Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PString PRemoteConnection::GetAddress (  ) 

Get the IP address in dotted decimal form for the RAS connection.

Returns:
String for IP address, or empty string if none.

Definition at line 415 of file remconn.cxx.

{
  if (Ras.GetProjectionInfo == NULL) {
    osError = ERROR_CALL_NOT_IMPLEMENTED;
    return PString();
  }

  if (rasConnection == NULL) {
    osError = ERROR_INVALID_HANDLE;
    return PString();
  }

  RASPPPIP ip;
  ip.dwSize = sizeof(ip);
  DWORD size = sizeof(ip);
  osError = Ras.GetProjectionInfo(rasConnection, RASP_PppIp, &ip, &size);
  if (osError != ERROR_SUCCESS)
    return PString();

  osError = ip.dwError;
  if (osError != ERROR_SUCCESS)
    return PString();

  return ip.szIpAddress;
}


Generated by  Doxygen 1.6.0   Back to index