Solved

HPrevInstance for Delphi 3

Posted on 1997-11-14
1
295 Views
Last Modified: 2010-04-04
What is Delphi 3's equivalent statement for Application.HPrevInstance from Delphi 1?

I know that the 32 bit environment makes it hard for this but if anyone has already invented the wheel, well...

Thanks
0
Comment
Question by:vorlon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
titz earned 100 total points
ID: 1350518
HPrevinstace doesnt exits in delphi 3.
Therefore you have to create a mutex.

var
mhandle : Thandle;

....
Initialization

mHandle:=createmutex(nil,true,'xxx');
if getlasterror=error_already_exists then begin
   showmessage('Is running');
   halt;
end;
finalization
  if mhandle<>0 then closehandle(mhandle);
end.

instead of xxx you have to write the name of your Application.

Hope you can use this.
titz
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question