Programming Advice needed (Which way to go?) 
Author Message
 Programming Advice needed (Which way to go?)

I am writing a DLL that will get used in other applications. The reason for
this is I have a bunch of functions that all the other applications will
use. So my thought is to combine them all to a DLL and reference all those
funtions from the DLL. So when I update the DLL everything updates as well..

The question is, how can I expose a function inside of the DLL to my
application. I have the reference already made to my DLL, but If I look at
the object viewer I only see my classes.

Do I need to have all my functions contained in a class in the DLL for me to
access it? I would like to reference the functions inside of the application
like:

mydllname.runFunction1

Can this be done?

Thanks!
-mike



Mon, 29 Dec 2003 03:55:53 GMT  
 Programming Advice needed (Which way to go?)
Yes, you have to have your functions in classes! But that's no problem.
Write them in a class module just the way you would do in a normal (.bas)
module. Your class-module has a property called 'Instancing'. Set this to 6
(GlobalMultiUse) and your function can be referenced either

mydll.functionname

or even only

functionname

within the calling project.

Carsten Dllmann



Mon, 29 Dec 2003 04:08:54 GMT  
 Programming Advice needed (Which way to go?)
Sweet it works! Now how do I get the little description of the function to
appear when I look at the library though "Object Browser"??

Thanks!!!

Quote:
----- Original Message -----

Newsgroups: microsoft.public.vb.controls
Sent: Wednesday, July 11, 2001 3:08 PM
Subject: Re: Programming Advice needed (Which way to go?)

> Yes, you have to have your functions in classes! But that's no problem.
> Write them in a class module just the way you would do in a normal (.bas)
> module. Your class-module has a property called 'Instancing'. Set this to
6
> (GlobalMultiUse) and your function can be referenced either

> mydll.functionname

> or even only

> functionname

> within the calling project.

> Carsten Dllmann



Mon, 29 Dec 2003 04:41:43 GMT  
 Programming Advice needed (Which way to go?)
I don't know exactly what you mean. The Object Browser will shows your
functions. But here you have to have the classes names again. I did not try
it, but in the Object Browser a function can not exist without the class, I
think. And calling your function actually causes VB to implicitly create an
instance of your class (you can test that by setting a breakpoint into the
Class_Initialize - Function of your class), so in fact your functions cannot
exist without an object/class neither at runtime nor in the Object Browser.

If you only have trouble finding them, try the search-function of the Object
Browser...

Hope I could help you! (and got to get some sleep now :-)



Mon, 29 Dec 2003 06:06:22 GMT  
 Programming Advice needed (Which way to go?)
Go into your class module (where you've defined your functions) and select
the "Tools...Procedure Attributes" menu item.  All the function names will
be in a combo box and you can associate a description with each of them.
Once completed, they'll show up in the Object Browser.

--
Good Luck,

Joe
------------------------------------------------------------
Before posting a question, see if it's already been answered:

http://groups.google.com/advanced_group_search
(use *vb* in the Newsgroup field to limit search to VB Groups)
------------------------------------------------------------



Quote:
> Sweet it works! Now how do I get the little description of the function to
> appear when I look at the library though "Object Browser"??

> Thanks!!!

> ----- Original Message -----

> Newsgroups: microsoft.public.vb.controls
> Sent: Wednesday, July 11, 2001 3:08 PM
> Subject: Re: Programming Advice needed (Which way to go?)

> > Yes, you have to have your functions in classes! But that's no problem.
> > Write them in a class module just the way you would do in a normal
(.bas)
> > module. Your class-module has a property called 'Instancing'. Set this
to
> 6
> > (GlobalMultiUse) and your function can be referenced either

> > mydll.functionname

> > or even only

> > functionname

> > within the calling project.

> > Carsten Dllmann



Mon, 29 Dec 2003 06:56:15 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. (2nd Post) BASIC programming advice needed: PKWARE'S compression utilities front end application - PROGRAMMING PROJECT

2. An experienced VB guy going to .NET needs advice

3. Audio Programming and Serial Port programming advice needed.

4. Modeless and Going both ways

5. TOTALLY NEW TO PROGRAMMING!!!! Need Advice Please :-)

6. Advice needed on turning SDI into MDI program

7. need advice on creating a program...

8. Need advice about checking for program install/Win 98 Concerns

9. Just started programming...need advice

10. Need advice on programming language

11. Ways to call a function in a compiled program

12. Get/SetPixel API - Need help on ways to speed up a loop

 

 
Powered by phpBB® Forum Software