Вниз
Скачать: 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
1-13209
Edelweiss
2003-05-27 11:05
2003.06.05
Oсновная форма создает окно. Как сделать, чтобы это окно было


14-13407
LOX
2003-05-11 14:25
2003.06.05
Cлепил браузер


6-13345
Puzzle
2003-04-02 12:32
2003.06.05
Как определить, что Dial-up соединение уже установлено?


1-13268
Zew
2003-05-23 20:48
2003.06.05
Combobox


14-13413
Один из тех
2003-05-17 11:26
2003.06.05
Озабоченные всего мира, объединяйтесь!




   Наверх