结构体与blob数据的转换
敬业的IT人
互联网
佚名
2008-1-4 11:04:16
要用API,如下:
设为结构 str_exam lstr_exam, blob lbl_exam
Function ulong MemoryCopy(ref str_exam source, REF blob destination, u long length) library "kernel32.dll" Alias for "RtlMoveMemory"
Function ulong MemoryCopy(REF blob destination,ref str_exam source, ul ong length) library "kernel32.dll" Alias for "RtlMoveMemory"
设str_exam长度为 li_lenexam
将lstr_exam copy 到 lbl_exam
lbl_exam = blob ( space ( li_lenexam ) )
MemoryCopy ( lstr_exam, lbl_exam, li_lenexam )
将lbl_exam copy 到 lsr_exam
MemoryCopy ( lbl_exam, lstr_exam, li_lenexam )
如只结构copy到blob,还可用blobedit,更简单一些。 记住这个API文档上找不到的RtlMoveMemory,非常非常有用。 它可用来取pb变量的指针。
进入讨论组讨论。- 最新文章
- Direct3D9初级教程[01-04]
- 优化你的PowerBuilder程序[01-04]
- 在MicroHelp Bar上显示时间[01-04]
- 在PB中调用外部程序并判断其运行结束[01-04]
- 在PB中动态修改SQL语句[01-04]
- 在PB中如何使用Microsoft Outlook发送邮件[01-04]
- 相关文章
