Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Windows Server 上,默认情况下,外部 USB 磁盘并不总是被挂载。我希望我的程序(用 C# 编写)能够检测外部 USB 磁盘,识别它们,然后挂载它们。
完成后,它应该执行任何与“安全删除硬件”等效的程序,以刷新和卸载磁盘。
任何指针?
您正在搜索功能SetVolumeMountPointA和DeleteVolumeMountPointW。
为了找到卷,您可以使用FindFirstVolumeW和FindNextVolumeW。