谁能给一个ISAPI Filter 能在IIS 6.0上加载的代码? ( 积分: 100 )

  • 主题发起人 主题发起人 soFTangeL
  • 开始时间 开始时间
S

soFTangeL

Unregistered / Unconfirmed
GUEST, unregistred user!
真邪门,下面的代码可以在Win2000/IIS 5.0上加载,但却不能在Win2003/IIS 6.0上加载。到底是哪里的问题?:(
library IISFilter;

uses
SysUtils,
Windows,
ISAPI2;

procedure LogInfo(aStr: PChar);
const
LogFileName = 'C:/FilterLog.txt';
var
OutFile: TextFile;
begin
AssignFile(OutFile, LogFileName);
if FileExists(LogFileName) then Append(OutFile) else Rewrite(OutFile);
Writeln(OutFile, aStr);
CloseFile(OutFile);
end;

function GetFilterVersion(var pVer: THTTP_FILTER_VERSION): BOOL; stdcall;
begin
LogInfo('Entering GetFilterVersion');
result := True;
end;

function HttpFilterProc(var pfc: THTTP_FILTER_CONTEXT; Notificationtype: DWORD;
pvNotification: Pointer): DWORD; stdcall;
begin
result := SF_STATUS_REQ_NEXT_NOTIFICATION;
end;

exports
HttpFilterProc,
GetFilterVersion;
begin

end.
 
真邪门,下面的代码可以在Win2000/IIS 5.0上加载,但却不能在Win2003/IIS 6.0上加载。到底是哪里的问题?:(
library IISFilter;

uses
SysUtils,
Windows,
ISAPI2;

procedure LogInfo(aStr: PChar);
const
LogFileName = 'C:/FilterLog.txt';
var
OutFile: TextFile;
begin
AssignFile(OutFile, LogFileName);
if FileExists(LogFileName) then Append(OutFile) else Rewrite(OutFile);
Writeln(OutFile, aStr);
CloseFile(OutFile);
end;

function GetFilterVersion(var pVer: THTTP_FILTER_VERSION): BOOL; stdcall;
begin
LogInfo('Entering GetFilterVersion');
result := True;
end;

function HttpFilterProc(var pfc: THTTP_FILTER_CONTEXT; Notificationtype: DWORD;
pvNotification: Pointer): DWORD; stdcall;
begin
result := SF_STATUS_REQ_NEXT_NOTIFICATION;
end;

exports
HttpFilterProc,
GetFilterVersion;
begin

end.
 
不是很懂,顶一下
 
请问楼主,你的http://soft.0zones.com/为什么关闭了呢?最近出了什么事吗?如果没有,请打开,谢谢!
 
后退
顶部