General information
Category:
Windows API functions
George,
This is what I had:
#DEFINE ERROR_ALREADY_EXISTS 183
LOCAL oMutex, lcformcaption
lcformcaption = "Remote Processing Program" && Even if I put _SCREEN.CAPTION I get the same result
SET PROCEDURE TO Mutex ADDITIVE
oMutex = CREATEOBJECT('Mutex', lcformcaption)
IF oMutex.nmutexerror # ERROR_ALREADY_EXISTS
*!* Some code
ELSE
omutex.displayinstance()
ENDIF
Could it be the way I define the class? This is the complete mutex.prg:
DEFINE CLASS mutex AS CUSTOM
* The 3 properties used in the 'INIT' procedure
cformcaption = ""
hmutex = 1
nmutexerror = 0
PROCEDURE INIT
* the exact code from the article
PROCEDURE displayinstance
* same
PROCEDURE DESTROY
* same
ENDDEFINE
I'm Stumped
Mike
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only