|
发表于 2006-6-2 19:41:00
|
显示全部楼层
订阅垃圾短信是吧?给你一段参考,比较旧,0452的。
void XXXCLUB_SUBSCRIBE_VIA_SMS(S8 number[], S8 code[])
{
EMSData * pEMS;
int result;
history temphistory;
S8 textbufucs2[30*ENCODING_LENGTH];
S8 codebufucs2[30*ENCODING_LENGTH];
memset (& temphistory, 0, sizeof (temphistory));
GetHistory (SCR_ID_MSG_WRITE, &temphistory);
memset(textbufucs2, 0, 30*ENCODING_LENGTH);
memset(codebufucs2, 0, 30*ENCODING_LENGTH);
memset(g_msg_cntx.smsPhoneNumber, 0, (MAX_DIGITS+1)*ENCODING_LENGTH);
AnsiiToUnicodeString((S8*)textbufucs2, (S8*)number);
AnsiiToUnicodeString(codebufucs2, (S8*)code);
pfnUnicodeStrcat(g_msg_cntx.smsPhoneNumber, textbufucs2);
pEMS = GetEMSDataForEdit (0, 1);
result = AppendEMSString (INPUT_TYPE_ALPHANUMERIC_SENTENCECASE,
pEMS, (U8*)codebufucs2, SMSAL_DEFAULT_DCS, temphistory.guiBuffer );
if(!result)
{
DisplayPopup((PU8)GetString(STR_STATUS_REPORT_MESSAGE_NOT_DELIVERD_MSG), IMG_GLOBAL_UNFINISHED, 1, 1000, (U8)ERROR_TONE);
return;
}
g_msg_cntx.sendMessageCase=SEND_CASE_SEND_ONLY;
mmi_msg_send_msg_to_entry();
}
void EntryXXXCLUBSMS0Subscribe(void)
{
if(g_msg_cntx.msg_init!=TRUE)
{
DisplayPopup((PU8)GetString(STR_SMS_MSG_NOT_READY_YET), IMG_GLOBAL_UNFINISHED, 1, 1000, (U8)ERROR_TONE);
return;
}
XXXCLUB_SUBSCRIBE_VIA_SMS("1861", "XXX");
} |
|