Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cheryl B
  Where is Cheryl B?
 Xenia
 Ohio - United States
 Cheryl B
 Tags
Subject: WinExec Failed
Thread ID: 21943 Message ID: 21943 # Views: 22 # Ratings: 0
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Friday, April 04, 2003 10:49:01 PM         
   


Hello All!

I need to interface a VFP6.0 program with a FW2.6 program. I'm using RUN right now, but I've seen the posts where that isn't a good idea. I agree, because we sometimes get "WinExec Failed, Code=24" on some W2K computers. In fact, we can have the program run fine for a while, but once we get the error, it seems to be "broke" forever.

PUBLIC gcSYSMemFile, gcPath
STORE FILENAME(M.SY_TempDir + "\" + SYS(3) + ".TMP") TO gcSYSMemFile
SAVE ALL LIKE SY_* TO (M.gcSYSMemFile)
STORE "F:" + M.gcSYSMemFile TO gcSYSMemFile
STORE "P:" + SET("PATH") TO gcPath
STORE FULLPATH("VISVF2FW.EXE") TO gcEXE
STORE STUFF(M.gcEXE, AT(".EXE", M.gcExe), 4, "") TO gcExe


And the actual run command is:
  RUN /N &gcEXE &gcSYSMemFile &gcPath "R:VRR001.EXE" -T


Any suggestions on how to "fix" the WinExec error? And any suggestions on the "best" way to do what I want? (Okay, besides converting all the FPW2.6 code to VFP... we're working on that! This is just a workaround until that is completed.)

Cheryl A Bellucci
TRIAD GOVERNMENTAL SYSTEMS, INC
(who now uses her Foxite lunchbox to carry lunch to work!)

COMPLETE THREAD

WinExec Failed Posted by Cheryl Bellucci @ 4/4/2003 10:49:01 PM
RE: WinExec Failed Posted by Lou Harris @ 4/5/2003 12:55:07 AM