Вниз
Скачать: CL | DM;

Слияние файлов   Найти похожие ветки 

 
Allex   (2003-04-08 11:38) [0]

Как соединить два бинарных файла при помощи win api(если можно пример)


 
jack128 ©   (2003-04-08 11:52) [1]

var h1, h2 : Thandle;
ActualBytes : Cardinal;
temp : string;
begin
h1 :=CreateFile(filename1,
GENERIC_WRITE,
0,
nil,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
0);
if h1=INVALID_HANDLE_VALUE then Exit;
h2 := CreateFile(filename1,
GENERIC_READ,
0,
nil,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
0);
if h2=INVALID_HANDLE_VALUE then begin
CloseHAndle(h1);
Exit;
end;
SetLength(temp,GetFileSize(h2,nil));
SetFilePointer(h1,0,nil,FILE_END);
if ReadFile(h2,Pchar(temp)^,Length(temp),Actualbytes,nil) and
ActualBytes = Length(temp) and
WriteFile(h1,Pchar(temp)^,Length(temp),Actualbytes,nil) and
ActualBytes = Length(temp) then ShowMessage("Yra!!!");
CloseHandle(h1);
CloseHandle(h2);
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.016 c
1-13195
YuraKiller
2003-05-26 01:56
2003.06.05
Как убить симлов из стринга?


14-13475
Sniffer
2003-05-20 17:50
2003.06.05
Кто знает где найти документацию по Windows XP API?


1-13321
Paylik
2003-05-24 22:32
2003.06.05
Task Bar


1-13313
Юрий Федоров
2003-05-23 10:39
2003.06.05
навесить обычную процедуру на обработчик события


1-13303
Mike_Goblin
2003-05-24 16:50
2003.06.05
OTA Expert




   Наверх