[This is preliminary documentation and subject to change.]
The MprAdminInterfaceConnect function creates a connection to the specified WAN interface.
DWORD MprAdminInterfaceConnect(
MPR_SERVER_HANDLE hMprServer, // handle to router
HANDLE hInterface, // handle to interface
HANDLE hEvent, // event to signal when connection
// attempt is complete
BOOL fBlocking // flag to control
// synchronous vs.
// asychronous operation
);
If this parameter is NULL, and fBlocking is TRUE, then this call is synchronous, that is, the function will not return until the connection attempt has completed.
The caller must specify NULL for this parameter, if hMprserver specifies a remote router.
If hEvent is NULL, and this parameter is set to FALSE, the function will return immediately. A return value of PENDING indicates that the connection attempt was initiated successfully.
If hEvent is not NULL, this parameter is ignored.
The following table summarizes the relationship between hEvent and fBlocking.
hEvent | fBlocking | Result |
---|---|---|
Event Handle | Ignored | The call returns immediately. A return value of PENDING indicates that the attempt was initiated successfully. Wait on hEvent. When hEvent is signalled, use MprAdminInterfaceGetInfo to determine the success or failure of the connection attempt. |
NULL | TRUE | The call will not return until connection attempt has completed. |
NULL | FALSE | The call returns immediately. A return value of PENDING indicates that the attempt was initiated successfully. |
Windows NT: Use version 5.0 and later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in mprapi.h.
Import Library: Link with mprapi.lib.
MprAdminInterfaceCreate, MprAdminInterfaceDisconnect, MprAdminInterfaceGetInfo, MprAdminServerConnect