IAccessControl (Windows Embedded CE 6.0)

1/6/2010

This interface manages access to objects and properties.

When to Implement

Distributed COM provides an implementation of the IAccessControl interface.

COM servers can use this implementation to help protect their objects from unauthorized access in a manner that is supported by Microsoft® Windows® 95, Microsoft Windows 98, Microsoft Windows NT®, and Microsoft Windows 2000.

To get a pointer to this implementation, call the CoCreateInstance function, specifying CLSID_DCOMAccessControl as the CLSID. This implementation supports the IPersist interface to save the state of the access control object.

Note

If you decide to implement IAccessControl and pass your implementation to the CoInitializeSecurity function, you must ensure that it is completely thread-safe, because COM can call it on any thread, at any time.

In addition to the COM implementation of IAccessControl, another implementation is supplied for storage and Directory Service objects.

When to Use

Call methods of the IAccessControl interface to manage access to objects and properties and to obtain access information.

This interface primarily sets process security with a call to CoInitializeSecurity, specifying capability flag EOAC_ACCESS_CONTROL and providing a pointer to an instance of IAccessControl as the first (pVoid) parameter. Then, COM calls IAccessControl methods to determine access rights.

IAccessControl should only be used to manage access rights. To manage launch permissions, use DCOMCNFG or set the LaunchPermission named value under the APPID registry key.

COM formats all character strings as Unicode. You must convert all ANSI strings to Unicode before passing them to methods of an implementation of IAccessControl.

Methods

The following table shows the methods for this interface in the order that the compiler calls the methods. Like all COM interfaces, this interface inherits the methods for the IUnknown interface.

IUnknown method Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IAccessControl method Description

GrantAccessRights

Merges the new ACTRL_ACCESS list with the existing access rights on the object.

SetAccessRights

Replaces existing access rights with the specified list.

SetOwner

Sets an item's owner or group.

RevokeAccessRights

Removes explicit entries for the list of trustees.

GetAllAccessRights

Gets the entire list of access rights and the owner and group for the object.

IsAccessAllowed

Determines whether the trustee has access to the object/property.

Remarks

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

Header iaccess.h
Library ole32.lib, uuid.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

COM Interfaces
CoCreateInstance
CoInitializeSecurity
IPersist