MprAdminInterfaceDisconnect

The MprAdminInterfaceDisconnect function disconnects a connected WAN interface.

DWORD MprAdminInterfaceDisconnect(
  MPR_SERVER_HANDLE hMprServer,  // handle to router
  HANDLE hInterface              // handle to interface
);

Parameters

hMprServer
[in] Handle to the Windows 2000 router on which to execute this call. Obtain this handle by calling MprAdminServerConnect.
hInterface
[in] Handle to the interface. This handle is obtained from a previous call to MprAdminInterfaceCreate.

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 privileges.
ERROR_DDM_NOT_RUNNING The Demand Dial Manager (DDM) is not running.
ERROR_INVALID_HANDLE The hInterface value is invalid.
ERROR_INTERFACE_NOT_CONNECTED This interface is not connected. Therefore, it cannot be disconnected.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Mprapi.h.
  Library: Use Mprapi.lib.

Router Management Reference, Router Administration Functions, MprAdminInterfaceCreate, MprAdminInterfaceConnect, MprAdminServerConnect