Solved

Including Turbo C++ modules in VB

Posted on 2001-06-12
2
422 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now