//---------------------------读数据到olevariant
//pfileName:带路径的文件名
function Getobj(pfileName:string): OleVariant;
var fs:TFileStream;
begin
fs := TFileStream.Create(pfileName,fmOpenRead);
try
result := VarArrayCreate([0,fs.size-1],varbyte);
fs.position := 0;
fs.readbuffer(varArrayLock(result)^, fs.size);
finally
fs.free;
varArrayunlock(result);
end;
end;
//---------------------------从 olevariant 写到新文件
function writeFileFromOle(pfileN...[ 查看全文 ]