I am attempting to write a very simple ISAPI filter for debugging another issue. IIS is returning error code 0x8007007f with Calling GetProcAddress on ISAPI filter "the dll here" failed
I'm using C++ without MFC in Visual Studio 2012 on Windows 7 with IIS 7.5.
Below is a snippet of the code. While debugging, it doesn't appear to call the HttpFilterProc. I manually added a def file to the project, but I don't know if it's actually getting used.
Any ideas on the cause?
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;
}
The solution was to explicitly add the Module Definition file into the project properties -> Linker -> Input Property page in VS2012.
The Linker wasn't picking up the file I added.
User contributions licensed under CC BY-SA 3.0