Solved

Passing cmd line args from one app to another that's already running?

Posted on 1999-01-05
2
191 Views
Last Modified: 2013-11-20
I have an application that allows only one instance of itself to run. I'd like to pass in the command line args from a second instance that's trying to start up, then dismiss the second instance before it comes up. Is there any easy way to do this?
0
Comment
Question by:barrett
[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
 
LVL 1

Accepted Solution

by:
dd_b earned 100 total points
ID: 1327261
hi

there is no direct way to send cmd parameter, b'cas u r not controling the application. The easiest way to pass parameter is  using file, whenever u start your appliction write some signeture in the file ( temp file ). & delete on exit. Using this file on start of your application always check the signeture. if signeture exits return false. This is what i did in my project.

0
 

Author Comment

by:barrett
ID: 1327262
OK, this is interesting. Is the idea that you write the command line params to the temp file? Then send the first instance of the app, say, WM_ACTIVATEAPP - when the first instance receives the message, it could then check the temp file for params and handle accordingly. Seems this could be done with the registry as well.
0

Featured Post

Technology Partners: 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
How to create frequencies of a variable from SAS dataset? 10 146
repeatEnd java challenge 42 85
deburging in oracle form 12 119
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 1,693
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

751 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