昊
昊海
Unregistered / Unconfirmed
GUEST, unregistred user!
我有NMUDP组件传一个文件,代码如下:
var
tmpMemoryStream: TMemoryStream;
tmpStream: TStream;
begin
tmpFileName := 'c:/321.mp3';
try
tmpMemoryStream := TMemoryStream.Create;
tmpStream := TStream.Create;
tmpStream := TFileStream.Create(tmpFileName, fmOpenRead or fmShareDenyNone);
if tmpStream.Size > 0 then
begin
tmpMemoryStream.LoadFromStream(tmpStream);
UDPServer.SendStream(tmpMemoryStream);//这里总是报错,说地址访问非法,CPU调试窗口显示调用地址为:????
end;
except
//
end;
end;
var
tmpMemoryStream: TMemoryStream;
tmpStream: TStream;
begin
tmpFileName := 'c:/321.mp3';
try
tmpMemoryStream := TMemoryStream.Create;
tmpStream := TStream.Create;
tmpStream := TFileStream.Create(tmpFileName, fmOpenRead or fmShareDenyNone);
if tmpStream.Size > 0 then
begin
tmpMemoryStream.LoadFromStream(tmpStream);
UDPServer.SendStream(tmpMemoryStream);//这里总是报错,说地址访问非法,CPU调试窗口显示调用地址为:????
end;
except
//
end;
end;