MprAdminGetIpAddressForUser

[This is preliminary documentation and subject to change.]

RAS calls MprAdminGetIpAddressForUser once for each user that requires an IP address. RAS calls the function with the IP address that RAS selects for the user. The third-party DLL that implements this function may change this address to one of its own choosing.

DWORD MprAdminGetIpAddressForUser(
  WCHAR * lpwszUserName,    // pointer to username 
  WCHAR * lpwszPortName,    // pointer to port name 
  DWORD * lpdwIpAddress,    // pointer to IP address 
  BOOL *  bNotifyRelease    // notify DLL when user disconnects 
);
 

Parameters

lpwszUserName
Pointer to a Unicode string containing the name of the user requiring an IP address.
lpwszPortName
Pointer to a Unicode string containing the name of the port on which the user is attempting to connect.
lpdwIpAddress
Pointer to a DWORD variable. When RAS calls the function this variable contains either the IP address RAS intends to allocate for the user or zero. If the variable contains an IP address, the DLL can either accept the address or substitute a different one. If the variable contains a zero, the DLL must allocate an IP address for the user. If this variable is zero, and the DLL does not allocate an IP address, the user will not be able to connect.
bNotifyRelease
Pointer to a BOOL variable. If the DLL sets this variable to TRUE, RAS will call MprAdminReleaseIpAddress when the user disconnects. Otherwise, RAS will not notifiy the DLL when this IP address is released.

Return Values

If function succeeds, the return value should be NO_ERROR.

If the function returns anything other than NO_ERROR, RAS will terminate the connection.

QuickInfo

  Windows NT: Use version 5.0 and later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in mprapi.h.
  Import Library: user-defined.

See Also

MprAdminReleaseIpAddress