En cours

Get Open File Path From WIndow Handle

Hi. All

I want to get C function about Get opened file path from window handle.

(not file handle and not executable path)

for example,

If c:\abc\[url removed, login to view] is opened using [url removed, login to view], and if we know winword's main window handle,

I want to get 'c:\abc\[url removed, login to view]'.

caution :

1) it is support that when read-only file is opened, and if we know window handle.

we get opened file path from window handle

2) it is support MDI Child window (like excel or powerpnt...)

3) Win XP, WIn 7, WIn VISTA support (32 bits)

4) I need source file and project files

target function :

Bool GetOpenFilePath(HWND, wchar *filepathvar)

if true, opened file path is saved to filepathvar, and return true.

if false, return false

test scenario.

1. create c:\[url removed, login to view], and open c:\[url removed, login to view] using [url removed, login to view],

if winword's window handle is 0x1234,

We get opened file path using below function

==> GetOpenFilePath(0x1234, filepathvar)

if true, filepathvar is 'c:\[url removed, login to view];

2. create c:\readonly\[url removed, login to view], and set c:\readonly\[url removed, login to view] file as readonly,

and open c:\readonly\[url removed, login to view] using [url removed, login to view],

if winword's window handle is 0x5678,

We get opened file(read only file) path using below function

==> GetOpenFilePath(0x5678, filepathvar)

if true, filepathvar is 'c:\readonly\[url removed, login to view]'

3. create c:\[url removed, login to view], c:\[url removed, login to view] 2 files. (c:\[url removed, login to view] is normal file, and c:\[url removed, login to view] is readonly file)

and open c:\[url removed, login to view], c:\[url removed, login to view] (using [url removed, login to view])

Now, Excel window have 2 child windows ([url removed, login to view], [url removed, login to view])

assume that we know child window handle

([url removed, login to view] => 0x1000 child window handle, [url removed, login to view] => 0x2000 child window handle)

if we use GetOpenFilePath(0x1000, filepathvar)

if true, filepathvar is 'c:\[url removed, login to view]'

if we use GetOpenFilePath(0x2000, filepathvar)

if true, filepathvar is 'c:\[url removed, login to view]'

Compétences : Programmation C

Voir plus : file path handle, executable path window handle, path window handle, path file handle, getopenfilepath, handle path, excel getopenfilepath, windows handle path, main window handle exe, window handle exe path, file path file handle, file path windows handle, path windows handle, winword open file path, path handle, open file handle file, read path, file path using window handle, vista 10 programming, test scenario, set bits, return path, open source programming, get c programming, c programming get

Concernant l'employeur :
( 22 commentaires ) Seoul, Korea, Republic of

N° du projet : #1053924

7 freelance ont fait une offre moyenne de 600 $ pour ce travail

srinichal

I would like to work on the project

700 $ USD en 8 jours
(46 Commentaires)
5.7
waterwood

please check PM. Thanks.

750 $ USD en 0 jours
(10 Commentaires)
5.5
thandadude

Hi, fairly possible. need to use Import Address [url removed, login to view] PM me for more details. Angad.

500 $ USD en 5 jours
(3 Commentaires)
4.2
jasminjx

Hello. I have already made this function. If you want, i can provide screenshot about this. If you choose me, i want to chat with you for details. Looking forward to your response. Thanks.

250 $ USD en 1 jour
(3 Commentaires)
3.3
mars8246

Hello. How are you? I know what you want and how to do it. I have techniques of windows process management and hooking. This project is in my power. Best regards.

750 $ USD en 3 jours
(1 Commentaire)
0.0
keies

Hi,please see PM

500 $ USD en 0 jours
(0 Commentaires)
0.0
ankasoftware

Please have a look at PMB.

750 $ USD en 3 jours
(0 Commentaires)
0.0