 |
| Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

December 30th, 2003, 01:22 PM
|
|
Authorized User
|
|
Join Date: Dec 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Creating a DLL using VB
I would like to create a DLL using VB, but NOT CREATING a Class, which forces invokation of the routines/functions stored in the DLL to be called as methods of a "ficticious" class. Rather, I would like to create my functions as standard functions in standard modules, so when called they are called as if they were normal VB functions
Is it possible? And, if so, how?
thanks
gisvb
|
|

December 30th, 2003, 01:42 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You can set your class to global multiuse. A class that is global multiuse does not require instantiation.
|
|

December 30th, 2003, 02:48 PM
|
|
Authorized User
|
|
Join Date: Dec 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thanks, after tiding my code, the invokation of a function stored in a dll crashes because it can not find the "entry point"
I am using VBA as main language, and the dll has been built using VB Studio 6... I am using a simple function like
public function multiplicar(a as double, b as double) as double
multiplicar=a*b
end function
Any suggestions for that ?
thanks
|
|

December 30th, 2003, 03:29 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I assume you are working off a dll that has a globalmultiuse class. Try creating a new Dll with the same functions (cut and paste). It may be when switching over the dll went flaky.
|
|

December 30th, 2003, 05:07 PM
|
|
Authorized User
|
|
Join Date: Dec 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thanks. I tried creating from scratch, but it can find the entry point.
It should be some basic error on my side, since all the stuff is very simple, but I must have missed something.
Anyway, the VBEditor recognizes de function, because when writing the name and the opening parenthesis it shows (in a tip) the arguments, so...... but at run time something happens.....
Any suggestions on that?
thanks again
|
|

December 30th, 2003, 05:39 PM
|
|
Authorized User
|
|
Join Date: Dec 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Does anyone know how to "extract" the function names contained in a dll?. I have read that the exported names in a dll might have suffixes added to the function names,... so maybe I have to check now what function names/entry points my dll has....
|
|

December 31st, 2003, 11:00 AM
|
|
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You said a new dll can find the entry point. Is this a typo? If not, why not just go with the new dll?
|
|

January 1st, 2004, 05:22 PM
|
|
Authorized User
|
|
Join Date: Dec 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
sorry, yes, it was a typo.... Entry Point CANNOT be found, so I am stuck here, without knowing what more to test... maybe registering through regsvr32???
|
|

January 1st, 2004, 06:52 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
If you have not registered, then do so. Regardless of whether you are going to instantiate the DLL it still needs to be registered.
|
|

January 2nd, 2004, 03:00 PM
|
|
Authorized User
|
|
Join Date: Dec 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I registered the dll successfully, but running the program again, crashes as usual because it is unable to find the entry point
Has to be something basic that I am doing wrong, or my computer has a strange setup somewhere...???
|
|
 |