MCPcopy Create free account
hub / github.com/OldJii/ring_layout / CreateAndAttachConsole

Function CreateAndAttachConsole

example/windows/runner/utils.cpp:10–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include <iostream>
9
10void CreateAndAttachConsole() {
11 if (::AllocConsole()) {
12 FILE *unused;
13 if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 _dup2(_fileno(stdout), 1);
15 }
16 if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 _dup2(_fileno(stdout), 2);
18 }
19 std::ios::sync_with_stdio();
20 FlutterDesktopResyncOutputStreams();
21 }
22}
23
24std::vector<std::string> GetCommandLineArguments() {
25 // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.

Callers 1

wWinMainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected