程序提示
总是提示找不到dll入口点(VB) ....但是在XP 下就正常,怎么办?声明:
 Option Explicit
    Const HWND_TOPMOST = -1
      Const HWND_NOTOPMOST = -2
      Const SWP_NOSIZE = &H1
      Const SWP_NOMOVE = &H2
      Const SWP_NOACTIVATE = &H10
      Const SWP_SHOWWINDOW = &H40
  Private Declare Sub SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)
Dim Messwert1 As Single, Messwert2 As Single, i As Integer
Dim Messwert3 As Single, Messwert4 As Single
Private Declare Function ReleaseCapture Lib "user32" () As LongPrivate Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongPrivate Declare Function ShellExecute Lib "shell32.dll" _
   Alias "ShellExecuteA" (ByVal hwnd As Long, _
   ByVal lpOperation As String, ByVal lpFile As String, _
   ByVal lpParameters As String, ByVal lpDirectory As String, _
   ByVal nShowCmd As Long) As LongPrivate Declare Function RasGetConnectionStatistics Lib _
        "RasApi32.DLL" (ByVal hRasConn As Long, lpStatistics _
        As RASSTATS2000) As LongPrivate Declare Function RasGetLinkStatistics Lib _
        "RasApi32.DLL" (ByVal hRasConn As Long, ByVal _
        dwSubEntry As Long, lpStatistics As RASSTATS2000) _
        As Long
            
Private Declare Function RasEnumConnections Lib "RasApi32.DLL" _
        Alias "RasEnumConnectionsA" (lpRasCon As Any, lpcb As _
        Long, lpcConnections As Long) As Long
        
Private Declare Function RasGetConnectStatus Lib "RasApi32.DLL" _
        Alias "RasGetConnectStatusA" (ByVal hRasCon As Long, _
        lpStatus As Any) As LongPrivate Type RASSTATS2000
  dwSize As Long
  dwBytesXmited As Long
  dwBytesRcved As Long
  dwFramesXmited As Long
  dwFramesRcved As Long
  dwCrcErr As Long
  dwTimeoutErr As Long
  dwAlignmentErr As Long
  dwHardwareOverrunErr As Long
  dwFramingErr As Long
  dwBufferOverrunErr As Long
  dwCompressionRatioIn As Long
  dwCompressionRatioOut As Long
  dwBps As Long
  dwConnectDuration As Long
End TypeConst RAS_MaxEntryName = 256
Const RAS_MaxDeviceType = 16
Const RAS_MaxDeviceName = 32Private Type RASType
  dwSize As Long
  hRasCon As Long
  szEntryName(RAS_MaxEntryName) As Byte
  szDeviceType(RAS_MaxDeviceType) As Byte
  szDeviceName(RAS_MaxDeviceName) As Byte
End TypePrivate Type RASStatusType
  dwSize As Long
  RasConnState As Long
  dwError As Long
  szDeviceType(RAS_MaxDeviceType) As Byte
  szDeviceName(RAS_MaxDeviceName) As Byte
  szInBytes As Double
  syOutbytes As Double
End Type
程序:
Dim RAS(255) As RASType, RASStatus As RASStatusType
  Dim lg&, lpcon&, Result&
  Dim rtn As Long
  Dim myStats As RASSTATS2000
  Dim Downloaded As Single, Uploaded As Single
  Dim Speed As Single, Stunden As Single, Minuten As Integer, Sekunden As Long    RAS(0).dwSize = 412
    lg = 256 * RAS(0).dwSize
    Result = RasEnumConnections(RAS(0), lg, lpcon)    myStats.dwSize = LenB(myStats)
    rtn = RasGetConnectionStatistics(RAS(0).hRasCon, myStats)