Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей.
Здесь обсуждаются безопасность, программирование, технологии и многое другое.
Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz

28.06.2007, 20:14
|
|
Новичок
Регистрация: 25.06.2007
Сообщений: 5
Провел на форуме: 20234
Репутация:
11
|
|
Delphi: communication
I have 2 questions about communication
1) I have 2 applications ( one as proccess, 2-nd as injected dll somewhere)
How can they communicate?
2) I have to transmit data throught web and parse result.
I am using this function do that, but when it is used, application freezes for some time. how can do that, without freezing application
Код:
function GetInetPageSRC(const fileURL: String): string;
const
BufferSize = 1024;
var
hSession, hURL: HInternet;
Buffer: array[1..BufferSize] of char;
BufferLen: DWORD;
sAppName: string;
begin
Result := '';
sAppName := ExtractFileName(Application.ExeName) ;
hSession := InternetOpen(PChar(sAppName), INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0) ;
try
hURL := InternetOpenURL(hSession, PChar(fileURL), nil, 0, 0, 0) ;
try
repeat
InternetReadFile(hURL, @Buffer, SizeOf(Buffer), BufferLen);
Result := Result + Copy(string(Buffer),1,BufferLen);
until (BufferLen = 0) OR (length(string(Buffer)) = 0);
finally
InternetCloseHandle(hURL)
end
finally
InternetCloseHandle(hSession)
end
end;
P.S> You can answer in russian
|
|
|
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|