我想用spcomm控件写一个接收函数,不知道怎么写,我得要求是用shortstring类型或者pchar类型 有一本书上写的是string类型的。我不知道改下面我写出代码,请大家帮我改正
procedure ReadData;
var
buffer:Pointer;
BufferLength:Word;
begin
SetLength(Receive,BufferLength);
Move(Buffer^,pchar(Receive)^,BufferLength);
end;
其中receive为string类型,我改为shortstring时就出错了
procedure ReadData;
var
buffer:Pointer;
BufferLength:Word;
begin
SetLength(Receive,BufferLength);
Move(Buffer^,pchar(Receive)^,BufferLength);
end;
其中receive为string类型,我改为shortstring时就出错了
解决方案 »
- 怎么样在 powerpdf 里增加宋体和黑体的中文字体?
- 我在写一个监控程序时.想得到在别的程序中的鼠标单击事件.请各位高手指点一下.
- 一個日期用什么控件最好(在dephi中)
- 100求delphi6在win 2k 英文版下的使用问题答案
- Format()用法是什么?请给出代码?一个具体的问题
- 请教奇怪问题(在线等待)
- 请高手帮助,一些简单的问题
- 在我的程序中,如何调用windows media player的可视化效果,显示在我的窗口中?
- 制作报表的时候,怎么才能让他横向排列呢?
- delphi7 找不到 TOpenTextFileDialog 。
- 高手救急!!!答对者每人一百分:word 自动化
- Delphi6的Sp2哪里有下载?
procedure ReadData;
var
buffer:Pointer;
BufferLength:Word;
begin
SetLength(Receive,BufferLength);
Move(Buffer^,pchar(Receive)^,BufferLength);
end;
其中receive为string类型,我改为shortstring时就出错了