Вниз
Скачать: 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.015 c
8-13336
Manulo
2003-02-18 13:51
2003.06.05
WAV -> MP3 from microphone


14-13408
Fog
2003-05-17 12:38
2003.06.05
На носу экзамен....


3-13053
gizar
2003-05-16 17:00
2003.06.05
LookUp - помогите!!! Может кто встречался с задачей.


1-13180
.::D.e.M.o.N.i.X::.
2003-05-26 17:39
2003.06.05
Опять строки


14-13458
Леся
2003-05-16 11:16
2003.06.05
А в Win2000 ActiveX-компоненты в IE грузятся если пользователь...




   Наверх