I am writing an C++ ISAPI wildcard extension and I want to use the Event Log. I have ripped off some code which is doing this quite nicely. However when I use GetModuleFileName with parameter 1 (hModule) set to NULL I get the IIS worker process address instead of the DLL (i.e. the exe name (as documented!)). I would quite like to install the event source into the registry every time the dll calls GetExtensionVersion even though this is a little pointless - it just seems to keep manual config and possible errors at bay. To do this I want to be able to get the [FILEPATH]\[FILENAME] of the DLL.
Could anyone tell me how to do this ? If the answer is to get a hold of the hModule handle could you give me a fairly clear clue as to how to do this please as I'm not much cop with C++.