Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in Programming. |
User | Post |
HyperHacker Posts: 686/5072 |
Don't see why not.
CurrentWindow.hWnd = GetForegroundWindow();
|
Vertex Posts: 4/4 |
Could you post the code you are using to get the hWnd and process module filename? |
HyperHacker Posts: 679/5072 |
It has to be valid, because passing the same hWnd to other functions gives correct results, and it's not the Unicode version. The function actually returns 0, as in 0 characters copied, or returns the name of the program that called it. |
Vertex Posts: 1/4 |
Are you absolutely sure that you are providing a valid hWnd? And if you're using the unicode version of GWMFN() then are you sure it's not returning a unicode string and your program is trying to interpret it as ANSI? |
HyperHacker Posts: 671/5072 |
I can't seem to figure out why but for some reason, GetWindowModuleFileName() just doesn't seem to work. I pass it one window's handle, and it returns the module of another or nothing at all. The desktop window returns shell32.dll which is correct, but the taskbar, created by the same process, returns nothing. Notepad and Calculator return nothing, and Winamp and Console (command prompt frontend) return the name of the program calling it! |