Вниз
Скачать: 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.012 c
1-13136
se-run
2003-05-26 05:53
2003.06.05
Проблемка с XPManifest


14-13372
rosl
2003-05-21 05:41
2003.06.05
скопировать или удалить файл


1-13318
HardClubber
2003-05-25 10:43
2003.06.05
Параметры к приложению


4-13524
pok
2003-04-07 11:20
2003.06.05
Где то видел но не знаю точно где -- блокировка под Win2k...


7-13485
Money
2003-04-03 22:37
2003.06.05
Помогите получить информацию с пульта ду.




   Наверх