没有合适的资源?快使用搜索试试~ 我知道了~
精彩编程与编程技巧-将数据转换为内存二进制形式字符串...
3星 · 超过75%的资源 需积分: 10 27 下载量 16 浏览量
2009-10-10
17:50:57
上传
评论 1
收藏 2KB TXT 举报
温馨提示
试读
3页
精彩编程与编程技巧-将数据转换为内存二进制形式字符串 ...
资源推荐
资源详情
资源评论
将数据转换为内存二进制形式字符串(模拟CV?和MK?$两组函数)
如 果 要 模 拟 这 些 函 数 , 可 以 使 用 下 面 的 代 码 :
Declare Sub CopyMemory Lib "KERNEL32" Alias "RtlMoveMemory" ( _
hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)
Function MKI$ (x As Integer)
temp$ = Space$(2)
hmemcpy ByVal temp$, x%, 2
MKI$ = temp$
End Function
Function CVI (x As String) As Integer
If Len(x) <> 2 Then
MsgBox "Illegal Function Call"
Stop
End If
hmemcpy temp%, ByVal x, 2
CVI = temp%
End Function
Function MKL$ (x As Long)
temp$ = Space$(4)
CopyMemory ByVal temp$, x&, 4
MKL$ = temp$
End Function
Function CVL (x As String) As Long
If Len(x) <> 4 Then
MsgBox "Illegal Function Call"
Stop
End If
如 果 要 模 拟 这 些 函 数 , 可 以 使 用 下 面 的 代 码 :
Declare Sub CopyMemory Lib "KERNEL32" Alias "RtlMoveMemory" ( _
hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)
Function MKI$ (x As Integer)
temp$ = Space$(2)
hmemcpy ByVal temp$, x%, 2
MKI$ = temp$
End Function
Function CVI (x As String) As Integer
If Len(x) <> 2 Then
MsgBox "Illegal Function Call"
Stop
End If
hmemcpy temp%, ByVal x, 2
CVI = temp%
End Function
Function MKL$ (x As Long)
temp$ = Space$(4)
CopyMemory ByVal temp$, x&, 4
MKL$ = temp$
End Function
Function CVL (x As String) As Long
If Len(x) <> 4 Then
MsgBox "Illegal Function Call"
Stop
End If
资源评论
- jiao_xudan2012-09-25还好吧。谢谢共享!用的是自己写的解析类,呵呵
求伯乐
- 粉丝: 22
- 资源: 3095
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功