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\[login to view URL] is opened using [login to view URL], and if we know winword's main window handle,
I want to get 'c:\abc\[login to view URL]'.
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 open file from menu.
3) it is support MDI Child window (like excel or powerpnt or openoffice or wps office or Autocad or Solidworks....)
4) Don't use Interop (like [login to view URL])
5) WIn 7, Win 8 , WIn 10 support (32 bits and 64bit)
6) 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:\[login to view URL], and open c:\[login to view URL] using [login to view URL],
if winword's window handle is 0x1234,
We get opened file path using below function
==> GetOpenFilePath(0x1234, filepathvar)
if true, filepathvar is 'c:\[login to view URL];
2. create c:\readonly\[login to view URL], and set c:\readonly\[login to view URL] file as readonly,
and open c:\readonly\[login to view URL] using [login to view URL],
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\[login to view URL]'
3. create c:\[login to view URL], c:\[login to view URL] 2 files. (c:\[login to view URL] is normal file, and c:\[login to view URL] is readonly file)
and open c:\[login to view URL], c:\[login to view URL] (using [login to view URL])
Now, Excel window have 2 child windows ([login to view URL], [login to view URL])
assume that we know child window handle
([login to view URL] => 0x1000 child window handle, [login to view URL] => 0x2000 child window handle)
if we use GetOpenFilePath(0x1000, filepathvar)
if true, filepathvar is 'c:\[login to view URL]'
if we use GetOpenFilePath(0x2000, filepathvar)
if true, filepathvar is 'c:\[login to view URL]'
Hi,
I found from your job discription is that you need currently opened document full path with filename based on window handle.
Definatly I will not use Application intropbility here.
I done similar job previously, I can give you smilar application with GUI and Function you need like Bool GetOpenFilePath(HWND, wchar *filepathvar).
You will select applicaiton from list and I will provide you single document for single instance application.
Also if application is MDI I will provide you list of all opened document with filename and path.
Same will apply to function you need Bool GetOpenFilePath(HWND, wchar *filepathvar)
I have over 5+ years of experience in .Net platform using C# language with knowledge in different domain like Realtime, Database, IoT, Web development.
Let's talk further on chatbox, waiting for your reply.
Thanks
Veerendra
$250 USD in 3 days
5.0 (26 reviews)
6.3
6.3
7 freelancers are bidding on average $473 USD for this job
Hello, I am C expert and win32 programmer. what you are requesting is in the internals of win32 api. I remember reading Path from file handles (HANDLE) So I can help you in this. Open a chat with me.
I CAN COMPLETE YOUR PROJECT EASILY
Hello, I am programmer with enough experiences on C/C++ for 13 years.
C/C++ is nice programming language and I am majoring on it for long years so I have confident to complete your project by C/C++.
I can work by full time for your project and trying to satisfy the requirements.
I am designing the project from scratch and structure it well.
I am following the project's design process exactly, and if any error is found, fix it within 24 hours and provide maintenance free of charge for a month.
Client's idea + Programmer's good coding is the perfect result, this is my idea.
I want to keep long-term relationship for customer so I want to give the nice result.
If you want the perfect result, please contact with me.
hello get free sample
i'm interested in your project i have 10 years experience in this field
I'm highly skilled programmer in visual Basic {vb.net, vb6} , C# Programming
Database {MS-Access , SQL Server} , Crystal Report , Microsoft Reports
please check my portfolio
Hi
I have very good skills in C/C++ and it's clear about your job.
I'll complete your job PERFECTLY within 3 days.
I have experiences like your job.
I'll provide high quality and C function code.
Best Regards.