|
Thread: DLL
-
Jun 22nd, 2000, 01:14 AM
#1
Thread Starter
Junior Member
Hey,
I was wondering how I could export a set of routines into a .dll file...
I don't want to just add the functions to my template dir
And my .exe is growing in size, so I want to split the functions. And it'd be easier to debug... when I don't jump through all sorts of tested code!
Thanks
Thomas
Teenage programmer
VB6 Pro
-
Jun 22nd, 2000, 01:23 AM
#2
To export them to a DLL, create a new ActiveX DLL and add the functions like you normally would to the module.
Code:
Public Sub Hello()
MsgBox ("Hello")
End Sub
Then make a new Project, add Refrence to your DLL and use the code below to use it.
Code:
Private Sub Command1_Click()
Dim myclass As Class1
Set myclass = New Class1
myclass.Hello
Set myclass = Nothing
End Sub
-
Jun 22nd, 2000, 02:06 AM
#3
Thread Starter
Junior Member
Ok, but...
Thanks, but isn't it possible to code a "decent" DLL ?
So I can Declare Function About lib "MyDLL" ?
Thomas
Teenage programmer
VB6 Pro
-
Jun 22nd, 2000, 06:28 AM
#4
I have not tested it yet, but I believe you can do that. There is a lib file that is created when you make your DLL so use Project1 as your lib.
-
Jun 22nd, 2000, 07:47 AM
#5
Fanatic Member
Megatron:
If you've added a reference then there is no reason to set your classes up... unless I missed part of your conversation and your doing something with a class elsewhere. Once you add the reference you can simply state:
Code:
Private Sub Command1_Click()
Hello
End Sub
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
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
|