Solved

DDE SetLink Snafu

Posted on 1997-05-28
2
362 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 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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Show Listview image from database (String field) 5 144
How to debug For loops? 3 60
tidtcpserver connection lost handle 2 109
Browsing a TTreeView in Delphi 5 31
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

740 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