The RpcServerInterfaceGroupDeactivate function tells the RPC runtime to attempt to close the given interface group, optionally aborting the operation if there is outstanding client activity.
RPC_STATUS RpcServerInterfaceGroupDeactivate( RPC_INTERFACE_GROUP IfGroup, unsigned long ForceDeactivation );
A RPC_INTERFACE_GROUP from RpcServerInterfaceGroupCreate that defines the interface group to deactivate
If TRUE, the RPC runtime should ignore client activity and unconditionally deactivate the interface group. If FALSE, the operation should be aborted if new activity takes place.
||The call succeeded.|
||ForceDeactivation is FALSE and there is outstanding client activity.|
RpcServerInterfaceGroupDeactivate is used by server applications to unregister the interfaces and endpoints in an interface group. It does the bulk of the shutdown work that RPC server applications need to do. It performs the following operations:
- Unregisters the endpoints and interfaces from the RPC endpoint mapper.
- Unregisters the endpoints from the server runtime.
- Unregisters the interfaces from the server runtime.
- Tells the runtime to stop listening for calls if no other interfaces are present.
If ForceDeactivation is FALSE, RpcServerInterfaceGroupDeactivate will only deactivate the interface group if there is no outstanding client activity. If new activity arrives during the deactivation process, RPC_S_SERVER_TOO_BUSY is returned. In this case, the operation is rolled back and the interface group will continue to receive and dispatch calls.
If ForceDeactivation is TRUE, RpcServerInterfaceGroupDeactivate does not fail.
Service applications can call RpcServerInterfaceGroupDeactivate with ForceDeactivation set to FALSE from their idle callback function RpcServerInterfaceGroupCreate. When used in conjunction with RPC service start triggers, this enables them to safely idle stop without missing calls from potential clients.
|Minimum supported client||Windows 8 [desktop apps only]|
|Minimum supported server||Windows Server 2012 [desktop apps only]|
|Header||rpcdce.h (include Rpc.h)|