to find full path to exequted file in application

Andrew111

New member
Joined
Jun 13, 2023
Messages
1
Programming Experience
1-3
Hi for every one!
The main papose is to trase user activity in limits of one folder of FSO. For example we're listening the folder "T:\325". If the user open and exeqite file plased there, the time add to TimeSheets. Otherwise the TimeSeets stay unchanged.
I try to use the shellWindows_WindowRegistered event, but I don' have an idea what way i can catch the current window with lCookie param. Till the current moment I didn't found way to catch the window (as ie object) by lCookie. It would can help.
Also the second question - if I have window descriptor (hWnd) - can I find the executable file? (for example - file - T:\325\1.psd in Photoshop App. Part of path "T:\325\" needed to be foud as marker).
 
You have no guarantees that the lCookie is a window handle, an atom, or something else. In Windows programming, a cookie is meant to be an opaque value that only has meaning to the caller. You as an outside observer can't tell what it is (unless you also have the source code of the caller).

In general, is you enumerate the open handles of a process you can see what files it has open.
 

Latest posts

Back
Top Bottom