RunWithoutConsoleWindow.cpp File Reference

Run Without Console Window Main Entry Point Source. More...

#include <fcntl.h>
#include <io.h>
#include <windows.h>
#include <stdio.h>
Include dependency graph for RunWithoutConsoleWindow.cpp:

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)
 

Detailed Description

Run Without Console Window Main Entry Point Source.

Definition in file RunWithoutConsoleWindow.cpp.

Function Documentation

static void InitStdio ( )
static

Initialize stdio.

Definition at line 188 of file RunWithoutConsoleWindow.cpp.

Here is the caller graph for this function:

static BOOL IsConsolePresent ( )
static

Return true if a console is present.

Returns
True if console is present.

Definition at line 164 of file RunWithoutConsoleWindow.cpp.

Here is the caller graph for this function:

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>="">

Parameters
hInstanceCurrent instance of application.
hPrevInstancePrevious instance of application.
lpCmdLineApplication command line excluding application name.
nCmdShowSpecifies how the window is to be shown.
Returns
Target application exit code.

Definition at line 90 of file RunWithoutConsoleWindow.cpp.

Here is the call graph for this function: