Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Including Turbo C++ modules in VB

Posted on 2001-06-12
2
Medium Priority
?
434 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 600 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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

704 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