求助 FindFirstVolumeMountPoint 的写法
本帖最后由 itsky2 于 2020-4-13 09:13 编辑下面是我自己尝试的,无效...
Local $tTag = DllStructCreate("char buffer")
$aRet = DllCall("Kernel32.dll", "int", "FindFirstVolumeMountPoint", "str", $sGUID, "str", $tTag, 'int', DllStructGetSize($tTag))
sGUID这个是设备标识符,用下面的代码可以取到:
$RET = DllCall("Kernel32.dll", "int", "FindFirstVolume", "str", "", "str", 255)
ConsoleWrite($RET & @TAB & DriveGetLabel($RET) & @TAB & DirGetSize($RET) & @CRLF)
$RET = $RET
While 1
$RET = DllCall("Kernel32.dll", "int", "FindNextVolume", "int", $RET, "str", "", "str", 255)
If Not $RET Then ExitLoop
ConsoleWrite($RET & @TAB & DriveGetLabel($RET) & @CRLF)
WEnd
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-findfirstvolumemountpointw
补充个文档,顺便如果各位大佬有空的话,再帮忙写个Next的...谢谢 GetVolumePathNamesForVolumeName解决了,谢谢大家!
页:
[1]