Since I get this following question on how to compile/use my ISAPI code examples quite a bit, I wager I should just have a blog post that answers it once and for all.
But, come on you guys... I already did the hard part in providing the full compiling sample source code illustrating the solution to your problem(s). Why can't you figure out the simpler task of compiling that source code into an ISAPI DLL? ;-) I mean, it's not rocket science. It's just compilers and linkers.
Dare I say it... do I have to spoon-feed it to you like a child? hehe, ok, never mind... ;-) Here goes...
Anyways... I still use Visual C++ 6.0 to compile/link my ISAPI code samples (in fact, I usually test them out on IIS 5 as well as IIS 6, too). I am not bought into the .Net fever... at least not as far as ISAPI and IIS modifications are concerned. Don't get me wrong, .Net is great for end users to accomplish what they need at the higher, business-logic levels... but I am not convinced that .Net is useful at the lower-levels that ISAPI runs at. In particular, the memory overhead and native/managed code transitions alone kill performance, not to mention the SxS issues of multiple CLR versions in the same memory space. Native ISAPI code simply does not have such problems.
Anyhow, getting off that sidetrack... here are step-by-step instructions on how to compile/link my ISAPI code samples for both Visual C++ 6.0 and Visual C++ 2005 Express Edition.
Yes, I went and walked through both sets directions using the LoadBalancedIP sample code and loaded the resulting DLL on IIS5 to verify that everything functioned as intended. I am happy to say that it all worked for me the first time. :-) The Client-IP in my log file changed to whatever X-Client-IP request header stated.
So... if this does not work for you... then I really do not know what else to do. Maybe you should chuck this ISAPI thing out the window and wait for IIS7 modules. :-P