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?
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.
Re: vb6 'rte 53: file not found'
Quote:
Originally Posted by
LaVolpe
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?
Re: vb6 'rte 53: file not found'
When you do project > references does MBOX show up in the list?
When you do project > references > browse, do you find MBOX.DLL ?
Re: vb6 'rte 53: file not found'
Quote:
Originally Posted by
MartinLiss
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
http://img593.imageshack.us/img593/4715/naamloosjb.jpg
gives error:
http://img835.imageshack.us/img835/4030/naamlooswl.jpg
Re: vb6 'rte 53: file not found'
Re: vb6 'rte 53: file not found'
Quote:
Originally Posted by
MartinLiss
Try
mbox "hello world"
still not working, i'll get the same error like on the picture above
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.
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
Re: vb6 'rte 53: file not found'
Quote:
Originally Posted by
Stupidiot
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.
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.