Export (0) Print
Expand All
Expand Minimize

RpcServerUnregisterIfEx function

The RpcServerUnregisterIfEx function removes an interface from the RPC run-time library registry. This function extends the functionality of the RpcServerUnregisterIf function.

Syntax


RPC_STATUS RpcServerUnregisterIfEx(
  _In_  RPC_IF_HANDLE IfSpec,
  _In_  UUID __RPC_FAR *MgrTypeUuid,
  _In_  int RundownContextHandles
);

Parameters

IfSpec [in]

Interface to remove from the registry.

Specify a null value to remove all interfaces previously registered with the type UUID value specified in the MgrTypeUuid parameter.

MgrTypeUuid [in]

Pointer to the type UUID of the manager entry-point vector (EPV) to remove from the registry. The value of MgrTypeUuid should be the same value as was provided in a call to the RpcServerRegisterIf function, RpcServerRegisterIf2 function, or the RpcServerRegisterIfEx function.

Specify a null value to remove the interface specified in the IfSpec parameter for all previously registered type UUIDs from the registry.

Specify a nil UUID to remove the MIDL-generated default manager EPV from the registry. In this case, all manager EPVs registered with a non-nil type UUID remain registered.

RundownContextHandles [in]

Specifies whether rundown is called for active context handles. If non-zero, the rundown is called once all calls on the interface have completed. If set to zero, the RPC run time assumes the server has already destroyed its portion of the context handle and it will not call the rundown routines.

Return value

Returns RPC status. RpcServerUnregisterIfEx does not fail unless supplied with invalid values.

Note  For a list of valid error codes, see RPC Return Values.

Remarks

The RpcServerUnregisterIfEx function waits for all calls on a given interface to complete before unregistering the context handles.

The RpcServerUnregisterIfEx function supplies all the functionality provided in the RpcServerUnregisterIf function. In addition, the RpcServerUnregisterIfEx function unregisters all context handles registered by the given interface. The interface must use the strict_context_handle attribute, otherwise the results are undefined.

RpcServerUnregisterIfEx is the only function that provides safe unloading of a DLL with active context handles outside of process shutdown. It is available on Windows XP and later versions of Windows only.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Rpcdce.h (include Rpc.h)

Library

Rpcrt4.lib

DLL

Rpcrt4.dll

See also

Registering Interfaces
RPC_MGR_EPV
RpcServerRegisterIf
RpcServerRegisterIf2
RpcServerRegisterIfEx
RpcServerUnregisterIf
Using Context Handles

 

 

Community Additions

ADD
Show:
© 2014 Microsoft