when the program is executed, it pop up:
Run-time error '53':
File not found: IO.DLL
but the IO.DLL is exist at the same directory with the program.
beside, the pop up is just for sometime, not every time.....so WEIRD!
when i restart the program, it works well.....
anybody know what had happened?
Option Explicit
'Declare Inp and Out for port I/O
Declare Sub PortOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Byte)
Declare Sub PortWordOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Integer)
Declare Sub PortDWordOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Long)
Declare Function PortIn Lib "IO.DLL" (ByVal Port As Integer) As Byte
Declare Function PortWordIn Lib "IO.DLL" (ByVal Port As Integer) As Integer
Declare Function PortDWordIn Lib "IO.DLL" (ByVal Port As Integer) As Long
Declare Sub SetPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte)
Declare Sub ClrPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte)
Declare Sub NotPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte)
Declare Function GetPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte) As Boolean
Declare Function RightPortShift Lib "IO.DLL" (ByVal Port As Integer, ByVal Val As Boolean) As Boolean
Declare Function LeftPortShift Lib "IO.DLL" (ByVal Port As Integer, ByVal Val As Boolean) As Boolean
Declare Function IsDriverInstalled Lib "IO.DLL" () As Boolean
'Global Variables and Constants
Global Const NUM_IOV = 32
'Data Variables defining I/O
Global DAQNAME$
Global NUM_AIP As Integer
Global NUM_AOP As Integer
Global NUM_DIP As Integer
Global NUM_DOP As Integer
Global gSpeed&
Global DIPs(1 To 16) As Integer
Global DOPs(1 To 16) As Integer
Global AIPs(1 To NUM_IOV) As Single
Global AOPs(1 To NUM_IOV) As Integer
Global gDOP As Integer
'Printer Variables
Global LPTNo%, LptPortAddr%
Global LPTData%, LPTStatus%, LPTControl%
Global DataReg%, StatusReg%, ControlReg%, iErr%
Global gInputV%, gMeasureV%, gOffSetV%
Function Inp(ByVal PortAddress As Integer) As Byte
Dim InpVal As Long
Dim bStatus As Boolean
Inp = PortIn(PortAddress)
End Function
Sub Out(ByVal PortAddress As Integer, ByVal Value As Byte)
Dim bStatus As Boolean
Dim InpVal As Long
Call PortOut(PortAddress, Value)
End Sub
C:\WINDOWS\system32|io.dll was loaded,but the DllRegisterServer entry point was not found.
There might be some supporting files(like resource files). You may have to copy them to some specified loaction before registering the "IO.Dll". I can't suggest more than this because I don't know anything about "IO.Dll". If it is provided with Windows, it may be installed with a driver. Where did you get this IO.dll?
If the post is heplful, Please Rate it
Chathura Wijekoon
Ok. Where did you placed the code. If you don't mind attach your app here. Then we can identify what is going on. Any way I think if you have put
[QUOTE]Option Explicit
'Declare Inp and Out for port I/O
Declare Sub PortOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Byte)
Declare Sub PortWordOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Integer)
Declare Sub PortDWordOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Long)
Declare Function PortIn Lib "IO.DLL" (ByVal Port As Integer) As Byte
Declare Function PortWordIn Lib "IO.DLL" (ByVal Port As Integer) As Integer
Declare Function PortDWordIn Lib "IO.DLL" (ByVal Port As Integer) As Long
Declare Sub SetPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte)
Declare Sub ClrPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte)
Declare Sub NotPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte)
Declare Function GetPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte) As Boolean
Declare Function RightPortShift Lib "IO.DLL" (ByVal Port As Integer, ByVal Val As Boolean) As Boolean
Declare Function LeftPortShift Lib "IO.DLL" (ByVal Port As Integer, ByVal Val As Boolean) As Boolean
Declare Function IsDriverInstalled Lib "IO.DLL" () As Boolean
Or see wheather it is like this
'Global Variables and Constants
Global Const NUM_IOV = 32
'Data Variables defining I/O
Global DAQNAME$
Global NUM_AIP As Integer
Global NUM_AOP As Integer
Global NUM_DIP As Integer
Global NUM_DOP As Integer
Global gSpeed&
Global DIPs(1 To 16) As Integer
Global DOPs(1 To 16) As Integer
Global AIPs(1 To NUM_IOV) As Single
Global AOPs(1 To NUM_IOV) As Integer
Global gDOP As Integer
'Printer Variables
Global LPTNo%, LptPortAddr%
Global LPTData%, LPTStatus%, LPTControl%
Global DataReg%, StatusReg%, ControlReg%, iErr%
Global gInputV%, gMeasureV%, gOffSetV%
Function Inp(ByVal PortAddress As Integer) As Byte
Dim InpVal As Long
Dim bStatus As Boolean
Inp = PortIn(PortAddress)
End Function[QUOTE]
At a module and the rest in the form the problem will solved. If not, please attach your app here
Last edited by Chathura; Feb 27th, 2007 at 06:21 AM.
If the post is heplful, Please Rate it
Chathura Wijekoon