下你所需,载你所想!
汇集开发技术源码资料

API挂载和卸载ISO镜像文件

:66.367KB :1 :2020-11-25 16:33:05

部分简介

VirtualStorageType = 取空白字节集 (20)
Parameters = 到字节集 (#OPEN_VIRTUAL_DISK_VERSION_1) + 取空白字节集 (40)
Path = { 116, 0, 101, 0, 115, 0, 116, 0, 46, 0, 105, 0, 115, 0, 111, 0, 0, 0 } ' 编码_Ansi到Unicode (“test.iso”)
ret = OpenVirtualDisk (VirtualStorageType, Path, #VIRTUAL_DISK_ACCESS_READ, #OPEN_VIRTUAL_DISK_FLAG_NONE, Parameters, Handle)
.如果真 (ret ≠ 0)
信息框 (“失败1”, 0, , )
返回 ()
.如果真结束
.如果真 (ConvertStringSecurityDescriptorToSecurityDescriptorA (“O:BAG:BAD:(A;;GA;;;WD)”, #SDDL_REVISION_1, sd, 0) = 假)
信息框 (“失败2”, 0, , )
返回 ()
.如果真结束
Parameters = 到字节集 (#ATTACH_VIRTUAL_DISK_VERSION_1) + 取空白字节集 (40)
ret = AttachVirtualDisk (Handle, sd, 位或 (#ATTACH_VIRTUAL_DISK_FLAG_PERMANENT_LIFETIME, #ATTACH_VIRTUAL_DISK_FLAG_READ_ONLY), 0, Parameters, 0)

热门推荐

相关文章