RpcMgmtStopServerListening function
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 RPC_ENTRY 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.
The server must be listening for remote procedure calls for this function to succeed. If the server is not listening, the function fails.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also