ipman 大哥,看看,不对啊!

tyfun 2003-11-21 03:08:57
我怎么得到SMGPDeliver函数里pDeliverResp指针?



'接收短信
Private Declare Function SMGPDeliver Lib "SmGwAPI.dll" (nTimeout As Integer, _
ByRef pDeliverResp As Long) As Long

'指针
Private Declare Sub CopyMemory Lib "kernel32 " Alias "RtlMoveMemory " _
(Destination As Any, Source As Any, ByVal Length As Long)

'接收
Public Sub Recieve()
Type ShortMsg
sMsgID(10) As Byte '短消息标识
nIsReport As Integer '是否状态报告
nMsgFormat As Integer '信息格式
sRecvTime(15) As Byte '接收时间((格式:yyyymmddhhmiss,例如20010301200000)
sSrcrmID(21) As Byte '发送消息的源终端号码
sDestTermID(21) As Byte 'Char(22) 发送消息的目的号码
nMsgLen As Integer '短消息长度
sMsgContent(251) As Byte 'Char(252) 短消息内容
End Type
Dim DataBuf(315) As Byte
Dim myMsg As ShortMsg
ret = SMGPDeliver(10, VarPtr(DataBuf(0)))
CopyMemory myMsg, DataBuf(0), LenB(myMsg)
End Sub
...全文
40 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
tyfun 2003-11-21
  • 打赏
  • 举报
回复
怎么弄啊?
kimurakenshin 2003-11-21
  • 打赏
  • 举报
回复
up

7,771

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧