Run Without Console Window Main Entry Point Source. More...
#include <fcntl.h>
#include <io.h>
#include <windows.h>
#include <stdio.h>
Go to the source code of this file.
Functions | |
static BOOL | IsConsolePresent () |
static void | InitStdio () |
int WINAPI | wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) |
Run Without Console Window Main Entry Point Source.
Definition in file RunWithoutConsoleWindow.cpp.
|
static |
Initialize stdio.
Definition at line 188 of file RunWithoutConsoleWindow.cpp.
|
static |
Return true if a console is present.
Definition at line 164 of file RunWithoutConsoleWindow.cpp.
int WINAPI wWinMain | ( | HINSTANCE | hInstance, |
HINSTANCE | hPrevInstance, | ||
LPWSTR | lpCmdLine, | ||
int | nCmdShow | ||
) |
Run a new process with the command line specified by lpCmdLine without a console window. This program may be used as a wrapper around a target console application. This program prevents a new console window from being created when the console application is launched. It passes through stdio and the target exit code to the calling process. This programs is provided for applications that need to run console applications but don't directly call CreateProcess. These might be applications that are using some other library for creating processes (e.g., NSPR).
Usage: RunWithoutConsoleWindow <cmd line>="">
hInstance | Current instance of application. |
hPrevInstance | Previous instance of application. |
lpCmdLine | Application command line excluding application name. |
nCmdShow | Specifies how the window is to be shown. |
Definition at line 90 of file RunWithoutConsoleWindow.cpp.