MprAdminPortReset function (mprapi.h)

The MprAdminPortReset function resets the communication device attached to the specified port.

Syntax

DWORD MprAdminPortReset(
  [in] RAS_SERVER_HANDLE hRasServer,
  [in] HANDLE            hPort
);

Parameters

[in] hRasServer

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

[in] hPort

Handle to the port to be reset. 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
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 4.0 if the RRAS redistributable is installed. However, the version of Mprapi.dll that ships with the RRAS redistributable exports the function as RasAdminPortReset rather than MprAdminPortReset. 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

See also

MprAdminPortEnum

MprAdminServerConnect

RAS Administration Functions

Remote Access Service Administration Reference