Solved

HPrevInstance for Delphi 3

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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