你可以试一下 DeviceIOControl 
-微软亚洲技术中心 VB技术支持本贴子仅供CSDN的用户作为参考信息使用。其内容不具备任何法律保障。您需要考虑到并承担使用此信息可能带来的风险。具体事项可参见使用条款 (http://www.csdn.net/microsoft/terms.shtm)。

解决方案 »

  1.   

    这样的,现在有一个读取硬盘序列号的VXD,具体怎样调用呢?我现在知道了使用DeviceIOControl API,其声明为:
    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其中的hDevice怎样获取?谢谢。
      

  2.   

    以下是从MSDN中摘录的一段Input and Output Control in ApplicationsYou use the device IOCTL interface in an application to carry out "low-level" operations that are not supported by the Win32 API and that require direct communication with a VxD. Windows 95/98/Me implements the interface through the DeviceIoControl function, which sends commands and accompanying data directly to the given VxD. To use the interface, you open the VxD by using the CreateFile function, send commands to the VxD by using DeviceIoControl, and finally close the VxD by using the CloseHandle function. For more information, see the following topics: Opening the VxD 
    Sending Commands 
    Closing a VxD 具体的内容可以参考
    <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win32/hh/win95/devio_6bxv.asp>-微软亚洲技术中心 VB技术支持本贴子仅供CSDN的用户作为参考信息使用。其内容不具备任何法律保障。您需要考虑到并承担使用此信息可能带来的风险。具体事项可参见使用条款 (http://www.csdn.net/microsoft/terms.shtm)。 
      

  3.   

    good  问一个非技术性问题,vc++的技术支持好像没看到呀。
      

  4.   

    感谢 acptvb !我已经知道怎样做了。