On 08/27/2017 12:18 PM, James Richters wrote:
I have a windows console application I wrote with Freepascal.    I can send
it a command line parameter for a file to use have it working so if I just
double click on the file I wish to open with my program, it launches and
opens it.   I am wondering how I can set it up so that double clicking a
second file will just load the new file into the first instance instead of
opening a second instance of the program.   I've been thinking up schemes for
how this could be done, but I think there must be some system in place that
does this already because a lot windows programs behave this way, just
loading the new file into the existing instance, but I'm not familiar enough
with how this is done.   Could someone please point me in the right direction
on how this is typically done?

i think you're looking for IPC (InterProcess Communication)... with this, the second instance would load up, find that there is one already running, tell the already running one about the new file to load, and then exit...


--
 NOTE: No off-list assistance is given without prior approval.
       *Please keep mailing list traffic on the list unless*
       *a signed and pre-paid contract is in effect with us.*
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to