Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is_run32 & mulitple instances
Message
From
18/07/2000 14:56:26
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00393284
Message ID:
00393974
Views:
16
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
Map
View

Click here to load this message in the networking platform