MprAdminPortDisconnect function (mprapi.h)
The MprAdminPortDisconnect function disconnects a connection on a specific port.
Syntax
DWORD MprAdminPortDisconnect(
[in] RAS_SERVER_HANDLE hRasServer,
[in] HANDLE hPort
);
Parameters
[in] hRasServer
Handle to the RAS server on which to disconnect the port. Obtain this handle by calling MprAdminServerConnect.
[in] hPort
Handle to the port to disconnect. Obtain this handle by calling MprAdminPortEnum.
Return value
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is one of the following error codes.
Value | Meaning |
---|---|
|
The calling application does not have sufficient privileges. |
|
The Demand Dial Manager (DDM) is not running, possibly because the Dynamic Interface Manager (DIM) is configured to run only on a LAN. |
|
The handle to the RAS server or the handle to the port is invalid. |
|
An error from MprError.h, RasError.h, or WinError.h. |
Remarks
This function is available on Windows NT Server 4.0 if the RRAS redistributable is installed. However, the version of Mprapi.dll that ships with the RRAS redistributable exports the function as RasAdminPortDisconnect rather than MprAdminPortDisconnect. Therefore, when using the RRAS redistributable, use LoadLibrary and GetProcAddress to access this function.
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 | mprapi.h |
Library | Mprapi.lib |
DLL | Mprapi.dll |