|
-
November 10th, 1999, 07:13 AM
#1
Running MS-DOS compiler
Hi!
I'm developping a simple tool to make it easier to write, compile and configure Grammar Files and Systems Parameters for a Speech Recognition Application.
After writing the Grammar - for which I developed a custom Notepad -, I need to compile it. The compiler runs on a DOS window, and prints all information to the screen. I need to get that information in order to display it on my tool.
I call the compiler using the SHELL command, and it works OK. I tried to redirect the output to a file "gc xxx.xxx >filename", but it didn't work: no redirection was done. Then I tried putting the compile command on a batch file, and run the batch file from my app, but it didn't work.
Needless to say, when doing this on the DOS prompt, it works fine.
Anybody got any ideas?
Thanks,
Jorge
-
November 10th, 1999, 07:16 AM
#2
Re: Running MS-DOS compiler
running the BAT (or CMD) file should work. You should wait though, till that process has finished before trying to read the file input from the redirected file.
Use CreateProcess API and waitForSingleObject instead of the VB Shell command.
-
November 11th, 1999, 05:13 AM
#3
Re: Running MS-DOS compiler
Usually Compilers print their Error & other messages to StdErr. So, simple Redirection with > wont work. Try std error redirection command >& ( or is it &>, i forget).
RK
-
November 11th, 1999, 07:52 AM
#4
Re: Running MS-DOS compiler
Under winnt sometimes it helps to load a new command - processor.
So:
- write a batch-file that calls your compiler.
(xxx.xxx > filename)
- call the batch file from your app like that:
c:\winnt\system32\command.com /c x:\your_path\your_batch_file.bat
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|