strict_context_handle attribute

The [strict_context_handle] ACF attribute sets restrictions on context handles.

[ 
    strict_context_handle 
    [, interface-attribute-list] 
] 
interface interface-name
{
    interface-definition-statements
}

Parameters

interface-attribute-list

Other ACF attributes that apply to the interface as a whole. Valid attributes include auto_handle, implicit_handle, explicit_handle, and optimize, code, or nocode. Separate multiple attributes with commas.

interface-name

The name of the interface.

interface-definition-statements

One or more MIDL statements that define the elements of the interface.

Remarks

Normally, when a call to an interface method generates a context handle, that handle becomes freely available to any other interface. When you use the [strict_context_handle] attribute you guarantee that the methods in that interface will only accept context handles that were created by a method from the same interface. Interfaces compiled without [strict_context_handle] cannot accept context handles created on interfaces compiled with [strict_context_handle].

See also

Application Configuration File (ACF)

code

Context Handles

context_handle_serialize

context_handle_noserialize

explicit_handle

implicit_handle

nocode

optimize

type_strict_context_handle