MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / OpenConsole

Function OpenConsole

libcppcryptfs/util/util.cpp:502–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500}
501
502bool
503OpenConsole(DWORD pid)
504{
505 FreeConsole();
506
507 if (AttachConsole(pid ? pid : ATTACH_PARENT_PROCESS)) {
508#pragma warning( push )
509#pragma warning(disable : 4996)
510 if (!freopen("CONOUT$", "wt", stdout)) {
511 FreeConsole();
512 return false;
513 }
514 if (!freopen("CONOUT$", "wt", stderr)) {
515 fclose(stdout);
516 FreeConsole();
517 return false;
518 }
519#pragma warning( pop )
520 return true;
521 } else {
522 return false;
523 }
524}
525
526void
527CloseConsole()

Callers 2

InitInstanceMethod · 0.85
OutputHandlerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected