IIS Native Module RegisterModule function not invoked

  c++, iis, module, native

I compiled IIS Native Module. If I compile 32bit and install in IIS. It gives error

The Module DLL … failed to load. The data is the error. Data is 7E000000

If I compile 64 bit and install it in IIS, I have no error but module is not working.

I added code to write to log. When I use C:WindowsSystem32inetsrvw3wp.exe in debugging property and debug it works and writes to log but when I use it in IIS neither RegisterModule is invoked, nor any of the notifications.

Any idea what may be wrong?

Source: Windows Questions C++