Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB DLL calling C++ DLL

Status
Not open for further replies.

whodaman

Programmer
May 23, 2001
60
CA
Is there away for VS to do this? I'm assuming it's managed DLL. Isn't this one of .Net's key capabilities?

What I want to do is have a VB DLL that calls functions in a C++ DLL to speed up the code. I've tried setting the project dependcies and a few other things. I'm just lost with ideas now. Does anyone have a clue?
 
What you are trying to do is odd for two reasons.

1. Why call the C++ DLL from another DLL, when you can call it directly?

2. If everything is managed code, I don't see how the C++ DLL will run any faster than the VB DLL.
 
I know it is odd, but

1) I would like to call another DLL because most of the programmers in this project are VB programmers. Thus most of the code will be done in VB. We would still like to have a DLL that is modular enough for other .Net programs to use (thus some VB code should be in a DLL). The core routine that requires speed, will need to be in C++. Which brings to the point 2.

2) I have tested a C++ and VB DLL (both managed) and C++ is 10 times as fast. I really don't understand why myself because it should be the CRL, but that is the case for me.

I've tried registering the COM Interop, but that too doesn't work.

 
if its managed you don't need com interop just reference it like you do a vb.net dll and use it. But you need to be sure that its 100% managed and I think that means no pointers in there but I must say I'm not sure about that.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top