|
-
May 14th, 1999, 06:33 AM
#1
How can I catch MS-Dos window message?
Some exes like java.exe, javac.exe, display
output on the MS-Dos window. How can I
catch the message if I use
CreateProcess
ShellExecute
ShellExecuteEx
to execute them from a my appliucation created
by VC++?
Your advice would be highly appreciated.
Xiaojian Liu
-
December 23rd, 2003, 02:13 PM
#2
I need the same thing. im executing mysqldump.exe and mysql.exe, how toknow if execution failed, error messages, results, etc? they are in a DOS window.
Thanks
-
December 23rd, 2003, 02:48 PM
#3
Originally posted by laura_glow
I need the same thing. im executing mysqldump.exe and mysql.exe, how toknow if execution failed, error messages, results, etc? they are in a DOS window.
Thanks
your not explaning it clear...or maybe we are not hearing it clear...
-
December 23rd, 2003, 04:21 PM
#4
well, for example, i could get the exit code from mysql.exe (executed with shellExecuteEx from my visual c++ application) with
Code:
BOOL GetExitCodeProcess(
HANDLE hProcess, // handle to the process
LPDWORD lpExitCode // address to receive termination status
);
the problem is i cant find the exit codes for that program, so is there any other way to know if the execution of mysql.exe and its parameter was successfull?
Code:
C:\backup>mysqldump sdlfkj
-- MySQL dump 8.22
--
-- Host: localhost Database: sdlfkj
---------------------------------------------------------
-- Server version 3.23.51-max-nt
mysqldump: Got error: 1044: Access denied for user: '@localhost' to database 'sdlfkj' when selecting the database
here is an error example from mysqldump, with this parameter (purposefully wrong) it sends error 1044, is there a list of this errors somewhere?
how can i know if something went wrong from my visual c++ application?
-
December 23rd, 2003, 05:44 PM
#5
winerror.h... getlasterror(...) errorlook.exe(...) tell me when to stop
-
December 23rd, 2003, 06:04 PM
#6
Hi,
You can use ShellExecute(NULL,"open","full path with file name","full path with arguments", default directory,cmdshow)
With Regards,
R.Selvam
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
|