Solved

HPrevInstance for Delphi 3

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now