strict_context_handle 属性

[strict_context_handle] ACF 属性设置对上下文句柄的限制。

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

parameters

interface-attribute-list

应用于接口的其他 ACF 属性作为一个整体。 有效属性包括 auto_handleimplicit_handleexplicit_handle优化代码nocode。 用逗号分隔多个属性。

interface-name

接口的名称。

interface-definition-statements

一个或多个用于定义 接口元素的 MIDL 语句。

备注

通常,当对接口方法的调用生成上下文句柄时,该句柄可供任何其他接口自由使用。 使用 [strict_context_handle] 属性时,可以保证该接口中的方法仅接受由同一接口中的方法创建的上下文句柄。 在没有 [strict_context_handle] 的情况下编译的接口不能接受在用 [strict_context_handle] 编译的接口上创建的上下文句柄。

另请参阅

应用程序配置文件 (ACF)

代码

上下文句柄

context_handle_serialize

context_handle_noserialize

explicit_handle

implicit_handle

nocode

优化

type_strict_context_handle