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

Articles

 

 

Tips and Tricks

 


 

Is another copy of application running

Print version  

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: 3/16/2008 7:30 AM
Views: 295
Votes: 0
Rating: Not Rated from Not Rated

Your Rating:
bookmark this
 

There is no comment for this topic.

Language:

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