IUnsecuredApartment interface

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).

Methods

The IUnsecuredApartment interface has these methods.

Method Description
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

   
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header wbemcli.h (include Wbemidl.h)

See Also

Calling a Method

IWbemObjectSink

IWbemUnsecuredApartment

Lowering the Security for a Sink in a Separate Process

Performing Access Checks

Setting Security on an Asynchronous Call