Results 1 to 17 of 17

Thread: run time error

  1. #1

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    run time error

    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?

  2. #2
    Addicted Member
    Join Date
    Jan 2006
    Posts
    234

    Re: run time error

    post the part of your code that is looking for that file, im tired maybee someone will help if im not here by the time you post

  3. #3

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    Re: run time error

    Code:
    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

  4. #4
    Hyperactive Member Chathura's Avatar
    Join Date
    Nov 2005
    Location
    Sri Lanka
    Posts
    345

    Re: run time error

    Did u debug the program? Else please debug and find what is the position the error occur. Also check whether you hv referenced the IO.Dll correctly
    If the post is heplful, Please Rate it
    Chathura Wijekoon

  5. #5

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    Re: run time error

    error at Function Inp(ByVal PortAddress As Integer) As Byte
    Inp = PortIn(PortAddress)

  6. #6
    Hyperactive Member Chathura's Avatar
    Join Date
    Nov 2005
    Location
    Sri Lanka
    Posts
    345

    Re: run time error

    Ok. Where is your IO.dll? Is it at System32? Try with registering it at System32.
    If the post is heplful, Please Rate it
    Chathura Wijekoon

  7. #7

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    Re: run time error

    ya...it is exist in System32

  8. #8
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Smile Re: run time error

    Add the dlls through Project--> Refrenece

  9. #9
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: run time error

    Have you registered the DLL at your computer?
    Start -> run -> regsvr32 Path of the DLL

  10. #10

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    Re: run time error

    when add from reference, it pop up:
    can't add a reference to the specified file.

  11. #11

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    Re: run time error

    when try add from: Start -> run ........it pop up.......
    C:\WINDOWS\system32|io.dll was loaded,but the DllRegisterServer entry point was not found.

  12. #12
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: run time error

    regsvr32 C:\WINDOWS\system32|io.dll

  13. #13
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: run time error

    When is this error popping up, in the IDE or when you run the exe?

  14. #14

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    Re: run time error

    Ide.....

  15. #15
    Hyperactive Member Chathura's Avatar
    Join Date
    Nov 2005
    Location
    Sri Lanka
    Posts
    345

    Re: run time error

    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

  16. #16

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    Re: run time error

    download form internet with code.....

  17. #17
    Hyperactive Member Chathura's Avatar
    Join Date
    Nov 2005
    Location
    Sri Lanka
    Posts
    345

    Re: run time error

    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
    Attached Files Attached Files
    Last edited by Chathura; Feb 27th, 2007 at 06:21 AM.
    If the post is heplful, Please Rate it
    Chathura Wijekoon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width