I've tried to simplify the logic from your nanoedit.lpr next way:

program Specom;
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
{$ifdef FPC}
 {$ifdef mswindows}{$apptype gui}{$endif}
{$endif}
uses
 {$ifdef FPC}{$ifdef unix}cthreads,{$endif}{$endif} 
 msegui,main,simpleipc;
 
function AnotherInstance: Boolean; 
 var 
  aClient: TSimpleIPCClient; 
 begin
  aClient := TSimpleIPCClient.Create(nil); 
  aClient.ServerID := 'Specom.exe';
  Result  :=    aClient.ServerRunning;  //There is another instance 
  aClient.Free;
end;

begin 
 if not AnotherInstance then
    begin
     application.createform(tmainfo,tmainform_SPECOM);
     application.run;
  end;
end.

It does not work: I've got a lot of instances. I've played with 
aClient.ServerID string: "Specom", "Specom.exe *32". Nothing from this 
helps. Where am I wrong?  




------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to