Solved

HPrevInstance for Delphi 3

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Simple Delphi Question 9 89
Create Database on Android via Delphi dbExpress 3 88
Dev Express grid collapse 2 44
Tviruailstringtree sort multi columns on header click 1 61
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

805 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