(VC++ 2008 Express ) Problems calling from VB6

Started by
5 comments, last by MichaelJackson 16 years ago
Well... To my suprise, the Visual Studio 2008 environment peforms much much much better as to 2005 - so basicly, I find it useable. Anyways, I compiled my previous project made within VC6 the environment. That project is a Dynamic DLL. No problems with compiling (The migration was rather 'smooth') - however, the TLB that is compiled from Visual Studio C++ 2008 - I can load it up in Visual Basic 6 fine, but for some very strange reason, when I run the project OR even compile it - it says Engine.dll cannot be found (Engine.dll is the DLL I'm writing in C++) - I even tried making the TLB through the old VC6, and still - the same error pops up. So I'm assuming there are some project settings I have to set for the 2008 Environment. I really really really need to get this working - other wise all my work has been for naught T.T Basicly - my intention is. Compile DLL through VC 2008 and make a TLB - load that TLB in VB6 and essentially get the .DLL WORKING! - So as a summary. My problem is I can't load my DLL that is compiled in VC 2008 as it just reports back the error that it is 'missing'. VC6 NEVER did this - so don't assume im doing stupid stuff like not keeping the DLL in the root folder of the VB6 project (I'm keeping the location as defined within .ODL file)
Advertisement
You really need to clarify your post.

What does TLB stand for?

You must be doing something wrong, or misunderstanding something, for the simple reason that vs.net 2008 doesn't have VB6. Nor has visual studio supported it for nigh upon a decade. Do you mean vb.net?

Never mind where the VB project is located, make sure the DLL is at the same location as the executable it produces. Such as the debug or release folders in the root solution folder.
Rofl.

Yes I use VC6 and VB6 between each other - I have no mis-understanding here.

I have installed BOTH Visual Studio 6 and Visual Studio 2008 (Express) - Visual Studio 2008 was just recent, in fact it was today.

TLB = Type Library

And no I do NOT mean VB.net. The structure shouldn't just 'change' - of course I'm doing something wrong! VS 2008 is such a big jump from VS 6.

VB6 has NO release or Debug folder.
So, to clarify, you're trying to build a DLL in vs.net 2008 c++, and use it from vb6? Just asking, because as I said, your post is a tad unclear.

I strongly suggest you move over to vb.net. VB6 is ridiculously antiquated. The added bonus is you'd be able to work in a single IDE as well.

Quote:Original post by MichaelJackson
Rofl.


Yup, that kind of attitude will really encourage people to help you out.
*sigh* I knew you'd say that.

No - moving to VB.NET is out of the question, simply because the project is too big. I moved onto VC 2008 because the project leader suggested to do so (after I showed him what other people said in my previous topic) - but we will not move to VB.NET. I am able to use Declare Sub / Declare function to connect to the DLL but its just through .TLB it wont work.
Moving away from VB6 will likely help you in the long run. Being willing to switch from VC6 to VS.net 2008 but not VB6 to VB.net seems a bit silly to me, but whatever floats your boat. *shrug*

Anyways, I have a lot of experience interoping between languages, but I'm not sure anyone can help you based on the limited info at hand. There's a great many potential problems.

If you've created the DLL properly (ie, given things external declarations), and have it at the same location as the executable, VB6 should be able to use it. Don't know what else to tell you.
Thank you for trying.

This is my last project with the VB6 IDE. After that I'm dropping it completely.

This topic is closed to new replies.

Advertisement