user1069650
user1069650

Reputation:

Calling a VS2010 C++ dll from VB in Visual Studio 6

It's my first question in Stack Overflow and it goes like this: I'm implementing some algorithms in C++, for a company that will use them as a DLL from Visual Basic in Visual Studio 6 (service pack 6). All the above (building as DLL, ability to call from VB, VS6) are mandatory and not something I can change. My approach so far (since I was asked to deliver code "compilable" in VC6) was to make the original implementation in VS2010 (with C++98 code standards), port and compile the code as a DLL in VC6, make function wrappers, and finally make "caller functions" in VB, accessing the DLL code. If I could use Boost::Geometry (eg make a wrapper function that performs a polygon union without exposing the template mechanism) my life would be much much better, but I can't compile it in VC6 so here is what I'm asking: Could a C++ DLL built in VS2010, be called from Visual Studio 6? Are there any tips or pitfalls? I simply want to use some newly made, fully tested, trustworthy C++ goodies as independent libraries that the recipient won't have the need to debug (at least I don't think they are planning to debug Boost).

Upvotes: 0

Views: 815

Answers (1)

JosephH
JosephH

Reputation: 8805

I would suggest creating an ActiveX component using ATL so that you can simply add them as references in VB6

Upvotes: 1

Related Questions