FreeConsole(false);

Jul 15, 2012 at 6:49pm
closed account (LAfSLyTq)
obviously you cannot do something like FreeConsole(false); so how would i make FreeConsole(); stop in its tracks? i use

while(1)
{
FreeConsole();
}

how would i make it stop if it was like this

1
2
3
4
5
6
7
8
while(1)
{
FreeConsole();
}

some code here

FreeConsole(false);
Last edited on Jul 15, 2012 at 7:02pm
Jul 15, 2012 at 8:30pm
closed account (zb0S216C)
Invader2010 wrote:
"obviously you cannot do something like FreeConsole(false);"

Why not?

Invader2010 wrote:
"so how would i make FreeConsole(); stop in its tracks?"

As in stopping the function prematurely? You can't do that; the function must either reach the end of it's main body, encounter a return statement, or throw an exception.

Invader2010 wrote:
1
2
3
4
5
6
7
8
while(1)
{
FreeConsole();
}

some code here

FreeConsole(false);

I don't understand.

Wazzak
Jul 15, 2012 at 8:46pm
closed account (LAfSLyTq)
im trying to say, how do i stop a function or command. if you dont understand my question still, then you might as well go kill yourself no offence.
Jul 15, 2012 at 11:19pm
closed account (zb0S216C)
Invader2010 wrote:
"im trying to say, how do i stop a function or command. if you dont understand my question still, then you might as well go kill yourself no offence."

GFY, then. I'm not going to help pricks like you.

Wazzak
Jul 16, 2012 at 1:38am
Sorry Framework. Invader2010 acts like a script kiddie and is rude to those who try to help him, if not outright dismissive. He's made my ignore list. You might want to put him on yours too...
Jul 16, 2012 at 7:30am
Script kiddie, learn to talk before you ask for help. disgusting creature.. i have blocked Invader.
Jul 17, 2012 at 12:22pm
Detaches the calling process from its console.
Syntax

BOOL WINAPI FreeConsole(void);

Parameters

This function has no parameters.
Return value

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.
Remarks

A process can be attached to at most one console. If the calling process is not already attached to a console, the error code returned is ERROR_INVALID_PARAMETER (87).

A process can use the FreeConsole function to detach itself from its console. If other processes share the console, the console is not destroyed, but the process that called FreeConsole cannot refer to it. A console is closed when the last process attached to it terminates or calls FreeConsole. After a process calls FreeConsole, it can call the AllocConsole function to create a new console or AttachConsole to attach to another console.
Requirements

Minimum supported client
Windows 2000 Professional

Minimum supported server
Windows 2000 Server

Header


Wincon.h (include Windows.h)

Library


Kernel32.lib

DLL


Kernel32.dll

Source: msdn.microsoft.com
Topic archived. No new replies allowed.