ISAPI Extension template. For ISAPI Filter, look up <httpfilt.h> and
change the names of the exported functions and signatures (all in the
include file) in this template and it should work as well.
For functionality, you must look up MSDN for the functions.
ISAPIExt.def:
LIBRARY MyIsapi
EXPORTS
GetExtensionVersion
HttpExtensionProc
TerminateExtension
ISAPIExt.c:
#include <windows.h>
#include <httpext.h>
BOOL WINAPI GetExtensionVersion(
HSE_VERSION_INFO *pVer
)
/*
Purpose:
This is a required ISAPI Extension DLL entry point.
Arguments:
pVer - Points to extension version info structure
Returns:
Always returns TRUE. Returning FALSE causes DLL to not be loaded
*/
{
pVer->dwExtensionVersion = MAKELONG(HSE_VERSION_MINOR,
HSE_VERSION_MAJOR);
lstrcpyn(pVer->lpszExtensionDesc, "Description String",
HSE_MAX_EXT_DLL_NAME_LEN);
return TRUE;
}
DWORD WINAPI HttpExtensionProc(
EXTENSION_CONTROL_BLOCK *pecb
)
/*
Purpose:
********
Arguments:
pecb - pointer to the extenstion control block
Returns:
HSE_STATUS_SUCCESS on successful transmission completion
HSE_STATUS_ERROR on failure
*/
{
return HSE_STATUS_SUCCESS;
}
BOOL WINAPI TerminateExtension(
DWORD dwFlags
)
/*
Purpose:
This is an optional ISAPI extension DLL entry point.
If present, it will be called before unloading the DLL,
giving it a chance to perform any shutdown procedures.
Arguments:
dwFlags - specifies whether the DLL can refuse to unload or not
Returns:
TRUE, if the DLL can be unloaded
*/
{
return TRUE;
}
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"bob bowmaker" <robert.bowmaker.TakeThisOut@dse.gen.nz> wrote in message
news:etbYIv$sDHA.3416@tk2msftngp13.phx.gbl...
I would be very grateful if you could e-mail me a skeleton ISAPI DLL
source code - something that output "Hello world" or something. I'm very
new with Visual C++, and these UI gliches aren't helping me!
Thanks in advance,
Robert
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
>> Stay informed about: Creating ISAPI DLLs