[This is preliminary documentation and subject to change.]
Use the MprAdminInterfaceGetCredentials function to retrieve the domain, username, and password for dialing out on the specified demand-dial interface.
DWORD MprAdminInterfaceGetCredentials(
LPWSTR lpwsServer, // string containing name
// of router
LPWSTR lpwsInterfaceName, // string containing name
// of interface
LPWSTR lpwsUserName, // string to receive username
LPWSTR lpwsPassword, // string to receive password
LPWSTR lpwsDomainName // string to receive domain name
);
This parameter is optional. If the caller specifies NULL for this parameter, the call is executed on the local machine.
This parameter is optional. If the caller specifies NULL for this parameter, the function will not return the user name.
This parameter is optional. If the caller specifies NULL for this parameter, the function will not return the password.
This parameter is optional. If the caller specifies NULL for this parameter, the function will not return the domain name.
The lpwsInterfaceName parameter is NULL.
All three of the lpwsUserName, lpwsPassword, and lpwsDomainName parameters are NULL.
The lpwsUserName, lpwsPassword, and lpwsDomainName parameters are optional. However, if the caller specifies NULL for all three parameters, MprAdminInterfaceGetCredentials will return ERROR_INVALID_PARAMETER.
The constants UNLEN, PWLEN, and DNLEN are the maximum lengths for the username, password, and domain name. These constants are defined in lmcons.h.
Note that the order of the parameters in MprAdminInterfaceGetCredentials is different from MprAdminInterfaceSetCredentials.
FormatMessage, MprAdminInterfaceSetCredentials