通过Windows.h函数关闭打开文件

Close an open file via Windows.h function

本文关键字:文件 Windows 函数 通过      更新时间:2023-10-16

如果我知道其名称,例如" c: 1.txt"(它是打开的vis createfile(...)),如何关闭Windows中的打开文件?谢谢

在您拨打createFile时创建的句柄即可。CloseHandle()

顺便说一句,当您有C 标准方法处理文件时,为什么要使用Windows API?

请参阅此