0

I want to know that ,hwnd value of a file or application is constant through the life time or it can vary for a file or application after close?

1 Answers1

2

You should not expect HWND to be constant. Every time you run your application, you might get different handles for files, windows, and anything else.

msporek
  • 1,187
  • 8
  • 21
  • can i get the full path of a file using handle please give me a suggestion . like if my file in d:\abc\abc.txt when i opened this i get the the file title by using foreground() and gettext() of user32.dll i want the complete path where it is in actually. – Pradeep Kumar Das Dec 18 '14 at 12:54
  • Why don't you google for it first, not that hard to find: http://msdn.microsoft.com/en-us/library/windows/desktop/aa366789%28v=vs.85%29.aspx – msporek Dec 18 '14 at 12:56
  • I would even say "_will_ get" instead of "_might_ get" (that is, if you ever get the same values it would be out of the norm, while getting different values is the usual case.) – Christian.K Dec 18 '14 at 13:02
  • @Christian K. - I agree, but they don't necessarily need to differ, it's just that they will differ in 99.99999% cases ;-). – msporek Dec 18 '14 at 13:06
  • I got the executable file path like notepad.exe in c folder but i can't get the path in d folder .i search every where but did not get . – Pradeep Kumar Das Dec 18 '14 at 13:13