RpcMgmtStopServerListening function (rpcdce.h)
The RpcMgmtStopServerListening function tells a server to stop listening for remote procedure calls. This function will not affect auto-listen interfaces. See RpcServerRegisterIfEx for more details.
Syntax
RPC_STATUS RpcMgmtStopServerListening(
RPC_BINDING_HANDLE Binding
);
Parameters
Binding
To direct a remote application to stop listening for remote procedure calls, specify a server binding handle for that application. To direct your own (local) application to stop listening for remote procedure calls, specify a value of NULL.
Return value
Value | Meaning |
---|---|
|
The call succeeded. |
|
The binding handle was invalid. |
|
This was the wrong kind of binding for the operation. |
Remarks
An application calls the RpcMgmtStopServerListening function to direct a server to stop listening for remote procedure calls. If DontWait was TRUE, the application should call RpcMgmtWaitServerListen to wait for all calls to complete.
When it receives a stop-listening request, the RPC run-time library stops accepting new remote procedure calls for all registered interfaces. Executing calls are allowed to complete, including callbacks. After all calls complete, this function signals RpcServerListen function that it must stop listening and return to the caller. If the DontWait parameter of RpcServerListen was set to TRUE, the application calls RpcMgmtWaitServerListen for all remaining calls to complete.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | rpcdce.h (include Rpc.h) |
Library | Rpcrt4.lib |
DLL | Rpcrt4.dll |