Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Writing console programs with VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00398000
Message ID:
00399110
Vues:
13
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
Fil
Voir

Click here to load this message in the networking platform