Hi!
I'm trying to restrict my exe to only one at any time. I've used the following code:

var
Mutex : THandle;

Mutex := CreateMutex(nil,False,'MyMutexName');

I got the following error in CreateMutex:

'Invalid Number of Parameters". How to create a Mutex in Delphi?

Recommended Answers

All 4 Replies

AFAIK it should have 3 parameters. If you put the cursor after the first parenthesis, and press ctrl+shift+space, what does it say ?

press ctrl+shift+space

I don't know which editor has this shortcut. Actually I'm using Delphi with Inno Setup.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.