Information générale
Catégorie:
Codage, syntaxe et commandes
Just a follow-up in case anyone is interested - in case you didn't see the original thread, I wanted to have my VFP program, called from a batch file, write results directly to the console window which launched it. I could write to a file and then TYPE the file, but that would involve distributing a batch file along with my EXE and that seemed too messy.
It does not appear that what I want to do is possible, even using API calls. Winapps can create a NEW console window and send output there using AllocConsole(), GetStdHandle(11), and WriteConsole(), but winapps apparently can't figure out what console launched them and send the output there.
Thanks to Ed and Jon Hawkins for their suggestions!
zahid
>>Do you have any idea what API calls I should look for?
>>
>
>Yep, all the basic file I/O APIs; you need to open STDOUT for output and write everything to whatever file handle is assigned.
>
>If you don't need to write to the console, then you can just read the command line as parameters from the main line program, and ignore writing to STDOUT; create a log file instead, and have your batch file display it if not empty.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement