Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CreateProcess Problems
Message
From
21/11/2003 10:11:57
 
 
To
20/11/2003 22:26:36
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00852013
Message ID:
00852306
Views:
13
Thanks I'll give it a shot!

>Hi Tracy,
>
>we didn't follow the exact wording of the WIN32API.TXT -
>I am sure of that, because I wondered why the ####
>some parameters were changed to INTEGERS -
>probably a Chr(0) with String definition would have worked as well -
>when I skipped over my "inheritance".
>
>The declare is of an old backup of a framework .vcx,
>and here I am certain it hasn't changed.
>
>I am also certain we put the program name into the commandline,
>(be careful of max line length: around 110 we had a problem,
>that number might be dependend on a setting of the OS),
>changed the directory before the call and afterwards.
>I remember that the middle 2 numbers were not zero:
>I think the second was the priority of the process.
>
>I've modified your code but not tested - and our setup doesn't
>have to wait for the end of the process...
>
>
>
>        DO DECL
>	lcivansparm = " /A /M:TECHSUPPORT;SYSERROR;TMCONFIG;AIDOWN"
>	lcivansapp = "c:\Program Files\IVANS\Transman\Transman.exe"
>	lcivansdir = LEFT(lcivansapp,RAT("\",lcivansapp)-1)
>	lcivansprg = "Transman.exe"
>	CD (lcivansdir)
>	SET DEFAULT TO LEFT(lcivansapp,RAT("\",lcivansapp)-1)
>	IF adir(laDummy, m.lcivansprg)=1
>	    * the exe has to be in the current Dir
>            = RunAndWait(lcivansprg, lcivansparm, lcivansdir)
>        ENDIF
>	
>
>PROCEDURE  RunAndWait (lcApp, lcCmdLine, lcdir)
>
>	LOCAL lcStartupInfo, lcProcInfo, hProcess, ;
>              lnPrio, lnIBelieve1
>        lnIBelieve1 = 1   && Don't remember what that was
>        lnPrio = 32 && Priority of Process=Normal
>	lcStartupInfo = CHR(68) + REPLI(CHR(0), 67)
>	lcProcInfo = REPLI(CHR(0), 16)
>	IF CreateProcess(0, m.lcApp+" "+m.lcCmdLine+Chr(0), 0,0,;
>                   m.lnIBelieve1, m.lnPrio,;
>                   0, 0, @lcStartupInfo, @lcProcInfo) <> 0
>                   Wait Wind "Hurray"
>
>	ELSE
>		Wait Wind "Still No Luck"
>	ENDIF
>
>
>PROCEDURE DECL
>	DECLARE INTEGER CreateProcess IN kernel32;
>	INTEGER lpAppName, STRING lpCmdLine, INTEGER lpProcAttr,;
>	INTEGER lpThrAttr, INTEGER bInhHandles, INTEGER dwCrFlags,;
>	INTEGER lpEnvir, INTEGER lpCurDir, ;
>        STRING @lpStInfo, STRING @lpProcInfo
>
>
>
>HTH
>
>thomas
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform