【VB】短信pdu生成代码

Option Explicit Public Function DecodeUnicode(ByVal UnicodeString As String) As String Dim strUnicode As String Dim objDll As New myVBDll On Error GoTo ErrorUnicode strUnicode = UnicodeString DecodeUnicode = objDll.Unicode2GB(strUnicode) Set objDll = Nothing Exit Function ErrorUnicode: Set objDll = Nothing MsgBox "Error:" & Err & "." & vbCrLf & Err.Description End Function '由于位置上略有处理,实际号码应为: 8613805515500( 字母 F 意指长度减 1), '这是作者所在地 GSM 短信息中心的号码。 ( 号码处理方法为 , 如果为 +86 开始 , 将 + 号去掉 , '然后判断是否为偶数 , 不是在末尾补 F, 然后将奇数位和偶数位互换 ) Public Function FormatPhoneNum(ByRef phoneNum As String, ByRef tonNpiFlag As String) As Integer Dim i As Integer Dim iAsc As Integer Dim strChar As String ' If Len(phoneNum) = 14 Then ' If Left(phoneNum, 3) = "+86" Then ' phoneNum = Right(phoneNum, 11) ' Else ' If Len(phoneNum) <> 11 Then ' FormatSMSC = 0 ' Exit Function ' End If ' End If ' End If If Len(phoneNum) <= 0 Then FormatPhoneNum = 0 Exit Function End If If Left(phoneNum, 3) = "+86" Then phoneNum = Right(phoneNum, 13) tonNpiFlag = "91" Else ' If Len(phoneNum) <> 11 Then ' FormatSMSC = 0 ' Exit Function ' End If tonNpiFlag = "81" End If For i = 1 To Len(phoneNum) strChar = Mid(phoneNum, i, 1) iAsc = Asc(strChar) If iAsc > 57 Or iAsc < 48 Then FormatPhoneNum = 0 Exit Function End If Next i If Len(phoneNum) Mod 2 <> 0 Then phoneNum = phoneNum & "F" End If Dim strTmp2, strTmp1 As String strTmp1 = "" For i = 1 To Len(phoneNum) Step 2 strTmp2 = Mid(phoneNum, i, 2) strTmp1 = strTmp1 & Right(strTmp2, 1) & Left(strTmp2, 1) Next i phoneNum = strTmp1 ' Debug.Print phoneNum FormatPhoneNum = Len(phoneNum) - 1 End Function '功能: 生成PDU串 '输入: 短信息内容、目标手机号码、[可选的短信服务中心号码] '输出: 生成的PDU串 '返回: 整个字串的长度 Public Function GenPDU(ByVal SMSText As String, _ ByVal DestNo As String, _ Optional ByVal ServiceNo As String) As SMSPDUStruct Dim msg As SMSPDUStruct If Len(DestNo) = 0 Then ' genPDU = 0 Exit Function End If ' If ServiceNo = "" Then ' ServiceNo = "+8613800769500" ' End If ' If Len(SMSText) > 70 Then ' SMSText = Left(SMSText, 70) ' ' ' End If msg.SMSC = ServiceNo msg.DestPhoneNum = DestNo FormatPhoneNum msg.SMSC, msg.SMSCType msg.SMSCLen = Int2HexStr(Len(msg.SMSC & msg.SMSCType) / 2) '短信息中心地址长度。(短信息中心号码类型 + 短信息中心号码长度 /2 的十六进制表示) ' msg.DestPhoneNumType 被叫号码类型。有+86时候为"91",否则为"81" msg.DestPhoneNumLen = Int2HexStr(FormatPhoneNum(msg.DestPhoneNum, msg.DestPhoneNumType)) ''被叫号码长度。被叫号码长度的十六进制表示。 Dim iLen As Integer SMSText = GB2Unicode(SMSText) '把汉字符转化为UNICODE的HEX编码字符串 ' strChar = Hex(iLen) ' If Len(strChar) < 2 Then strChar = "0" & strChar ' strTmp = strChar & SMSText ' If flash = True Then ' SMSText = "0001" & SMSText ' End If msg.MSGContent = SMSText ' Debug.Print "total:" & SMSText iLen = Len(SMSText) / 2 ' iLen = Len(SMSText) ' Debug.Print SMSText If iLen > 140 Then Dim totalMsgCount As Integer Dim currentMsgCount As Integer totalMsgCount = 0 currentMsgCount = 0 If iLen Mod 134 > 0 Then totalMsgCount = iLen / 134 + 1 Else totalMsgCount = iLen / 134 + 1 End If msg.MsgHead = "11" '文件头字节 (header byte, 是一种 bitmask) 。这里 11 指正常地发送短信息。 msg.TPMR = "00" '信息参考号。( TP-MR ) msg.TPPID = "00" '‘一般都是 00 ,表示点到点的标准短信 msg.TPVP = "FF" '‘有效期 (TP-VP), 短信的有效时间 ,00或FF表示长期有效 msg.TPDSC = "08" '用户信息编码方式 (TP-DCS) , 7-bit 编码( 08 : UCS2 编码 汉字一般为08) Dim i As Integer For i = 1 To totalMsgCount - 1 If Len(ServiceNo) = 0 Then msg.PDU = msg.SMSCLen & msg.MsgHead & msg.TPMR & msg.DestPhoneNumLen & msg.DestPhoneNumType & msg.DestPhoneNum & _ msg.TPPID & msg.TPDSC & msg.TPVP & Int2HexStr(140) & "05000339" & Int2HexStr(totalMsgCount) & Int2HexStr(i) & Mid(msg.MSGContent, (i - 1) * 268 + 1, 268) ' Msg.PDU = Msg.SMSCLen & Msg.MsgHead & Msg.TPMR & Msg.DestPhoneNumLen & Msg.DestPhoneNumType & Msg.DestPhoneNum & _ ' Msg.TPPID & Msg.TPDSC & Msg.TPVP & Msg.MSGLen & genWbxml("wap.dg1860.com", "好1860") msg.PDULen = Len(msg.PDU) / 2 - 1 Else msg.PDU = msg.SMSCLen & msg.SMSCType & msg.SMSC & "44" & msg.DestPhoneNumLen & msg.DestPhoneNumType & msg.DestPhoneNum & _ msg.TPPID & msg.TPDSC & msg.TPVP & Int2HexStr(140) & "05000339" & Int2HexStr(totalMsgCount) & Int2HexStr(i) & Mid(msg.MSGContent, (i - 1) * 268 + 1, 268) ' Msg.PDU = Msg.SMSCLen & Msg.SMSCType & Msg.SMSC & Msg.MsgHead & Msg.TPMR & Msg.DestPhoneNumLen & Msg.DestPhoneNumType & Msg.DestPhoneNum & _ ' Msg.TPPID & Msg.TPDSC & Msg.TPVP & Msg.MSGLen & genWbxml("wap.dg1860.com", "好1860") msg.PDULen = Len(msg.PDU) / 2 - 9 'PDU字符串长度 End If ' SendSms Msg.PDU, Msg.PDULen ' Debug.Print "i:" + CStr(i) ' Debug.Print Mid(Msg.MSGContent, (i - 1) * 268 + 1, 268) ' ' Debug.Print Msg.PDU ' Debug.Print Msg.PDULen Next i If iLen Mod 134 > 0 Then totalMsgCount = totalMsgCount - 1 If Len(ServiceNo) = 0 Then msg.PDU = msg.SMSCLen & msg.MsgHead & msg.TPMR & msg.DestPhoneNumLen & msg.DestPhoneNumType & msg.DestPhoneNum & _ msg.TPPID & msg.TPDSC & msg.TPVP & Int2HexStr((iLen Mod 134) + 6) & "05000339" & Int2HexStr(totalMsgCount + 1) & Int2HexStr(totalMsgCount + 1) & Mid(msg.MSGContent, totalMsgCount * 268 + 1, Len(msg.MSGContent) - totalMsgCount * 268) ' Msg.PDU = Msg.SMSCLen & Msg.MsgHead & Msg.TPMR & Msg.DestPhoneNumLen & Msg.DestPhoneNumType & Msg.DestPhoneNum & _ ' Msg.TPPID & Msg.TPDSC & Msg.TPVP & Msg.MSGLen & genWbxml("wap.dg1860.com", "好1860") msg.PDULen = Len(msg.PDU) / 2 - 1 ' Debug.Print "left:" & Mid(Msg.MSGContent, totalMsgCount * 268 + 1, Len(Msg.MSGContent) - totalMsgCount * 268) Else msg.PDU = msg.SMSCLen & msg.SMSCType & msg.SMSC & "44" & msg.DestPhoneNumLen & msg.DestPhoneNumType & msg.DestPhoneNum & _ msg.TPPID & msg.TPDSC & msg.TPVP & Int2HexStr((iLen Mod 134) + 6) & "05000339" & Int2HexStr(totalMsgCount + 1) & Int2HexStr(totalMsgCount + 1) & Mid(msg.MSGContent, totalMsgCount * 268 + 1, Len(msg.MSGContent) - totalMsgCount * 268) ' Msg.PDU = Msg.SMSCLen & Msg.SMSCType & Msg.SMSC & Msg.MsgHead & Msg.TPMR & Msg.DestPhoneNumLen & Msg.DestPhoneNumType & Msg.DestPhoneNum & _ ' Msg.TPPID & Msg.TPDSC & Msg.TPVP & Msg.MSGLen & genWbxml("wap.dg1860.com", "好1860") msg.PDULen = Len(msg.PDU) / 2 - 9 'PDU字符串长度 End If GenPDU = msg End If Else msg.MSGLen = Int2HexStr(iLen) '短信息长度 ' Debug.Print strChar ' Debug.Print SMSText '' PDUString = strTmp ' If blIsEmptyService Then ' iLen = Len(strTmp) / 2 - 1 ' Else ' iLen = Len(strTmp) / 2 - 9 ' End If msg.MsgHead = "11" '文件头字节 (header byte, 是一种 bitmask) 。这里 11 指正常地发送短信息。 msg.TPMR = "00" '信息参考号。( TP-MR ) msg.TPPID = "00" '‘一般都是 00 ,表示点到点的标准短信 msg.TPVP = "FF" '‘有效期 (TP-VP), 短信的有效时间 ,00或FF表示长期有效 msg.TPDSC = "08" '用户信息编码方式 (TP-DCS) , 7-bit 编码( 08 : UCS2 编码 汉字一般为08) If Len(ServiceNo) = 0 Then msg.PDU = msg.SMSCLen & msg.MsgHead & msg.TPMR & msg.DestPhoneNumLen & msg.DestPhoneNumType & msg.DestPhoneNum & _ msg.TPPID & msg.TPDSC & msg.TPVP & msg.MSGLen & msg.MSGContent ' Msg.PDU = Msg.SMSCLen & Msg.MsgHead & Msg.TPMR & Msg.DestPhoneNumLen & Msg.DestPhoneNumType & Msg.DestPhoneNum & _ ' Msg.TPPID & Msg.TPDSC & Msg.TPVP & Msg.MSGLen & genWbxml("wap.dg1860.com", "好1860") msg.PDULen = Len(msg.PDU) / 2 - 1 Else msg.PDU = msg.SMSCLen & msg.SMSCType & msg.SMSC & msg.MsgHead & msg.TPMR & msg.DestPhoneNumLen & msg.DestPhoneNumType & msg.DestPhoneNum & _ msg.TPPID & msg.TPDSC & msg.TPVP & msg.MSGLen & msg.MSGContent ' Msg.PDU = Msg.SMSCLen & Msg.SMSCType & Msg.SMSC & Msg.MsgHead & Msg.TPMR & Msg.DestPhoneNumLen & Msg.DestPhoneNumType & Msg.DestPhoneNum & _ ' Msg.TPPID & Msg.TPDSC & Msg.TPVP & Msg.MSGLen & genWbxml("wap.dg1860.com", "好1860") msg.PDULen = Len(msg.PDU) / 2 - 9 'PDU字符串长度 End If GenPDU = msg End If Exit Function ErrorPDU: MsgBox "Error:" & Err & "." & vbCrLf & Err.Description End Function Public Function genWbxml(ByVal URL As String, ByVal title As String) As String Dim WapPushUDH As String Dim WapPushPUD As String Dim WapPushIndicator As String Dim WapPushDisplayTextHeader As String Dim EndOfWapPush As String '格式1 ' WapPushUDH = "0605040B8423F0" ' WapPushPUD = "81060603AE81EA8D00" ' //最后一位为WBXML长度; ' WapPushIndicator = "02056A0045C6080C03" '格式2 WapPushUDH = "0605040B8423F0" WapPushPUD = "010603AE8DC4" WapPushIndicator = "02056A0045C6080C03" ' '格式3 ' 'WapPushUDH = "0B05040B8423F00003030101" 'WapPushPUD = "29060603AE81EA8DCA" 'WapPushIndicator = "02056A0045C6080C03" ' ''格式4 ''//比老赵帮本多了一个,在这里;//不成功; 'WapPushUDH="0605040b8423f0" 'WapPushPUD="250601ae" 'WapPushIndicator="02056a0045C6080C03" ' ''格式5 'WapPushUDH="0605040b8423f0" 'WapPushPUD="250601ae" 'WapPushIndicator="01056a0045C60C03"'//老赵版本;不成功 ' '格式6 'WapPushUDH = "0605040b8423f0" 'WapPushPUD = "250601ae" 'WapPushIndicator = "02056a0045C60C0" ' ''格式7 'WapPushUDH="0605040B8423F0" 'WapPushPUD="72060a03AE81EAaf828D"'//最后一位为WBXML长度; 'WapPushIndicator="80b48402056A0045C60C03" 'WapPushDisplayTextHeader="00080103" ' ''格式8 'WapPushUDH = "0B05040B8423F00003030101" 'WapPushPUD = "29060603AE81EA8DCA" '//最后一位为WBXML长度; 'WapPushIndicator = "02056A0045C60C03" 'WapPushDisplayTextHeader = "00080103" ' ''格式9 'WapPushUDH = "0605040b8423f0" 'WapPushPUD = "81060803ae81eab4848d" '//最后一位为WBXML长度; 'WapPushIndicator = "02056A0045C6080C03" WapPushDisplayTextHeader = "000103" EndOfWapPush = "000101" ' URL = GB2Unicode(URL) URL = Str2HexStr(URL) ' title = GB2Unicode(title) title = Str_UTF_8(title, "HEX") Dim str1, str2 As String '======================================================================================================================================= ' str1 = SMSCLen & SMSCType & SMSC & PROTOCOL & TPMRBase & RePhoneNumLen & RePhoneNumType & RePhoneNum & TPPID & TPDSC & TPVP ' str1 = SMSCLen & SMSCType & SMSC & "11" & RePhoneNumLen & RePhoneNumType & RePhoneNum & TPPID & TPDSC & TPVP '短信消息头,按照正常短信 ' str2 = WapPushUDH & WapPushPUD & WapPushIndicator & URL & WapPushDisplayTextHeader & title & EndOfWapPush ' genWbxml = str2 ' ' MSGLen = Int2HexStr(Len(str2) / 2) '' MSGLen = Int2HexStr(Len(URL) + Len(title) + 1) ' ' PDU = str1 & MSGLen & str2 ' ' '' PDULen = Len(PDU) / 2 ' ' PDULen = Len(PDU) / 2 - 9 End Function '《SMS WITH THE SMS PDU-MODE》 Public Function genWapPushPdu(ByVal URL As String, ByVal title As String, ByVal SMSC As String, ByVal phoneNum As String) As WAPPushPDUStruct Dim wapPush As WAPPushPDUStruct With wapPush ' .SMSCLen ' .SMSCType .SMSC = SMSC .PROTOCOL = "51" .TPMRBase = "00" ' .RePhoneNumLen ' .RePhoneNumType .RePhoneNum = phoneNum FormatPhoneNum .SMSC, .SMSCType .SMSCLen = Int2HexStr(Len(.SMSC & .SMSCType) / 2) '短信息中心地址长度。(短信息中心号码类型 + 短信息中心号码长度 /2 的十六进制表示) ' msg.DestPhoneNumType 被叫号码类型。有+86时候为"91",否则为"81" .RePhoneNumLen = Int2HexStr(FormatPhoneNum(.RePhoneNum, .RePhoneNumType)) ''被叫号码长度。被叫号码长度的十六进制表示。 .TPPID = "00" ' .TPDSC = "A6" ' .TPDSC = "04" '用户信息编码方式 F5 .TPDSC = "F5" ' .TPVP = "A7" .TPVP = "AA" ' .TPVP = "FF" ' .MSGLen ' ' Dim Push_head1, Push_head2 As String ' ' Push_head1 = "0B05040B8423F00003030101" ' Push_head2 = "29060603AE81EA8DCA" ' // 81EA8D98 02 06 6A 00 85 09 03 .WAPPUSHHeadLen = "0B" '以下内容在UDH后面 .WAPPUSHFlag = "00" .DATALen = "03" .WAPPUSHCOMBFlag = "03" .Total = "01" .MSGID = "01" .WapPushDisplayTextHeader = "000103" .EndOfWapPush = "000101" '格式1 ' .WapPushUDH = "0605040B8423F0" ' .WapPushPUD = "81060603AE81EA8D00" ' //最后一位为WBXML长度; ' .WapPushIndicator = "02056A0045C6080C03" '格式2 '.WapPushUDH = "0605040B8423F0" '.WapPushPUD = "010603AE8DC4" '.WapPushIndicator = "02056A0045C6080C03" ' '格式3 ' '.WapPushUDH = "0B05040B8423F00003030101" '.WapPushPUD = "29060603AE81EA8DCA" '.WapPushIndicator = "02056A0045C6080C03" ' ''格式4 '//比老赵帮本多了一个,在这里;//不成功; '.WapPushUDH = "0605040b8423f0" '.WapPushPUD = "250601ae" '.WapPushIndicator = "02056a0045C6080C03" ' ''格式5 '.WapPushUDH = "0605040b8423f0" '.WapPushPUD = "250601ae" '.WapPushIndicator = "01056a0045C60C03" '//老赵版本;不成功 ' '格式6 '.WapPushUDH = "0605040b8423f0" '.WapPushPUD = "250601ae" '.WapPushIndicator = "02056a0045C60C0" ' ''格式7 '.WapPushUDH="0605040B8423F0" '.WapPushPUD="72060a03AE81EAaf828D"'//最后一位为WBXML长度; '.WapPushIndicator="80b48402056A0045C60C03" '.WapPushDisplayTextHeader="00080103" ' ''格式8 '.WapPushUDH = "0B05040B8423F00003030101" '.WapPushPUD = "29060603AE81EA8DCA" '//最后一位为WBXML长度; '.WapPushIndicator = "02056A0045C60C03" '.WapPushDisplayTextHeader = "00080103" ' ''格式9 '.WapPushUDH = "0605040b8423f0" '.WapPushPUD = "81060803ae81eab4848d" '//最后一位为WBXML长度; '.WapPushIndicator = "02056A0045C6080C03" ''格式10 '.WapPushUDH = "0B05040B8423F00003010101" '.WapPushPUD = "5F060A03AE81EAAF828D90B484" '//最后一位为WBXML长度; '.WapPushIndicator = "02056A0045C60C03" ' .WapPushUDH = "05040B8423F0" '.WapPushPUD = "29060603AE81EA8DCA" '//最后一位为WBXML长度; .WapPushPUD = "29060603AE81EA8D" ' .WapPushIndicator = "02056A0045C6080C03" ' .URL = GB2Unicode(URL) .URL = Str2HexStr(URL) ' .title = GB2Unicode(title) .title = Str_UTF_8(title, "HEX") Dim strHead, strWBXMLBODY, strControl As String '======================================================================================================================================= ' str1 = .SMSCLen & .SMSCType & .SMSC & .PROTOCOL & .TPMRBase & .RePhoneNumLen & .RePhoneNumType & .RePhoneNum & .TPPID & .TPDSC & .TPVP strHead = .SMSCLen & .SMSCType & .SMSC & .PROTOCOL & .TPMRBase & .RePhoneNumLen & .RePhoneNumType & .RePhoneNum & .TPPID & .TPDSC & .TPVP ' str1 = .SMSCLen & .SMSCType & .SMSC & "11" & .RePhoneNumLen & .RePhoneNumType & .RePhoneNum & .TPPID & .TPDSC & .TPVP '短信消息头,按照正常短信 ' strControl = "1901" '到WAP字节有0X19个 strControl = "0701" ' Dim bodyLen As Integer bodyLen = Len(.WapPushUDH & .WapPushPUD & "00" & .WapPushIndicator & .URL & .WapPushDisplayTextHeader & .title & .EndOfWapPush) / 2 + 128 ' .MSGLen = Int2HexStr(Len(strWBXMLBODY + strControl) / 2) strWBXMLBODY = .WapPushUDH & .WapPushPUD & Int2HexStr(bodyLen) & .WapPushIndicator & .URL & .WapPushDisplayTextHeader & .title & .EndOfWapPush .MSGLen = Int2HexStr(Len(strWBXMLBODY + strControl) / 2) ' .MSGLen = Int2HexStr(Len(.URL) + Len(.title) + 1) Debug.Print .MSGLen .PDU = strHead & .MSGLen & strControl & strWBXMLBODY ' .PDULen = Len(.PDU) / 2 .PDULen = Len(.PDU) / 2 - 9 ' .PDULen = Len(.PDU) / 2 - 1 End With genWapPushPdu = wapPush End Function ' strAppend = Format(Now, "YYYY-MM-DD HH:MM:SS") & vbTab & txtDestNO.Text & vbCrLf & _ "-----------------------------" & vbCrLf & txtSMS.Text ' strTmp = Format(objSMSTmp.ReachDate, "YYYY-MM-DD") & " " & Format(objSMSTmp.ReachTime, "HH:MM:SS") & vbTab & objSMSTmp.SourceNo & vbCrLf Public Function FormatTimeString() As String Dim strTime As String Dim yyyy, mm, dd, hh, minu, ss As String yyyy = Year(Now()) mm = Month(Now()) dd = Day(Now()) hh = Hour(Now()) minu = Minute(Now()) ss = Second(Now()) If Len(mm) = 1 Then mm = "0" & mm If Len(dd) = 1 Then dd = "0" & dd If Len(hh) = 1 Then hh = "0" & hh If Len(minu) = 1 Then minu = "0" & minu If Len(ss) = 1 Then ss = "0" & ss strTime = yyyy & mm & dd & hh & minu & ss & "00" If Len(strTime) Mod 2 <> 0 Then strTime = strTime & "F" End If Dim i As Integer Dim strTmp2, strTmp1 As String strTmp1 = "" For i = 1 To Len(strTime) Step 2 strTmp2 = Mid(strTime, i, 2) strTmp1 = strTmp1 & Right(strTmp2, 1) & Left(strTmp2, 1) Next i strTime = strTmp1 FormatTimeString = strTime End Function Option Explicit Type SysStruct CommPort As Integer Baud As String Handshaking As Integer ServiceNo As String End Type Type SysStruct2 CommPort As Integer Baud As String Handshaking As Integer ServiceNo As String DestNo As String CallMelody As Integer SMSMelody As Integer Clock As Boolean ClockSet As String End Type '+CMGL: 12,1,,30 '0891683108709605F0040D91683129922970F80008901112221555230A006B006B006B963F7238 '6位协议头格式:05 00 03 XX MM NN 'byte 1 : 05, 表示剩余协议头的长度 'byte 2 : 00, 这个值在GSM 03.40规范9.2.3.24.1中规定,表示随后的这批超长短信的标识位长度为1(格式中的XX值)。 'byte 3 : 03, 这个值表示剩下短信标识的长度 'byte 4 : XX,这批短信的唯一标志,事实上,SME(手机或者SP)把消息合并完之后,就重新记录,所以这个标志是否唯一并不是很重要。 'byte 5 : MM, 这批短信的数量。如果一个超长短信总共5条,这里的值就是5。 'byte 6 : NN, 这批短信的数量。如果当前短信是这批短信中的第一条的值是1,第二条的值是2。 '例如:05 00 03 39 02 01 '- '7位的协议头格式:06 08 04 XX XX MM NN 'byte 1 : 06, 表示剩余协议头的长度 'byte 2 : 08, 这个值在GSM 03.40规范9.2.3.24.1中规定,表示随后的这批超长短信的标识位长度为2(格式中的XX值)。 'byte 3 : 04, 这个值表示剩下短信标识的长度 'byte 4-5 : XX XX,这批短信的唯一标志,事实上,SME(手机或者SP)把消息合并完之后,就重新记录,所以这个标志是否唯一并不是很重要。 'byte 6 : MM, 这批短信的数量。如果一个超长短信总共5条,这里的值就是5。 'byte 7 : NN, 这批短信的数量。如果当前短信是这批短信中的第一条的值是1,第二条的值是2。 '例如:06 08 04 00 39 02 01 ' '本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/cutemouse/archive/2009/11/22/4850326.aspx Type SMSRecDef SmsId As Long SmsIndex As Long SmsStatus As Integer SmsPDULen As Integer SmsCSCA As String SmsFromNum As String SmsTP_SCTS As String '时间 SmsContentLen As Integer SMSContent As String SmsLongTag As String '这批短信的唯一标志 SmsLongCount As Integer '这批短信的数量 SmsLongIndex As Integer '这批短信的索引 End Type Type SMSDef '+CMGL: 1,"REC UNREAD","+8613181985843",,"04/06/04,15:31:25+00" '00480069002C4F60597D5417003F ListOrRead As Boolean '是否用列举(List)方法读取 SmsIndex As Long SourceNo As String ReachDate As String ReachTime As String SmsMain As String End Type 'Type SysStruct ' CommPort As Integer ' Baud As String ' ServiceNo As String ' DestNo As String ' CallMelody As Integer ' SMSMelody As Integer ' Clock As Boolean ' ClockSet As String 'End Type 'Type SMSDef ' ''+CMGL: 1,"REC UNREAD","+8613181985843",,"04/06/04,15:31:25+00" ''00480069002C4F60597D5417003F ' ' ListOrRead As Boolean '是否用列举(List)方法读取 ' SmsIndex As Long ' SourceNo As String ' ReachDate As String ' ReachTime As String ' SmsMain As String ' 'End Type Type SMSPDUStruct SMSCLen As String SMSCType As String SMSC As String MsgHead As String TPMR As String DestPhoneNumLen As String DestPhoneNumType As String DestPhoneNum As String TPPID As String TPDSC As String TPVP As String TPUDL As String MSGLen As String MSGContent As String PDULen As Integer PDU As String End Type Type WAPPushPDUStruct SMSCLen As String SMSCType As String SMSC As String PROTOCOL As String TPMRBase As String RePhoneNumLen As String RePhoneNumType As String RePhoneNum As String TPPID As String TPDSC As String TPVP As String MSGLen As String WAPPUSHHeadLen As String WAPPUSHFlag As String DATALen As String WAPPUSHCOMBFlag As String Total As String MSGID As String WapPushUDH As String WapPushPUD As String ' WAPPUSHBegin As String ' WSP As String ' Flag As String ' DTDSIFlag As String ' UTF As String ' FlagBegin As String ' SIBegin As String ' ' IndicationBegin As String ' ' Action As String ' Href As String ' HrefBegin As String WapPushIndicator As String URL As String ' HrefEnd As String ' Split As String ' TitleBegin As String WapPushDisplayTextHeader As String title As String ' TitleEnd As String ' SIEnd As String ' IndicationEnd As String EndOfWapPush As String PDULen As Integer PDU As String End Type
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值