[fpc-pascal] sending new parameters to existing instance

James Richters james at productionautomation.net
Sun Aug 27 18:18:01 CEST 2017


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





More information about the fpc-pascal mailing list