I want to have an installation package do a check for an existing running copy of the program, so it can warn the user to close the app before trying to do the install. I've been advised that the way to do this is to call CreateMutEx, which I've been trying to do, but it always returns 0 (with a GetlastError returning 998, if I put the call in a DLL, or 1305 if it's in the main EXE)
I've tried: IRET = CreateMutEx (0,.FALSE.,progname) IRET = CreateMutEx (NULL,.FALSE.,progname) IRET = CreateMutEx (NULL,.FALSE.,progname//CHAR(0)) IRET = CreateMutEx (NULL,LRET,progname) ! LRETLOGICAL*4=.FALSE. IRET = CreateMutEx (NULL,LRET,progname) ! LRETLOGICAL*1=.FALSE.
And various other combinations, always with the same result.
Has anyone successfully used this call from FTN95? What's the trick?
TIA
K