Solved

HPrevInstance for Delphi 3

Posted on 1997-11-14
1
291 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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

680 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