Typically, when TCC starts, @CONSOLEB[-1] is 19. Where does that number come from? I couldn't get it in a plugin ... tried GetStdHandle and opening "CONOUT$" ... for now, settled on expanding "%@CONSOLEB[-1]".
It's the current console output handle. It comes from CreateFile( _TEXT("CONOUT$"), (GENERIC_READ | GENERIC_WRITE), (FILE_SHARE_READ | FILE_SHARE_WRITE), &sa, OPEN_EXISTING, 0, NULL );
It's the current console output handle. It comes from CreateFile( _TEXT("CONOUT$"), (GENERIC_READ | GENERIC_WRITE), (FILE_SHARE_READ | FILE_SHARE_WRITE), &sa, OPEN_EXISTING, 0, NULL );
I tried that but with a NULL security descriptor. I suppose that's why I wasn't getting 19. I wouldn't use it, except inside @CONSOLEB. I found out (the hard way) that if TCC starts a program in the same console and that program switches to an alternative buffer and exits without switching back to its startup buffer, the parent TCC is in never_never_land. Try it ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.