Information générale
Catégorie:
Fonctions Windows API
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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement