Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there any way of re-connecting a File Handle (CreateFile) to a File Path.

:)
Posted

To retrieve the file path from a valid file handle returned by CreateFile() on Windows, look at GetFinalPathNameByHandle() [^]. If it was the file name you were interested in, check out GetFileInformationByHandleEx()[^].
 
Share this answer
 
After you have created the file, open it. You should be holding the file name and path in variables, so this won't be too difficult.
 
Share this answer
 
After you have created the file, open it. You should be holding the file name and path in variables, so this won't be too difficult.

Well, actually it Can be!


A File Handle is created somewhere in a Stack of Libs. Something goes wrong. To retrieve a Debug Report of 'what' was intended to happen 'where' would be usefull.

Regards,
Bram.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900