通过Windows.h函数关闭打开文件
Close an open file via Windows.h function
如果我知道其名称,例如" c: 1.txt"(它是打开的vis createfile(...)),如何关闭Windows中的打开文件?谢谢
在您拨打createFile时创建的句柄即可。CloseHandle()
顺便说一句,当您有C 标准方法处理文件时,为什么要使用Windows API?
请参阅此
相关文章:
- C++ Windows 驱动程序MSB3030无法复制该文件,因为它找不到
- 如何加载(或映射)文件部分的最大大小,但适合在Windows上的RAM
- 在 Windows 上,是否可以让 dll 在不使用 PATH 环境变量的情况下在另一个文件夹中查找依赖项?
- c++17文件系统::recursive_directory迭代器()在mac上没有给出这样的目录,但在windows上
- 如何使 windows 命令提示符在C++可执行文件上显示返回值?
- 从存储为 Windows 资源 (c++) 的 png 中获取 png 文件数据
- vcruntime.h 从 Windows 包含文件夹中丢失?
- 在Linux上使用Clang / OLLVM交叉编译helloworld Windows可执行文件时的问题
- 如何在Windows内核中获取文件大小
- Qt自动生成的.rc文件无法打开包含文件'windows.h'
- MinGW GCC通配符编译所有文件(Windows)
- QTCreator G .EXE:致命错误:无输入文件(Windows)
- 切割和粘贴后监视文件(Windows shell扩展?)
- 如何读取目录中包含的所有文件 (WINDOWS)
- WebCam预览和捕获到文件(Windows)
- 从 c++ 中的当前目录复制文件(Windows API)
- 我可以将一个可执行文件与另一个可执行文件(Windows 服务程序)组合在一起,并将该程序作为逻辑服务运行吗?
- C++锁定文件Windows阻止模式
- 正在将明文AES 128密钥导出到缓冲区/文件Windows Crypto API c++
- 有效删除文件Windows c++