-
July 26th, 2005, 10:21 PM
#1
Path Name
Hai..
I have a small problem, let me explain.
Suppose i have opened a file, name called d:\raghu\name.txt in the notepad application. Now i want to trace this path from my vc++ application. I have searched in the registry, but there is no use.
Please let me know.
Thanking you,
E.Veera Raghavendra.
-
July 26th, 2005, 11:15 PM
#2
Re: Path Name
ur problem is not so well clear as u hav tried to....
u are opening this file from ur program
OR
it has been opened by windows then ur are trying to get the path from ur project.
??
plz clear this thing or explain ur demand for project
Virender
-
July 27th, 2005, 04:13 AM
#3
Re: Path Name
the file is opened from the windows and i am trying to find the path from my application.
-
July 27th, 2005, 09:26 AM
#4
Re: Path Name
you can get the name of the file from notepad using the ::GetWindowText(..) api (since its there in the caption).
and you can use the ::SearchTreeForFile(..) api to look for it on the disc.
the cons for this solution:
1) its slow.
2) if there are multply files with the same name then there is a probelm.
second solution that will work for sure (but its not easy) is to use API hooking you can hook the ::CreateFile(..) api for the Notepad.exe process and you will know exactly what files it opened cause you can monitor the params of CreateFile.
Cheers
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
|