When I run my application compiled as x86 I get:
“the specified module could not be found”
It works fine compiled as x64. The application can be downloaded from codeproject. I need to run this class library inside a 32-bit app.
Errors I see in depency walker:
Error: Modules with different CPU types were found. Warning: At least
one delay-load dependency module was not found. Warning: At least one
module has an unresolved import due to a missing export function in a
delay-load dependent module.
Further info in dependency walker…
IESHIMS.DLL not found
This code causes the problem:
s_MouseHookHandle = SetWindowsHookEx(
WH_MOUSE_LL,
s_MouseDelegate,
Marshal.GetHINSTANCE(
Assembly.GetExecutingAssembly().GetModules()[0]),
0);
Later down the road…
int errorCode = Marshal.GetLastWin32Error();//error code comes back as 126
Any idea how to run inside a 32 bit app?
Add an x86 solution platform via the configuration manager, and change the Platform to x86 for both projects. “Processing Global Mouse and Keyboard Hooks in C#” works fine as x86.
http://msdn.microsoft.com/en-us/library/kwybya3w(v=vs.80).aspx