Hi, every one, I got a problem when using the ::GetModuleHandle API, it always fails if I pass in an absolute path, for example, ::GetModuleHandle("c:\\my app\\app.dll"); will fail even though the file "c:\\my app\\app.dll" exists, but if I copy the program into that directory and call ::GetModuleHandle("app"); it succeeds.
Why can't I use an absolute path for the module? Thank you.
A suspicion I have is that perhaps the module is in several places on your machine.
The one your process is loading is probably not the full path you are testing.
You can try this topic from MSDN: "Enumerating All Modules For a Process" to determine if the module you are loading is actually from the path you suspect. If it is not indeed loaded from that specific path, then the function call will fail.
systemtray, taskbar - its not a big reason. in both cases main windows are hided.
i won't dispute about stability, but as i said: use findwindow to get handle.
u've caption and u've class, or u dont've? its quite complete info to use this function.
Yes, i have the caption.
- I find the window when its visible on screen.
- I don't find the window when it is minimized to the tray.
it is simply not listed when using the callback func.
Last Visit: 31-Dec-99 19:00 Last Update: 17-Nov-17 23:10