Windows 应用商店应用程序、Windows 运行时和 C 运行时Windows Store Apps, the Windows Runtime, and the C Run-Time

--- --- Windows 8.x 应用商店Windows 8.x Store 应用是在 --- --- Windows 8Windows 8 上执行的 Windows 运行时中运行的程序。 apps are programs that run in the Windows Runtime that executes on --- --- Windows 8Windows 8. Windows 运行时是一个控制函数、变量以及可用于 --- --- Windows 8.x 应用商店Windows 8.x Store 应用的资源的可信环境。The Windows Runtime is a trustworthy environment that controls the functions, variables, and resources that are available to a --- --- Windows 8.x 应用商店Windows 8.x Store app. 但依据设计,Windows 运行时限制会阻止在 --- --- Windows 8.x 应用商店Windows 8.x Store 应用中使用大多数 C 运行库 (CRT) 功能。However, by design, Windows Runtime restrictions prevent the use of most C Run-Time Library (CRT) features in --- --- Windows 8.x 应用商店Windows 8.x Store apps.

Windows 运行时不支持以下 CRT 功能:The Windows Runtime does not support the following CRT features:

  • 与不受支持的功能相关的大多数 CRT 函数。Most CRT functions that are related to unsupported functionality.

    例如,--- --- Windows 8.x 应用商店Windows 8.x Store应用无法使用 execspawn 系列的例程创建过程。For example, a --- --- Windows 8.x 应用商店Windows 8.x Store app cannot create a process by using the exec and spawn families of routines.

    对于 CRT 函数在 --- --- Windows 8.x 应用商店Windows 8.x Store应用中不受支持的情况,其参考文章中会进行说明。When a CRT function is not supported in a --- --- Windows 8.x 应用商店Windows 8.x Store app, that fact is noted in its reference article.

  • 大多数多字节字符和字符串函数。Most multibyte character and string functions.

    但是,支持 Unicode 和 ANSI 文本。However, both Unicode and ANSI text are supported.

  • 控制台应用和命令行参数。Console apps and command-line arguments.

    但是,传统桌面应用仍支持控制台和命令行参数。However, traditional desktop apps still support the console and command-line arguments.

  • 环境变量。Environment variables.

  • 当前工作目录的概念。The concept of a current working directory.

  • 静态链接到 CRT 且使用 /MT/MTd 编译器选项生成的 --- --- Windows 8.x 应用商店Windows 8.x Store 应用和 DLL。--- --- Windows 8.x 应用商店Windows 8.x Store apps and DLLs that are statically linked to the CRT and built by using the /MT or /MTd compiler options.

    即,使用多线程、静态版本的 CRT 的应用。That is, an app that uses a multithread, static version of the CRT.

  • 使用 /MDd 编译器选项生成的应用。An app that's built by using the /MDd compiler option.

    即,多线程的特定于 DLL 的调试版本的 CRT。That is, a debug, multithread, and DLL-specific version of the CRT. 此类应用在 --- --- Windows 应用商店Windows Store中不受支持。Such an app is not supported on the --- --- Windows 应用商店Windows Store.

    有关不适用于 --- --- Windows 8.x 应用商店Windows 8.x Store 应用的 CRT 函数的完整列表和替代函数的建议,请参阅不支持 /ZW 的 CRT 函数For a complete list of CRT functions that are not available in a --- --- Windows 8.x 应用商店Windows 8.x Store app and suggestions for alternative functions, see CRT functions not supported with /ZW.

另请参阅See Also

兼容性 Compatibility
Windows 运行时不支持的 CRT 函数 Windows Runtime Unsupported CRT Functions
按类别分的运行时例程Run-Time Routines by Category