?
Solved

DDE SetLink Snafu

Posted on 1997-05-28
2
Medium Priority
?
376 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
[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
 

Accepted Solution

by:
arnoldu earned 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

719 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