IUnsecuredApartment interface (wbemcli.h)
The IUnsecuredApartment interface is used to simplify the process of making asynchronous calls from a client process. When a client is making asynchronous calls, the roles of the client and the server are reversed. In this case, the client implements an object (IWbemObjectSink interface) and the server calls the methods of that object. Because of this, COM security rules for servers make it difficult for clients to make asynchronous calls. The primary difficulty is the fact that the client needs to inform COM that it will allow Windows Management to invoke methods on the client's object (IWbemObjectSink).
Inheritance
The IUnsecuredApartment interface inherits from the IUnknown interface. IUnsecuredApartment also has these types of members:
Methods
The IUnsecuredApartment interface has these methods.
IUnsecuredApartment::CreateObjectStub The CreateObjectStub method creates an object forwarder sink to assist in receiving asynchronous calls from Windows Management. |
Remarks
IUnsecuredApartment allows WMI to create a separate process to handle callbacks. Using this interface creates security risks, as described in Setting Security on an Asynchronous Call. Semisynchronous access or performing access checks are recommended instead of asynchronous calls. For more information and an example of using IUnsecuredApartment, see Lowering the Security for a Sink in a Separate Process. Use IWbemUnsecuredApartment::CreateSinkStub for a more secure approach.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | wbemcli.h (include Wbemidl.h) |