MprAdminAcceptNewConnection2 callback function

Remote Access Service calls the MprAdminAcceptNewConnection2 function each time a new user dials in and successfully completes RAS authentication. MprAdminAcceptNewConnection2 determines whether the user is allowed to connect.


BOOL CALLBACK MprAdminAcceptNewConnection2(
  _In_ RAS_CONNECTION_0 *pRasConnection0,
  _In_ RAS_CONNECTION_1 *pRasConnection1,
  _In_ RAS_CONNECTION_2 *pRasConnection2


pRasConnection0 [in]

Pointer to a RAS_CONNECTION_0 structure that describes this connection.

pRasConnection1 [in]

Pointer to a RAS_CONNECTION_1 structure that describes this connection.

pRasConnection2 [in]

Pointer to a RAS_CONNECTION_2 structure that describes this connection.

Return value

If MprAdminAcceptNewConnection2 accepts the connection, the return value should be TRUE.

If MprAdminAcceptNewConnection2 rejects the connection, the return value should be FALSE.


RAS supports multiple Administration DLLs. RAS calls the multiple implementations of the MprAdminAcceptNewConnection2 function in the order in which the DLLs are listed in the registry. The remote-access user is allowed to connect only if the implementation of MprAdminAcceptNewConnection2 in each of the DLLs accepts the connection. In other words, every DLL must accept the connection in order for the user to be allowed to connect.

Windows 2000 Server and earlier:  If MprAdminAcceptNewConnection2 does not accept the new connection, RAS does not call the MprAdminConnectionHangupNotification2 function.

Do not call any of the RAS Administration Functions or RAS User Administration Functions from inside MprAdminAcceptNewConnection2. Calls to these functions do not return when made from within a callout function.


Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]



See also

Remote Access Service Administration Reference
RAS Administration Functions
RAS Administration DLL