Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CreateProcess Problems
Message
From
20/11/2003 17:36:39
 
 
To
20/11/2003 15:21:01
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00852013
Message ID:
00852114
Views:
15
I can launch it fine either way (with the full path and filename in the 2nd parameter passed to createprocess and .null. as the first parameter or with the path and filename as the first parameter and the command line parameters as the 2nd parameter) but either way, it still fails once it is running. It doesn't seem to be able to grab its own path once it runs because once it is launched and running it fails after that and just hangs. Thanks for the information though it was useful for testing!

Tracy

>Have you tried launching cmd.exe instead of transman.exe? Nice for debugging things like this.
>
>Some programs are picky about getting a fully qualified name for argv[0] (first param of CreateProcess()). Some others dislike being started from paths containing blanks unless the executable name is quoted in a certain way, because their command line parsing code is broken. Such a program would think that it resides in a folder called "c:\program" or that "program" is its own name and the path is "c:\", when it is actually located in "c:\program files\what\ever".
>
>So you could try passing a fully qualified name as the first param for CreateProcess() but you could also pass .null. for the first parameter and build a complete command line (including the executable name) for the second parameter. Windows will do path searching for program names in the second parameter but not in the first, and it will probably supply the full path to the program even if you pass an unqualified name in the second parameter.
>
>E.g., assuming cmd.exe is in the path but not in the current directory, RunAndWait("cmd.exe") would fail but RunAndWait(.null., "cmd.exe") would not.
.·*´¨)
.·`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