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
是不是有类似文件包含的方法调用????

解决方案 »

  1.   

    不用.你编译后再运行看看.
    han.DLL要放到系统目录或者和EXE放到同一目录
      

  2.   

    han.DLL要放到系统目录或者和EXE放到同一目录!!!!强烈同意。楼主当然也可以直接放到某处明显的地方,譬如C盘根目录,然后:
    Public Declare Function IsWinNT Lib "C:\han.DLL" () As Long
    这样试一下。
      

  3.   

    还是把DLL文件 放到系统目录吧 省心呀
      

  4.   

    的确生成EXE文件再执行是没有问题的
    为什么DEBUG运行就不行呢
    我的所有工程文件全在桌面上,有关系吗?
      

  5.   

    放到E:下还是找不到工程目录下的han.dll
      

  6.   

    是不是有设置加载DLL文件路径的地方啊?朋友们帮忙了