Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

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

Members

The IUnsecuredApartment interface inherits from the IUnknown interface. IUnsecuredApartment also has these types of members:

Methods

The IUnsecuredApartment interface has these methods.

MethodDescription
CreateObjectStub

Creates an object stub to assist in making asynchronous calls from a client process.

 

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. In Windows Server 2003, use IWbemUnsecuredApartment::CreateSinkStub for a more secure approach.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Wbemcli.h (include Wbemidl.h)

Library

Wbemuuid.lib

DLL

Unsecapp.exe

See also

Calling a Method
IWbemObjectSink
IWbemUnsecuredApartment
Setting Security on an Asynchronous Call
Lowering the Security for a Sink in a Separate Process
Performing Access Checks

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.