Freigeben über


IClientSecurity (Compact 2013)

3/26/2014

This interface gives the client control over the security settings for each individual interface proxy of an object. The methods of IClientSecurity can be used to set or query the security settings of a specific interface proxy or to copy an interface proxy.

Every object has one proxy manager, and every proxy manager exposes the IClientSecurity interface automatically. Therefore, the client can query the proxy manager of an object for IClientSecurity, using any interface pointer on the object.

If the QueryInterface call succeeds, the IClientSecurity pointer can be used to call an IClientSecurity method, passing a pointer to the interface proxy that the client is interested in.

If a call to QueryInterface for IClientSecurity fails, either the object is implemented in-process or it is remoted by a custom marshaler that does not support COM security functionality. (A custom marshaler can support COM security functionality by offering the IClientSecurity interface to the client.)

The interface proxies passed as parameters to IClientSecurity methods must be from the same object as the IClientSecurity interface. That is, each object has a distinct IClientSecurity interface: calling IClientSecurity on one object and passing a proxy to another object will not work.

Also, you cannot pass an interface to an IClientSecurity method if the interface does not use a proxy. This means that interfaces implemented locally by the proxy manager cannot be passed to IClientSecurity methods, except for IUnknown, which is the exception to this rule.

For more information about proxies, see IMarshal Default Implementation.

When to Implement

The proxy manager for each object provides an implementation of IClientSecurity, so you would typically not implement this interface.

However, if you are defining objects that support custom marshaling, you can choose to implement IClientSecurity on the objects' custom proxies to maintain a consistent programming model for the objects' client applications.

You can also support this interface on in-process objects.

When to Use

Call the methods of this interface to examine or modify the security settings of a particular connection to an out-of-process object.

For example, you might temporarily establish a higher security level - one with complex encryption - only for the period when sensitive information or data is being sent to the object.

Alternately, you might establish different proxies to the same object with different security levels. You could use these security levels to support different clients that are calling your object or to support different operations within your application.

Methods in Vtable Order

IUnknown method

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments the reference count.

Release

Decrements the reference count.

Method

Description

QueryBlanket

Retrieves authentication information.

SetBlanket

Sets the authentication information that will be used to make calls on the specified proxy.

CopyProxy

Makes a copy of the specified proxy.

Remarks

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

Requirements

Header

objidl.h,
objidl.idl

Library

ole32.lib,
uuid.lib

See Also

Reference

COM Interfaces