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.
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.