_set_app_type_set_app_type

在启动时使用的内部函数告知 CRT,应用属于控制台应用程序还是 GUI 应用。An internal function used at startup to tell the CRT whether the app is a console app or a GUI app.

语法Syntax

typedef enum _crt_app_type
{
    _crt_unknown_app,
    _crt_console_app,
    _crt_gui_app
} _crt_app_type;

void __cdecl _set_app_type(
    _crt_app_type appType
    ); 

参数Parameters

appType
表示应用程序类型的值。A value that indicates the application type. 可能的值为:The possible values are:

“值”Value 描述Description
_crt_unknown_app_crt_unknown_app 未知应用程序类型。Unknown application type.
_crt_console_app_crt_console_app 控制台(命令行)应用程序。Console (command-line) application.
_crt_gui_app_crt_gui_app GUI (Windows) 应用程序。GUI (Windows) application.

备注Remarks

通常情况下,不需要调用此函数。Normally, you do not need to call this function. 它是在应用中调用 main 前执行的 C 运行时启动代码的一部分。It is part of the C runtime startup code that executes before main is called in your app.

惠?Requirements

例程所返回的值Routine 必需的标头Required header
_set_app_type_set_app_type process.hprocess.h