RpcServerUnregisterIfEx 函数 (rpcdce.h)

RpcServerUnregisterIfEx 函数从 RPC 运行时库注册表中删除接口。 此函数扩展 RpcServerUnregisterIf 函数的功能。

语法

RPC_STATUS RpcServerUnregisterIfEx(
  [in] RPC_IF_HANDLE IfSpec,
  [in] UUID          *MgrTypeUuid,
  [in] int           RundownContextHandles
);

参数

[in] IfSpec

要从注册表中删除的接口。

指定一个 null 值,以删除以前使用 MgrTypeUuid 参数中指定的类型 UUID 值注册的所有接口。

[in] MgrTypeUuid

指向要从注册表中删除的管理器入口点矢量 (EPV) 的类型 UUID 的指针。 MgrTypeUuid 的值应与调用 RpcServerRegisterIf 函数、RpcServerRegisterIf2 函数或 RpcServerRegisterIfEx 函数中提供的值相同。

指定一个 null 值,以从注册表中删除所有以前注册的类型 UUID 的 IfSpec 参数中指定的接口。

指定 nil UUID 以从注册表中删除 MIDL 生成的默认管理器 EPV。 在这种情况下,使用非 nil 类型 UUID 注册的所有管理器EPV将保持注册状态。

[in] RundownContextHandles

指定是否为活动上下文句柄调用 rundown。 如果不是零,则接口上的所有调用完成后,将调用中断。 如果设置为零,则 RPC 运行时假定服务器已销毁其上下文句柄部分,并且不会调用运行例程。

返回值

返回 RPC 状态。 RpcServerUnregisterIfEx 不会失败,除非提供无效值。

注意 有关有效错误代码的列表,请参阅 RPC 返回值
 

注解

RpcServerUnregisterIfEx 函数等待给定接口上的所有调用完成,然后才能注销上下文句柄。

RpcServerUnregisterIfEx 函数提供 RpcServerUnregisterIf 函数中提供的所有功能。 此外, RpcServerUnregisterIfEx 函数会注销由给定接口注册的所有上下文句柄。 接口必须使用 strict_context_handle 属性,否则结果为未定义。

RpcServerUnregisterIfEx 是唯一一个在进程关闭之外通过活动上下文句柄提供 DLL 安全卸载的函数。 它仅在 Windows XP 和更高版本的 Windows 上可用。

要求

要求
最低受支持的客户端 Windows XP [仅限桌面应用]
最低受支持的服务器 Windows Server 2003 [仅限桌面应用]
目标平台 Windows
标头 rpcdce.h (包括 Rpc.h)
Library Rpcrt4.lib
DLL Rpcrt4.dll

另请参阅

RPC_MGR_EPV

注册接口

RpcServerRegisterIf

RpcServerRegisterIf2

RpcServerRegisterIfEx

RpcServerUnregisterIf

使用上下文句柄