MprAdminServerConnect

The MprAdminServerConnect function establishes a connection to a Windows 2000 router for the purpose of administering that router. Call this function before making any other calls to the server. Use the handle returned in subsequent calls to administer interfaces on the server.

DWORD MprAdminServerConnect(
  LPWSTR lpwsServerName,          // name of router
  MPR_SERVER_HANDLE *phMprServer  // handle to router
);

Parameters

lpwsServerName
[in] Pointer to a Unicode string that specifies the name of the remote server.
phMprServer
[out] Pointer to a HANDLE variable that receives a handle to the server. Use this handle in subsequent calls to administer the server.

Return Values

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 privilege.

Requirements

  Windows NT/2000: Requires Windows 2000. Available as a redistributable for Windows NT 4.0.
  Header: Declared in Mprapi.h.
  Library: Use Mprapi.lib.

See Also

Router Management Reference, Router Administration Functions, MprAdminServerDisconnect