老
老在门外
Unregistered / Unconfirmed
GUEST, unregistred user!
COMM1接带摄像头的电路版,,用控件SPCOMM,,接收JPG图象,,
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
var
NumRecWriten,k,i,j:integer;
lens:byte;
s:array of byte;
begin
if AllowtoComm=true then {数据接收}
Begin
Setlength(s,BufferLength);//图象有3K左右,第一次接收时BufferLength=2048,
,第二次接收时BufferLength=1024,
两次接收完成一幅图象
s:=buffer;
seek(capture,filesize(capture));
Blockwrite(capture,S,sizeof(s),NumRecWriten);//sizeof(s)=4,NumRecWriten=4,而文
件只写入了512字节,这是怎么回事呢,,没搞明白,,望大虾指导一下
if (s[BufferLength-2]=byte($FF)) and (s[BufferLength-1]=byte($D9)) then
begin
end;
end;
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
var
NumRecWriten,k,i,j:integer;
lens:byte;
s:array of byte;
begin
if AllowtoComm=true then {数据接收}
Begin
Setlength(s,BufferLength);//图象有3K左右,第一次接收时BufferLength=2048,
,第二次接收时BufferLength=1024,
两次接收完成一幅图象
s:=buffer;
seek(capture,filesize(capture));
Blockwrite(capture,S,sizeof(s),NumRecWriten);//sizeof(s)=4,NumRecWriten=4,而文
件只写入了512字节,这是怎么回事呢,,没搞明白,,望大虾指导一下
if (s[BufferLength-2]=byte($FF)) and (s[BufferLength-1]=byte($D9)) then
begin
end;
end;