type
TDataUnit = record
Len: Byte; //参数长度
Obj_ID: Word; //参数ID
Content: Array of Byte; //参数内容
DataType: String; //数据类型
end;
我定义了这样一个结构体,想用copymemory进行简洁的赋值,可以吗?请给出具体的说明一下。这个id注册了很多年,以前的csdn是以天计算可用分的,不登录也行,导致我分太多了,发点出来,大家拿
TDataUnit = record
Len: Byte; //参数长度
Obj_ID: Word; //参数ID
Content: Array of Byte; //参数内容
DataType: String; //数据类型
end;
我定义了这样一个结构体,想用copymemory进行简洁的赋值,可以吗?请给出具体的说明一下。这个id注册了很多年,以前的csdn是以天计算可用分的,不登录也行,导致我分太多了,发点出来,大家拿
解决方案 »
- delphi7的datetimepicker为长时间时不能显示13点之后的小时时间?
- 各位老师,delphi 2005 可建立三种应用程序,各有什么区别?
- 我和群群!!!!!!!!!!!!!!!!!!!!!!!!!!!!不得不讲的二句话
- 如何获取当前可用的扫描仪?
- 如何在点按钮前检查编辑框是否空,如空则取消点击事件,焦点指向为空的编辑框
- 请问 TSdfDataSet 这个控件哪儿可以下载的到
- 把image1里的图片从(10,10)-(20,20)的区域剪切到image2中。如何编写呢?
- 有嗎? Delphi开发工程师.
- C#转Delpi
- 调查!!!!
- 如何用NSIS做个双语言的安装包
- 基于indy8+TIdTCPClient实现安全传输SSL的话,匿名认证如何设置?
type
TDataUnit = record
Len: Byte; //参数长度
Obj_ID: Word; //参数ID
Content: Array of Byte; //参数内容
DataType: Array of Char; //数据类型
end; 然后再copyMemoryprocedure TForm1.Button1Click(Sender: TObject);
var
DataA, DataB: TDataUnit;
begin
copyMemory(@DataA, @DataB, sizeof(TDataUnit));
end;
DataType: String; //数据类型 这两个不定长的,处理起来可能会出错,建议改成定长的再用
copyMemory(@DataA, @DataB, sizeof(TDataUnit));
例子
PSMSinfo = ^TSMSInfo;
TSMSInfo = packed record
sComPort: string[5]; //数据库地址
BaudRate: string[4]; //数据库名称
Center: string[20];//数据库密码
end;
type
TDataUnit = record
Len: Byte; //参数长度
Obj_ID: Word; //参数ID
Content: Array[0..255] of Byte; //参数内容
DataType: Array [0..255]of Char; //数据类型
end;
type
TDataUnit = record
Len: Byte; //参数长度
Obj_ID: Word; //参数ID
Content: Array[0..請指定長度] of Byte; //参数内容
DataType: array[0..請指定長度] of char; //数据类型
end;