Share via


SmsSetProfile (Compact 2013)

3/26/2014

Deprecated.

This function sets the SMS_PROFILE information for a radio.

This function replaces the deprecated SmsSetBroadcastMsgRanges and SmsSetSMSC functions.

Syntax

HRESULT SmsSetProfile(
  const DWORD dwRadioIndex,
  const SMS_PROFILE *const psmpSmsProfile
);

Parameters

  • dwRadioIndex
    [in] The index of the radio to use.
  • psmpSmsProfile
    [in] A pointer to an SMS_PROFILE structure.

Return Value

HRESULT is S_OK for success, a standard error value, or one of the error constants defined in SMS Specific Errors.

Example

HRESULT     hr              = NOERROR;
SMS_PROFILE *psmpSmsProfile = NULL;
int         RADIO_INDEX_1   = 1;

// Here, you populate psmpSmsProfile.

psmpSmsProfile->dwParams = SMS_PARAM_PROFILE_ALL 
                         ^ SMS_PARAM_PROFILE_PHONENUMBER 
                         ^ SMS_PARAM_PROFILE_CAPABILITY  ;

psmpSmsProfile->dwBroadcastMsgLangs = SMS_DCSLANG_UNKNOWN;

hr = SmsSetProfile( RADIO_INDEX_1, psmpSmsProfile );

Remarks

E_INVALIDARG is returned when the psmpSmsProfile dwSize input parameter is less than the size of a SMS_PROFILE structure.

Requirements

Header

sms.h

Library

sms.lib

See Also

Reference

Short Message Service Functions
SmsOpen
SmsClose
SMS Message Mode Constants

Other Resources

WaitForSingleObject
MsgWaitForMultipleObjects
SetEvent
ResetEvent
CloseHandle