idnum,basepos:integer;
inbuf:array of byte;
basepos:=16;
idnum:=PInteger(@inbuf[basepos])^;这一行是什么意思,谁能解释一下,谢谢
inbuf:array of byte;
basepos:=16;
idnum:=PInteger(@inbuf[basepos])^;这一行是什么意思,谁能解释一下,谢谢
解决方案 »
- 500分求关于DLL中,如何动态加载JPEG图片的问题?加分100
- Delphi 2009 搞什么鬼呀,以前D2007的控件安装不上,D7的就更不用说了!!!大家是怎样解决的?
- 怎么得到一个文件夹下面的所有文件名?
- database问题,谢谢!
- 高手们指教:集团应用的报表怎么设计,提提意见!
- 如何在delphi工程中判断那些文件是工程必须的,有工具吗,像vb打包工具一样
- 如何在dephi 6中注册componentone的VSFlexGrid控件?
- 急急!!主窗体中如何引入子窗体
- zip 的压缩率?
- 关于两个DBF文件的关联
- 关于UDP指定源端口发送数据包
- delphi6属性编辑器有没有修改过的属性字体变粗的功能?
@inbuf[basepos] 获得inbuf[basepos]这个值在内存中地址
PInteger(@inbuf[basepos]) 将上面的地址值通过强制类型转换变为指向Integer的一个指针
PInteger(@inbuf[basepos])^ 获取这个指针所指向地址的内容,是一个Integer值, 即将inbuf[basepos]、inbuf[basepos+1]、inbuf[basepos+2]、inbuf[basepos+3]这四个连续字节的内容按Integer类型取出。
从inbuf的basepos位置开始取integer大小的字节作为整数赋给idnum
int idnum,basepos;
unsigned char *inbuf;
basepos=16;
idnum=*(int *)(inbuf+basepos);