Solved

DDE SetLink Snafu

Posted on 1997-05-28
2
358 Views
Last Modified: 2010-04-03
I attempt to use SetLink (with a DDEClientConv) to determine
whether or not an application is running, then I take action
depending on the result. I have tried this with ConnectMode set to ddeManual and ddeAutomatic but I get the same odd effect - namely, the application I am searching for gets executed if it isn't already running! Now, this doesn't happen all the time - I can write a very simple Delphi program to turn a program on and off that works as expected - but in the context of a larger, more complicated Delphi program I see this behaviour happenning. My question to you is, what might make SetLink behave this way? (actually I think it's the OpenLink implicit to a ddeAutomatic that causes it to happen. When I do it with ddeManual it is not the SetLink but the OpenLink which causes an instance of the  
app to be fired up).  
0
Comment
Question by:sidarthur
2 Comments
 

Accepted Solution

by:
arnoldu earned 100 total points
ID: 1336637
I have looked up the thing in the VCL (assuming you are using Delphi 2.0). Whats going on is this:
OpenLink tries to establish a DDEConversation via a DDEConnect to the application ... if this DDEConnect fails then OpenLink executes a WinExec on the application, even if it is already running. Write me if you want me to go more inside the problem - I could send you some lines from the source code and comment it for you that you understand whats possibly wrong
//Arnold
0
 

Author Comment

by:sidarthur
ID: 1336638
Arnoldu:

So your saying that there is an explicit attempt by the OpenLink to open the application using WinExec? How is it getting the path
and name of the application to run?!? More importantly, how do I
avoid it doing that?

Thanks.

  - S -
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 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