En  Fa
Discovering: Tips & Tricks  > Languages  > Delphi Tips  > Is another copy of application running
 
 

Is another copy of application running

   

Is another copy of application running

Description

This function detect if another copy of application is running

Delphi code

Function IsRunningApp:Boolean;
var
    Hwnd:Thandle;
begin
    hwnd:=CreateMutex(nil,False,'OneCopyMutex');
    Result:=false;
    If not(WaitForSingleObject(Hwnd,0)<>Wait_TimeOut) then
    Result:=true;
end;

Details
      
Writer: Salar Khalilzadeh
Date Sent: 6/14/2008 7:30 AM
Views: 557
Votes: 1
Rating:   from 4.00 Points

Your Rating:

bookmark this
 

There is no comment for this topic.
Language:

Copyright © 2009 SoftProjects.org | About | Valid XHTML | CSS