Solved

Need 16bit app to talk to 32bit app -DDE or OLE?

Posted on 1998-07-30
3
190 Views
Last Modified: 2010-05-03
I have a 16bit VB4 app that needs to talk (using mostly string messages) to a 32bit C++ app. Windows messaging is limited (i believe?) and I am told DDE is very touchy. I have been suggested OLE but how? I don't know. I just need to get short strings between apps very quickly. What do I do?
0
Comment
Question by:rblackwell
3 Comments
 
LVL 6

Expert Comment

by:alamo
ID: 1467300
Are the apps on the same machine? Is data flowing in both directions, or is the VB4 app exclusively sending data?
0
 

Author Comment

by:rblackwell
ID: 1467301
Both apps are on the same machine and data (string & Integer) is going in both directions. They will be combined in the future but time does not permitt.
0
 
LVL 9

Accepted Solution

by:
cymbolic earned 30 total points
ID: 1467302
DDE is not touchy, and extremely easy to implement in VB.  It's fast and reliable, but of course needs both applications to be running before it works!  I've used it without fail to communicate and interoperate older mail systems that were not MAPI compliant running in W95, and it's really the interface of choice for 16 bit apps in Windows.  Don't believe the FUD factor comments used to migrate the development lemmings into the waiting arms of Microsoft's 32bit world of profit.

For instance, the following was all I needed after setting the properties on a textbox control to kick off an email message under GroupWise using DDE:

    'Create GroupWise SendMail String, as documented
    ' in GroupWise online help.
    sql$ = "SendMail(" & xx$ & "DTaylor" & xx$ & ";" & xx$ & FrmProgress.Caption & xx$ & ";" & xx$ & sql$ & xx$ & ")"
    Text1.LinkMode = 0
    'GroupWise server: Ofwin GroupWise Topic: Command
    Text1.LinkTopic = "Ofwin|Command"    ' Set link topic.
    On Error Resume Next
    Text1.LinkMode = vbLinkManual
    If Err <> 282 Then Text1.LinkExecute sql$ 'Send GroupWise SendMail Command

The only tricky part is digging out the specs for some other person's program to perform the DDE link.  This is usually a whole hell of a lot simpler than trying to pry hidden registry switches from proprietary MS apps, and since you are setting it up on both ends, there's no "hidden" tricks to be bartered from a third party bug producer on this one!
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

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…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

786 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