I currently start a target executable written in VB.Net from an
application that uses a C-script language.
I start the target executable using ShellExecute in the C-script. The
target runs fine like this except for the fact that the target can't
write to a log file. If I run the target independently of the C-script
application, the log file is created and written to without a hitch.
There is no error produced - the log file just never appears. If I put
a log file in the directory, it is not appended.
The code is as follows:
Dim tx as TextWriter = File.AppendText("Log.txt")
tx.WriteLine( sLogText )
tx.Close
The ShellExecute command is:
result = ShellExecute(
HWND_DESKTOP, "open", "target.exe", "-1", NULL,
SW_SHOWNORMAL);
I get the impression I'm missing something simple here, but I don't know
what it is.
TIA
Frank Maxey
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!