|
-
Mar 15th, 2002, 02:16 AM
#1
Thread Starter
Lively Member
Running an ActiveX Dll
Is it possible to run an ActiveX Dll created with VB in the same way you would run a windows API DLL?
All attempts so far have failed due to the lack of an entry point.
-
Mar 15th, 2002, 03:40 AM
#2
You want the long anser or the short answer?
The short answer: no.
The long anser: still no.
-
Mar 15th, 2002, 01:28 PM
#3
Out of curiosity why do you want to use them the same?
-
Mar 15th, 2002, 02:37 PM
#4
Thread Starter
Lively Member
I need to write a DLL for a program that will be accessible from a number of other different programs. But I only have the necessary library files for my main program in VB. Hence, if the DLL has to be written in C the libraries will need to be rewritten (a major task considering the number involved).
-
Mar 15th, 2002, 03:14 PM
#5
Well an ActiveX DLL is COM based so any language that can use COM Objects should be able to use your ActiveX DLL. Or maybe I missed something.
-
Mar 15th, 2002, 05:48 PM
#6
Thread Starter
Lively Member
I hear what you are saying, however one of the programs that need to access the DLL has been written in VB and it is this program that keeps getting the error "Cant find Entry Point"
-
Mar 15th, 2002, 06:16 PM
#7
With ActiveX DLLs yo don't declare the individual functions like you do with standard/other dlls. You declare an object of one of the classes from the dll.
Say you have a MyClass class in your activeX dll and it has a Text property and a Transfer method. Then this is an example of how you would use it in VB (after you make a reference to it in your program):
VB Code:
dim obj as New MyClass
obj.Text="My Text"
obj.Transfer
-
Mar 15th, 2002, 06:20 PM
#8
Thread Starter
Lively Member
Your right, I will have to make it a reference within the other programs, something I was trying to avoid.
Thanks for your help, it has been nice to be able to bounce this topic around and clear my thinking.
-
Mar 15th, 2002, 08:00 PM
#9
Well you can take a bit of a performance hit and use latebinding if you don't want to make a reference. That will require the Projectname also.
VB Code:
dim obj as object
set obj=CreateObject("Project1.MyClass")
obj.Text="My Text"
obj.Transfer
set obj=nothing
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
|