Public Type DRIVER_INFO_OK
ModalNumber As String * 40
SerialNumber As String * 20
ControlNum As String * 8
DriveType As Long
Cylinders As Long
Heads As Long
Sectors As Long
End TypePublic Declare Function ReadPhysicalDriveInNT Lib "han.DLL" (ByVal driveID As Integer, lpSerialNumberr As DRIVER_INFO_OK, ByVal bufLen As Integer) As Long
Public Declare Function ReadDrivePortsInWin9X Lib "han.DLL" (ByVal driveID As Integer, lpSerialNumberr As DRIVER_INFO_OK, ByVal bufLen As Integer) As Long
Public Declare Function IsWinNT Lib "han.DLL" () As Long
----------------------------------------------------------------
以上是Moudle1在Form1中怎么不能调用,DEBUG通不过呢?
Form1中: If IsWinNT Then Call ReadPhysicalDriveInNT(0, ds, 256)
Else Call ReadDrivePortsInWin9X(0, ds, 256)
End If
hahn = ds.SerialNumber
t$ = hahn
是不是有类似文件包含的方法调用????
ModalNumber As String * 40
SerialNumber As String * 20
ControlNum As String * 8
DriveType As Long
Cylinders As Long
Heads As Long
Sectors As Long
End TypePublic Declare Function ReadPhysicalDriveInNT Lib "han.DLL" (ByVal driveID As Integer, lpSerialNumberr As DRIVER_INFO_OK, ByVal bufLen As Integer) As Long
Public Declare Function ReadDrivePortsInWin9X Lib "han.DLL" (ByVal driveID As Integer, lpSerialNumberr As DRIVER_INFO_OK, ByVal bufLen As Integer) As Long
Public Declare Function IsWinNT Lib "han.DLL" () As Long
----------------------------------------------------------------
以上是Moudle1在Form1中怎么不能调用,DEBUG通不过呢?
Form1中: If IsWinNT Then Call ReadPhysicalDriveInNT(0, ds, 256)
Else Call ReadDrivePortsInWin9X(0, ds, 256)
End If
hahn = ds.SerialNumber
t$ = hahn
是不是有类似文件包含的方法调用????
han.DLL要放到系统目录或者和EXE放到同一目录
Public Declare Function IsWinNT Lib "C:\han.DLL" () As Long
这样试一下。
为什么DEBUG运行就不行呢
我的所有工程文件全在桌面上,有关系吗?