MprAdminPortDisconnect Function

The MprAdminPortDisconnect function disconnects a connection on a specific port.

Syntax

C++
DWORD MprAdminPortDisconnect(
  __in  RAS_SERVER_HANDLE hRasServer,
  __in  HANDLE hPort
);

Parameters

hRasServer [in]

Handle to the RAS server on which to disconnect the port. Obtain this handle by calling MprAdminServerConnect.

hPort [in]

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.

ValueMeaning
ERROR_ACCESS_DENIED

The calling application does not have sufficient privileges.

ERROR_DDM_NOT_RUNNING

The Demand Dial Manager (DDM) is not running, possibly because the Dynamic Interface Manager (DIM) is configured to run only on a LAN.

ERROR_INVALID_PARAMETER

The handle to the RAS server or the handle to the port is invalid.

Other

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

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderMprapi.h
LibraryMprapi.lib
DLLMprapi.dll

See Also

Remote Access Service Administration Reference
RAS Administration Functions
MprAdminServerConnect
MprAdminPortEnum

Send comments about this topic to Microsoft

Build date: 11/19/2009

Tags :


Page view tracker