Module windows_subsystem

Module windows_subsystem 

Source
Expand description

Helpers for apps built with #![windows_subsystem = "windows"].

The Windows operating system does not support hybrid CLI and GUI apps in the same executable, this module contains helpers that help provide a best effort compatibility, based on the tricks Microsoft Visual Studio uses.

The attach_console function must be called at the start of the hybrid executable when it determinate it is running in CLI mode, the build_cli_com_proxy must be called in the build script for the hybrid executable.

The functions in this module are noop in other systems.

See the zng::env::windows_subsystem docs for a full example.

Functionsยง

attach_console
Connect to parent stdio if disconnected.
build_cli_com_proxy
Compile a small console executable that proxies CLI requests to a full hybrid CLI and GUI executable.