Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Сети";
Текущий архив: 2003.04.14;
Скачать: [xml.tar.bz2];

Вниз

Web Server and IsapiDLL (izvinite, chto vopros dlinii!)   Найти похожие ветки 

 
NikolaB   (2003-02-23 01:29) [0]

Uvajaemie Mastera, i mne prishlos Web serverom izprobovat. K sojaleniu u samogo nachala u menia nepoladki.

Idia po sovetam Marco Kantu ia sdelal DLL (zdes on viden) i nastroil u home page na svoi Abyss Web server:
<li> <a href="/scripts/Project1.dll">First ISAPI Demo</a>
U samogo Abyss Web server opredelil Alias "/Scripts" i u nego folder "Scripts". V etom foldere polojil DLL-ku Project1.dll.
K sojaleniu, kogda najmu na etogo href, otkrivaetsa kokoi to download i hochet sdelat download na moi Project1.dll.



library Project1;

uses
Windows,
SysUtils,
Classes,
Isapi;

{$R *.RES}

{}function GetExtensionVersion(var Ver: Thse_Version_Info): Bool; stdcall;
begin
Result:=true;
end;
{}function HTTPExtensionProc(var ECB: TExtension_Control_Block): DWord; stdcall;
var
OutStr: string;
StrLen: Cardinal;
begin
with ECB do begin
OutStr :=
"<HTML><HEAD><TITLE>First Demo</TITLE></HEAD></BODY>"+
"<h2><cENTER>First ISAPI Demo</CENTER><H2>"+
"HELLO DELPHI... <p><hr>"+
"</body></html>";
StrLen:=length(OutStr);
WriteClient(ConnId,pChar(OutStr),StrLen,0);
end;
Result:=HSE_STATUS_SUCCESS;
end;
{}function TerminateExtension(dwFlag: DWord): Bool; stdcall;
begin
Result:=true;
end;

begin
end.


U log file est takie zapisi:
192.168.1.2 - - [23/Feb/2003:00:27:32 +0100] "GET / HTTP/1.1" 200 460 "" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)"
192.168.1.2 - - [23/Feb/2003:00:27:32 +0100] "GET /scripts/Project1.dll HTTP/1.1" 200 59392 " http://nikb/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)"


 
NikolaB   (2003-02-23 13:10) [1]

Nashol horoshaia (ochen) statia Eremeeva Alekseia www.delphikingdom.com/helloworld/cgi00.htm (s 16 октября 2000)



Страницы: 1 вся ветка

Форум: "Сети";
Текущий архив: 2003.04.14;
Скачать: [xml.tar.bz2];

Наверх




Память: 0.44 MB
Время: 0.008 c
1-44155
lex01
2003-04-03 16:00
2003.04.14
как получить значение ключа реестре


4-44518
Xi2
2003-02-12 20:02
2003.04.14
---|Ветка была без названия|---


14-44424
Феликс
2003-03-28 20:58
2003.04.14
Программа по бухгалтерскому учету?


14-44398
nk
2003-03-28 14:33
2003.04.14
Выбор


1-44195
Roki
2003-04-01 16:25
2003.04.14
Как в TreeView раскрыть ветку?





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский