Does Windows take care about DLL hooking?

Started by Stefan Pendl, July 09, 2008, 12:34:22 PM

Previous topic - Next topic

Stefan Pendl

Due to a problem with a hook DLL, I wounder if Windows allows hooking of 32-bit DLLs into 64-bit applications ???

I have checked MSDN, which says, that you can only hook a 64-bit DLL into a 64-bit application, so I created two separate DLLs one 32-bit and one 64-bit.

The whole thing consists of two files, an exe to enable/disable the hook and the dll.
Running the 32-bit package and the 64-bit package concurrently, the last enabled hook takes precedence, no matter if the hooked application is 32 or 64-bit.

Will I have to check against 32 or 64-bit in the DLL_ATTACH case of DLLMain and return FALSE, if they differ ???
---
Stefan

Proud member of the UltraDefrag Development Team