Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I have a dll that can be injected noepad process and I am hooking StartDoc function
I am only getting the document name , I want to get full path name of the file that is currently opened by notepad

like E:\Projects\GenDoc\Specs.txt

Regards,
Dileep S
Posted
Updated 6-Nov-13 1:31am
v2
Comments
Richard MacCutchan 6-Nov-13 9:59am    
How are you getting the document name?
Sergey Alexandrovich Kryukov 6-Nov-13 10:15am    
Do you really think that such a rudimentary application as notepad really deserves such an advanced technique as injection? :-)
Why doing it all? (This problem should be easy; you find a control's windows as a child of the main application window and send WM_GETTEXT. But why?)
—SA
dileep Perumbavoor 6-Nov-13 23:03pm    
Dear Richard,
The intention is when text file some.txt is double clicked and opened & Ctrl+P print is given I want to hook print dialogs ok/Print button click (Since it is not getting for other application like WinWORD ..) So I tried to hook StartDoc . Hooking SartDoc is possible all application like winword,execel, AdobeAcrobat Reader, Notepad, WritePad The sample Itried to hook obtained from http://www.codeproject.com/Articles/2082/API-hooking-revealed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900