ShowWindow not working from a DLL on a 64-bit OS?
- by Auto Roast
I have a process that calls SetWindowsHook to catch keyboard events. In the DLL that processes the events, I conditionally call ShowWindow on the handle of the window of the process who set the hook.
That code works perfectly on a 32-bit OS (XP) and as a 32-bit application on a 64-bit OS, but when compiled to 64-bit, the window is not showing.
The code to make the window visible is:
if (idx == passlen) {
HWND h = FindWindow(NULL,windowNameToShow);
ShowWindow(h,SW_SHOW);
idx = 0;
logger->backerase(passlen - 1);
nextCharToMatch = passPointer;
}