Using stdin, stdout, stderr in static libraries


2008-08-05 08:53:26 PM
cppbuilder46
I have a bunch of legacy code, that uses stdio from within a console
application.
Trouble is, when a function inside a static library accesses stdin,
stdout etc it has a different handle than the main routine gets. Thus
it just generates access violations.
Is there a way to build the static libraries so they can see the main
program console handles ?
Having to alter the libraries to pass in the handles from the main
routine will be a huge task, there are thousands of references.!