Вниз
Скачать: 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.013 c
9-12993
Jedi Knight
2002-12-26 17:33
2003.06.05
Rebellion 2


3-13068
pathfinder
2003-05-16 23:22
2003.06.05
Вопрос про IB...


14-13366
Dabadabiabo
2003-05-16 11:40
2003.06.05
Высота строки в DBGrid е


4-13519
Ahmad K
2003-04-04 17:21
2003.06.05
Автозаполнение и-нет форм


14-13436
WInAPi Lamer
2003-04-28 17:03
2003.06.05
Как запретить двойной щелчок на заголовке моего окна ?




   Наверх