The AllocConsole function allocates a new console for the calling process.
BOOL AllocConsole(VOID)
This function has no parameters.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
A process can be associated with only one console, so the AllocConsole function fails if the calling process already has a console. A process can use the FreeConsole function to detach itself from its current console, and then it can call AllocConsole to create a new console. If the calling process creates a child process, the child inherits the new console.
AllocConsole also sets up standard input, standard output, and standard error handles for the new console. The standard input handle is a handle to the console’s input buffer, and the standard output and standard error handles are handles to the console’s screen buffer. To retrieve these handles, use the GetStdHandle function.
This function is primarily used by graphics applications to create a console window. Graphics applications are initialized without a console. Console applications are normally initialized with a console, unless they are created as detached processes (by calling the CreateProcess function with the DETACHED_PROCESS flag).
CreateProcess, FreeConsole, GetStdHandle
See:
file: /Techref/os/win/api/win32/func/src/f02_2.htm, 2KB, , updated: 2001/6/26 09:34, local time: 2024/11/14 03:12,
3.135.193.105:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/Techref/os/win/api/win32/func/src/f02_2.htm"> AllocConsole</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.