This PR defines a series of `NOSOMETHING` macros in PCHs, in order to prevent `windows.h` from bringing a lot of rarely used things into the project. Theoretically this should make PCH generation and overall complication faster, but I didn't really benchmark the speed. Another benefit would be reducing the symbol noises caused by `windows.h`.
40 lines
940 B
C
40 lines
940 B
C
/*++
|
|
Copyright (c) Microsoft Corporation
|
|
Licensed under the MIT license.
|
|
|
|
Module Name:
|
|
- pch.h
|
|
|
|
Abstract:
|
|
- Contains external headers to include in the precompile phase of console build process.
|
|
- Avoid including internal project headers. Instead include them only in the classes that need them (helps with test project building).
|
|
--*/
|
|
|
|
#pragma once
|
|
|
|
// Ignore checked iterators warning from VC compiler.
|
|
#define _SCL_SECURE_NO_WARNINGS
|
|
|
|
// Block minwindef.h min/max macros to prevent <algorithm> conflict
|
|
#define NOMINMAX
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
#define NOMCX
|
|
#define NOHELP
|
|
#define NOCOMM
|
|
#include <unknwn.h>
|
|
|
|
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
|
|
|
|
#include <windows.h>
|
|
|
|
#include "../inc/LibraryIncludes.h"
|
|
|
|
#include <wil/cppwinrt.h>
|
|
|
|
#include <winrt/Windows.system.h>
|
|
#include <winrt/Windows.Foundation.Collections.h>
|
|
|
|
#include <wil/resource.h>
|
|
#include <wil/win32_helpers.h>
|