|
我在evc中写了个简单的短信发送程序
SMS_HANDLE smsHandle;
HRESULT hr = SmsOpen(SMS_MSGTYPE_TEXT, SMS_MODE_SEND, &smsHandle, NULL);
ASSERT(hr == ERROR_SUCCESS);//简化代码,未使用错误处理
TEXT_PROVIDER_SPECIFIC_DATA tpsd;
tpsd.dwMessageOptions = PS_MESSAGE_OPTION_STATUSREPORT;
tpsd.psMessageClass = PS_MESSAGE_CLASS1;
tpsd.psReplaceOption = PSRO_NONE;
SMS_ADDRESS smsaDestination;
smsaDestination.smsatAddressType = SMSAT_INTERNATIONAL;
lstrcpy(smsaDestination.ptsAddress, _T("8613588881696"));
TCHAR szMessage[] = _T("adfadsfasdgasryoufqrelfjbhldasfasdyrfasdfasd");
DWORD length = lstrlen(szMessage) * sizeof (TCHAR);//szMessage的字节长度
SMS_DATA_ENCODING encode = SMSDE_GSM;
hr = SmsSendMessage(smsHandle, NULL, &smsaDestination, NULL,
(PBYTE) szMessage, length,
(PBYTE) &tpsd, 12, encode,
SMS_OPTION_DELIVERY_NONE, NULL);
SmsClose (smsHandle);
ASSERT(hr == ERROR_SUCCESS);
包含了sms.h头文件,加载了sms.lib,编译能顺利通过,但连上模拟器执行报错:cannot execute program
我用的是evc4+SP4+PPC SDK 2003
我连smartphone 2003的模拟器没问题啊,难道PPC不支持,但微软的网站说PPC Phone Edition是支持sms的,
哪位高手解答一下
|
|