Compile your common modules into one .DLL?? 
Author Message
 Compile your common modules into one .DLL??

merlin

If you want to put your common functions in a dll, you have to add them as
public methods in a Class module, or call the functions/methods in the
General Modules from public methods in a Class Module, in the dll.

Then after you've compiled the dll you set a reference to it, Project |
References and browse to where the dll is, then it's

Dim objMyDll As MyDll.CLassName
Set objMyDll = New MyDll.ClassName
objMyDll.say_hello

regards

Ian

** invalid email address, change dk to denmark

homepage http://www.*-*-*.com/
Tips & Tricks page http://www.*-*-*.com/


Quote:
> p.s I should mention that I started a new project as an ActiveX dll type
> project and put in a simple function and compiled it. I assume that might
be
> the how to get the .dll part, but as to how to use it I'm a bit lost.

> ----------------
> for example:

> public sub say_hello()
>     msgbox "Hello"
> end sub

> If it was in a module I would say

> call say_hello
> -----------------

> But if in a .dll how do I call that from my VB app. ?

> There we go I think thats a bit clearer as to what I'm haveing trouble on.

> Thankyou for any help in advance,
> merlin



Wed, 10 Mar 2004 15:48:38 GMT  
 Compile your common modules into one .DLL??
And, you should understand that the only kind of .DLL that VB can create is
an in-process COM Component, and that, even using it locally, you will pay
some extra overhead for COM processing.

To create a "real, local Dynamic Load Library", you'll have to use a
language other than VB... if you have Visual Studio, C++ will do it. If you
want to stick with BASIC, powerbasic will do it -- http://www.powerbasic.com
is the website. And, there are other PC languages you can use to create
Windows .DLLs, as well.


Quote:
> merlin

> If you want to put your common functions in a dll, you have to add them as
> public methods in a Class module, or call the functions/methods in the
> General Modules from public methods in a Class Module, in the dll.

> Then after you've compiled the dll you set a reference to it, Project |
> References and browse to where the dll is, then it's

> Dim objMyDll As MyDll.CLassName
> Set objMyDll = New MyDll.ClassName
> objMyDll.say_hello

> regards

> Ian

> ** invalid email address, change dk to denmark

> homepage http://www.kingsoft-denmark.com/
> Tips & Tricks page http://tips.kingsoft-denmark.com/



> > p.s I should mention that I started a new project as an ActiveX dll type
> > project and put in a simple function and compiled it. I assume that
might
> be
> > the how to get the .dll part, but as to how to use it I'm a bit lost.

> > ----------------
> > for example:

> > public sub say_hello()
> >     msgbox "Hello"
> > end sub

> > If it was in a module I would say

> > call say_hello
> > -----------------

> > But if in a .dll how do I call that from my VB app. ?

> > There we go I think thats a bit clearer as to what I'm haveing trouble
on.

> > Thankyou for any help in advance,
> > merlin



Thu, 11 Mar 2004 01:23:36 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB5 compiled module vs compiled DLL written in Visual C++ 5

2. Compile all DLL in one?

3. How to call one VB class module method from another class in an ActiveX dll

4. Two Virtually Identical Modules, One Works, One doesn't

5. One Big Module or Several Small Ones?

6. active-X DLL - Helpfile not found using the compiled dll

7. Compiling Module

8. Compile Error in Hidden Module ACC97

9. Problem compiling Module -- error code 32811

10. Compile Error in Hidden Module

11. Compile and Save All Modules Problem in Access97

12. Help: Compile and save all modules in Access runtime with VBA code

 

 
Powered by phpBB® Forum Software