I have this VFP5a EXE that has this code at the start of the program.
IF NOT tsprgrun('TERMISRV')
RUN /n2 TERMISRV.exe
ENDIF
IF NOT tsprgrun('RELAYSRV')
RUN /n2 RELAYSRV.exe
ENDIF
Where tsprgrun is a function to check(using API's) if the app is already running and TERMISRV.exe & RELAYSRV.exe are 2 VFP5a DDE Servers.
The problem is that on the latest 450+Mhz computers, the run command does not happen. The code in the IF - ENDIF does not execute.So the DDE servers do not start up.So what I usually get is TERMISRV.EXE runs but RELAYSRV.EXE does not execute.
On slower computers (350mhz) it works fine. If I add the following line just before the RUN on the 450's:
WAIT WIND "" TIMEOUT .3
This works on some speedsters and on the really fast ones I have to add:
WAIT WIND "" TIMEOUT .5
to make it work.
What is happening here? Is the CPU "too fast" for VFP or what?
So on 450 Mhz--------------
IF NOT tsprgrun('TERMISRV')
WAIT WIND "" TIMEOUT .3
RUN /n2 TERMISRV.exe
ENDIF
IF NOT tsprgrun('RELAYSRV')
WAIT WIND "" TIMEOUT .3
RUN /n2 RELAYSRV.exe
ENDIF
--------------------------------
And on faster CPU's / Computers
IF NOT tsprgrun('TERMISRV')
WAIT WIND "" TIMEOUT .5
RUN /n2 TERMISRV.exe
ENDIF
IF NOT tsprgrun('RELAYSRV')
WAIT WIND "" TIMEOUT .5
RUN /n2 RELAYSRV.exe
ENDIF
--------------------------------
works! Starnge eh?
Anyone else have this problem of having to SLOW DOWN their code to make it work??
Bernard