RpcServerUnregisterIf
The RpcServerUnregisterIf
function unregisters an interface from the RPC run-time library.
This function
is supported by both 32-bit platforms Windows NT and Windows 95.
#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcServerUnregisterIf(
RPC_IF_HANDLE IfSpec, |
|
UUID *
MgrTypeUuid, |
|
unsigned int WaitForCallsToComplete |
|
); |
|
Parameters
IfSpec
Specifies the
interface to unregister.
Specify a
null value to unregister all interfaces previously registered with the type
UUID value specified in the MgrTypeUuid argument.
MgrTypeUuid
Points to the
type UUID of the manager entry-point vector (EPV) to unregister. The value of MgrTypeUuid
should be the same value as was provided in a call to the RpcServerRegisterIf
or RpcServerRegisterIfEx routine.
Specify a
null value to unregister the interface specified in the IfSpec argument
for all previously registered type UUIDs.
Specify a nil
UUID to unregister the MIDL-generated default manager EPV. In this case, all manager
EPVs registered with a non-nil type UUID remain registered.
WaitForCallsToComplete
Specifies a
flag that indicates whether to unregister immediately or to wait until all
current calls are complete.
Specify a
value of zero to disregard calls in progress and unregister immediately.
Specify any non-zero value to wait until all active calls complete.
Remarks
A server
calls the RpcServerUnregisterIf routine to remove the association between
an interface and a manager EPV.
Specify the
manager EPV to remove in the MgrTypeUuid argument by providing the type
UUID value that was specified in a call to the RpcServerRegisterIf
routine. Once unregistered, an interface is no longer available to client
applications.
When an
interface is unregistered, the RPC run-time library stops accepting new calls
for that interface. Executing calls on the interface are allowed to complete,
including callbacks.
The following
table summarizes the behavior of RpcServerUnregisterIf:
IfSpec |
MgrTypeUuid |
Behavior |
Non-null |
Non-null |
Unregisters
the manager EPV associated with the specified arguments. |
Non-null |
NULL |
Unregisters
all manager EPVs associated with the IfSpec argument. |
NULL |
Non-null |
Unregisters
all manager EPVs associated with the MgrTypeUuid argument. |
NULL |
NULL |
Unregisters
all manager EPVs. This call has the effect of preventing the server from
receiving any new remote procedure calls because all the manager EPVs for all
interfaces have been unregistered. |
Note If IfSpec
is NULL, this function will leave auto-listen interfaces registered.
Auto-listen interfaces must be individually unregistered. See RpcServerRegisterIfEx
for more details.
Return Values
Value |
Meaning |
RPC_S_OK |
Success |
RPC_S_UNKNOWN_MGR_TYPE |
Unknown
manager type |
RPC_S_UNKNOWN_IF |
Unknown
interface |
See Also