C++/Win32: How to wait for a pending delete to complete

前端 未结 13 1104
不思量自难忘°
不思量自难忘° 2020-11-30 03:20

Solved:

  • Workable solution: sbi\'s answer
  • Explanation for what really happens: Hans\'s answer
  • Explanation for why OpenFile do
13条回答
  •  长情又很酷
    2020-11-30 03:41

    I actually had the same issue while using the LoadLibrary(path). I couldn't delete the file in path.

    The solution was to "close the handle" or use the FreeLibrary(path) method.

    NOTE: Please read the "Remarks" on MSDN regarding the FreeLibrary().

提交回复
热议问题