Hi all
How can I get a file path and name from a file handle (returned by FCREATE)? I am sure that there is a Windows API to do this but I cannot workout how to call it from VFP.
Many thanks
Paul Newton
Hi Chris,
I just did: nHandle = FCREATE('pc.txt')
and it created a pc.txt in the current folder. I could not open it so I know it is the right file. Don't you have access to the original FCREATE command?
Peter
On 02/08/2019 13:22, Paul Newton wrote:
Hi all
How can I get a file path and name from a file handle (returned by FCREATE)? I am sure that there is a Windows API to do this but I cannot workout how to call it from VFP.
Many thanks
Paul Newton
[excessive quoting removed by server]
On 02/08/2019 13:22, Paul Newton wrote:
Hi all
How can I get a file path and name from a file handle (returned by
FCREATE)? I am sure that there is a Windows API to do this but I cannot workout how to call it from VFP.
That question is a doozie! What corner have you gotten yourself painted into?
More info would be helpful.
I think a string search on a FileToStr() on a LIST STATUS TO FILE might do it, but (Happy Days!) there aren't any Windows machines handy for me to test it.
I'll look at that Thanks Ted
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Ted Roche Sent: 02 August 2019 14:56 To: profoxtech@leafe.com Subject: Re: Get file path and name from file handle
Sent by an external sender ------------------------------
On 02/08/2019 13:22, Paul Newton wrote:
Hi all
How can I get a file path and name from a file handle (returned by
FCREATE)? I am sure that there is a Windows API to do this but I cannot workout how to call it from VFP.
That question is a doozie! What corner have you gotten yourself painted into?
More info would be helpful.
I think a string search on a FileToStr() on a LIST STATUS TO FILE might do it, but (Happy Days!) there aren't any Windows machines handy for me to test it.
-- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
[excessive quoting removed by server]
In this particular scenario I do not have access to the FCREATE
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Peter Cushing Sent: 02 August 2019 14:12 To: profoxtech@leafe.com Subject: Re: Get file path and name from file handle
Sent by an external sender ------------------------------
Hi Chris,
I just did: nHandle = FCREATE('pc.txt')
and it created a pc.txt in the current folder. I could not open it so I know it is the right file. Don't you have access to the original FCREATE command?
Peter
On 02/08/2019 13:22, Paul Newton wrote:
Hi all
How can I get a file path and name from a file handle (returned by FCREATE)? I am sure that there is a Windows API to do this but I cannot workout how to call it from VFP.
Many thanks
Paul Newton
[excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/e8bd7a1b-97c4-277f-7e54-a503504d303a@whispe... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/e8bd7a1b-97c4-277f-7e54-a503504d303a@whispering...
On 2019/08/02 14:22, Paul Newton wrote:
How can I get a file path and name from a file handle (returned by FCREATE)? I am sure that there is a Windows API to do this but I cannot workout how to call it from VFP.
Here is a link to how it is done in c.
https://docs.microsoft.com/en-us/windows/win32/memory/obtaining-a-file-name-...
Good luck,
Johan Nel George, South Africa.
Thanks Johan That's what I need but I need some help in using that API in VFP Paul -----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Johan Nel Sent: 02 August 2019 15:11 To: profoxtech@leafe.com Subject: Re: Get file path and name from file handle
Sent by an external sender ------------------------------
On 2019/08/02 14:22, Paul Newton wrote:
How can I get a file path and name from a file handle (returned by FCREATE)? I am sure that there is a Windows API to do this but I cannot workout how to call it from VFP.
Here is a link to how it is done in c.
https://docs.microsoft.com/en-us/windows/win32/memory/obtaining-a-file-name-...
Good luck,
Johan Nel George, South Africa.
[excessive quoting removed by server]