From: Kenneth J.Davis (jeremyd@computer.org)
Date: Tue May 14 2002 - 03:19:05 EDT
CVS: ----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: src\wp\main\win/Makefile src\wp\ap\win/ap_Win32App.cpp
CVS: ----------------------------------------------------------------------
minor Makefile correction
and changed to use preparsed command line (__argv) when compiled with MSVC
Unrelated info for those curious.
>On Mon, May 13, 2002 at 03:05:52AM +0100, Andrew Dunbar wrote:
>> If you're running from the command line to just
>> convert files between formats without opening the GUI
>> should the errors just output to the console?
Just in case anyone wants to know, I do believe this is possible
on Windows XP, but not earlier versions. Windows XP adds a
Win32 API call 'AttachConsole' that [MSDN docs state] allows a
process to attach to another process' console (probably requires
compatible security stuff). So use the Tool Help functions
(CreateToolhelp32Snapshot, Process32First, Process32Next)
available since Windows NT 2000 (or Windows 95+) to get
the parent process ID, call AttachConsole(processID), then
map the C/C++ stdin/stdout/stderr to the console's STD handles.
Now anything you write using std C/C++ handles should be
displayed on calling console (if it was indeed a console).
(Note: While I have the code written, I haven't actually tried this on
Windows XP's as I refuse to use an OS that locks me out of my own
computer just because I change a few components.)
Jeremy Davis
jeremyd@computer.org
This archive was generated by hypermail 2.1.4 : Tue May 14 2002 - 03:26:32 EDT