Search:
Forum
General C++ Programming
The clockwork of console/file-streams?
The clockwork of console/file-streams?
Nov 16, 2010 at 11:36pm UTC
fruitloop2222
(51)
How might I program something such as the standard streaming features for Input/Output in console windows and files? I want to know how they work. I don't care if it requires inline ASM or even NASM, I just want to know!
Nov 17, 2010 at 5:47am UTC
rocketboy9000
(562)
Writing/reading in the low level uses different things depending on the platform. On unix it uses the write,read,open,close system calls.
Last edited on
Nov 17, 2010 at 5:48am UTC
Nov 17, 2010 at 12:26pm UTC
kbw
(9488)
It's the same for Windows. The native calls are ReadFile/WriteFile/CreateFile/OpenFile/CloseHandle.
GetStdHandle(STD_INPUT_HANDLE)
returns the handle for stdin
GetStdHandle(STD_OUTPUT_HANDLE)
for stdout
GetStdHandle(STD_ERROR_HANDLE)
for stderr
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs