Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This interface manages access to objects and properties.
When to Implement
Distributed COM provides an implementation of the IAccessControlinterface.
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 CoCreateInstancefunction, specifying CLSID_DCOMAccessControl as the CLSID. This implementation supports the IPersistinterface to save the state of the access control object.
Note: |
---|
If you decide to implement IAccessControland pass your implementation to the CoInitializeSecurityfunction, 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 IAccessControlinterface 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 IAccessControlas the first ( pVoid) parameter. Then, COM calls IAccessControlmethods to determine access rights.
IAccessControlshould 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 IUnknowninterface.
IUnknown method | Description |
---|---|
Returns pointers to supported interfaces. |
|
Increments reference count. |
|
Decrements reference count. |
IAccessControl method | Description |
---|---|
Merges the new ACTRL_ACCESSlist with the existing access rights on the object. |
|
Replaces existing access rights with the specified list. |
|
Sets an item's owner or group. |
|
Removes explicit entries for the list of trustees. |
|
Gets the entire list of access rights and the owner and group for the object. |
|
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 |
Windows Mobile | Windows Mobile Version 5.0 and later |