There's a new sample module that I wrote available here.
One of the great new things in IIS 7 is this great extensibility we built so that modules and request handlers can be written with a much richer API than before (those who've had to tackle writting an ISAPI filter or handler know the pain involved). Of course, most samples you see out there involve extending IIS 7 using ASP.Net modules. But, a little while back we had an internal "app building" week, so I took upon myself to figure out this new native(C++) extensibility.
Now, understand that I typically don't work with anything involving the request processing itself. That's the domain of my next-door office mate, AnilR (who also answers lots of questions in the forums). But I wanted to do learn about this new API and also do something cool, so I wrote a watermarker module all in C++ (along with extending config and the UI -- I really did want to get the "full experience"). Of course the UI is in managed code (C#), but overall, it was a pretty cool to do and I learned a lot.
A few observations that I made during this exercise. One is that the new native extensibility API is quite cool. You really can do much more with this new API than the old ISAPI ones. Next, I found that the management UI itself contains a very rich set of APIs to do all they do under the covers. Quite impressive really. And finally, I found that there are decent image manipulation code in native C++ that doesn't require a whole lot of dependencies (the CImage classes).
In any case, the point of it was to provide a cool native C++ module for folks to play with and use. So, please, go and download it, play with it and extend it further. The docs will mention a few things that I didn't finish that I left as work items to anyone else. After all, it is a sample and didn't want to give away all the answers... :) Hope you enjoy!
Comments