|
-
Mar 2nd, 2001, 10:27 AM
#1
Thread Starter
Junior Member
Is there a way to get the the full path and file name with only knowing the handle of the window?
Any code/api's will help.
-
Mar 2nd, 2001, 11:42 AM
#2
-
Mar 2nd, 2001, 04:32 PM
#3
Has anyone found/written a method that works for Windows 2000? I've seen several that work for windows 98 but I need one for windows 2000 compatibility.
Thanks
-
Mar 2nd, 2001, 11:54 PM
#4
Member
Shouldn't the snippets & functions & API calls & such like that work for 98 also work for 2000?
-Patrick
Visual Basic 6 SP5
Master Programmer Wannabe
Check out the API-Guide for all your API needs!
--Soli Deo Gloria--
-
Mar 3rd, 2001, 05:56 PM
#5
Not always. There are some pieces of code that work on 9x, but not NT and vice versa.
-
Mar 3rd, 2001, 06:19 PM
#6
Monday Morning Lunatic
This one seemed to work when I tried it in 2000.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Mar 3rd, 2001, 06:27 PM
#7
It only sort of works. On Windows 2000 it will only return the .EXE name of the given handle, but on Windows 9x it returns the entire path of the given handle. Does anyone have one that works for 2000?
-
Mar 3rd, 2001, 06:34 PM
#8
Monday Morning Lunatic
DING DING DING!!!!
If in doubt, stick "Ex" on the end of something 
GetModuleFileNameEx
The GetModuleFileNameEx function retrieves the fully qualified path for the specified module.
DWORD GetModuleFileNameEx(
HANDLE hProcess, // handle to process
HMODULE hModule, // handle to module
LPTSTR lpFilename, // path buffer
DWORD nSize // maximum characters to retrieve
);
This is definitely only NT4+, though.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Mar 6th, 2001, 10:50 AM
#9
Get form caption from exe name
Given the exe name, is there an API to get the title (form caption) if the application is running?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|