-
Jul 19th, 2011, 02:50 PM
#1
Thread Starter
Lively Member
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?
-
Jul 19th, 2011, 03:33 PM
#2
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.
-
Jul 19th, 2011, 03:37 PM
#3
Thread Starter
Lively Member
Re: vb6 'rte 53: file not found'
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?
-
Jul 19th, 2011, 04:59 PM
#4
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 ?
-
Jul 20th, 2011, 02:19 AM
#5
Thread Starter
Lively Member
Re: vb6 'rte 53: file not found'
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
gives error:
-
Jul 20th, 2011, 09:43 AM
#6
Re: vb6 'rte 53: file not found'
-
Jul 20th, 2011, 10:16 AM
#7
Thread Starter
Lively Member
Re: vb6 'rte 53: file not found'
Originally Posted by MartinLiss
Try
mbox "hello world"
still not working, i'll get the same error like on the picture above
-
Jul 20th, 2011, 10:40 AM
#8
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.
-
Jul 20th, 2011, 11:08 AM
#9
Lively Member
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
-
Jul 20th, 2011, 11:11 AM
#10
Re: vb6 'rte 53: file not found'
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.
-
Jul 20th, 2011, 11:31 AM
#11
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|