CTextMessage::GetFirstProvider Method  
 
BOOL GetFirstProvider(
  LPSMSPROVIDER lpProvider  
);

The GetFirstProvider method returns information about the first supported wireless service provider.

Parameters

lpProvider
A pointer to an SMSPROVIDER structure that will contain information about the service provider. This parameter cannot be NULL.

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 SmsGetLastError.

Remarks

The GetFirstProvider method is used in conjunction with GetNextProvider to enumerate all of the supported wireless providers available to the client. These two methods can be used as an alternative to the EnumProviders method.

Example

SMSPROVIDER smsProvider;

BOOL bResult = pTextMessage->GetFirstProvider(&smsProvider);
while (bResult)
{
    pListBox->AddString(smsProvider.szName);
    bResult = pTextMessage->GetNextProvider(&smsProvider);
}

Requirements

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

See Also

EnumProviders, GetGateway, GetNextProvider, SMSPROVIDER