Re: [fpc-pascal] sending new parameters to existing instance
El 27/08/17 a les 21:52, James Richters ha escrit: 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... Thank you, that is exactly what I want but did not know what it was called. And here's simple wrapper around ipc to do what you want to do: http://wiki.freepascal.org/UniqueInstance Bye -- Luca ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] sending new parameters to existing instance
On 2017-08-27 14:52, James Richters wrote: 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... Thank you, that is exactly what I want but did not know what it was called. James http://wiki.lazarus.freepascal.org/SimpleIPC FPC has its own ipc unit that makes it pretty easy, and I ported it to a DLL so that any program in any language can communicate with an fpc program ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] sending new parameters to existing instance
>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... Thank you, that is exactly what I want but did not know what it was called. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] sending new parameters to existing instance
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
[fpc-pascal] sending new parameters to existing instance
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? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal