Results 1 to 11 of 11

Thread: vb6 'rte 53: file not found'

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2011
    Posts
    118

    vb6 'rte 53: file not found'

    Hello,

    i've made an dll just to test it.

    the .DLL code:
    Code:
    Option Explicit
    
    Public Sub MBOX(ByVal Text As String)
    
        Call MsgBox(Text, vbOKOnly, "MBOX")
        
    End Sub
    my test project:
    Code:
    Private Declare Sub MBOX Lib "MBOX.dll" (ByVal Text As String)
    
    Private Sub Form_Load()
    
       Call MBOX("hello world")
    
    End Sub
    i've already gone to > project > references > browse > MBOX.DLL > checked the "MBOX.DLL" > ok
    I also registered the .DLL in the system but it's still saying "dll not found" but its not working

    Can someone tell me what im doing wrong?

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: vb6 'rte 53: file not found'

    VB does not create standard DLLs. VB creates Active-X DLLs. ActiveX dlls are ones you add to your project via the Project | References menu. If you've worked with ADO, DirectShow, FSO, MS Office automation, etc, same idea.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2011
    Posts
    118

    Re: vb6 'rte 53: file not found'

    Quote Originally Posted by LaVolpe View Post
    VB does not create standard DLLs. VB creates Active-X DLLs. ActiveX dlls are ones you add to your project via the Project | References menu. If you've worked with ADO, DirectShow, FSO, MS Office automation, etc, same idea.
    But when I did > project > references > browse > MBOX.DLL it didnt work, or do I have to change the code also then?

  4. #4

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2011
    Posts
    118

    Re: vb6 'rte 53: file not found'

    Quote Originally Posted by MartinLiss View Post
    When you do project > references does MBOX show up in the list?
    When you do project > references > browse, do you find MBOX.DLL ?
    if this is what you ment



    gives error:

  6. #6

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jan 2011
    Posts
    118

    Re: vb6 'rte 53: file not found'

    Quote Originally Posted by MartinLiss View Post
    Try

    mbox "hello world"
    still not working, i'll get the same error like on the picture above

  8. #8
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Re: vb6 'rte 53: file not found'

    Okay, looking at the error message it seems to be confused between the name of your project which I assume is MBOX and the name of your dll so I think you've not done something incorrectly in the DLL. I've never created a dll for VB but if you look at this MSDN article it shows you step by step how to do it. Good luck.

  9. #9
    Lively Member Stupidiot's Avatar
    Join Date
    Apr 2011
    Location
    India
    Posts
    95

    Re: vb6 'rte 53: file not found'

    I think you have to declare the mbox
    'dim mb as mbox / 'set mb=new mbox / dim mb as new mbox

    Private Sub Form_Load()

    MB.mbox ("hello world")

    End Sub

  10. #10
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Re: vb6 'rte 53: file not found'

    Quote Originally Posted by Stupidiot View Post
    I think you have to declare the mbox
    'dim mb as mbox / 'set mb=new mbox / dim mb as new mbox

    Private Sub Form_Load()

    MB.mbox ("hello world")

    End Sub
    I think you're right.

  11. #11
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: vb6 'rte 53: file not found'

    In your MBOX dll project, what is the class' name you used?
    Does that class have the MBOX function in it?

    If so...
    Code:
    Dim cMB As New MBOX.ClassName ' < change ClassName to the class name of that project
    cMB.MBOX "Hello World"
    If the above doesn't work, what is the Instancing property of the class inside your dll project.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

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