Using VC++-DLL in VB

olka
olka used Ask the Experts™
on
We combined a couple of general function classes (error handling, user identification...), written in C++ (V6), in two DLLs. These DLLS should not only be used in Background-Tasks, written in C++, but also in the user interface implemented in Visual Basic (V6).
The only solution we found so far to use these classes in VB is to modify them into COM-Objects, which is an absolut overkill for our problem. We're looking for easier ways to handle this in VB?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You can still use this dlls in VB without modifying:
Declare Function ErrHandling Lib "MyCDLL.dll" (param1 As Long, Param2 As String) As Long
etc.

Cheers

Author

Commented:
I know how to use functions of my dll. I have classes in my dll, and i want to use these classes with their methods. But i can't see the methods in vb.
How can i instanciate my object in vb?

olka
VB accepts only two types of dll - standard DLL or ActiveX (COM). In first case you can use only exported functions (with declare). If you want to use classes, you need COM.

Cheers
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Commented:
Using the COM interface is the only way, unfortunately.
olka,
Please close out this question properly by stating what action you would like to be taken.  Otherwise, we will simply delete it without refunding the points back to your account.


TonyS
Community Support Moderator @ Experts Exchange
Open today, please update/finalize this.

Thanks,

Moondancer
Community Support Moderator @ Experts Exchange
I am sorry to see that Asker has not returned to update and finalize this question.  I am, therefore, force accepting this question.  In the event the Asker returns with additional needs related to this question, please respond and continue the collaboration process.
Thank you,
Moondancer
Community Support Moderator @ Experts Exchange
 

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial