Solved

Including Turbo C++ modules in VB

Posted on 2001-06-12
2
425 Views
Last Modified: 2007-12-19
Is is possible to  include Turbo C++ modules in Visual Baisc? I am having a module which has been developed in C++ ,Which is used to communicate to a external device so I want to include that C++ module in Visual Basic. I wish to pass parameters beteween VB & C++ . So is it possible?
Please treat this matter as most urgent .

0
Comment
Question by:arna
2 Comments
 
LVL 1

Expert Comment

by:morgan_peat
ID: 6180708
Very possible.
Either:
1. Compile your C++ code into a DLL, or other linkable binary.  You can then use Declare statements to call the exported functions in your DLL.
2. Compile a C++ module into VB during the compile process.  I haven't done this myself, but I know it is possible.
Read http://www.devx.com/upload/free/features/vbpj/1999/11nov99/jc1199/jc1199.asp fore more details.
0
 
LVL 3

Accepted Solution

by:
baldrick earned 200 total points
ID: 6180845
Yes I imagine it's possible... just extremely difficult. I recall Turbo C++ was Borland's old 16 bit compiler. It may be able to generate 16-bit DLLs, but I seem to recall back in those dark Win 3.1 days that 16 bit DLL programming is rather awkward since data segment DS will probably not equal the stack segment SS (get an old copy of Charles Petzold's "Programming Windows 3.1" for clarification on this). It won't be as simple as just changing a couple of compiler switches.

Although COM is a binary standard I wouldn't want to even consider recompiling a 16 bit C++ module under TC to be COM compliant. Scary stuff...


0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question