CTextMessage::GetAddress Method  
 
BOOL GetAddress(
  LPCTSTR lpszPhoneNumber,  
  LPTSTR lpszAddress,  
  INT nMaxLength,  
);
BOOL GetAddress(
  LPCTSTR lpszPhoneNumber,  
  CString& strAddress  
);

The GetAddress method returns the email address associated with the specified phone number.

Parameters

lpszPhoneNumber
A null-terminated string that specifies the phone number of the mobile device.
lpszAddress
A null-terminated string that will contain the email address associated with the specified phone number when the method returns. If MFC or ATL is being used, an alternate version of this function will return the address in a CString type variable.
nMaxLength
The maximum number of characters that may be copied into the string buffer.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The GetAddress method is used to determine the email address associated with a mobile device. Sending an email message to this address will forward that message to the device as a text message. Internally, this method calls GetGateway and returns the address specified in the SMSGATEWAY structure.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cstxtv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also