|
memset(&rilMsg, 0, sizeof(RILMESSAGE));
rilMsg.cbSize = sizeof(RILMESSAGE);
rilMsg.dwType = RIL_MSGTYPE_OUT_SUBMIT;
rilMsg.dwParams |= RIL_PARAM_M_TYPE;
rilMsg.dwFlags = RIL_MSGFLAG_REPLYPATH;
rilMsg.dwParams |= RIL_PARAM_M_FLAGS;
// StringToRILAddress(L"15818682612", RIL_ADDRTYPE_UNKNOWN, &rilMsg.msgOutSubmit.raDestAddress);
rilMsg.msgOutSubmit.raDestAddress.cbSize = sizeof(RILADDRESS);
rilMsg.msgOutSubmit.raDestAddress.dwType = RIL_ADDRTYPE_UNKNOWN/*RIL_ADDRTYPE_NATIONAL*/;
rilMsg.msgOutSubmit.raDestAddress.dwNumPlan = RIL_NUMPLAN_TELEPHONE/*RIL_NUMPLAN_UNKNOWN*/;
wcscpy(rilMsg.msgOutSubmit.raDestAddress.wszAddress, L"15815369852");
rilMsg.msgOutSubmit.raDestAddress.dwParams = RIL_PARAM_A_ALL;
rilMsg.dwParams |= RIL_PARAM_M_DESTADDRESS;
rilMsg.msgOutSubmit.dwProtocolID = RIL_MSGPROTOCOL_SMETOSME;
rilMsg.dwParams |= RIL_PARAM_M_PROTOCOLID;
rilMsg.msgOutSubmit.dwVPFormat = RIL_MSGVP_NONE;
rilMsg.dwParams |= RIL_PARAM_M_VPFORMAT;
rilMsg.msgOutSubmit.rmdDataCoding.cbSize = sizeof(RILMSGDCS);
rilMsg.msgOutSubmit.rmdDataCoding.dwAlphabet = RIL_DCSALPHABET_UCS2;
rilMsg.msgOutSubmit.rmdDataCoding.dwFlags = RIL_DCSFLAG_NONE;
rilMsg.msgOutSubmit.rmdDataCoding.dwType = RIL_DCSTYPE_GENERAL/*RIL_DCSTYPE_MSGCLASS*/;
rilMsg.msgOutSubmit.rmdDataCoding.dwMsgClass = RIL_DCSMSGCLASS_1;
rilMsg.msgOutSubmit.rmdDataCoding.dwParams = RIL_PARAM_MDCS_FLAGS | RIL_PARAM_MDCS_ALPHABET | RIL_PARAM_MDCS_TYPE | RIL_PARAM_MDCS_MSGCLASS;
rilMsg.dwParams |= RIL_PARAM_M_DATACODING;
wcscpy((TCHAR *)rilMsg.msgOutSubmit.rgbMsg, TEXT("测试"));
rilMsg.dwParams |= RIL_PARAM_M_MSG;
rilMsg.msgOutSubmit.cchMsgLength = 14;
rilMsg.dwParams |= RIL_PARAM_M_MSGLENGTH;
m_hr = RIL_SendMsg(m_ril, &rilMsg, NULL); |
|