0
我正在嘗試編寫一個非常簡單的ISAPI篩選器來調試另一個問題。 IIS將返回錯誤代碼0x8007007f與ISAPI篩選器調用GetProcAddress的 「這裏的dll」 在Visual Studio 2012在Windows 7上的IIS 7.5失敗IIS:在ISAPI篩選器上調用GetProcAddress失敗
我使用C++沒有MFC。
以下是代碼片段。在調試的時候,它似乎沒有調用HttpFilterProc。我手動添加一個def文件到項目中,但我不知道它是否真的被使用。
關於原因的任何想法?
DWORD WINAPI __stdcall HttpFilterProc(HTTP_FILTER_CONTEXT *pfc, DWORD NotificationType, VOID *pvData)
{
switch (NotificationType)
{
case SF_NOTIFY_SEND_RESPONSE :
return DoSendResponse(pfc, (HTTP_FILTER_SEND_RESPONSE *) pvData);
default :
break;
}
return SF_STATUS_REQ_NEXT_NOTIFICATION;
}
DWORD DoSendResponse(HTTP_FILTER_CONTEXT * pfc,HTTP_FILTER_SEND_RESPONSE * pResponse)
{
BOOL fServer = TRUE;
DWORD dwServerError;
fServer = pResponse->SetHeader(pfc, "UMFilter:", "Enabled");
if (!fServer)
{
dwServerError = GetLastError();
pfc->pFilterContext = (LPVOID)(DWORD64)pResponse->HttpStatus;
}
return SF_STATUS_REQ_NEXT_NOTIFICATION;
}