Versions des environnements
>>>Function IsAppRunning
>>> Lparameters tcSemaphoreName
>>> Local hsem, lpszSemName
>>> #Define ERROR_ALREADY_EXISTS 183
>>> Declare Integer GetLastError In win32API
>>> Declare Integer CreateSemaphore In WIN32API ;
>>> string @ lpSemaphoreAttributes, ;
>>> LONG lInitialCount, ;
>>> LONG lMaximumCount, ;
>>> string @ lpName
>>> hsem = CreateSemaphore(0,0,1,tcSemaphoreName)
>>> Return (hsem # 0 And GetLastError() == ERROR_ALREADY_EXISTS)
>>>Cetin
>
>I do not the answer Fabio, but what about including the HWND into the semaphore's name?, something like:
>
>lcSemaphoreName = tcSemaphoreName + "~" + transform(thisform.HWND)
>
>Then you can parse the name of the semaphore to get the Window Handle and activate it.
>
>Just a thought
I agree, but you have to enumerate the semaphores list, and, how do you do this?
Fabio
Précédent
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