Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
COM
id
in
int
odl
out
ptr
ref
Expand Minimize

type_strict_context_handle attribute

Use the [type_strict_context_handle] in an ACF file to set restrictions on context handles.


[ 
    type_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

In order to use this attribute, the -target flag must be set to NT60 (or higher) when running midl.exe.

[type_strict_context_handle] is a functional superset of [strict_context_handle]. In [strict_context_handle], the type ID of the handle is always 0; in [type_strict_context_handle], a unique type ID is assigned by the MIDL compiler.

It is recommended to use [type_strict_context_handle] rather than [strict_context_handle]. Context handles are not associated with a specific type by default. When multiple types of context handles are used in the same process, it is possible for a malicious client to pass a context handle in place of another to produce undesirable results. The use of [type_strict_context_handle] allows applications to enforce context handle type consistency and prevent any mismatched context handle type usage.

A context handle attributed with [type_strict_context_handle] cannot also be attributed 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
strict_context_handle

 

 

Community Additions

ADD
Show:
© 2015 Microsoft