Recent

Author Topic: UniqueInstance 1.0 released  (Read 7500 times)

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
UniqueInstance 1.0 released
« on: April 18, 2011, 03:29:21 am »
Hi,

After almost four years since the last release i'm proudly to announce a new version of Unique Instance component.

More information in http://wiki.lazarus.freepascal.org/UniqueInstance

The news:

    * Fix application being detected as running after a crash under unix
    * Fix crash when compiling with Gtk2 widgetset
    * Set default values of published properties
    * Optimizations and code clean up
    * New icon

Takeda

  • Full Member
  • ***
  • Posts: 157
Re: UniqueInstance 1.0 released
« Reply #1 on: April 18, 2011, 05:51:04 am »
Cool.. :)
I love it..  :D

I hope it will works in my projects. Amen.

Thank you for your times to built this component, Sir.
« Last Edit: April 18, 2011, 05:53:35 am by Takeda »
Call me Takeda coz that's my true name.
Pascal coding using Lazarus => "Be native in any where.."

ƪ(˘⌣˘)┐ ƪ(˘⌣˘)ʃ ┌(˘⌣˘)ʃ

michaelthuma

  • New Member
  • *
  • Posts: 49
Re: UniqueInstance 1.0 released
« Reply #2 on: April 18, 2011, 10:10:00 am »
Thank you, well done!

krexon

  • Jr. Member
  • **
  • Posts: 80
Re: UniqueInstance 1.0 released
« Reply #3 on: April 18, 2011, 03:39:10 pm »
Is it working in terminal services environment?
I have one windows server and 5 users which launch ie. app.exe through RDP protocol (Jestro Cocpit Client - similar to Citrix Client)
When I check server's task manager I see 5 instances of app.exe. But I have one application I would like not to run more than once. I wrote procedure to check unique instances but it doesn't work. It doesn't see other processes, only from my session.

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: UniqueInstance 1.0 released
« Reply #4 on: April 18, 2011, 06:03:23 pm »
Quote
Is it working in terminal services environment?
I have one windows server and 5 users which launch ie. app.exe through RDP protocol (Jestro Cocpit Client - similar to Citrix Client)

Not tested since i don't have such setup.

You can test yourself. I'd suggest using the function InstanceRunning from unit UniqueInstanceRaw since is a server application.

SunyD

  • Guest
Re: UniqueInstance 1.0 released
« Reply #5 on: April 22, 2011, 02:44:44 pm »
Is it working in terminal services environment?
I have one windows server and 5 users which launch ie. app.exe through RDP protocol (Jestro Cocpit Client - similar to Citrix Client)
When I check server's task manager I see 5 instances of app.exe. But I have one application I would like not to run more than once. I wrote procedure to check unique instances but it doesn't work. It doesn't see other processes, only from my session.

Try this in your main project file:
Code: [Select]

uses windows;

var  MySem  : THandle;
begin
  // check if 1.Start ?
  MySem := CreateSemaphore(nil,0,1,'ThisStringMustBeUnique18454');
   if ((MySem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS)) then begin
     CloseHandle(MySem);
     Halt;   //Close The programm
   end;
 // End of check if 1.Start ?

 // put here your code like
 //......



 

TinyPortal © 2005-2018