home *** CD-ROM | disk | FTP | other *** search
/ PC World 1999 August / PCWorld_1999-08_cd.bin / Komunik / pnws / pnws1074s.exe / file0048.bin < prev    next >
Encoding:
Text File  |  1999-07-13  |  1.0 KB  |  44 lines

  1. library ISAPI_Minimal;
  2.  
  3. uses
  4.   SysUtils,
  5.   Classes,
  6.   isapi2 in '\Program Files\Borland\Delphi 3\Source\RTL\WIN\isapi2.pas';
  7.  
  8. // Zalezi na velikosti pismen v nazvu !!!!
  9. function GetExtensionVersion(var ver: THSE_VERSION_INFO): Boolean; stdcall;
  10. begin
  11.   result:=True;
  12. end;
  13.  
  14. // Zalezi na velikosti pismen v nazvu !!!!
  15. function HttpExtensionProc(var ecb: TEXTENSION_CONTROL_BLOCK): LongInt; stdcall;
  16. var
  17.   FN_Write: TWriteClientProc;
  18.   s: String;
  19.   len: Integer;
  20. begin
  21.   // Vytvor si funkci pro zapis dat
  22.   @FN_Write:=@ecb.WriteClient;
  23.  
  24.   s:=  'HTTP/1.0 200 OK'#13#10#13#10;
  25.   s:=s+'<html><head>'#13#10;
  26.   s:=s+'   <title>ISAPI skript</title>'#13#10;
  27.   s:=s+'</head><body bgcolor=white>'#13#10;
  28.   s:=s+'<h1>Generovanß strßnka</h1>'#13#10;
  29.   s:=s+'Tento text je generovan² knihovnou ISAPI v serveru PNWS'#13#10;
  30.   s:=s+'</body></html>';
  31.   len:=Length(s);
  32.  
  33.   // Zapis do prohlizece
  34.   FN_WRITE(ecb.ConnID, PChar(s), len, 0)
  35. end;
  36.  
  37. // Potreba pro export funkci
  38. exports
  39.   GetExtensionVersion,
  40.   HttpExtensionProc;
  41.  
  42. begin
  43. end.
  44.