本文整理自网络,侵删。
procedure BytesToFile(bData:TByteArray; sPath:string);varhFile: THandle;dWritten: DWORD;begin hFile := CreateFile(PChar(sPath), GENERIC_WRITE, FILE_SHARE_WRITE, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if hFile <> 0 then begin SetFilePointer(hFile, 0, nil, FILE_BEGIN); WriteFile(hFile, bData[0],Length(bData), dWritten, nil); CloseHandle(hFile); end;end;
相关阅读 >>
Delphi一个非常完整的取windows os 版本信息的函数
老外写的在桌面添加快捷方式(Delphi xe5 android)
更多相关阅读请进入《Delphi》频道 >>