Solved

Including Turbo C++ modules in VB

Posted on 2001-06-12
2
430 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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
Course of the Month7 days, 13 hours left to enroll

632 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