|
-
Nov 13th, 2001, 02:33 AM
#1
Thread Starter
Lively Member
ActiveX from VB
If I make a DLL in VB Let's say with a class with this functions in:
Code:
Public Variable As Integer
Public Function Func1(Param As Integer) As String
...
End Function
How do I use the DLL and the class in C++?
/J Lindroos
____________________
"My opinions may have changed, but not the fact that I am right"
-
Nov 13th, 2001, 12:27 PM
#2
Monday Morning Lunatic
It's debatable whether it particularly works in VC++, but...
First, make sure that the VB ActiveX DLL is registered. Then, copy it to your source directory. Use the following code:
Code:
#import <dllname.dll>
And then build it.
Hopefully VC should generate some include files for you containing all the necessary code to interface with the DLL.
Note: when using DLLs it's nearly always best to make them in C++ and call from VB using Declare than to do it this way round.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
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
|