Information générale
Catégorie:
Fonctions Windows API
Hi Michael,
I could be out of my league because I havent worked with Is_Run32.
>Hi All,
>
>I have downloaded George's routine 'is_run32'. I have used it with no problems in programs that are running. Now I am trying to use it to block multiple instances of the calling program. In my main.prg I put this block long before I open any forms:
>
>* This is a call to a function to check and see if this program is already running
>exe_running = is_run32("Remote Process")
WAG, but try this:
ltTimeOut = SECONDS() + 3
DO WHILE Exe_Running = 0 AND SECONDS()
DOEVENTS
ENDDO
>
>* If the Function found that this program was already running
>* Block any multiple instances.
>IF exe_running > 0
> QUIT
>ENDIF
>
>"exe_running" always == 0. If I add a messagebox('anything') before that block. I always get the handle of the other instance.
Add a timeout before the 'block' you are referring too.
>
>My question is, must my '.exe' have some prior interaction with windows for the function to work? If so, is there a way to do it without user involvement? Or will this only work once the form has been loaded?
>
>TIA
>Mike
Jon
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