Ann: Forward the Command Line from One Instance to Another - October 2003 Tip

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Ann: Forward the Command Line from One Instance to Another - October 2003 Tip

The problem with using command line parameters for any application is that a
new instance of the application is started. For some apps it would be
preferable if there was only one instance of the app and the command line
could be forwarded to the previous instance. This can be done by looking for
a previous instance of the app, sending a WM_COPYDATA message to that
previous instance and exiting (if it is found). If it is not found then the
application is started normally. This is the technique used by MS Word and
other applications.