文件句柄到文件名 [英] File Handle to File Name

查看:92
本文介绍了文件句柄到文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以将文件句柄(CreateFile)重新连接到文件路径.

:)

Is there any way of re-connecting a File Handle (CreateFile) to a File Path.

:)

推荐答案

要从Windows上CreateFile()返回的有效文件句柄中检索文件路径,请查看 GetFileInformationByHandleEx() [ ^ ] .
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()[^].


创建文件后,将其打开.您应该将文件名和路径保存在变量中,这样就不会太困难.
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.


创建文件后,将其打开.您应该将文件名和路径保存在变量中,这样就不会太困难.

好吧,实际上可以!


文件句柄在库库中的某个位置创建.出问题了.检索什么"打算在哪里"发生的调试报告将很有用.

问候,
布拉姆.
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.


这篇关于文件句柄到文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆