VB声明 |
|
Declare Function DeviceIoControl Lib "kernel32" Alias "DeviceIoControl" (ByVal hDevice As Long, ByVal dwIoControlCode As Long, lpInBuffer As Any, ByVal nInBufferSize As Long, lpOutBuffer As Any, ByVal nOutBufferSize As Long, lpBytesReturned As Long, lpOverlapped As OVERLAPPED) As Long |
|
说明 |
|
对设备执行指定的操作 |
|
返回值 |
|
Long,非零表示成功,零表示失败。会设置GetLastError |
|
参数表 |
|
参数 |
类型及说明 |
hDevice |
Long,设备句柄 |
dwIoControlCode |
Long,带有 FSCTL_ 前缀的常数。参考设备控制选项的部分列表 |
lpInBuffer |
Any,具体取决于dwIoControlCode参数。参考设备控制选项的部分列表 |
nInBufferSize |
Long,输入缓冲区的长度 |
lpOutBuffer |
Any,具体取决于dwIoControlCode参数。参考设备控制选项的部分列表 |
nOutBufferSize |
Long,输出缓冲区的长度 |
lpBytesReturned |
Long,实际装载到输出缓冲区的字节数量 |
lpOverlapped |
OVERLAPPED,这个结构用于重叠操作。针对同步操作,请用ByVal As Long传递零值 |
注解 |
|
可用于windows 95 和 windows nt,但并非所有的操作都得到了两种操作系统的同时支持 |