Skip to content

Instantly share code, notes, and snippets.

@zacps
Created January 21, 2018 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zacps/ab5ae414952fc390dd63795d3b402cfd to your computer and use it in GitHub Desktop.
Save zacps/ab5ae414952fc390dd63795d3b402cfd to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
# 1 "__bindgen.cpp"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 352 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "__bindgen.cpp" 2
# 1 "./src/include/winpty.h" 1
/*
* Copyright (c) 2011-2016 Ryan Prichard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\windows.h" 1 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\winapifamily.h" 1 3
/*
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
winapifamily.h
Abstract:
Master include file for API family partitioning.
*/
#pragma warning(push)
#pragma warning(disable: 4001)
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\winpackagefamily.h" 1 3
/*
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
winpackagefamily.h
Abstract:
API family partitioning based on packages.
*/
#pragma warning(push)
#pragma warning(disable: 4001)
/*
* PARTITIONS based on packages are each #undef'ed below, and then will be #define-ed
* to be either 1 or 0 or depending on the active WINAPI_FAMILY.
*/
# 58 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\winpackagefamily.h" 3
/*
* PARTITIONS for feature packages. Each package might be active for one or more editions
*/
# 87 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\winpackagefamily.h" 3
#pragma warning(pop)
# 26 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\winapifamily.h" 2 3
/*
* When compiling C and C++ code using SDK header files, the development
* environment can specify a target platform by #define-ing the
* pre-processor symbol WINAPI_FAMILY to one of the following values.
* Each FAMILY value denotes an application family for which a different
* subset of the total set of header-file-defined APIs are available.
* Setting the WINAPI_FAMILY value will effectively hide from the
* editing and compilation environments the existence of APIs that
* are not applicable to the family of applications targeting a
* specific platform.
*/
/* In Windows 10, WINAPI_PARTITIONs will be used to add additional
* device specific APIs to a particular WINAPI_FAMILY.
* For example, when writing Windows Universal apps, specifying
* WINAPI_FAMILY_APP will hide phone APIs from compilation.
* However, specifying WINAPI_PARTITION_PHONE_APP=1 additionally, will
* unhide any API hidden behind the partition, to the compiler.
* The following partitions are currently defined:
* WINAPI_PARTITION_DESKTOP // usable for Desktop Win32 apps (but not store apps)
* WINAPI_PARTITION_APP // usable for Windows Universal store apps
* WINAPI_PARTITION_PC_APP // specific to Desktop-only store apps
* WINAPI_PARTITION_PHONE_APP // specific to Phone-only store apps
* WINAPI_PARTITION_SYSTEM // specific to System applications
* The following partitions are indirect partitions and defined in
* winpackagefamily.h. These partitions are related to package based
* partitions. For example, specifying WINAPI_PARTITION_SERVER=1 will light up
* any API hidden behind the package based partitions that are bound to
* WINAPI_PARTITION_SERVER, to the compiler.
* WINAPI_PARTITION_SERVER // specific to Server applications
*/
/*
* The WINAPI_FAMILY values of 0 and 1 are reserved to ensure that
* an error will occur if WINAPI_FAMILY is set to any
* WINAPI_PARTITION value (which must be 0 or 1, see below).
*/
/* The value of WINAPI_FAMILY_DESKTOP_APP may change in future SDKs. */
/* Additional WINAPI_FAMILY values may be defined in future SDKs. */
/*
* For compatibility with Windows 8 header files, the following
* synonym for WINAPI_FAMILY_PC_APP is temporarily #define'd.
* Use of this symbol should be considered deprecated.
*/
/*
* If no WINAPI_FAMILY value is specified, then all APIs available to
* Windows desktop applications are exposed.
*/
/*
* API PARTITONs are part of an indirection mechanism for mapping between
* individual APIs and the FAMILYs to which they apply.
* Each PARTITION is a category or subset of named APIs. PARTITIONs
* are permitted to have overlapping membership -- some single API
* might be part of more than one PARTITION. PARTITIONS are each #define-ed
* to be either 1 or 0 or depending on the platform at which the app is targeted.
*/
/*
* The mapping between families and partitions is summarized here.
* An X indicates that the given partition is active for the given
* platform/family.
*
* +-------------------+---+
* | *Partition* | |
* +---+---+---+---+---+---+
* | | | | | | |
* | | | | | | |
* | | | | P | | |
* | | | | H | | |
* | D | | | O | | |
* | E | | P | N | S | S |
* | S | | C | E | Y | E |
* | K | | _ | _ | S | R |
* | T | A | A | A | T | V |
* +-------------------------+----+ O | P | P | P | E | E |
* | *Platform/Family* \| P | P | P | P | M | R |
* +------------------------------+---+---+---+---+---+---+
* | WINAPI_FAMILY_DESKTOP_APP | X | X | X | | | |
* +------------------------------+---+---+---+---+---+---+
* | WINAPI_FAMILY_PC_APP | | X | X | | | |
* +------------------------------+---+---+---+---+---+---+
* | WINAPI_FAMILY_PHONE_APP | | X | | X | | |
* +----------------------------- +---+---+---+---+---+---+
* | WINAPI_FAMILY_SYSTEM | | | | | X | |
* +----------------------------- +---+---+---+---+---+---+
* | WINAPI_FAMILY_SERVER | | | | | X | X |
* +------------------------------+---+---+---+---+---+---+
*
* The table above is encoded in the following expressions,
* each of which evaluates to 1 or 0.
*
* Whenever a new family is added, all of these expressions
* need to be reconsidered.
*/
# 165 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\winapifamily.h" 3
/*
* SYSTEM is the only partition defined here.
* All other System based editions are defined as packages
* on top of the System partition.
* See winpackagefamily.h for packages level partitions
*/
/*
* For compatibility with Windows Phone 8 header files, the following
* synonym for WINAPI_PARTITION_PHONE_APP is temporarily #define'd.
* Use of this symbol should be regarded as deprecated.
*/
/*
* Header files use the WINAPI_FAMILY_PARTITION macro to assign one or
* more declarations to some group of partitions. The macro chooses
* whether the preprocessor will emit or omit a sequence of declarations
* bracketed by an #if/#endif pair. All header file references to the
* WINAPI_PARTITION_* values should be in the form of occurrences of
* WINAPI_FAMILY_PARTITION(...).
*
* For example, the following usage of WINAPI_FAMILY_PARTITION identifies
* a sequence of declarations that are part of both the Windows Desktop
* Partition and the Windows-Phone-Specific Store Partition:
*
* #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PHONE_APP)
* ...
* #endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PHONE_APP)
*
* The comment on the closing #endif allow tools as well as people to find the
* matching #ifdef properly.
*
* Usages of WINAPI_FAMILY_PARTITION may be combined, when the partitition definitions are
* related. In particular one might use declarations like
*
* #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
*
* or
*
* #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
*
* Direct references to WINAPI_PARTITION_ values (eg #if !WINAPI_FAMILY_PARTITION_...)
* should not be used.
*/
/*
* Macro used to #define or typedef a symbol used for selective deprecation
* of individual methods of a COM interfaces that are otherwise available
* for a given set of partitions.
*/
/*
* For compatibility with Windows 8 header files, the following
* symbol is temporarily conditionally #define'd. Additional symbols
* like this should be not defined in winapifamily.h, but rather should be
* introduced locally to the header files of the component that needs them.
*/
#pragma warning(pop)
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\windows.h" 2 3
/*++ BUILD Version: 0001 Increment this if a change has global effects
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
windows.h
Abstract:
Master include file for Windows applications.
--*/
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\sdkddkver.h" 1 3
/*
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
sdkddkver.h
Abstract:
Master include file for versioning windows SDK/DDK.
*/
#pragma warning(push)
#pragma warning(disable: 4668)
#pragma warning(disable: 4001)
//
// _WIN32_WINNT version constants
//
# 45 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\sdkddkver.h" 3
//
// _WIN32_IE_ version constants
//
# 65 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\sdkddkver.h" 3
//
// IE <-> OS version mapping
//
// NT4 supports IE versions 2.0 -> 6.0 SP1
// Win98 supports IE versions 4.01 -> 6.0 SP1
// Win98SE supports IE versions 5.0 -> 6.0 SP1
// WinME supports IE versions 5.5 -> 6.0 SP1
// Win2k supports IE versions 5.01 -> 6.0 SP1
# 102 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\sdkddkver.h" 3
//
// NTDDI version constants
//
# 154 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\sdkddkver.h" 3
//
// masks for version macros
//
//
// macros to extract various version fields from the NTDDI version
//
# 205 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\sdkddkver.h" 3
//
// if versions aren't already defined, default to most current
//
# 222 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\sdkddkver.h" 3
// set NTDDI_VERSION to default to WDK_NTDDI_VERSION
# 233 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\sdkddkver.h" 3
// set WINVER based on _WIN32_WINNT
# 242 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\sdkddkver.h" 3
// set _WIN32_IE based on _WIN32_WINNT
# 265 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\sdkddkver.h" 3
//
// Sanity check for compatible versions
//
# 298 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\sdkddkver.h" 3
#pragma warning(pop)
# 22 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\windows.h" 2 3
# 35 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\windows.h" 3
/* If defined, the following flags inhibit definition
* of the indicated items.
*
* NOGDICAPMASKS - CC_*, LC_*, PC_*, CP_*, TC_*, RC_
* NOVIRTUALKEYCODES - VK_*
* NOWINMESSAGES - WM_*, EM_*, LB_*, CB_*
* NOWINSTYLES - WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_*
* NOSYSMETRICS - SM_*
* NOMENUS - MF_*
* NOICONS - IDI_*
* NOKEYSTATES - MK_*
* NOSYSCOMMANDS - SC_*
* NORASTEROPS - Binary and Tertiary raster ops
* NOSHOWWINDOW - SW_*
* OEMRESOURCE - OEM Resource values
* NOATOM - Atom Manager routines
* NOCLIPBOARD - Clipboard routines
* NOCOLOR - Screen colors
* NOCTLMGR - Control and Dialog routines
* NODRAWTEXT - DrawText() and DT_*
* NOGDI - All GDI defines and routines
* NOKERNEL - All KERNEL defines and routines
* NOUSER - All USER defines and routines
* NONLS - All NLS defines and routines
* NOMB - MB_* and MessageBox()
* NOMEMMGR - GMEM_*, LMEM_*, GHND, LHND, associated routines
* NOMETAFILE - typedef METAFILEPICT
* NOMINMAX - Macros min(a,b) and max(a,b)
* NOMSG - typedef MSG and associated routines
* NOOPENFILE - OpenFile(), OemToAnsi, AnsiToOem, and OF_*
* NOSCROLL - SB_* and scrolling routines
* NOSERVICE - All Service Controller routines, SERVICE_ equates, etc.
* NOSOUND - Sound driver routines
* NOTEXTMETRIC - typedef TEXTMETRIC and associated routines
* NOWH - SetWindowsHook and WH_*
* NOWINOFFSETS - GWL_*, GCL_*, associated routines
* NOCOMM - COMM driver routines
* NOKANJI - Kanji support stuff.
* NOHELP - Help engine interface.
* NOPROFILER - Profiler interface.
* NODEFERWINDOWPOS - DeferWindowPos routines
* NOMCX - Modem Configuration Extensions
*/
# 153 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\windows.h" 3
#pragma warning(disable: 4514)
#pragma warning(disable: 4103)
#pragma warning(push)
#pragma warning(disable: 4001)
#pragma warning(disable: 4201)
#pragma warning(disable: 4214)
# 1 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\excpt.h" 1 3
//
// excpt.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// The declarations of the compiler-dependent intrinsics, support functions, and
// keywords which implement the structured exception handling extensions.
//
# 1 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 1 3
//
// vcruntime.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Declarations used throughout the VCRuntime library.
//
// Note on use of "deprecate":
//
// Various places in this header and other headers use
// __declspec(deprecate) or macros that have the term DEPRECATE in them.
// We use "deprecate" here ONLY to signal the compiler to emit a warning
// about these items. The use of "deprecate" should NOT be taken to imply
// that any standard committee has deprecated these functions from the
// relevant standards. In fact, these functions are NOT deprecated from
// the standard.
//
// Full details can be found in our documentation by searching for
// "Security Enhancements in the CRT".
//
// The _CRTIMP macro is not used in the VCRuntime or the CoreCRT anymore, but
// there is a lot of existing code that declares CRT functions using this macro,
// and if we remove its definition, we break that existing code. It is thus
// defined here only for compatibility.
# 45 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 3
# 1 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 1 3
/***
*sal.h - markers for documenting the semantics of APIs
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* sal.h provides a set of annotations to describe how a function uses its
* parameters - the assumptions it makes about them, and the guarantees it makes
* upon finishing.
*
* [Public]
*
****/
/*==========================================================================
The comments in this file are intended to give basic understanding of
the usage of SAL, the Microsoft Source Code Annotation Language.
For more details, please see https://go.microsoft.com/fwlink/?LinkID=242134
The macros are defined in 3 layers, plus the structural set:
_In_/_Out_/_Ret_ Layer:
----------------------
This layer provides the highest abstraction and its macros should be used
in most cases. These macros typically start with:
_In_ : input parameter to a function, unmodified by called function
_Out_ : output parameter, written to by called function, pointed-to
location not expected to be initialized prior to call
_Outptr_ : like _Out_ when returned variable is a pointer type
(so param is pointer-to-pointer type). Called function
provides/allocated space.
_Outref_ : like _Outptr_, except param is reference-to-pointer type.
_Inout_ : inout parameter, read from and potentially modified by
called function.
_Ret_ : for return values
_Field_ : class/struct field invariants
For common usage, this class of SAL provides the most concise annotations.
Note that _In_/_Out_/_Inout_/_Outptr_ annotations are designed to be used
with a parameter target. Using them with _At_ to specify non-parameter
targets may yield unexpected results.
This layer also includes a number of other properties that can be specified
to extend the ability of code analysis, most notably:
-- Designating parameters as format strings for printf/scanf/scanf_s
-- Requesting stricter type checking for C enum parameters
_Pre_/_Post_ Layer:
------------------
The macros of this layer only should be used when there is no suitable macro
in the _In_/_Out_ layer. Its macros start with _Pre_ or _Post_.
This layer provides the most flexibility for annotations.
Implementation Abstraction Layer:
--------------------------------
Macros from this layer should never be used directly. The layer only exists
to hide the implementation of the annotation macros.
Structural Layer:
----------------
These annotations, like _At_ and _When_, are used with annotations from
any of the other layers as modifiers, indicating exactly when and where
the annotations apply.
Common syntactic conventions:
----------------------------
Usage:
-----
_In_, _Out_, _Inout_, _Pre_, _Post_, are for formal parameters.
_Ret_, _Deref_ret_ must be used for return values.
Nullness:
--------
If the parameter can be NULL as a precondition to the function, the
annotation contains _opt. If the macro does not contain '_opt' the
parameter cannot be NULL.
If an out/inout parameter returns a null pointer as a postcondition, this is
indicated by _Ret_maybenull_ or _result_maybenull_. If the macro is not
of this form, then the result will not be NULL as a postcondition.
_Outptr_ - output value is not NULL
_Outptr_result_maybenull_ - output value might be NULL
String Type:
-----------
_z: NullTerminated string
for _In_ parameters the buffer must have the specified stringtype before the call
for _Out_ parameters the buffer must have the specified stringtype after the call
for _Inout_ parameters both conditions apply
Extent Syntax:
-------------
Buffer sizes are expressed as element counts, unless the macro explicitly
contains _byte_ or _bytes_. Some annotations specify two buffer sizes, in
which case the second is used to indicate how much of the buffer is valid
as a postcondition. This table outlines the precondition buffer allocation
size, precondition number of valid elements, postcondition allocation size,
and postcondition number of valid elements for representative buffer size
annotations:
Pre | Pre | Post | Post
alloc | valid | alloc | valid
Annotation elems | elems | elems | elems
---------- ------------------------------------
_In_reads_(s) s | s | s | s
_Inout_updates_(s) s | s | s | s
_Inout_updates_to_(s,c) s | s | s | c
_Out_writes_(s) s | 0 | s | s
_Out_writes_to_(s,c) s | 0 | s | c
_Outptr_result_buffer_(s) ? | ? | s | s
_Outptr_result_buffer_to_(s,c) ? | ? | s | c
For the _Outptr_ annotations, the buffer in question is at one level of
dereference. The called function is responsible for supplying the buffer.
Success and failure:
-------------------
The SAL concept of success allows functions to define expressions that can
be tested by the caller, which if it evaluates to non-zero, indicates the
function succeeded, which means that its postconditions are guaranteed to
hold. Otherwise, if the expression evaluates to zero, the function is
considered to have failed, and the postconditions are not guaranteed.
The success criteria can be specified with the _Success_(expr) annotation:
_Success_(return != FALSE) BOOL
PathCanonicalizeA(_Out_writes_(MAX_PATH) LPSTR pszBuf, LPCSTR pszPath) :
pszBuf is only guaranteed to be NULL-terminated when TRUE is returned,
and FALSE indiates failure. In common practice, callers check for zero
vs. non-zero returns, so it is preferable to express the success
criteria in terms of zero/non-zero, not checked for exactly TRUE.
Functions can specify that some postconditions will still hold, even when
the function fails, using _On_failure_(anno-list), or postconditions that
hold regardless of success or failure using _Always_(anno-list).
The annotation _Return_type_success_(expr) may be used with a typedef to
give a default _Success_ criteria to all functions returning that type.
This is the case for common Windows API status types, including
HRESULT and NTSTATUS. This may be overridden on a per-function basis by
specifying a _Success_ annotation locally.
============================================================================*/
# 180 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// Disable expansion of SAL macros in non-Prefast mode to
// improve compiler throughput.
# 191 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// safeguard for MIDL and RC builds
# 225 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// Some annotations aren't officially SAL2 yet.
//============================================================================
// Structural SAL:
// These annotations modify the use of other annotations. They may
// express the annotation target (i.e. what parameter/field the annotation
// applies to) or the condition under which the annotation is applicable.
//============================================================================
// _At_(target, annos) specifies that the annotations listed in 'annos' is to
// be applied to 'target' rather than to the identifier which is the current
// lexical target.
// _At_buffer_(target, iter, bound, annos) is similar to _At_, except that
// target names a buffer, and each annotation in annos is applied to each
// element of target up to bound, with the variable named in iter usable
// by the annotations to refer to relevant offsets within target.
// _When_(expr, annos) specifies that the annotations listed in 'annos' only
// apply when 'expr' evaluates to non-zero.
// <expr> indicates whether normal post conditions apply to a function
// <expr> indicates whether post conditions apply to a function returning
// the type that this annotation is applied to
// Establish postconditions that apply only if the function does not succeed
// Establish postconditions that apply in both success and failure cases.
// Only applicable with functions that have _Success_ or _Return_type_succss_.
// Usable on a function defintion. Asserts that a function declaration is
// in scope, and its annotations are to be used. There are no other annotations
// allowed on the function definition.
// _Notref_ may precede a _Deref_ or "real" annotation, and removes one
// level of dereference if the parameter is a C++ reference (&). If the
// net deref on a "real" annotation is negative, it is simply discarded.
// Annotations for defensive programming styles.
//============================================================================
// _In_\_Out_ Layer:
//============================================================================
// Reserved pointer parameters, must always be NULL.
// _Const_ allows specification that any namable memory location is considered
// readonly for a given call.
// Input parameters --------------------------
// _In_ - Annotations for parameters where data is passed into the function, but not modified.
// _In_ by itself can be used with non-pointer types (although it is redundant).
// e.g. void SetPoint( _In_ const POINT* pPT );
// nullterminated 'in' parameters.
// e.g. void CopyStr( _In_z_ const char* szFrom, _Out_z_cap_(cchTo) char* szTo, size_t cchTo );
// 'input' buffers with given size
# 326 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// 'input' buffers valid to the given end pointer
# 335 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// Output parameters --------------------------
// _Out_ - Annotations for pointer or reference parameters where data passed back to the caller.
// These are mostly used where the pointer/reference is to a non-pointer type.
// _Outptr_/_Outref) (see below) are typically used to return pointers via parameters.
// e.g. void GetPoint( _Out_ POINT* pPT );
# 368 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// Inout parameters ----------------------------
// _Inout_ - Annotations for pointer or reference parameters where data is passed in and
// potentially modified.
// void ModifyPoint( _Inout_ POINT* pPT );
// void ModifyPointByRef( _Inout_ POINT& pPT );
// For modifying string buffers
// void toupper( _Inout_z_ char* sz );
// For modifying buffers with explicit element size
# 395 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// For modifying buffers with explicit byte size
# 406 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// Pointer to pointer parameters -------------------------
// _Outptr_ - Annotations for output params returning pointers
// These describe parameters where the called function provides the buffer:
// HRESULT SHStrDupW(_In_ LPCWSTR psz, _Outptr_ LPWSTR *ppwsz);
// The caller passes the address of an LPWSTR variable as ppwsz, and SHStrDupW allocates
// and initializes memory and returns the pointer to the new LPWSTR in *ppwsz.
//
// _Outptr_opt_ - describes parameters that are allowed to be NULL.
// _Outptr_*_result_maybenull_ - describes parameters where the called function might return NULL to the caller.
//
// Example:
// void MyFunc(_Outptr_opt_ int **ppData1, _Outptr_result_maybenull_ int **ppData2);
// Callers:
// MyFunc(NULL, NULL); // error: parameter 2, ppData2, should not be NULL
// MyFunc(&pData1, &pData2); // ok: both non-NULL
// if (*pData1 == *pData2) ... // error: pData2 might be NULL after call
// Annotations for _Outptr_ parameters returning pointers to null terminated strings.
// Annotations for _Outptr_ parameters where the output pointer is set to NULL if the function fails.
// Annotations for _Outptr_ parameters which return a pointer to a ref-counted COM object,
// following the COM convention of setting the output to NULL on failure.
// The current implementation is identical to _Outptr_result_nullonfailure_.
// For pointers to types that are not COM objects, _Outptr_result_nullonfailure_ is preferred.
// Annotations for _Outptr_ parameters returning a pointer to buffer with a specified number of elements/bytes
# 485 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// Annotations for output reference to pointer parameters.
# 504 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// Annotations for output reference to pointer parameters that guarantee
// that the pointer is set to NULL on failure.
// Generic annotations to set output value of a by-pointer or by-reference parameter to null/zero on failure.
// return values -------------------------------
//
// _Ret_ annotations
//
// describing conditions that hold for return values after the call
// e.g. _Ret_z_ CString::operator const wchar_t*() const throw();
// used with allocated but not yet initialized objects
// used with allocated and initialized objects
// returns single valid object
// returns pointer to initialized buffer of specified size
// returns pointer to partially initialized buffer, with total size 'size' and initialized size 'count'
// Annotations for strict type checking
// Check the return value of a function e.g. _Check_return_ ErrorCode Foo();
// e.g. MyPrintF( _Printf_format_string_ const wchar_t* wzFormat, ... );
# 567 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// annotations to express value of integral or pointer parameter
# 577 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// annotation to express that a value (usually a field of a mutable class)
// is not changed by a function call
// Annotations to allow expressing generalized pre and post conditions.
// 'cond' may be any valid SAL expression that is considered to be true as a precondition
// or postcondition (respsectively).
// Annotations to express struct, class and field invariants
# 608 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
//============================================================================
// _Pre_\_Post_ Layer:
//============================================================================
//
// Raw Pre/Post for declaring custom pre/post conditions
//
//
// Validity property
//
//
// Buffer size properties
//
// Expressing buffer sizes without specifying pre or post condition
# 640 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// Expressing buffer size as pre or post condition
# 651 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
//
// Pointer null-ness properties
//
//
// _Pre_ annotations ---
//
// describing conditions that must be met before the call of the function
// e.g. int strlen( _Pre_z_ const char* sz );
// buffer is a zero terminated string
// valid size unknown or indicated by type (e.g.:LPSTR)
// Overrides recursive valid when some field is not yet initialized when using _Inout_
// used with allocated but not yet initialized objects
//
// _Post_ annotations ---
//
// describing conditions that hold after the function call
// void CopyStr( _In_z_ const char* szFrom, _Pre_cap_(cch) _Post_z_ char* szFrom, size_t cchFrom );
// buffer will be a zero-terminated string after the call
// e.g. HRESULT InitStruct( _Post_valid_ Struct* pobj );
// e.g. void free( _Post_ptr_invalid_ void* pv );
// e.g. void ThrowExceptionIfNull( _Post_notnull_ const void* pv );
// e.g. HRESULT GetObject(_Outptr_ _On_failure_(_At_(*p, _Post_null_)) T **p);
# 710 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
/*==========================================================================
This section contains definitions for macros defined for VS2010 and earlier.
Usage of these macros is still supported, but the SAL 2 macros defined above
are recommended instead. This comment block is retained to assist in
understanding SAL that still uses the older syntax.
The macros are defined in 3 layers:
_In_\_Out_ Layer:
----------------
This layer provides the highest abstraction and its macros should be used
in most cases. Its macros start with _In_, _Out_ or _Inout_. For the
typical case they provide the most concise annotations.
_Pre_\_Post_ Layer:
------------------
The macros of this layer only should be used when there is no suitable macro
in the _In_\_Out_ layer. Its macros start with _Pre_, _Post_, _Ret_,
_Deref_pre_ _Deref_post_ and _Deref_ret_. This layer provides the most
flexibility for annotations.
Implementation Abstraction Layer:
--------------------------------
Macros from this layer should never be used directly. The layer only exists
to hide the implementation of the annotation macros.
Annotation Syntax:
|--------------|----------|----------------|-----------------------------|
| Usage | Nullness | ZeroTerminated | Extent |
|--------------|----------|----------------|-----------------------------|
| _In_ | <> | <> | <> |
| _Out_ | opt_ | z_ | [byte]cap_[c_|x_]( size ) |
| _Inout_ | | | [byte]count_[c_|x_]( size ) |
| _Deref_out_ | | | ptrdiff_cap_( ptr ) |
|--------------| | | ptrdiff_count_( ptr ) |
| _Ret_ | | | |
| _Deref_ret_ | | | |
|--------------| | | |
| _Pre_ | | | |
| _Post_ | | | |
| _Deref_pre_ | | | |
| _Deref_post_ | | | |
|--------------|----------|----------------|-----------------------------|
Usage:
-----
_In_, _Out_, _Inout_, _Pre_, _Post_, _Deref_pre_, _Deref_post_ are for
formal parameters.
_Ret_, _Deref_ret_ must be used for return values.
Nullness:
--------
If the pointer can be NULL the annotation contains _opt. If the macro
does not contain '_opt' the pointer may not be NULL.
String Type:
-----------
_z: NullTerminated string
for _In_ parameters the buffer must have the specified stringtype before the call
for _Out_ parameters the buffer must have the specified stringtype after the call
for _Inout_ parameters both conditions apply
Extent Syntax:
|------|---------------|---------------|
| Unit | Writ\Readable | Argument Type |
|------|---------------|---------------|
| <> | cap_ | <> |
| byte | count_ | c_ |
| | | x_ |
|------|---------------|---------------|
'cap' (capacity) describes the writable size of the buffer and is typically used
with _Out_. The default unit is elements. Use 'bytecap' if the size is given in bytes
'count' describes the readable size of the buffer and is typically used with _In_.
The default unit is elements. Use 'bytecount' if the size is given in bytes.
Argument syntax for cap_, bytecap_, count_, bytecount_:
(<parameter>|return)[+n] e.g. cch, return, cb+2
If the buffer size is a constant expression use the c_ postfix.
E.g. cap_c_(20), count_c_(MAX_PATH), bytecount_c_(16)
If the buffer size is given by a limiting pointer use the ptrdiff_ versions
of the macros.
If the buffer size is neither a parameter nor a constant expression use the x_
postfix. e.g. bytecount_x_(num*size) x_ annotations accept any arbitrary string.
No analysis can be done for x_ annotations but they at least tell the tool that
the buffer has some sort of extent description. x_ annotations might be supported
by future compiler versions.
============================================================================*/
// e.g. void SetCharRange( _In_count_(cch) const char* rgch, size_t cch )
// valid buffer extent described by another parameter
// valid buffer extent described by a constant extression
// nullterminated 'input' buffers with given size
// e.g. void SetCharRange( _In_count_(cch) const char* rgch, size_t cch )
// nullterminated valid buffer extent described by another parameter
// nullterminated valid buffer extent described by a constant extression
// buffer capacity is described by another pointer
// e.g. void Foo( _In_ptrdiff_count_(pchMax) const char* pch, const char* pchMax ) { while pch < pchMax ) pch++; }
// 'x' version for complex expressions that are not supported by the current compiler version
// e.g. void Set3ColMatrix( _In_count_x_(3*cRows) const Elem* matrix, int cRows );
// 'out' with buffer size
// e.g. void GetIndeces( _Out_cap_(cIndeces) int* rgIndeces, size_t cIndices );
// buffer capacity is described by another parameter
// buffer capacity is described by a constant expression
// buffer capacity is described by another parameter multiplied by a constant expression
// buffer capacity is described by another pointer
// e.g. void Foo( _Out_ptrdiff_cap_(pchMax) char* pch, const char* pchMax ) { while pch < pchMax ) pch++; }
// buffer capacity is described by a complex expression
// a zero terminated string is filled into a buffer of given capacity
// e.g. void CopyStr( _In_z_ const char* szFrom, _Out_z_cap_(cchTo) char* szTo, size_t cchTo );
// buffer capacity is described by another parameter
// buffer capacity is described by a constant expression
// buffer capacity is described by a complex expression
// a zero terminated string is filled into a buffer of given capacity
// e.g. size_t CopyCharRange( _In_count_(cchFrom) const char* rgchFrom, size_t cchFrom, _Out_cap_post_count_(cchTo,return)) char* rgchTo, size_t cchTo );
// a zero terminated string is filled into a buffer of given capacity
// e.g. size_t CopyStr( _In_z_ const char* szFrom, _Out_z_cap_post_count_(cchTo,return+1) char* szTo, size_t cchTo );
// only use with dereferenced arguments e.g. '*pcch'
# 922 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// e.g. GetString( _Out_z_capcount_(*pLen+1) char* sz, size_t* pLen );
// 'inout' buffers with initialized elements before and after the call
// e.g. void ModifyIndices( _Inout_count_(cIndices) int* rgIndeces, size_t cIndices );
# 941 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// nullterminated 'inout' buffers with initialized elements before and after the call
// e.g. void ModifyIndices( _Inout_count_(cIndices) int* rgIndeces, size_t cIndices );
# 961 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// e.g. void AppendToLPSTR( _In_ LPCSTR szFrom, _Inout_cap_(cchTo) LPSTR* szTo, size_t cchTo );
# 977 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// inout string buffers with writable size
// e.g. void AppendStr( _In_z_ const char* szFrom, _Inout_z_cap_(cchTo) char* szTo, size_t cchTo );
# 995 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// returning pointers to valid objects
// annotations to express 'boundedness' of integral value parameter
# 1008 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// e.g. HRESULT HrCreatePoint( _Deref_out_opt_ POINT** ppPT );
// e.g. void CloneString( _In_z_ const wchar_t* wzFrom, _Deref_out_z_ wchar_t** pWzTo );
//
// _Deref_pre_ ---
//
// describing conditions for array elements of dereferenced pointer parameters that must be met before the call
// e.g. void SaveStringArray( _In_count_(cStrings) _Deref_pre_z_ const wchar_t* const rgpwch[] );
// e.g. void FillInArrayOfStr32( _In_count_(cStrings) _Deref_pre_cap_c_(32) _Deref_post_z_ wchar_t* const rgpwch[] );
// buffer capacity is described by another parameter
// buffer capacity is described by a constant expression
// buffer capacity is described by a complex condition
// convenience macros for nullterminated buffers with given capacity
# 1064 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// known capacity and valid but unknown readable extent
# 1080 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// e.g. void SaveMatrix( _In_count_(n) _Deref_pre_count_(n) const Elem** matrix, size_t n );
// valid buffer extent is described by another parameter
// valid buffer extent is described by a constant expression
// valid buffer extent is described by a complex expression
// e.g. void PrintStringArray( _In_count_(cElems) _Deref_pre_valid_ LPCSTR rgStr[], size_t cElems );
# 1108 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// restrict access rights
//
// _Deref_post_ ---
//
// describing conditions for array elements or dereferenced pointer parameters that hold after the call
// e.g. void CloneString( _In_z_ const Wchar_t* wzIn _Out_ _Deref_post_z_ wchar_t** pWzOut );
// e.g. HRESULT HrAllocateMemory( size_t cb, _Out_ _Deref_post_bytecap_(cb) void** ppv );
// buffer capacity is described by another parameter
// buffer capacity is described by a constant expression
// buffer capacity is described by a complex expression
// convenience macros for nullterminated buffers with given capacity
# 1156 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// known capacity and valid but unknown readable extent
# 1172 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// e.g. HRESULT HrAllocateZeroInitializedMemory( size_t cb, _Out_ _Deref_post_bytecount_(cb) void** ppv );
// valid buffer extent is described by another parameter
// buffer capacity is described by a constant expression
// buffer capacity is described by a complex expression
// e.g. void GetStrings( _Out_count_(cElems) _Deref_post_valid_ LPSTR const rgStr[], size_t cElems );
//
// _Deref_ret_ ---
//
//
// special _Deref_ ---
//
//
// _Ret_ ---
//
// e.g. _Ret_opt_valid_ LPSTR void* CloneSTR( _Pre_valid_ LPSTR src );
// e.g. _Ret_opt_bytecap_(cb) void* AllocateMemory( size_t cb );
// Buffer capacity is described by another parameter
// Buffer capacity is described by a constant expression
// Buffer capacity is described by a complex condition
// return value is nullterminated and capacity is given by another parameter
// e.g. _Ret_opt_bytecount_(cb) void* AllocateZeroInitializedMemory( size_t cb );
// Valid Buffer extent is described by another parameter
// Valid Buffer extent is described by a constant expression
// Valid Buffer extent is described by a complex expression
// return value is nullterminated and length is given by another parameter
// _Pre_ annotations ---
// restrict access rights
// e.g. void FreeMemory( _Pre_bytecap_(cb) _Post_ptr_invalid_ void* pv, size_t cb );
// buffer capacity described by another parameter
// buffer capacity described by a constant expression
// buffer capacity is described by another parameter multiplied by a constant expression
// buffer capacity described by size of other buffer, only used by dangerous legacy APIs
// e.g. int strcpy(_Pre_cap_for_(src) char* dst, const char* src);
// buffer capacity described by a complex condition
// buffer capacity described by the difference to another pointer parameter
// e.g. void AppendStr( _Pre_z_ const char* szFrom, _Pre_z_cap_(cchTo) _Post_z_ char* szTo, size_t cchTo );
# 1327 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// known capacity and valid but unknown readable extent
# 1343 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// e.g. void AppendCharRange( _Pre_count_(cchFrom) const char* rgFrom, size_t cchFrom, _Out_z_cap_(cchTo) char* szTo, size_t cchTo );
// Valid buffer extent described by another parameter
// Valid buffer extent described by a constant expression
// Valid buffer extent described by a complex expression
// Valid buffer extent described by the difference to another pointer parameter
// char * strncpy(_Out_cap_(_Count) _Post_maybez_ char * _Dest, _In_z_ const char * _Source, _In_ size_t _Count)
// buffer maybe zero-terminated after the call
// e.g. SIZE_T HeapSize( _In_ HANDLE hHeap, DWORD dwFlags, _Pre_notnull_ _Post_bytecap_(return) LPCVOID lpMem );
// e.g. int strlen( _In_z_ _Post_count_(return+1) const char* sz );
// e.g. size_t CopyStr( _In_z_ const char* szFrom, _Pre_cap_(cch) _Post_z_count_(return+1) char* szFrom, size_t cchFrom );
//
// _Prepost_ ---
//
// describing conditions that hold before and after the function call
# 1414 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
//
// _Deref_<both> ---
//
// short version for _Deref_pre_<ann> _Deref_post_<ann>
// describing conditions for array elements or dereferenced pointer parameters that hold before and after the call
# 1461 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
//
// _Deref_<miscellaneous>
//
// used with references to arrays
# 1475 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
//============================================================================
// Implementation Layer:
//============================================================================
// Naming conventions:
// A symbol the begins with _SA_ is for the machinery of creating any
// annotations; many of those come from sourceannotations.h in the case
// of attributes.
// A symbol that ends with _impl is the very lowest level macro. It is
// not required to be a legal standalone annotation, and in the case
// of attribute annotations, usually is not. (In the case of some declspec
// annotations, it might be, but it should not be assumed so.) Those
// symols will be used in the _PreN..., _PostN... and _RetN... annotations
// to build up more complete annotations.
// A symbol ending in _impl_ is reserved to the implementation as well,
// but it does form a complete annotation; usually they are used to build
// up even higher level annotations.
# 1612 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// Using "nothing" for sal
# 2144 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// Obsolete -- may be needed for transition to attributes.
// This section contains the deprecated annotations
/*
-------------------------------------------------------------------------------
Introduction
sal.h provides a set of annotations to describe how a function uses its
parameters - the assumptions it makes about them, and the guarantees it makes
upon finishing.
Annotations may be placed before either a function parameter's type or its return
type, and describe the function's behavior regarding the parameter or return value.
There are two classes of annotations: buffer annotations and advanced annotations.
Buffer annotations describe how functions use their pointer parameters, and
advanced annotations either describe complex/unusual buffer behavior, or provide
additional information about a parameter that is not otherwise expressible.
-------------------------------------------------------------------------------
Buffer Annotations
The most important annotations in sal.h provide a consistent way to annotate
buffer parameters or return values for a function. Each of these annotations describes
a single buffer (which could be a string, a fixed-length or variable-length array,
or just a pointer) that the function interacts with: where it is, how large it is,
how much is initialized, and what the function does with it.
The appropriate macro for a given buffer can be constructed using the table below.
Just pick the appropriate values from each category, and combine them together
with a leading underscore. Some combinations of values do not make sense as buffer
annotations. Only meaningful annotations can be added to your code; for a list of
these, see the buffer annotation definitions section.
Only a single buffer annotation should be used for each parameter.
|------------|------------|---------|--------|----------|----------|---------------|
| Level | Usage | Size | Output | NullTerm | Optional | Parameters |
|------------|------------|---------|--------|----------|----------|---------------|
| <> | <> | <> | <> | _z | <> | <> |
| _deref | _in | _ecount | _full | _nz | _opt | (size) |
| _deref_opt | _out | _bcount | _part | | | (size,length) |
| | _inout | | | | | |
| | | | | | | |
|------------|------------|---------|--------|----------|----------|---------------|
Level: Describes the buffer pointer's level of indirection from the parameter or
return value 'p'.
<> : p is the buffer pointer.
_deref : *p is the buffer pointer. p must not be NULL.
_deref_opt : *p may be the buffer pointer. p may be NULL, in which case the rest of
the annotation is ignored.
Usage: Describes how the function uses the buffer.
<> : The buffer is not accessed. If used on the return value or with _deref, the
function will provide the buffer, and it will be uninitialized at exit.
Otherwise, the caller must provide the buffer. This should only be used
for alloc and free functions.
_in : The function will only read from the buffer. The caller must provide the
buffer and initialize it. Cannot be used with _deref.
_out : The function will only write to the buffer. If used on the return value or
with _deref, the function will provide the buffer and initialize it.
Otherwise, the caller must provide the buffer, and the function will
initialize it.
_inout : The function may freely read from and write to the buffer. The caller must
provide the buffer and initialize it. If used with _deref, the buffer may
be reallocated by the function.
Size: Describes the total size of the buffer. This may be less than the space actually
allocated for the buffer, in which case it describes the accessible amount.
<> : No buffer size is given. If the type specifies the buffer size (such as
with LPSTR and LPWSTR), that amount is used. Otherwise, the buffer is one
element long. Must be used with _in, _out, or _inout.
_ecount : The buffer size is an explicit element count.
_bcount : The buffer size is an explicit byte count.
Output: Describes how much of the buffer will be initialized by the function. For
_inout buffers, this also describes how much is initialized at entry. Omit this
category for _in buffers; they must be fully initialized by the caller.
<> : The type specifies how much is initialized. For instance, a function initializing
an LPWSTR must NULL-terminate the string.
_full : The function initializes the entire buffer.
_part : The function initializes part of the buffer, and explicitly indicates how much.
NullTerm: States if the present of a '\0' marks the end of valid elements in the buffer.
_z : A '\0' indicated the end of the buffer
_nz : The buffer may not be null terminated and a '\0' does not indicate the end of the
buffer.
Optional: Describes if the buffer itself is optional.
<> : The pointer to the buffer must not be NULL.
_opt : The pointer to the buffer might be NULL. It will be checked before being dereferenced.
Parameters: Gives explicit counts for the size and length of the buffer.
<> : There is no explicit count. Use when neither _ecount nor _bcount is used.
(size) : Only the buffer's total size is given. Use with _ecount or _bcount but not _part.
(size,length) : The buffer's total size and initialized length are given. Use with _ecount_part
and _bcount_part.
-------------------------------------------------------------------------------
Buffer Annotation Examples
LWSTDAPI_(BOOL) StrToIntExA(
__in LPCSTR pszString,
DWORD dwFlags,
__out int *piRet -- A pointer whose dereference will be filled in.
);
void MyPaintingFunction(
__in HWND hwndControl, -- An initialized read-only parameter.
__in_opt HDC hdcOptional, -- An initialized read-only parameter that might be NULL.
__inout IPropertyStore *ppsStore -- An initialized parameter that may be freely used
-- and modified.
);
LWSTDAPI_(BOOL) PathCompactPathExA(
__out_ecount(cchMax) LPSTR pszOut, -- A string buffer with cch elements that will
-- be NULL terminated on exit.
__in LPCSTR pszSrc,
UINT cchMax,
DWORD dwFlags
);
HRESULT SHLocalAllocBytes(
size_t cb,
__deref_bcount(cb) T **ppv -- A pointer whose dereference will be set to an
-- uninitialized buffer with cb bytes.
);
__inout_bcount_full(cb) : A buffer with cb elements that is fully initialized at
entry and exit, and may be written to by this function.
__out_ecount_part(count, *countOut) : A buffer with count elements that will be
partially initialized by this function. The function indicates how much it
initialized by setting *countOut.
-------------------------------------------------------------------------------
Advanced Annotations
Advanced annotations describe behavior that is not expressible with the regular
buffer macros. These may be used either to annotate buffer parameters that involve
complex or conditional behavior, or to enrich existing annotations with additional
information.
__success(expr) f :
<expr> indicates whether function f succeeded or not. If <expr> is true at exit,
all the function's guarantees (as given by other annotations) must hold. If <expr>
is false at exit, the caller should not expect any of the function's guarantees
to hold. If not used, the function must always satisfy its guarantees. Added
automatically to functions that indicate success in standard ways, such as by
returning an HRESULT.
__nullterminated p :
Pointer p is a buffer that may be read or written up to and including the first
NULL character or pointer. May be used on typedefs, which marks valid (properly
initialized) instances of that type as being NULL-terminated.
__nullnullterminated p :
Pointer p is a buffer that may be read or written up to and including the first
sequence of two NULL characters or pointers. May be used on typedefs, which marks
valid instances of that type as being double-NULL terminated.
__reserved v :
Value v must be 0/NULL, reserved for future use.
__checkReturn v :
Return value v must not be ignored by callers of this function.
__typefix(ctype) v :
Value v should be treated as an instance of ctype, rather than its declared type.
__override f :
Specify C#-style 'override' behaviour for overriding virtual methods.
__callback f :
Function f can be used as a function pointer.
__format_string p :
Pointer p is a string that contains % markers in the style of printf.
__blocksOn(resource) f :
Function f blocks on the resource 'resource'.
__fallthrough :
Annotates switch statement labels where fall-through is desired, to distinguish
from forgotten break statements.
-------------------------------------------------------------------------------
Advanced Annotation Examples
__success(return != FALSE) LWSTDAPI_(BOOL)
PathCanonicalizeA(__out_ecount(MAX_PATH) LPSTR pszBuf, LPCSTR pszPath) :
pszBuf is only guaranteed to be NULL-terminated when TRUE is returned.
typedef __nullterminated WCHAR* LPWSTR : Initialized LPWSTRs are NULL-terminated strings.
__out_ecount(cch) __typefix(LPWSTR) void *psz : psz is a buffer parameter which will be
a NULL-terminated WCHAR string at exit, and which initially contains cch WCHARs.
-------------------------------------------------------------------------------
*/
extern "C" {
/*
-------------------------------------------------------------------------------
Helper Macro Definitions
These express behavior common to many of the high-level annotations.
DO NOT USE THESE IN YOUR CODE.
-------------------------------------------------------------------------------
*/
/*
The helper annotations are only understood by the compiler version used by
various defect detection tools. When the regular compiler is running, they
are defined into nothing, and do not affect the compiled code.
*/
# 2635 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
/*
-------------------------------------------------------------------------------
Buffer Annotation Definitions
Any of these may be used to directly annotate functions, but only one should
be used for each parameter. To determine which annotation to use for a given
buffer, use the table in the buffer annotations section.
-------------------------------------------------------------------------------
*/
# 2836 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
/*
-------------------------------------------------------------------------------
Advanced Annotation Definitions
Any of these may be used to directly annotate functions, and may be used in
combination with each other or with regular buffer macros. For an explanation
of each annotation, see the advanced annotations section.
-------------------------------------------------------------------------------
*/
# 2912 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
//
// Set the analysis mode (global flags to analysis).
// They take effect at the point of declaration; use at global scope
// as a declaration.
//
// Synthesize a unique symbol.
# 2927 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
//
// Floating point warnings are only meaningful in kernel-mode on x86
// so avoid reporting them on other platforms.
//
# 2946 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
// The following are predefined:
// _Analysis_operator_new_throw_ (operator new throws)
// _Analysis_operator_new_null_ (operator new returns null)
// _Analysis_operator_new_never_fails_ (operator new never fails)
//
// Function class annotations.
# 2967 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 3
}
# 1 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\ConcurrencySal.h" 1 3
/***
*concurrencysal.h - markers for documenting the concurrent semantics of APIs
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains macros for Concurrency SAL annotations. Definitions
* starting with _Internal are low level macros that are subject to change.
* Users should not use those low level macros directly.
* [ANSI]
*
* [Public]
*
****/
extern "C" {
# 314 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\ConcurrencySal.h" 3
/*
* Old spelling: will be deprecated
*/
# 354 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\ConcurrencySal.h" 3
}
# 2970 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\sal.h" 2 3
# 45 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 2 3
# 1 "C:\\Program Files\\LLVM\\lib\\clang\\5.0.1\\include\\vadefs.h" 1 3
/* ===-------- vadefs.h ---------------------------------------------------===
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
/* Only include this if we are aiming for MSVC compatibility. */
# 1 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vadefs.h" 1 3
//
// vadefs.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Definitions of macro helpers used by <stdarg.h>. This is the topmost header
// in the CRT header lattice, and is always the first CRT header to be included,
// explicitly or implicitly. Therefore, this header also has several definitions
// that are used throughout the CRT.
//
#pragma pack(push, 8)
extern "C" {
# 28 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vadefs.h" 3
typedef unsigned __int64 uintptr_t;
# 39 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vadefs.h" 3
typedef char* va_list;
# 106 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vadefs.h" 3
void __cdecl __va_start(va_list* , ...);
# 118 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vadefs.h" 3
} // extern "C"
extern "C++"
{
template <typename _Ty>
struct __vcrt_va_list_is_reference
{
enum : bool { __the_value = false };
};
template <typename _Ty>
struct __vcrt_va_list_is_reference<_Ty&>
{
enum : bool { __the_value = true };
};
template <typename _Ty>
struct __vcrt_va_list_is_reference<_Ty&&>
{
enum : bool { __the_value = true };
};
template <typename _Ty>
void __vcrt_va_start_verify_argument_type() throw()
{
static_assert(!__vcrt_va_list_is_reference<_Ty>::__the_value, "va_start argument must not have reference type and must not be parenthesized");
}
} // extern "C++"
# 157 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vadefs.h" 3
#pragma pack(pop)
# 33 "C:\\Program Files\\LLVM\\lib\\clang\\5.0.1\\include\\vadefs.h" 2 3
/* Override macros from vadefs.h with definitions that work with Clang. */
# 48 "C:\\Program Files\\LLVM\\lib\\clang\\5.0.1\\include\\vadefs.h" 3
/* VS 2015 switched to double underscore names, which is an improvement, but now
* we have to intercept those names too.
*/
# 46 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 2 3
// All C headers have a common prologue and epilogue, to enclose the header in
// an extern "C" declaration when the header is #included in a C++ translation
// unit and to push/pop the packing.
# 81 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 3
#pragma pack(push, 8)
# 81 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 3
extern "C" {
# 141 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 3
// Definitions of calling conventions used code sometimes compiled as managed
# 158 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 3
// Definitions of common __declspecs
# 189 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 3
// For backwards compatibility
// Definitions of common types
typedef unsigned __int64 size_t;
typedef __int64 ptrdiff_t;
typedef __int64 intptr_t;
typedef bool __vcrt_bool;
# 213 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 3
// Indicate that these common types are defined
# 226 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 3
// Provide a typedef for wchar_t for use under /Zc:wchar_t-
# 247 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 3
extern "C++"
{
template <typename _CountofType, size_t _SizeOfArray>
char (*__countof_helper(__unaligned _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
}
// See note on use of "deprecate" at the top of this file
# 298 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 3
void __cdecl __security_init_cookie(void);
void __cdecl __security_check_cookie( uintptr_t _StackCookie);
__declspec(noreturn) void __cdecl __report_gsfailure( uintptr_t _StackCookie);
extern uintptr_t __security_cookie;
}
# 317 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 3
#pragma pack(pop)
# 12 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\excpt.h" 2 3
#pragma pack(push, 8)
# 14 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\excpt.h" 3
extern "C" {
// Exception disposition return values
typedef enum _EXCEPTION_DISPOSITION
{
ExceptionContinueExecution,
ExceptionContinueSearch,
ExceptionNestedException,
ExceptionCollidedUnwind
} EXCEPTION_DISPOSITION;
// SEH handler
# 45 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\excpt.h" 3
struct _EXCEPTION_RECORD;
struct _CONTEXT;
struct _DISPATCHER_CONTEXT;
EXCEPTION_DISPOSITION __C_specific_handler(
struct _EXCEPTION_RECORD* ExceptionRecord,
void* EstablisherFrame,
struct _CONTEXT* ContextRecord,
struct _DISPATCHER_CONTEXT* DispatcherContext
);
// SEH intrinsics
unsigned long __cdecl _exception_code(void);
void * __cdecl _exception_info(void);
int __cdecl _abnormal_termination(void);
// Defined values for the exception filter expression
}
# 82 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\excpt.h" 3
#pragma pack(pop)
# 164 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\windows.h" 2 3
# 1 "C:\\Program Files\\LLVM\\lib\\clang\\5.0.1\\include\\stdarg.h" 1 3
/*===---- stdarg.h - Variable argument handling ----------------------------===
*
* Copyright (c) 2008 Eli Friedman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
typedef __builtin_va_list va_list;
/* GCC always defines __va_copy, but does not define va_copy unless in c99 mode
* or -ansi is not specified, since it was not part of C90.
*/
# 48 "C:\\Program Files\\LLVM\\lib\\clang\\5.0.1\\include\\stdarg.h" 3
typedef __builtin_va_list __gnuc_va_list;
# 165 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\windows.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\windef.h" 1 3
/****************************************************************************
* *
* windef.h -- Basic Windows Type Definitions *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
****************************************************************************/
extern "C" {
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\minwindef.h" 1 3
/****************************************************************************
* *
* minwindef.h -- Basic Windows Type Definitions for minwin partition *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
****************************************************************************/
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 1 3
/***
*specstrings.h - support for markers for documenting the semantics of APIs
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* [Public]
****/
/*************************************************************************
* See specstrings_strict.h for documentation of all user visible macros.
*************************************************************************/
#pragma warning(push)
#pragma warning(disable: 4668)
# 47 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
/* Begin compatibility fixes required for Win8/VS2012 RTM sal.h */
# 59 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
/* End compatibility fixes required for Win8/VS2012 RTM sal.h */
/* This version symbol is deprecated in favor of __SAL_H_VER */
extern "C" {
/* version specific fixes to bring sal.h upto date */
# 196 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
/* __in_ecount_or_z(c) specifies semantics like strncmp, where a string
* parameter is either null terminated, or valid up to c elements.
*/
/* Provide default definition to be overridden when needed */
/* Must protect redfinitions of macros to workaround rc.exe issues. */
# 218 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
/************************************************************************
New extensions to sal.h follow here.
*************************************************************************/
# 329 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
/* Internal defintions */
# 347 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
///////////////////////////////////////////////////////////////////////////////
//
// Low Level Memory Correctness annotations
//
// These are the implementation details for the Memory Correctness annotations
// that support checking of kernel/user memory handling within kernel mode code.
//
///////////////////////////////////////////////////////////////////////////////
# 363 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
///////////////////////////////////////////////////////////////////////////////
//
// High Level Memory Correctness annotations
//
// These annotations form the expected interface for users to the Memory Correctness
// annotations that support checking of kernel/user memory handling within
// kernel mode code.
//
///////////////////////////////////////////////////////////////////////////////
# 417 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
/* integer related macros */
# 438 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
/* Penetration review macros */
# 459 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
/* useful PFD related macros */
/* Windows Internal */
# 471 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
/* declare stub functions for macros */
/**************************************************************************
* SAL 2 extensions for Windows-specific APIs.
***************************************************************************/
// Annotation for parameters that are not used in any way by the function.
// Unlike _Reserved_, an _Unreferenced_parameter_ pointer need not be NULL.
// Pointer parameters that are freed by the function, and thus the pointed-to
// memory should not be used after return.
# 499 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
// Functions which behave like realloc in that they may succeed by
// freeing one block of memory and allocating another, or may fail, in
// which case the original block is still valid, or may be used to
// free memory directly by requesting that the new block is of size
// zero. We do not say here whether the before may be null, we leave
// that to the annotation on the argument
# 515 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
// NLS APIs allow strings to be specified either by an element count or
// null termination. Unlike _In_reads_or_z_, this is not whichever comes
// first, but based on whether the size is negative or not.
// Minifilter CompletionContext parameters on the pre-operation callback
// default to NULL. For return type FLT_PREOP_SUCCESS_WITH_CALLBACK or
// FLT_PREOP_SYNCHRONIZE, it may be set to NULL or a valid pointer. For all
// other returns, it must be NULL.
// Minifilter ConnectionCookie parameters on the port connect notify callback
// default to NULL. On successful return, it may be set to NULL or non-NULL,
// but it must be NULL on failure.
//
// A common pattern is to pass an "_Inout_ PCHAR* ppBuf" of size "_Inout_ DWORD* pSize"
// to a function that writes to **pBuf, incrementing *ppBuf to point to one
// past the last written byte. Thus the length of the write is
// (*ppBuf - Old(*ppBuf)). The size of the remaining unwritten capacity
// is written to *pSize.
//
// This pattern is frequently used when progressively filling a
// large buffer in chunks
// (e.g. when reading from a network interface in a driver).
//
// It is expected that these supplementary annotations would be used inside an
// _At_, like so:
//
// _At_(*ppBuf, _Writes_and_advances_ptr_(*pBufSize))
// HRESULT WriteChunkOfData(_Inout_ PCHAR* ppBuf, _Inout_ DWORD* pBufSize);
//
# 578 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
//
// Gets the current error code (as returned by GetLastError()), and stores
// in _Curr_ as a postcondition. This is currently approximated by assuming
// that GetLastError() always returns a failed error code. This is not a
// completely accurate approximation, but reasonable.
//
//
// Indicates the function simply translates the given Win32 error code into an HRESULT
// with broadly the same semantics as HRESULT_FROM_WIN32().
//
// This convenience macro allows analyzers to understand the many bespoke error-translation
// functions as simple translators that can be treated as equivalent to HRESULT_FROM_WIN32().
// This results in fewer false positives and unnecessary path explorations. This is because
// for analysis, the specific translations rarely matter, it is more important to know the
// that function cannot fail and the conditions under which it will return an error-range
// HRESULT and when a success-range HRESULT.
//
# 609 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
//
// Indicates the function just directly translates the given NTSTATUS error code into an HRESULT.
//
// This convenience macro allows analyzers to understand the many bespoke error-translation
// functions as simple translators that can be treated as equivalent to HRESULT_FROM_NT().
// This results in fewer false positives and unnecessary path explorations. This is because
// for analysis, the specific translations rarely matter.
//
# 626 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
//
// Indicates the funtion just translates the result of GetLastError() into an HRESULT.
//
// This convenience macro allows analyzers to understand the many bespoke GetLastError-translation
// functions as simple translators that will always return a failure-value HRESULT (these functions
// are almost never meant to be called when GetLastError() could return 0).
// This results in fewer false positives and unnecessary path explorations. This is because
// for analysis, the specific translations rarely matter.
//
# 645 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
}
# 669 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 3
/**************************************************************************
* This include should always be the last thing in this file.
* Must avoid redfinitions of macros to workaround rc.exe issues.
***************************************************************************/
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings_strict.h" 1 3
//
// Copyright (C) Microsoft. All rights reserved.
//
/*************************************************************************
* This file documents all the macros approved for use in windows source
* code. It includes some experimental macros which should only be used by
* experts.
*
* DO NOT include this file directly. This file is include after
* specstrings.h. So we can undefine every possible old definition including
* private internal macros people should not be using, as well as macros from
* sal.h. Macros are redefined here in a way to cause syntax errors when used
* incorrectly during a normal build when specstrings.h is included and
* __SPECSTRINGS_STRICT_LEVEL is defined.
*
* There are several levels of strictness, each level includes the behavior of
* all previous levels.
*
* 0 - Disable strict checking
* 1 - Break on unapproved macros and misuse of statement
* macros such as __fallthrough (default)
* 2 - Deprecated some old macros that should not be used
* 3 - Use VS 2005 Source Annotation to make sure every macro
* is used in the right context. For example placing __in on a return
* parameter will result in an error.
************************************************************************/
/************************************************************************
* Introduction
*
* specstrings.h provides a set of annotations to describe how a function uses
* its parameters - the assumptions it makes about them, and the guarantees it
* makes upon finishing.
*
* Annotations must be placed before a function parameter's type or its return
* type. There are two basic classes of common annotations buffer annotations
* and advanced annotations. Buffer annotations describe how functions use
* their pointer parameters, and advanced annotations either describe
* complex/unusual buffer behavior, or provide additional information about a
* parameter that is not otherwise expressible.
*
* Buffer Annotations
*
* The most important annotations in SpecStrings.h provide a consistent way to
* annotate buffer parameters or return values for a function. Each of these
* annotations describes a single buffer (which could be a string, a
* fixed-length or variable-length array, or just a pointer) that the function
* interacts with: where it is, how large it is, how much is initialized, and
* what the function does with it.
*
* The appropriate macro for a given buffer can be constructed using the table
* below. Just pick the appropriate values from each category, and combine
* them together with a leading underscore. Some combinations of values do not
* make sense as buffer annotations. Only meaningful annotations can be added
* to your code; for a list of these, see the buffer annotation definitions
* section.
*
* Only a single buffer annotation should be used for each parameter.
*
* |------------|------------|---------|--------|----------|---------------|
* | Level | Usage | Size | Output | Optional | Parameters |
* |------------|------------|---------|--------|----------|---------------|
* | <> | <> | <> | <> | <> | <> |
* | _deref | _in | _ecount | _full | _opt | (size) |
* | _deref_opt | _out | _bcount | _part | | (size,length) |
* | | _inout | | | | |
* | | | | | | |
* |------------|------------|---------|--------|----------|---------------|
*
* Note: "<>" represents the empty string.
*
* Level: Describes the buffer pointer's level of indirection from the
* parameter or return value 'p'.
*
* <> : p is the buffer pointer.
* _deref : *p is the buffer pointer. p must not be NULL.
* _deref_opt : *p may be the buffer pointer. p may be NULL, in which case the
* rest of the annotation is ignored.
*
* Usage: Describes how the function uses the buffer.
*
* <> : The buffer is not accessed. If used on the return value or with
* _deref, the function will provide the buffer, and it will be uninitialized
* at exit. Otherwise, the caller must provide the buffer. This should only
* be used for alloc and free functions.
*
* _in : The function will only read from the buffer. The caller must provide
* the buffer and initialize it.
*
* _out : The function will only write to the buffer. If used on the return
* value or with _deref, the function will provide the buffer and initialize
* it. Otherwise, the caller must provide the buffer, and the function will
* initialize it.
*
* _inout : The function may freely read from and write to the buffer. The
* caller must provide the buffer and initialize it. If used with _deref, the
* buffer may be reallocated by the function.
*
* Size: Describes the total size of the buffer. This may be less than the
* space actually allocated for the buffer, in which case it describes the
* accessible amount.
*
* <> : No buffer size is given. If the type specifies the buffer size (such
* as with LPSTR and LPWSTR), that amount is used. Otherwise, the buffer is
* one element long. Must be used with _in, _out, or _inout.
*
* _ecount : The buffer size is an explicit element count.
*
* _bcount : The buffer size is an explicit byte count.
*
* Output: Describes how much of the buffer will be initialized by the
* function. For _inout buffers, this also describes how much is initialized
* at entry. Omit this category for _in buffers; they must be fully
* initialized by the caller.
*
* <> : The type specifies how much is initialized. For instance, a function
* initializing an LPWSTR must NULL-terminate the string.
*
* _full : The function initializes the entire buffer.
*
* _part : The function initializes part of the buffer, and explicitly
* indicates how much.
*
* Optional: Describes if the buffer itself is optional.
*
* <> : The pointer to the buffer must not be NULL.
*
* _opt : The pointer to the buffer might be NULL. It will be checked before
* being dereferenced.
*
* Parameters: Gives explicit counts for the size and length of the buffer.
*
* <> : There is no explicit count. Use when neither _ecount nor _bcount is
* used.
*
* (size) : Only the buffer's total size is given. Use with _ecount or _bcount
* but not _part.
*
* (size,length) : The buffer's total size and initialized length are
* given. Use with _ecount_part and _bcount_part.
*
* ----------------------------------------------------------------------------
* Buffer Annotation Examples
*
* LWSTDAPI_(BOOL) StrToIntExA(
* LPCSTR pszString, // No annotation required, const implies __in.
* DWORD dwFlags,
* __out int *piRet // A pointer whose dereference will be filled in.
* );
*
* void MyPaintingFunction(
* __in HWND hwndControl, // An initialized read-only parameter.
* __in_opt HDC hdcOptional, // An initialized read-only parameter that
* // might be NULL.
* __inout IPropertyStore *ppsStore // An initialized parameter that
* // may be freely used and modified.
* );
*
* LWSTDAPI_(BOOL) PathCompactPathExA(
* __out_ecount(cchMax) LPSTR pszOut, // A string buffer with cch elements
* // that will be '\0' terminated
* // on exit.
* LPCSTR pszSrc, // No annotation required,
* // const implies __in.
* UINT cchMax,
* DWORD dwFlags
* );
*
* HRESULT SHLocalAllocBytes(
* size_t cb,
* __deref_bcount(cb) T **ppv // A pointer whose dereference will be set
* // to an uninitialized buffer with cb bytes.
* );
*
* __inout_bcount_full(cb) : A buffer with cb elements that is fully
* initialized at entry and exit, and may be written to by this function.
*
* __out_ecount_part(count, *countOut) : A buffer with count elements that
* will be partially initialized by this function. The function indicates how
* much it initialized by setting *countOut.
*
************************************************************************/
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings_undef.h" 1 3
//
// Copyright (C) Microsoft. All rights reserved.
//
# 188 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings_strict.h" 2 3
# 396 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings_strict.h" 3
/************************************************************************
* SAL 2 _Ouptr_ family of annotations
************************************************************************/
# 439 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings_strict.h" 3
/************************************************************************
* Orcas SAL
************************************************************************/
# 463 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings_strict.h" 3
/************************************************************************
* Advanced Annotations
*
* Advanced annotations describe behavior that is not expressible with the
* regular buffer macros. These may be used either to annotate buffer
* parameters that involve complex or conditional behavior, or to enrich
* existing annotations with additional information.
*
* _At_(expr, annotes) : annotation list annotes applies to target 'expr'
*
* _When_(expr, annotes) : annotation list annotes applies when 'expr' is true
*
* __success(expr) T f() : <expr> indicates whether function f succeeded or
* not. If <expr> is true at exit, all the function's guarantees (as given
* by other annotations) must hold. If <expr> is false at exit, the caller
* should not expect any of the function's guarantees to hold. If not used,
* the function must always satisfy its guarantees. Added automatically to
* functions that indicate success in standard ways, such as by returning an
* HRESULT.
*
* __out_awcount(expr, size) T *p : Pointer p is a buffer whose size may be
* given in either bytes or elements. If <expr> is true, this acts like
* __out_bcount. If <expr> is false, this acts like __out_ecount. This
* should only be used to annotate old APIs.
*
* __in_awcount(expr, size) T* p : Pointer p is a buffer whose size may be given
* in either bytes or elements. If <expr> is true, this acts like
* __in_bcount. If <expr> is false, this acts like __in_ecount. This should
* only be used to annotate old APIs.
*
* __nullterminated T* p : Pointer p is a buffer that may be read or written
* up to and including the first '\0' character or pointer. May be used on
* typedefs, which marks valid (properly initialized) instances of that type
* as being null-terminated.
*
* __nullnullterminated T* p : Pointer p is a buffer that may be read or
* written up to and including the first sequence of two '\0' characters or
* pointers. May be used on typedefs, which marks valid instances of that
* type as being double-null terminated.
*
* __reserved T v : Value v must be 0/NULL, reserved for future use.
*
* __checkReturn T f(); : Return value of f must not be ignored by callers
* of this function.
*
* __typefix(ctype) T v : Value v should be treated as an instance of ctype,
* rather than its declared type when considering validity.
*
* __override T f(); : Specify C#-style 'override' behaviour for overriding
* virtual methods.
*
* __callback T f(); : Function f can be used as a function pointer.
*
* __format_string T p : Pointer p is a string that contains % markers in
* the style of printf.
*
* __blocksOn(resource) f(); : Function f blocks on the resource 'resource'.
*
* __fallthrough : Annotates switch statement labels where fall-through is
* desired, to distinguish from forgotten break statements.
*
* __range(low_bnd, up_bnd) int f(): The return from the function "f" must
* be in the inclusive numeric range [low_bnd, up_bnd].
*
* __in_range(low_bnd, up_bnd) int i : Precondition that integer i must be
* in the inclusive numeric range [low_bnd, up_bnd].
*
* __out_range(low_bnd, up_bnd) int i : Postcondition that integer i must be
* in the inclusive numeric range [low_bnd, up_bnd].
*
* __deref_in_range(low_bnd, up_bnd) int* pi : Precondition that integer *pi
* must be in the inclusive numeric range [low_bnd, up_bnd].
*
* __deref_out_range(low_bnd, up_bnd) int* pi : Postcondition that integer
* *pi must be in the inclusive numeric range [low_bnd, up_bnd].
*
* __deref_inout_range(low_bnd, up_bnd) int* pi : Invariant that the integer
* *pi must be in the inclusive numeric range [low_bnd, up_bnd].
*
* The first argument of a range macro may also be a C relational operator
* (<,>,!=, ==, <=, >=).
*
* __range(rel_op, j) int f(): Postcondition that "f() rel_op j" must be
* true. Note that j may be a expression known only at runtime.
*
* __in_range(rel_op, j) int i : Precondition that "i rel_op j" must be
* true. Note that j may be a expression known only at runtime.
*
* __out_range(rel_op, j) int i : Postcondition that integer "i rel_op j"
* must be true. Note that j may be a expression known only at runtime.
*
* __deref_in_range(rel_op, j) int *pi : Precondition that "*pi rel_op j"
* must be true. Note that j may be a expression known only at runtime.
*
* __deref_out_range(rel_op, j) int *pi : Postcondition that "*pi rel_op j"
* must be true. Note that j may be a expression known only at runtime.
*
* __deref_inout_range(rel_op, j) int *pi : Invariant that "*pi rel_op j"
* must be true. Note that j may be a expression known only at runtime.
*
* __range_max(a, b) int f(): Postcondition f acts as 'max', returns larger
* of a and b. Note that a and b may be expressions known only at runtime.
*
* __range_min(a, b) int f(): Postcondition f acts as 'min', returns smaller
* of a and b. Note that a and b may be expressions known only at runtime.
*
* __in_bound int i : Precondition that integer i must be bound, but the
* exact range can't be specified at compile time. __in_range should be
* used if the range can be explicitly stated.
*
* __out_bound int i : Postcondition that integer i must be bound, but the
* exact range can't be specified at compile time. __out_range should be
* used if the range can be explicitly stated.
*
* __deref_out_bound int pi : Postcondition that integer *pi must be bound,
* but the exact range can't be specified at compile time.
* __deref_out_range should be used if the range can be explicitly stated.
*
* __assume_bound(expr); : Assume that the expression is bound to some known
* range. This can be used to suppress integer overflow warnings on integral
* expressions that are known to be bound due to reasons not explicit in the
* code. Use as a statement in the body of a function.
*
* __analysis_assume_nulltermianted(expr); : Assume that the expression is
* a null terminated buffer. Use this to suppress tool noise specific to
* nulltermination warnings, and capture deeper invariants tools can not
* discover.
*
* __allocator void f(): Function allocates memory using an integral size
* argument
*
* void myfree(__deallocate(Mem) void *p) : Memory is freed, no longer usable
* upon return, and p may not be null.
*
* void myfree(__deallocate_opt(Mem) void *p) : Memory is freed, no longer
* usable upon return, and p may be null.
*
* void free(__post_invalid void* x): Mark memory as untouchable when
* function returns.
*
* ----------------------------------------------------------------------------
* Advanced Annotation Examples
*
* __success(return == TRUE) LWSTDAPI_(BOOL)
* PathCanonicalizeA(__out_ecount(MAX_PATH) LPSTR pszBuf, LPCSTR pszPath);
* // pszBuf is only guaranteed to be null-terminated when TRUE is returned.
*
* // Initialized LPWSTRs are null-terminated strings.
* typedef __nullterminated WCHAR* LPWSTR;
*
* __out_ecount(cch) __typefix(LPWSTR) void *psz;
* // psz is a buffer parameter which will be a null-terminated WCHAR string
* // at exit, and which initially contains cch WCHARs.
*
************************************************************************/
# 655 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings_strict.h" 3
/***************************************************************************
* Expert Macros
***************************************************************************/
/***************************************************************************
* Macros to classify fields of structures.
* Structure Annotations
*
* The buffer annotations are a convenient way of describing
* relationships between buffers and their size on a function by
* function basis. Very often struct or class data members have similar
* invariants, which can be expressed directly on the type.
*
* Similar to our buffer annotations we can summarize all the various
* structure annotations by one choosing an element from each column of
* this table to build a composite annotation.
*
* +--------------------------------------------------+
* | Selector | Units | Size/Init | Optional |
* |----------+---------+------------------+----------|
* | __field | _ecount | (size) | empty |
* |----------+---------+------------------+----------|
* | __struct | _bcount | _full(size) | _opt |
* |----------+---------+------------------+----------|
* | | _xcount | _part(size,init) | |
* +--------------------------------------------------+
*
* Note that empty represents the empty string. Sometime arguments need
* to be "floated" to the left to give us a valid annotation name. For
* example the naive combination __field_ecount(size)_opt is actually
* written as __field_ecount_opt(size). Not all possible combinations
* are currently supported or sensible. See specstrings_strict.h for
* the currently supported set. Those that are supported are documented
* below.
*
*Summary of Elements
*
* Selector
*
* __field
* The annotation should only be placed in front
* of data members of structures and classes. The
* data members are pointers to a block of data.
* The annotations describe properties about the
* size of the block of data. This can be used for
*
* __struct
* The annotation should only be placed at the
* beginning of the definition of a structure or
* class. These annotations are used when a struct
* or class is used as a "header" that is
* allocated inline with a block of data and there
* is no apparent field that represents the tail
* end of the structure.
*
* Units
*
* _ecount
* All size and initialization values are in terms
* of elements of the appropriate type
*
* _bcount
* All size and initialization values are in terms
* of raw byte sizes.
*
* _xcount
* The size or initialization values cannot be
* properly expressed as a simple byte or element
* count, and instead a place holder is used to
* document the relationship.
*
* Size/Init
* All the size/init expressions can contain references to
* other fields in the struct or class.
*
* (size)
* The size of the buffer is determined by the
* expression size. Unless, the type of the buffer
* provides more information nothing is know about
* how much of this data is initialized. For
* example, if the data member happens to be a
* string type such as LPSTR. It is assumed that
* the data is initialized to the first '\0'.
*
* _full(size)
* The size of the buffer is determined by the
* expression size and all the data in the buffer
* is guaranteed to be initialized.
*
* _part(size,init)
* The size of the buffer is determined by the
* expression size and all the data in the buffer
* is guaranteed to be initialized up to init
* elements or bytes.
*
* Optional
*
* empty
* The pointer to the block of memory is never
* NULL
*
* _opt
* The pointer to the block of memory is may be
* NULL
*
*
* // Basic Usage of Struct Annotations
* #include <stdio.h>
* #include <stdlib.h>
* struct buf_s {
* int sz;
* __field_bcount_full(sz)
* char *buf;
* };
* void InitBuf(__out struct *buf_s b,int sz) {
* b->buf = calloc(sz,sizeof(char));
* b->sz = sz;
* }
* void WriteBuf(__in FILE *fp,__in struct *buf_s b) {
* fwrite(b->buf,b->sz,sizeof(char),fp);
* }
* void ReadBuf(__in FILE *fp,__inout struct *buf_s b) {
* fread(b->buf,b->sz,sizeof(char),fp);
* }
*
*
*
* // Inline Allocated Buffer
* struct buf_s {
* int sz;
* __field_bcount(sz)
* char buf[1];
* };
* void WriteBuf(__in FILE *fp,__in struct *buf_s b) {
* fwrite(&(b->buf),b->sz,sizeof(char),fp);
* }
* void ReadBuf(__in FILE *fp,__inout struct *buf_s b) {
* fread(&(b->buf),b->sz,sizeof(char),fp);
* }
*
*
*
* // Embedded Header Structure
* __struct_bcount(sz)
* struct buf_s {
* int sz;
* };
* void WriteBuf(__in FILE *fp,__in struct *buf_s b) {
* fwrite(&b,b->sz,sizeof(char),fp);
* }
* void ReadBuf(__in FILE *fp,__inout struct *buf_s b) {
* fread(&b,b->sz,sizeof(char),fp);
* }
*
*
****************************************************************************/
# 836 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings_strict.h" 3
/***************************************************************************
* Macros to classify the entrypoints and indicate their category.
*
* Pre-defined control point categories include: RPC, KERNEL, GDI.
*
* Pre-defined control point macros include:
* __rpc_entry, __kernel_entry, __gdi_entry.
***************************************************************************/
/***************************************************************************
* Macros to track untrusted data and their validation. The list of untrusted
* sources include:
*
* FILE - File reading stream or API
* NETWORK - Socket readers
* INTERNET - WinInet and WinHttp readers
* USER_REGISTRY - HKCU portions of the registry
* USER_MODE - Parameters to kernel entry points
* RPC - Parameters to RPC entry points
* DRIVER - Device driver
***************************************************************************/
/**************************************************************************
* Macros to tag file parsing code. Predefined formats include:
* PNG - Portable Network Graphics
* JPEG - Joint Photographic Experts Group
* BMP - Bitmap
* RC_BMP - Resource bitmap
* WMF - Windows Metafile
* EMF - Windows Enhanced Metafile
* GIF - Graphics Interchange Format
* MIME_TYPE - MIME type from header tokens
* MAIL_MONIKER - MAIL information refered by URL moniker
* HTML - HyperText Markup Language
* WMPHOTO - Windows media photo
* OE_VCARD - Outlook Express virtual card
* OE_CONTACT - Outlook Express contact
* MIDI - Musical Instrument Digital Interface
* LDIF - LDAP Data Interchange Format
* AVI - Audio Visual Interchange
* ACM - Audio Compression Manager
**************************************************************************/
/***************************************************************************
* Macros to track the code content in the file. The type of code
* contents currently tracked:
*
* NDIS_DRIVER - NDIS Device driver
***************************************************************************/
/***************************************************************************
* Macros to track the code content in the class. The type of code
* contents currently tracked:
*
* DCOM - Class implementing DCOM
***************************************************************************/
/*************************************************************************
* Macros to tag encoded function pointers
**************************************************************************/
# 919 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings_strict.h" 3
/*************************************************************************
* __analysis_assume(expr) : Expert macro use only when directed. Use this to
* tell static analysis tools like PREfix and PREfast about a non-coded
* assumption that you wish the tools to assume. The assumption will be
* understood by those tools. By default there is no dynamic checking or
* static checking of the assumption in any build.
*
* To obtain dynamic checking wrap this macro in your local version of a debug
* assert.
* Please do not put function calls in the expression because this is not
* supported by all tools:
* __analysis_assume(GetObject () != NULL); // DO NOT DO THIS
*
*************************************************************************/
/*************************************************************************
* __analysis_hint(hint_sym) : Expert macro use only when
* directed. Use this to influence certain analysis heuristics
* used by the tools. These hints do not describe the semantics
* of functions but simply direct the tools to act in a certain
* way.
*
* Current hints that are supported are:
*
* INLINE - inline this function during analysis overrides any
* default heuristics
* NOINLINE - do not inline this function during analysis overrides
* and default heuristics
*************************************************************************/
/*************************************************************************
* Macros to encode abstract properties of values. Used by SALadt.h
*************************************************************************/
/*************************************************************************
* Macros used by Prefast for Drivers
*
* __possibly_notnullterminated :
*
* Used for return values of parameters or functions that do not
* guarantee nulltermination in all cases.
*
*************************************************************************/
/*************************************************************************
* Advanced macros
*
* __volatile
* The __volatile annotation identifies a global variable or
* structure field that:
* 1) is not declared volatile;
* 2) is accessed concurrently by multiple threads.
*
* The __deref_volatile annotation identifies a global variable
* or structure field that stores a pointer to some data that:
* 1) is not declared volatile;
* 2) is accessed concurrently by multiple threads.
*
* Prefast uses these annotations to find patterns of code that
* may result in unexpected re-fetching of the global variable
* into a local variable.
*
* We also provide two complimentary annotations __nonvolatile
* and __deref_nonvolatile that could be used to suppress Prefast
*
* re-fetching warnings on variables that are known either:
* 1) not to be in danger of being re-fetched or,
* 2) not to lead to incorrect results if they are re-fetched
*
*************************************************************************/
/*************************************************************************
* Macros deprecated with strict level greater then 1.
**************************************************************************/
# 1065 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings_strict.h" 3
/* Define soon to be deprecated macros to nops. */
# 1123 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings_strict.h" 3
/*************************************************************************
* Definitions to force a compile error when macros are used improperly.
* Relies on VS 2005 source annotations.
*************************************************************************/
# 1137 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings_strict.h" 3
/**************************************************************************
* This should go away. It's only for __success which we should split into.
* __success and __typdecl_sucess
***************************************************************************/
# 674 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 2 3
/*
If no SAL 2 appears to have been defined (_Outptr_ is a representative choice)
then we must be operating in a downlevel build environment (such as VS10).
We also test against the compiler version to identify a downlevel environment,
as VS11 is the minimum required for SAL 2 support.
If we are operating in a downlevel build environment (such as VS10)
we need to undefine the following symbols before including driverspecs.h
or we will end up referencing SAL 2 implementation symbols and cause
build failures.
*/
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\driverspecs.h" 1 3
/*****************************************************************************\
* *
* DriverSpecs.h - markers for documenting the semantics of driver APIs *
* See also <SpecStrings.h> *
* *
* Version 1.2.10 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
\*****************************************************************************/
/*****************************************************************************\
* NOTE *
* NOTE *
* NOTE *
* The macro bodies in this file are subject to change without notice. *
* Attempting to use the annotations in the macro bodies directly is not *
* supported. *
* NOTE *
* NOTE *
* NOTE *
\*****************************************************************************/
/*****************************************************************************\
* The annotations described by KernelSpecs.h and DriverSpecs.h, taken together,
* are used to annotate drivers. Many of the annotations are applicable to
* user space code (including subsystems) as well as to drivers.
*
* DriverSpecs.h contains those annotations which are appropriate to userspace
* code, or which might appear in headers that are shared between user space
* and kernel space. In the case of annotations which might appear in such a
* shared header, but which are meaningless in user space, the annotations are
* #defined to nothing in DriverSpecs.h.
*
* KernelSpecs.h contains those annotations which either will only appear in
* kernel code or headers; or which might appear in shared headers. In the
* latter case, it is assumed that DriverSpecs.h has been #included, and
* the anntoations are re-defined (using #undef) to give them a meaningful
* value. In general, documentation for the shared-header annotations appears
* in DriverSpecs.h.
*
* Many annotations are context dependent. They only apply to certain versions
* of Windows, or only to certain classes of driver. These rules can be written
* using something like _When_(NTDDI_VERSION >= NTDDI_WINXP, ...)
* which causes the rule only to apply to Windows XP and later. Many of these
* symbols are already defined in various Windows headers.
*
* To facilitate using this sort of conditional rule, we collect here the
* various known symbols that are (or reasonably might) be used in such
* a conditional annotation. Some are speculative in that the symbol has
* not yet been defined because there are no known uses of it yet.
*
* Where the symbol already exists its relevant header is
* noted below (excluding the "really well known" ones).
*
* Each symbol is listed with the currently known possible values.
*
* Some symbols are marked as #define symbols -- they are used with #ifdef
* operators only. To use them in _When_, use something like
* _When_(__drv_defined(NT), ...).
*
* WDK Version (copied for convenience from sdkddkver.h)
* NTDDI_VERSION: NTDDI_WIN2K NTDDI_WIN2KSP1 NTDDI_WIN2KSP2 NTDDI_WIN2KSP3
* NTDDI_WIN2KSP4 NTDDI_WINXP NTDDI_WINXPSP1 NTDDI_WINXPSP2
* NTDDI_WS03 NTDDI_WS03SP1 NTDDI_VISTA
* The WDK version is taken as the WDM version as well.
*
* OS Version: (copied for convenience from sdkddkver.h)
* _WIN32_WINNT: _WIN32_WINNT_NT4 _WIN32_WINNT_WIN2K _WIN32_WINNT_WINXP
* _WIN32_WINNT_WS03 _WIN32_WINNT_LONGHORN
* WINVER: 0x030B 0x0400 0x0500 0x0600
* NT (#define symbol)
* (sdkddkver.h also defines symbols for IE versions should they be needed.)
*
* Compiler Version:
* _MSC_VER: too many to list.
* _MSC_FULL_VER: too many to list.
*
* KMDF Version: (Currently defined/used only in makefiles.)
* KMDF_VERSION_MAJOR: 1
*
* UMDF Version: (Currently defined/used only in makefiles.)
* UMDF_VERSION_MAJOR: 1
*
* Architecture kinds:
* __WIN64 (#define symbols)
* _X86_
* _AMD64_
* _IA64_
*
* Machine Architectures:
* _M_IX86
* _M_AMD64
* _M_IA64
*
* Driver Kind (NYI: "not yet implemented")
* Typically these will be defined in the most-common header for a
* particular driver (or in individual source files if appropriate).
* These are not intended to necessarily be orthogonal: more than one might
* apply to a particular driver.
* _DRIVER_TYPE_BUS: 1 // NYI
* _DRIVER_TYPE_FUNCTIONAL: 1 // NYI
* _DRIVER_TYPE_MINIPORT: 1 // NYI
* _DRIVER_TYPE_STORAGE: 1 // NYI
* _DRIVER_TYPE_DISPLAY: 1 // NYI
* _DRIVER_TYPE_FILESYSTEM: 1
* _DRIVER_TYPE_FILESYSTEM_FILTER: 1
*
* NDIS driver version: (see ndis.h for much more detail.)
* These can be used to both identify an NDIS driver and to check the version.
* NDIS40 NDIS50 NDIS51 NDIS60 (#defined symbols)
* NDIS_PROTOCOL_MAJOR_VERSION.NDIS_PROTOCOL_MINOR_VERSION: 4.0 5.0 5.1 6.0
* And many others in ndis.h (including MINIPORT)
*
\*****************************************************************************/
// In case driverspecs.h is included directly (and w/o specstrings.h)
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared/sdv_driverspecs.h" 1 3
// general purpose save
//-----------------------
// general purpose retrieve
//-----------------------
// NDIS AdapterContext save
//-----------------------
# 125 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\driverspecs.h" 2 3
extern "C" {
# 273 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\driverspecs.h" 3
// Callback with high IRQL level will never actually be called above
// 'level'
// core macros: these provide syntatic wrappers to make other uses
// simpler.
//
// For example:
// __drv_in(__drv_nonconstant __setsIRQL)
# 300 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\driverspecs.h" 3
// Internal macros for convenience
//
// __drv_unit
//
// Flags for compilation units that indicated specifically what kind of
// code it is.
// These should be coded as early as possible in any compilation unit
// (.c/.cpp file) that doesn't get the correct default. Whether before
// or after __internal_kernel_driver is immaterial as long as it will
// successfully parse.
//
// Indicate that the code is kernel, but not driver, code.
// Indicate that the code is kernel, driver, code.
// Indicate that the code is a user mode driver.
// Indicate that the code is ordinary user mode code.
// These are needed for backwards compatability.
# 342 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\driverspecs.h" 3
// ---------------------------------------------------------------------
// Syntatic utilities:
//
// Needed to make the annotations convenient to use.
//
// So we can use a macro name that might be used in #ifdef context,
// where it's defined with no value.
// This should only be used inside a _When_ condition.
//
// ---------------------------------------------------------------------
// Callback properties:
//
// __drv_functionClass(x)
//
// Flag that the the annotated function
// is a member of that function class. Some class names are recognized
// by PREfast itself for special treatment.
// This can be tested by the condition function _In_function_class_()
//
// ---------------------------------------------------------------------
// Resources:
//
// __drv_acquiresResource(kind)
// __drv_releasesResource(kind)
// __drv_acquiresResourceGlobal(kind,param)
// __drv_releasesResourceGlobal(kind,param)
// __drv_mustHold(kind)
// __drv_neverHold(kind)
// __drv_mustHoldGlobal(kind,param)
// __drv_neverHoldGlobal(kind,param)
//
// Flag that the annotated parameter acquires a resource of type kind.
//
# 387 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\driverspecs.h" 3
//
// Flag that the annotated parameter releases a resource of type kind.
//
//
// Flag that the annotated object acquires a global resource named by param
//
//
// Flag that the annotated object releases a global resource named by param
//
//
// Flag that the annotated parameter must hold a resource of type kind
//
# 426 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\driverspecs.h" 3
//
// Flag that the annotated object must hold a global resource named by param
//
//
// Flag that the annotated parameter must never hold a resource of type kind
//
//
// Flag that the annotated object must never hold a global resource
// of type kind named by param.
//
// Predicates to determine if a resource is held
//
// ---------------------------------------------------------------------
// IRQL annotations:
//
// _IRQL_raises_(irql)
// _IRQL_requires_(irql)
// _IRQL_requires_max_(irql)
// _IRQL_requires_min_(irql)
// _IRQL_saves_
// _IRQL_saves_global_(kind,param)
// _IRQL_restores_
// _IRQL_restores_global_(kind,param)
// _IRQL_always_function_min_(irql)
// _IRQL_always_function_max_(irql)
// _IRQL_requires_same_
// _IRQL_uses_cancel_
//
// Legacy IRQL annotations:
// Legacy annotation: Use instead:
// __drv_setsIRQL (Obsolete, use _IRQL_raises_)
// __drv_raisesIRQL _IRQL_raises_
// __drv_requiresIRQL _IRQL_requires_
// __drv_maxIRQL _IRQL_requires_max_
// __drv_minIRQL _IRQL_requires_min_
// __drv_savesIRQL _IRQL_saves_
// __drv_savesIRQLGlobal _IRQL_saves_global_
// __drv_restoresIRQL _IRQL_restores_
// __drv_restoresIRQLGlobal _IRQL_restores_global_
// __drv_minFunctionIRQL _IRQL_always_function_min_
// __drv_maxFunctionIRQL _IRQL_always_function_max_
// __drv_sameIRQL _IRQL_requires_same_
// __drv_useCancelIRQL _IRQL_uses_cancel_
//
//
// The function exits at IRQL irql (obsolete, use _IRQL_raises_)
//
//
// The function exits at IRQL irql, but this may only raise the irql.
//
//
// The called function must be entered at IRQL level
//
//
// The maximum IRQL at which the function may be called.
//
//
// The minimum IRQL at which the function may be called.
//
//
// The current IRQL is saved in the annotated parameter
//
//
// The current IRQL is saved in the (otherwise anonymous) global object
// identified by kind and further refined by param.
//
//
// The current IRQL is restored from the annotated parameter
//
//
// The current IRQL is restored from the (otherwise anonymous) global
// object identified by kind and further refined by param.
//
//
// The minimum IRQL to which the function can lower itself. The IRQL
// at entry is assumed to be that value unless overridden.
//
//
// The maximum IRQL to which the function can raise itself.
//
//
// The function must exit with the same IRQL it was entered with.
// (It may change it but it must restore it.)
//
//
// The annotated parameter contains the cancelIRQL, which will be restored
// by the called function.
//
//
// The annotated parameter is an IRQL that will be restored and a new (probably the same)
// value will be inserted. (Use this in preference to directly coding it.)
// ---------------------------------------------------------------------
// Specific function behaviors
// The annotated function clears the requirement that DoInitializeing
// is cleared (or not).
// This is (or is like) IoGetDmaAdapter: look for misuse of DMA pointers
// ---------------------------------------------------------------------
// Function and out parameter return values.
//
// __drv_valueIs(<list>)
//
// The function being annotated will return each of the specified values
// during simulation. The items in the list are <relational op><constant>,
// e.g. ==0 or <0.
// This is a ; separated list of values. The internal parser will accept
// a comma-separated list. In the future __VA_ARGS__ could be used.
// See the documentation for use of this.
//
// ---------------------------------------------------------------------
// Additional parameter checking.
//
// __drv_constant
// __drv_nonConstant
// __drv_strictTypeMatch(mode)
// __drv_strictType(type,mode)
//
// The actual parameter must evaluate to a constant (not a const).
//
//
// The actual parameter may never evaluate to a numeric constant
// (exclusive of a const symbol).
//
//
// The actual parameter must match the type of the annotated formal
// within the specifications set by mode.
//
//
// The actual parameter must match the type of typename (below)
// within the specifications set by mode.
//
// currently 1/2 args
//
// The following modes are defined:
//
// The actual parameter must be data (not a pointer). Used to
// prevent passing pointers to pointers when pointers to structures
// are needed (because &pXXX is a common error when pXXX is
// intended).
//
// Convenience for the most common form of the above.
// ---------------------------------------------------------------------
// Memory management
//
// __drv_aliasesMem
// __drv_allocatesMem
// __drv_freesMem
//
// The annotated parameter is "kept" by the function, creating an
// alias, and relieving any obligation to free the object.
//
//
// Allocate/release memory-like objects.
// Kind is unused, but should be "mem" for malloc/free
// and "object" for new/delete.
// ---------------------------------------------------------------------
// Additional diagnostics
//
// __drv_preferredFunction
// __drv_reportError
//
//
// Function 'func' should be used for reason 'why'. Often used
// conditionally.
//
//
// The error given by 'why' was detected. Used conditionally.
//
// ---------------------------------------------------------------------
// Floating point save/restore:
//
// _Kernel_float_saved_
// _Kernel_float_restored_
// _Kernel_float_used_
// __drv_floatSaved (legacy, replaced by _Kernel_float_saved_)
// __drv_floatRestored (legacy, replaced by _Kernel_float_restored_)
// __drv_floatUsed (legacy, replaced by _Kernel_float_used_)
//
// The floating point hardware was saved (available to kernel)
//
// The floating point hardware was restored (no longer available)
//
// The function uses floating point. Functions with floating point
// in their type signature get this automatically.
// ---------------------------------------------------------------------
// Usage:
//
// __drv_interlocked
// __drv_inTry
// __drv_notInTry
//
// The parameter is used for interlocked instructions.
// The function must be called inside a try block
// The function must not be called inside a try block
// ---------------------------------------------------------------------
// FormatString:
//
// kind can be "printf", "scanf", "strftime" or "FormatMessage".
// ---------------------------------------------------------------------
// Function classes for drivers:
//
// Function class for driver dispatch functions:
// Legacy function class for driver dispatch functions:
// Legacy function class for driver dispatch functions - special case:
// Legacy function class for driver completion functions:
// Legacy function class for driver callback functions (FDO or PDO):
// ---------------------------------------------------------------------
// Composite:
# 888 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\driverspecs.h" 3
// Passing the cancel Irql to a utility function
// Check if this is kernel or driver code
}
# 695 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\specstrings.h" 2 3
/*
If no SAL 2 appears to have been defined (_Outptr_ is a representative choice)
then we must be operating in a downlevel build environment (such as VS10).
We also test against the compiler version to identify a downlevel environment,
as VS11 is the minimum required for SAL 2 support.
If we are in a downlevel environment, we can go ahead and include no_sal2.h
to make all of SAL 2 no-ops to ensure no build failures.
*/
#pragma warning(pop)
# 14 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\minwindef.h" 2 3
# 27 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\minwindef.h" 3
// Win32 defines _WIN32 automatically,
// but Macintosh doesn't, so if we are using
// Win32 Functions, we must do it here
# 42 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\minwindef.h" 3
extern "C" {
/*
* BASETYPES is defined in ntdef.h if these types are already defined
*/
typedef unsigned long ULONG;
typedef ULONG *PULONG;
typedef unsigned short USHORT;
typedef USHORT *PUSHORT;
typedef unsigned char UCHAR;
typedef UCHAR *PUCHAR;
typedef char *PSZ;
# 156 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\minwindef.h" 3
typedef unsigned long DWORD;
typedef int BOOL;
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef float FLOAT;
typedef FLOAT *PFLOAT;
typedef BOOL *PBOOL;
typedef BOOL *LPBOOL;
typedef BYTE *PBYTE;
typedef BYTE *LPBYTE;
typedef int *PINT;
typedef int *LPINT;
typedef WORD *PWORD;
typedef WORD *LPWORD;
typedef long *LPLONG;
typedef DWORD *PDWORD;
typedef DWORD *LPDWORD;
typedef void *LPVOID;
typedef const void *LPCVOID;
typedef int INT;
typedef unsigned int UINT;
typedef unsigned int *PUINT;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 1 3
/*++ BUILD Version: 0073 Increment this if a change has global effects
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
winnt.h
Abstract:
This module defines the 32-Bit Windows types and constants that are
defined by NT, but exposed through the Win32 API.
Revision History:
--*/
#pragma warning(push)
#pragma warning(disable: 4668)
#pragma warning(disable: 4820)
#pragma warning(disable: 4200)
#pragma warning(disable: 4201)
#pragma warning(disable: 4214)
extern "C" {
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\ctype.h" 1 3
//
// ctype.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This file declares the narrow character (char) classification functionality.
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 1 3
//
// corecrt.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Declarations used throughout the CoreCRT library.
//
# 1 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 1 3
//
// vcruntime.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Declarations used throughout the VCRuntime library.
//
// Note on use of "deprecate":
//
// Various places in this header and other headers use
// __declspec(deprecate) or macros that have the term DEPRECATE in them.
// We use "deprecate" here ONLY to signal the compiler to emit a warning
// about these items. The use of "deprecate" should NOT be taken to imply
// that any standard committee has deprecated these functions from the
// relevant standards. In fact, these functions are NOT deprecated from
// the standard.
//
// Full details can be found in our documentation by searching for
// "Security Enhancements in the CRT".
//
// The _CRTIMP macro is not used in the VCRuntime or the CoreCRT anymore, but
// there is a lot of existing code that declares CRT functions using this macro,
// and if we remove its definition, we break that existing code. It is thus
// defined here only for compatibility.
# 10 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 2 3
#pragma pack(push, 8)
# 12 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
extern "C" {
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Annotation Macros
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# 31 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
// If you need the ability to remove __declspec(import) from an API, to support static replacement,
// declare the API using _ACRTIMP_ALT instead of _ACRTIMP.
# 67 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
// __declspec(guard(overflow)) enabled by /sdl compiler switch for CRT allocators
# 113 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Miscellaneous Stuff
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
extern "C++"
{
template<bool _Enable, typename _Ty>
struct _CrtEnableIf;
template<typename _Ty>
struct _CrtEnableIf<true, _Ty>
{
typedef _Ty _Type;
};
}
typedef bool __crt_bool;
# 162 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
// CRT headers are included into some kinds of source files where only data type
// definitions and macro definitions are required but function declarations and
// inline function definitions are not. These files include assembly files, IDL
// files, and resource files. The tools that process these files often have a
// limited ability to process C and C++ code. The _CRT_FUNCTIONS_REQUIRED macro
// is defined to 1 when we are compiling a file that actually needs functions to
// be declared (and defined, where applicable), and to 0 when we are compiling a
// file that does not. This allows us to suppress declarations and definitions
// that are not compilable with the aforementioned tools.
# 189 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Windows API Partitioning and ARM Desktop Support
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# 223 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
// Verify that the ARM Desktop SDK is available when building an ARM Desktop app
# 232 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Invalid Parameter Handler
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# 247 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
void __cdecl _invalid_parameter_noinfo(void);
__declspec(noreturn) void __cdecl _invalid_parameter_noinfo_noreturn(void);
__declspec(noreturn)
void __cdecl _invoke_watson(
wchar_t const* _Expression,
wchar_t const* _FunctionName,
wchar_t const* _FileName,
unsigned int _LineNo,
uintptr_t _Reserved);
// By default, _CRT_SECURE_INVALID_PARAMETER in retail invokes
// _invalid_parameter_noinfo_noreturn(), which is marked
// __declspec(noreturn) and does not return control to the application.
// Even if _set_invalid_parameter_handler() is used to set a new invalid
// parameter handler which does return control to the application,
// _invalid_parameter_noinfo_noreturn() will terminate the application
// and invoke Watson. You can overwrite the definition of
// _CRT_SECURE_INVALID_PARAMETER if you need.
//
// _CRT_SECURE_INVALID_PARAMETER is used in the Standard C++ Libraries
// and the SafeInt library.
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Deprecation
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# 308 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Managed CRT Support
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# 339 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// SecureCRT Configuration
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# 427 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
// _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT is ignored if
// _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES is set to 0
# 471 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Basic Types
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
typedef int errno_t;
typedef unsigned short wint_t;
typedef unsigned short wctype_t;
typedef long __time32_t;
typedef __int64 __time64_t;
typedef struct __crt_locale_data_public
{
unsigned short const* _locale_pctype;
int _locale_mb_cur_max;
unsigned int _locale_lc_codepage;
} __crt_locale_data_public;
typedef struct __crt_locale_pointers
{
struct __crt_locale_data* locinfo;
struct __crt_multibyte_data* mbcinfo;
} __crt_locale_pointers;
typedef __crt_locale_pointers* _locale_t;
typedef struct _Mbstatet
{ // state of a multibyte translation
unsigned long _Wchar;
unsigned short _Byte, _State;
} _Mbstatet;
typedef _Mbstatet mbstate_t;
# 517 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
typedef __time64_t time_t;
// Indicate that these common types are defined
typedef size_t rsize_t;
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// C++ Secure Overload Generation Macros
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# 776 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// C++ Standard Overload Generation Macros
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# 1976 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
}
# 1976 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt.h" 3
#pragma pack(pop)
# 11 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\ctype.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wctype.h" 1 3
//
// corecrt_wctype.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This file declares the wide character (wchar_t) classification functionality,
// shared by <ctype.h>, <wchar.h>, and <wctype.h>.
//
#pragma pack(push, 8)
# 13 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wctype.h" 3
extern "C" {
// This declaration allows the user access to the ctype look-up
// array _ctype defined in ctype.obj by simply including ctype.h
# 31 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wctype.h" 3
const unsigned short* __cdecl __pctype_func(void);
const wctype_t* __cdecl __pwctype_func(void);
# 43 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wctype.h" 3
// Bit masks for the possible character types
# 58 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wctype.h" 3
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Wide Character Classification and Conversion Functions
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
int __cdecl iswalnum ( wint_t _C);
int __cdecl iswalpha ( wint_t _C);
int __cdecl iswascii ( wint_t _C);
int __cdecl iswblank ( wint_t _C);
int __cdecl iswcntrl ( wint_t _C);
int __cdecl iswdigit ( wint_t _C);
int __cdecl iswgraph ( wint_t _C);
int __cdecl iswlower ( wint_t _C);
int __cdecl iswprint ( wint_t _C);
int __cdecl iswpunct ( wint_t _C);
int __cdecl iswspace ( wint_t _C);
int __cdecl iswupper ( wint_t _C);
int __cdecl iswxdigit ( wint_t _C);
int __cdecl __iswcsymf( wint_t _C);
int __cdecl __iswcsym ( wint_t _C);
int __cdecl _iswalnum_l ( wint_t _C, _locale_t _Locale);
int __cdecl _iswalpha_l ( wint_t _C, _locale_t _Locale);
int __cdecl _iswblank_l ( wint_t _C, _locale_t _Locale);
int __cdecl _iswcntrl_l ( wint_t _C, _locale_t _Locale);
int __cdecl _iswdigit_l ( wint_t _C, _locale_t _Locale);
int __cdecl _iswgraph_l ( wint_t _C, _locale_t _Locale);
int __cdecl _iswlower_l ( wint_t _C, _locale_t _Locale);
int __cdecl _iswprint_l ( wint_t _C, _locale_t _Locale);
int __cdecl _iswpunct_l ( wint_t _C, _locale_t _Locale);
int __cdecl _iswspace_l ( wint_t _C, _locale_t _Locale);
int __cdecl _iswupper_l ( wint_t _C, _locale_t _Locale);
int __cdecl _iswxdigit_l( wint_t _C, _locale_t _Locale);
int __cdecl _iswcsymf_l ( wint_t _C, _locale_t _Locale);
int __cdecl _iswcsym_l ( wint_t _C, _locale_t _Locale);
wint_t __cdecl towupper( wint_t _C);
wint_t __cdecl towlower( wint_t _C);
int __cdecl iswctype( wint_t _C, wctype_t _Type);
wint_t __cdecl _towupper_l( wint_t _C, _locale_t _Locale);
wint_t __cdecl _towlower_l( wint_t _C, _locale_t _Locale);
int __cdecl _iswctype_l( wint_t _C, wctype_t _Type, _locale_t _Locale);
int __cdecl isleadbyte( int _C);
int __cdecl _isleadbyte_l( int _C, _locale_t _Locale);
__declspec(deprecated("This function or variable has been superceded by newer library " "or operating system functionality. Consider using " "iswctype" " " "instead. See online help for details.")) int __cdecl is_wctype( wint_t _C, wctype_t _Type);
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Macro and Inline Definitions
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# 199 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wctype.h" 3
}
# 199 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wctype.h" 3
#pragma pack(pop)
# 12 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\ctype.h" 2 3
#pragma pack(push, 8)
# 14 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\ctype.h" 3
extern "C" {
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Character Classification Function Declarations
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
int __cdecl _isctype( int _C, int _Type);
int __cdecl _isctype_l( int _C, int _Type, _locale_t _Locale);
int __cdecl isalpha( int _C);
int __cdecl _isalpha_l( int _C, _locale_t _Locale);
int __cdecl isupper( int _C);
int __cdecl _isupper_l( int _C, _locale_t _Locale);
int __cdecl islower( int _C);
int __cdecl _islower_l( int _C, _locale_t _Locale);
int __cdecl isdigit( int _C);
int __cdecl _isdigit_l( int _C, _locale_t _Locale);
int __cdecl isxdigit( int _C);
int __cdecl _isxdigit_l( int _C, _locale_t _Locale);
int __cdecl isspace( int _C);
int __cdecl _isspace_l( int _C, _locale_t _Locale);
int __cdecl ispunct( int _C);
int __cdecl _ispunct_l( int _C, _locale_t _Locale);
int __cdecl isblank( int _C);
int __cdecl _isblank_l( int _C, _locale_t _Locale);
int __cdecl isalnum( int _C);
int __cdecl _isalnum_l( int _C, _locale_t _Locale);
int __cdecl isprint( int _C);
int __cdecl _isprint_l( int _C, _locale_t _Locale);
int __cdecl isgraph( int _C);
int __cdecl _isgraph_l( int _C, _locale_t _Locale);
int __cdecl iscntrl( int _C);
int __cdecl _iscntrl_l( int _C, _locale_t _Locale);
int __cdecl toupper( int _C);
int __cdecl tolower( int _C);
int __cdecl _tolower( int _C);
int __cdecl _tolower_l( int _C, _locale_t _Locale);
int __cdecl _toupper( int _C);
int __cdecl _toupper_l( int _C, _locale_t _Locale);
int __cdecl __isascii( int _C);
int __cdecl __toascii( int _C);
int __cdecl __iscsymf( int _C);
int __cdecl __iscsym( int _C);
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Character Classification Macro Definitions
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// Maximum number of bytes in multi-byte character in the current locale
// (also defined in stdlib.h).
# 97 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\ctype.h" 3
// MB_LEN_MAX = 5 in limits.h but we do not include that header here so use 5
// directly.
int __cdecl ___mb_cur_max_func(void);
int __cdecl ___mb_cur_max_l_func(_locale_t _Locale);
// In the debug CRT, we make all calls through the validation function to catch
// invalid integer inputs that yield undefined behavior.
# 144 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\ctype.h" 3
__inline __crt_locale_data_public* __cdecl __acrt_get_locale_data_prefix(void const volatile* const _LocalePointers)
{
_locale_t const _TypedLocalePointers = (_locale_t)_LocalePointers;
return (__crt_locale_data_public*)_TypedLocalePointers->locinfo;
}
__inline int __cdecl _chvalidchk_l(
int const _C,
int const _Mask,
_locale_t const _Locale
)
{
if (_Locale)
{
return __acrt_get_locale_data_prefix(_Locale)->_locale_pctype[_C] & _Mask;
}
return (__pctype_func()[(_C)] & (_Mask));
}
__inline int __cdecl _ischartype_l(
int const _C,
int const _Mask,
_locale_t const _Locale
)
{
if (_Locale && __acrt_get_locale_data_prefix(_Locale)->_locale_mb_cur_max > 1)
{
return _isctype_l(_C, _Mask, _Locale);
}
return _chvalidchk_l(_C, _Mask, _Locale);
}
# 209 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\ctype.h" 3
// Microsoft C version 2.0 extended ctype macros
# 233 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\ctype.h" 3
}
# 233 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\ctype.h" 3
#pragma pack(pop)
# 34 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
//
// For compilers that don't support nameless unions/structs
//
# 83 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_ntoshvp
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\kernelspecs.h" 1 3
/*****************************************************************************\
* *
* KernelSpecs.h - markers for documenting the semantics of driver APIs *
* See DriverSpecs.h for detailed comments *
* See also <SpecStrings.h> *
* *
* Version 1.2.00 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
\*****************************************************************************/
/*****************************************************************************\
* NOTE *
* NOTE *
* NOTE *
* The macro bodies in this file are subject to change without notice. *
* Attempting to use the annotations in the macro bodies directly is not *
* supported. *
* NOTE *
* NOTE *
* NOTE *
\*****************************************************************************/
/*****************************************************************************\
* As noted in DriverSpecs.h, this header contains "real" definitions for
* annotations that either never appear in user space, or which are meaningles
* in user space and are #defined to nothing by DriverSpecs.h.
*
* Further commentary appears in DriverSpecs.h.
\*****************************************************************************/
# 43 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\kernelspecs.h" 3
extern "C" {
// ---------------------------------------------------------------------
// The symbolic IRQL values can sometimes end up undefined, so define
// the usual ones here, for PREfast purposes only.
# 67 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\kernelspecs.h" 3
//
// ---------------------------------------------------------------------
// IRQL annotations:
//
// _IRQL_raises_(irql)
// _IRQL_requires_(irql)
// _IRQL_requires_max_(irql)
// _IRQL_requires_min_(irql)
// _IRQL_saves_
// _IRQL_saves_global_(kind,param)
// _IRQL_restores_
// _IRQL_restores_global_(kind,param)
// _IRQL_always_function_min_(irql)
// _IRQL_always_function_max_(irql)
// _IRQL_requires_same_
// _IRQL_uses_cancel_
//
// Legacy IRQL annotations:
// Legacy annotation: Use instead:
// __drv_setsIRQL (Obsolete, use _IRQL_raises_)
// __drv_raisesIRQL _IRQL_raises_
// __drv_requiresIRQL _IRQL_requires_
// __drv_maxIRQL _IRQL_requires_max_
// __drv_minIRQL _IRQL_requires_min_
// __drv_savesIRQL _IRQL_saves_
// __drv_savesIRQLGlobal _IRQL_saves_global_
// __drv_restoresIRQL _IRQL_restores_
// __drv_restoresIRQLGlobal _IRQL_restores_global_
// __drv_minFunctionIRQL _IRQL_always_function_min_
// __drv_maxFunctionIRQL _IRQL_always_function_max_
// __drv_sameIRQL _IRQL_requires_same_
// __drv_useCancelIRQL _IRQL_uses_cancel_
//
//
// The function exits at IRQL irql (obsolete, use _IRQL_raises_)
//
// ';' inside the parens to keep MIDL happy
//
// The function exits at IRQL irql, but this may only raise the irql.
//
//
// The called function must be entered at IRQL level
//
//
// The maximum IRQL at which the function may be called.
//
//
// The minimum IRQL at which the function may be called.
//
//
// The current IRQL is saved in the annotated parameter
//
//
// The current IRQL is saved in the (otherwise anonymous) global object
// identified by kind and further refined by param.
//
//
// The current IRQL is restored from the annotated parameter
//
//
// The current IRQL is restored from the (otherwise anonymous) global
// object identified by kind and further refined by param.
//
//
// The minimum IRQL to which the function can lower itself. The IRQL
// at entry is assumed to be that value unless overridden.
//
//
// The maximum IRQL to which the function can raise itself.
//
//
// The function must exit with the same IRQL it was entered with.
// (It may change it but it must restore it.)
//
//
// The annotated parameter contains the cancelIRQL, which will be restored
// by the called function.
//
//
// The annotated parameter is an IRQL that will be restored and a new (probably the same)
// value will be inserted. (Use this in preference to directly coding it.)
# 256 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\kernelspecs.h" 3
}
# 86 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
// begin_ntoshvp
# 114 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_ntoshvp
# 125 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// TYPE_ALIGNMENT will return the alignment requirements of a given type for
// the current platform.
//
# 139 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Note: RC_INVOKED is checked in PROBE_ALIGNMENT to maintain compatibility with previous
// versions of the SDK which did not block inclusion in an .RC file.
//
# 157 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Define PROBE_ALIGNMENT32 to be the same as PROBE_ALIGNMENT on x86, so that
// code hosting x86 under WoW can handle x86's maximum guaranteed alignment.
//
// begin_ntoshvp
//
// C_ASSERT() can be used to perform many compile-time assertions:
// type sizes, field offsets, etc.
//
// An assertion failure results in error C2118: negative subscript.
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\basetsd.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
basetsd.h
Abstract:
Type definitions for the basic sized types.
Author:
Revision History:
--*/
#pragma warning(push)
#pragma warning(disable: 4668)
typedef unsigned __int64 POINTER_64_INT;
# 72 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\basetsd.h" 3
extern "C" {
typedef signed char INT8, *PINT8;
typedef signed short INT16, *PINT16;
typedef signed int INT32, *PINT32;
typedef signed __int64 INT64, *PINT64;
typedef unsigned char UINT8, *PUINT8;
typedef unsigned short UINT16, *PUINT16;
typedef unsigned int UINT32, *PUINT32;
typedef unsigned __int64 UINT64, *PUINT64;
//
// The following types are guaranteed to be signed and 32 bits wide.
//
typedef signed int LONG32, *PLONG32;
//
// The following types are guaranteed to be unsigned and 32 bits wide.
//
typedef unsigned int ULONG32, *PULONG32;
typedef unsigned int DWORD32, *PDWORD32;
# 105 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\basetsd.h" 3
//
// The INT_PTR is guaranteed to be the same size as a pointer. Its
// size with change with pointer size (32/64). It should be used
// anywhere that a pointer is cast to an integer type. UINT_PTR is
// the unsigned variation.
//
// __int3264 is intrinsic to 64b MIDL but not to old MIDL or to C compiler.
//
# 122 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\basetsd.h" 3
// old midl and C++ compiler
typedef __int64 INT_PTR, *PINT_PTR;
typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
typedef __int64 LONG_PTR, *PLONG_PTR;
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
# 145 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\basetsd.h" 3
//
// HALF_PTR is half the size of a pointer it intended for use with
// within structures which contain a pointer and two small fields.
// UHALF_PTR is the unsigned variation.
//
typedef __int64 SHANDLE_PTR;
typedef unsigned __int64 HANDLE_PTR;
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
typedef int HALF_PTR, *PHALF_PTR;
__inline
unsigned long
HandleToULong(
const void *h
)
{
return((unsigned long) (ULONG_PTR) h );
}
__inline
long
HandleToLong(
const void *h
)
{
return((long) (LONG_PTR) h );
}
__inline
void *
ULongToHandle(
const unsigned long h
)
{
return((void *) (UINT_PTR) h );
}
__inline
void *
LongToHandle(
const long h
)
{
return((void *) (INT_PTR) h );
}
__inline
unsigned long
PtrToUlong(
const void *p
)
{
return((unsigned long) (ULONG_PTR) p );
}
__inline
unsigned int
PtrToUint(
const void *p
)
{
return((unsigned int) (UINT_PTR) p );
}
__inline
unsigned short
PtrToUshort(
const void *p
)
{
return((unsigned short) (unsigned long) (ULONG_PTR) p );
}
__inline
long
PtrToLong(
const void *p
)
{
return((long) (LONG_PTR) p );
}
__inline
int
PtrToInt(
const void *p
)
{
return((int) (INT_PTR) p );
}
__inline
short
PtrToShort(
const void *p
)
{
return((short) (long) (LONG_PTR) p );
}
__inline
void *
IntToPtr(
const int i
)
// Caution: IntToPtr() sign-extends the int value.
{
return( (void *)(INT_PTR)i );
}
__inline
void *
UIntToPtr(
const unsigned int ui
)
// Caution: UIntToPtr() zero-extends the unsigned int value.
{
return( (void *)(UINT_PTR)ui );
}
__inline
void *
LongToPtr(
const long l
)
// Caution: LongToPtr() sign-extends the long value.
{
return( (void *)(LONG_PTR)l );
}
__inline
void *
ULongToPtr(
const unsigned long ul
)
// Caution: ULongToPtr() zero-extends the unsigned long value.
{
return( (void *)(ULONG_PTR)ul );
}
__inline
void *
Ptr32ToPtr(
const void * __ptr32 p
)
{
return((void *) (ULONG_PTR) (unsigned long) p);
}
__inline
void *
Handle32ToHandle(
const void * __ptr32 h
)
{
return((void *) (LONG_PTR) (long) h);
}
__inline
void * __ptr32
PtrToPtr32(
const void *p
)
{
return((void * __ptr32) (unsigned long) (ULONG_PTR) p);
}
# 415 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\basetsd.h" 3
//
// SIZE_T used for counts or ranges which need to span the range of
// of a pointer. SSIZE_T is the signed variation.
//
typedef ULONG_PTR SIZE_T, *PSIZE_T;
typedef LONG_PTR SSIZE_T, *PSSIZE_T;
# 465 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\basetsd.h" 3
//
// Add Windows flavor DWORD_PTR types
//
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
//
// The following types are guaranteed to be signed and 64 bits wide.
//
typedef __int64 LONG64, *PLONG64;
//
// The following types are guaranteed to be unsigned and 64 bits wide.
//
typedef unsigned __int64 ULONG64, *PULONG64;
typedef unsigned __int64 DWORD64, *PDWORD64;
// begin_wudfpwdm
//
// Legacy thread affinity.
//
typedef ULONG_PTR KAFFINITY;
typedef KAFFINITY *PKAFFINITY;
// end_wudfpwdm
}
#pragma warning(pop)
# 179 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
# 212 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_ntoshvp
# 315 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// begin_ntoshvp
# 325 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// CFORCEINLINE: __forceinline required for correctness.
//
//
// STKFORCEINLINE: __forceinline required for correctness due to counting stack
// frames for a stack trace being captured.
//
//
// PFORCEINLINE: __forceinline required for performance.
//
// end_ntoshvp
# 373 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// begin_ntoshvp
//
// Void
//
typedef void *PVOID;
typedef void * __ptr64 PVOID64;
# 397 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Define API decoration for direct importing system DLL references.
//
# 415 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Basics
//
typedef char CHAR;
typedef short SHORT;
typedef long LONG;
typedef int INT;
//
// UNICODE (Wide Character) types
//
typedef wchar_t WCHAR; // wc, 16-bit UNICODE character
typedef WCHAR *PWCHAR, *LPWCH, *PWCH;
typedef const WCHAR *LPCWCH, *PCWCH;
typedef WCHAR *NWPSTR, *LPWSTR, *PWSTR;
typedef PWSTR *PZPWSTR;
typedef const PWSTR *PCZPWSTR;
typedef WCHAR __unaligned *LPUWSTR, *PUWSTR;
typedef const WCHAR *LPCWSTR, *PCWSTR;
typedef PCWSTR *PZPCWSTR;
typedef const PCWSTR *PCZPCWSTR;
typedef const WCHAR __unaligned *LPCUWSTR, *PCUWSTR;
typedef WCHAR *PZZWSTR;
typedef const WCHAR *PCZZWSTR;
typedef WCHAR __unaligned *PUZZWSTR;
typedef const WCHAR __unaligned *PCUZZWSTR;
typedef WCHAR *PNZWCH;
typedef const WCHAR *PCNZWCH;
typedef WCHAR __unaligned *PUNZWCH;
typedef const WCHAR __unaligned *PCUNZWCH;
typedef const WCHAR *LPCWCHAR, *PCWCHAR;
typedef const WCHAR __unaligned *LPCUWCHAR, *PCUWCHAR;
//
// UCS (Universal Character Set) types
//
typedef unsigned long UCSCHAR;
//
// Even pre-Unicode agreement, UCS values are always in the
// range U+00000000 to U+7FFFFFFF, so we'll pick an obvious
// value.
//
// We'll assume here that the ISO-10646 / Unicode agreement
// not to assign code points after U+0010FFFF holds so that
// we do not have to have separate "UCSCHAR" and "UNICODECHAR"
// types.
//
typedef UCSCHAR *PUCSCHAR;
typedef const UCSCHAR *PCUCSCHAR;
typedef UCSCHAR *PUCSSTR;
typedef UCSCHAR __unaligned *PUUCSSTR;
typedef const UCSCHAR *PCUCSSTR;
typedef const UCSCHAR __unaligned *PCUUCSSTR;
typedef UCSCHAR __unaligned *PUUCSCHAR;
typedef const UCSCHAR __unaligned *PCUUCSCHAR;
//
// ANSI (Multi-byte Character) types
//
typedef CHAR *PCHAR, *LPCH, *PCH;
typedef const CHAR *LPCCH, *PCCH;
typedef CHAR *NPSTR, *LPSTR, *PSTR;
typedef PSTR *PZPSTR;
typedef const PSTR *PCZPSTR;
typedef const CHAR *LPCSTR, *PCSTR;
typedef PCSTR *PZPCSTR;
typedef const PCSTR *PCZPCSTR;
typedef CHAR *PZZSTR;
typedef const CHAR *PCZZSTR;
typedef CHAR *PNZCH;
typedef const CHAR *PCNZCH;
//
// Neutral ANSI/UNICODE types and macros
//
# 557 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef char TCHAR, *PTCHAR;
typedef unsigned char TBYTE , *PTBYTE ;
typedef LPCH LPTCH, PTCH;
typedef LPCCH LPCTCH, PCTCH;
typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR;
typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR;
typedef PZZSTR PZZTSTR, PUZZTSTR;
typedef PCZZSTR PCZZTSTR, PCUZZTSTR;
typedef PZPSTR PZPTSTR;
typedef PNZCH PNZTCH, PUNZTCH;
typedef PCNZCH PCNZTCH, PCUNZTCH;
typedef SHORT *PSHORT;
typedef LONG *PLONG;
//
// Structure to represent a system wide processor number. It contains a
// group number and relative processor number within the group.
//
typedef struct _PROCESSOR_NUMBER {
WORD Group;
BYTE Number;
BYTE Reserved;
} PROCESSOR_NUMBER, *PPROCESSOR_NUMBER;
//
// Structure to represent a group-specific affinity, such as that of a
// thread. Specifies the group number and the affinity within that group.
//
typedef struct _GROUP_AFFINITY {
KAFFINITY Mask;
WORD Group;
WORD Reserved[3];
} GROUP_AFFINITY, *PGROUP_AFFINITY;
# 616 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// begin_ntoshvp
//
// Handle to an Object
//
typedef void *HANDLE;
# 633 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef HANDLE *PHANDLE;
// end_ntoshvp
//
// Flag (bit) fields
//
typedef BYTE FCHAR;
typedef WORD FSHORT;
typedef DWORD FLONG;
// begin_ntoshvp
// Component Object Model defines, and macros
typedef long HRESULT;
// end_ntoshvp
# 672 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// Win32 doesn't support __export
# 707 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// The 'V' versions allow Variable Argument lists.
# 721 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef char CCHAR;
typedef DWORD LCID;
typedef PDWORD PLCID;
typedef WORD LANGID;
//
// Compartment identifier
//
typedef enum {
UNSPECIFIED_COMPARTMENT_ID = 0,
DEFAULT_COMPARTMENT_ID
} COMPARTMENT_ID, *PCOMPARTMENT_ID;
# 745 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// begin_ntoshvp
//
// _M_IX86 included so that EM CONTEXT structure compiles with
// x86 programs. *** TBD should this be for all architectures?
//
//
// 16 byte aligned type for 128 bit floats
//
//
// For we define a 128 bit structure and use __declspec(align(16)) pragma to
// align to 128 bits.
//
typedef struct _FLOAT128 {
__int64 LowPart;
__int64 HighPart;
} FLOAT128;
typedef FLOAT128 *PFLOAT128;
//
// __int64 is only supported by 2.0 and later midl.
// __midl is set by the 2.0 midl and not by 1.0 midl.
//
typedef __int64 LONGLONG;
typedef unsigned __int64 ULONGLONG;
# 801 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef LONGLONG *PLONGLONG;
typedef ULONGLONG *PULONGLONG;
// Update Sequence Number
typedef LONGLONG USN;
typedef union _LARGE_INTEGER {
struct {
DWORD LowPart;
LONG HighPart;
} ;
struct {
DWORD LowPart;
LONG HighPart;
} u;
LONGLONG QuadPart;
} LARGE_INTEGER;
typedef LARGE_INTEGER *PLARGE_INTEGER;
typedef union _ULARGE_INTEGER {
struct {
DWORD LowPart;
DWORD HighPart;
} ;
struct {
DWORD LowPart;
DWORD HighPart;
} u;
ULONGLONG QuadPart;
} ULARGE_INTEGER;
typedef ULARGE_INTEGER *PULARGE_INTEGER;
//
// Reference count.
//
typedef LONG_PTR RTL_REFERENCE_COUNT, *PRTL_REFERENCE_COUNT;
typedef LONG RTL_REFERENCE_COUNT32, *PRTL_REFERENCE_COUNT32;
// end_ntminiport end_ntndis end_ntminitape
// end_ntoshvp
//
// Locally Unique Identifier
//
typedef struct _LUID {
DWORD LowPart;
LONG HighPart;
} LUID, *PLUID;
typedef ULONGLONG DWORDLONG;
typedef DWORDLONG *PDWORDLONG;
//
// Define operations to logically shift an int64 by 0..31 bits and to multiply
// 32-bits by 32-bits to form a 64-bit product.
//
//
// Midl does not understand inline assembler. Therefore, the Rtl functions
// are used for shifts by 0..31 and multiplies of 32-bits times 32-bits to
// form a 64-bit product.
//
//
// IA64 and AMD64 have native 64-bit operations that are just as fast as their
// 32-bit counter parts. Therefore, the int64 data type is used directly to form
// shifts of 0..31 and multiplies of 32-bits times 32-bits to form a 64-bit
// product.
//
# 1002 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Define rotate intrinsics.
//
extern "C" {
# 1017 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
unsigned char
__cdecl
_rotl8 (
unsigned char Value,
unsigned char Shift
);
unsigned short
__cdecl
_rotl16 (
unsigned short Value,
unsigned char Shift
);
unsigned char
__cdecl
_rotr8 (
unsigned char Value,
unsigned char Shift
);
unsigned short
__cdecl
_rotr16 (
unsigned short Value,
unsigned char Shift
);
#pragma intrinsic(_rotl8)
#pragma intrinsic(_rotl16)
#pragma intrinsic(_rotr8)
#pragma intrinsic(_rotr16)
# 1059 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
unsigned int
__cdecl
_rotl (
unsigned int Value,
int Shift
);
unsigned __int64
__cdecl
_rotl64 (
unsigned __int64 Value,
int Shift
);
unsigned int
__cdecl
_rotr (
unsigned int Value,
int Shift
);
unsigned __int64
__cdecl
_rotr64 (
unsigned __int64 Value,
int Shift
);
#pragma intrinsic(_rotl)
#pragma intrinsic(_rotl64)
#pragma intrinsic(_rotr)
#pragma intrinsic(_rotr64)
}
typedef BYTE BOOLEAN;
typedef BOOLEAN *PBOOLEAN;
//
// Doubly linked list structure. Can be used as either a list head, or
// as link words.
//
typedef struct _LIST_ENTRY {
struct _LIST_ENTRY *Flink;
struct _LIST_ENTRY *Blink;
} LIST_ENTRY, *PLIST_ENTRY, * PRLIST_ENTRY;
//
// Singly linked list structure. Can be used as either a list head, or
// as link words.
//
typedef struct _SINGLE_LIST_ENTRY {
struct _SINGLE_LIST_ENTRY *Next;
} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
// end_ntoshvp
// begin_ntoshvp
//
// These are needed for portable debugger support.
//
typedef struct LIST_ENTRY32 {
DWORD Flink;
DWORD Blink;
} LIST_ENTRY32;
typedef LIST_ENTRY32 *PLIST_ENTRY32;
typedef struct LIST_ENTRY64 {
ULONGLONG Flink;
ULONGLONG Blink;
} LIST_ENTRY64;
typedef LIST_ENTRY64 *PLIST_ENTRY64;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\guiddef.h" 1 3
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: guiddef.h
//
// Contents: GUID definition
//
//----------------------------------------------------------------------------
# 22 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\guiddef.h" 3
typedef struct _GUID {
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[ 8 ];
} GUID;
# 75 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\guiddef.h" 3
typedef GUID *LPGUID;
typedef const GUID *LPCGUID;
typedef GUID IID;
typedef IID *LPIID;
typedef GUID CLSID;
typedef CLSID *LPCLSID;
typedef GUID FMTID;
typedef FMTID *LPFMTID;
# 146 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\guiddef.h" 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\string.h" 1 3
//
// string.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// The C Standard Library <string.h> header.
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_memory.h" 1 3
//
// corecrt_memory.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// The buffer (memory) manipulation library. These declarations are split out
// so that they may be included by both <string.h> and <memory.h>. <string.h>
// does not include <memory.h> to avoid introducing conflicts with other user
// headers named <memory.h>.
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_memcpy_s.h" 1 3
//
// corecrt_memcpy_s.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Inline definitions of memcpy_s and memmove_s
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\errno.h" 1 3
//
// errno.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// System error numbers for use with errno and errno_t.
//
#pragma pack(push, 8)
# 13 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\errno.h" 3
extern "C" {
int* __cdecl _errno(void);
errno_t __cdecl _set_errno( int _Value);
errno_t __cdecl _get_errno( int* _Value);
unsigned long* __cdecl __doserrno(void);
errno_t __cdecl _set_doserrno( unsigned long _Value);
errno_t __cdecl _get_doserrno( unsigned long * _Value);
// Error codes
# 70 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\errno.h" 3
// Error codes used in the Secure CRT functions
# 79 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\errno.h" 3
// Support EDEADLOCK for compatibility with older Microsoft C versions
// POSIX Supplement
# 129 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\errno.h" 3
}
# 129 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\errno.h" 3
#pragma pack(pop)
# 11 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_memcpy_s.h" 2 3
# 1 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime_string.h" 1 3
//
// vcruntime_string.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// <string.h> functionality that is implemented in the VCRuntime.
//
# 1 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime.h" 1 3
//
// vcruntime.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Declarations used throughout the VCRuntime library.
//
// Note on use of "deprecate":
//
// Various places in this header and other headers use
// __declspec(deprecate) or macros that have the term DEPRECATE in them.
// We use "deprecate" here ONLY to signal the compiler to emit a warning
// about these items. The use of "deprecate" should NOT be taken to imply
// that any standard committee has deprecated these functions from the
// relevant standards. In fact, these functions are NOT deprecated from
// the standard.
//
// Full details can be found in our documentation by searching for
// "Security Enhancements in the CRT".
//
// The _CRTIMP macro is not used in the VCRuntime or the CoreCRT anymore, but
// there is a lot of existing code that declares CRT functions using this macro,
// and if we remove its definition, we break that existing code. It is thus
// defined here only for compatibility.
# 10 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime_string.h" 2 3
#pragma pack(push, 8)
# 14 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime_string.h" 3
extern "C" {
void const* __cdecl memchr(
void const* _Buf,
int _Val,
size_t _MaxCount
);
int __cdecl memcmp(
void const* _Buf1,
void const* _Buf2,
size_t _Size
);
# 40 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime_string.h" 3
void* __cdecl memcpy(
void* _Dst,
void const* _Src,
size_t _Size
);
void* __cdecl memmove(
void* _Dst,
void const* _Src,
size_t _Size
);
# 60 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime_string.h" 3
void* __cdecl memset(
void* _Dst,
int _Val,
size_t _Size
);
char const* __cdecl strchr(
char const* _Str,
int _Val
);
char const* __cdecl strrchr(
char const* _Str,
int _Ch
);
char const* __cdecl strstr(
char const* _Str,
char const* _SubStr
);
wchar_t const* __cdecl wcschr(
wchar_t const* _Str,
wchar_t _Ch
);
wchar_t const* __cdecl wcsrchr(
wchar_t const* _Str,
wchar_t _Ch
);
wchar_t const* __cdecl wcsstr(
wchar_t const* _Str,
wchar_t const* _SubStr
);
}
# 106 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\vcruntime_string.h" 3
#pragma pack(pop)
# 12 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_memcpy_s.h" 2 3
#pragma pack(push, 8)
# 14 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_memcpy_s.h" 3
extern "C" {
# 35 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_memcpy_s.h" 3
static __inline errno_t __cdecl memcpy_s(
void* const _Destination,
rsize_t const _DestinationSize,
void const* const _Source,
rsize_t const _SourceSize
)
{
if (_SourceSize == 0)
{
return 0;
}
{ int _Expr_val=!!(_Destination != 0); if (!(_Expr_val)) { (*_errno()) = 22; _invalid_parameter_noinfo(); return 22; } };
if (_Source == 0 || _DestinationSize < _SourceSize)
{
memset(_Destination, 0, _DestinationSize);
{ int _Expr_val=!!(_Source != 0); if (!(_Expr_val)) { (*_errno()) = 22; _invalid_parameter_noinfo(); return 22; } };
{ int _Expr_val=!!(_DestinationSize >= _SourceSize); if (!(_Expr_val)) { (*_errno()) = 34; _invalid_parameter_noinfo(); return 34; } };
// Unreachable, but required to suppress /analyze warnings:
return 22;
}
memcpy(_Destination, _Source, _SourceSize);
return 0;
}
static __inline errno_t __cdecl memmove_s(
void* const _Destination,
rsize_t const _DestinationSize,
void const* const _Source,
rsize_t const _SourceSize
)
{
if (_SourceSize == 0)
{
return 0;
}
{ int _Expr_val=!!(_Destination != 0); if (!(_Expr_val)) { (*_errno()) = 22; _invalid_parameter_noinfo(); return 22; } };
{ int _Expr_val=!!(_Source != 0); if (!(_Expr_val)) { (*_errno()) = 22; _invalid_parameter_noinfo(); return 22; } };
{ int _Expr_val=!!(_DestinationSize >= _SourceSize); if (!(_Expr_val)) { (*_errno()) = 34; _invalid_parameter_noinfo(); return 34; } };
memmove(_Destination, _Source, _SourceSize);
return 0;
}
}
# 88 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_memcpy_s.h" 3
#pragma pack(pop)
# 14 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_memory.h" 2 3
#pragma pack(push, 8)
# 19 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_memory.h" 3
extern "C" {
int __cdecl _memicmp(
void const* _Buf1,
void const* _Buf2,
size_t _Size
);
int __cdecl _memicmp_l(
void const* _Buf1,
void const* _Buf2,
size_t _Size,
_locale_t _Locale
);
# 78 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_memory.h" 3
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details."))
void* __cdecl memccpy(
void* _Dst,
void const* _Src,
int _Val,
size_t _Size
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details."))
int __cdecl memicmp(
void const* _Buf1,
void const* _Buf2,
size_t _Size
);
extern "C++"
inline void* __cdecl memchr(
void* _Pv,
int _C,
size_t _N
)
{
void const* const _Pvc = _Pv;
return const_cast<void*>(memchr(_Pvc, _C, _N));
}
}
# 114 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_memory.h" 3
#pragma pack(pop)
# 12 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\string.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wstring.h" 1 3
//
// corecrt_wstring.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This file declares the wide character (wchar_t) string functionality, shared
// by <string.h> and <wchar.h>.
//
#pragma pack(push, 8)
# 16 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wstring.h" 3
extern "C" {
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Secure Alternatives
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
errno_t __cdecl wcscat_s(
wchar_t* _Destination,
rsize_t _SizeInWords,
wchar_t const* _Source
);
errno_t __cdecl wcscpy_s(
wchar_t* _Destination,
rsize_t _SizeInWords,
wchar_t const* _Source
);
errno_t __cdecl wcsncat_s(
wchar_t* _Destination,
rsize_t _SizeInWords,
wchar_t const* _Source,
rsize_t _MaxCount
);
errno_t __cdecl wcsncpy_s(
wchar_t* _Destination,
rsize_t _SizeInWords,
wchar_t const* _Source,
rsize_t _MaxCount
);
wchar_t* __cdecl wcstok_s(
wchar_t* _String,
wchar_t const* _Delimiter,
wchar_t** _Context
);
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Wide-Character <string.h> Functions
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
__declspec(allocator) wchar_t* __cdecl _wcsdup(
wchar_t const* _String
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl wcscat_s(wchar_t (&_Destination)[_Size], wchar_t const* _Source) throw() { return wcscat_s(_Destination, _Size, _Source); } }
#pragma warning(push)
#pragma warning(disable: 28719)
#pragma warning(disable: 28726)
__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t* __cdecl wcscat( wchar_t *_Destination, wchar_t const* _Source);
#pragma warning(pop)
int __cdecl wcscmp(
wchar_t const* _String1,
wchar_t const* _String2
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl wcscpy_s(wchar_t (&_Destination)[_Size], wchar_t const* _Source) throw() { return wcscpy_s(_Destination, _Size, _Source); } }
#pragma warning(push)
#pragma warning(disable: 28719)
#pragma warning(disable: 28726)
__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t* __cdecl wcscpy( wchar_t *_Destination, wchar_t const* _Source);
#pragma warning(pop)
size_t __cdecl wcscspn(
wchar_t const* _String,
wchar_t const* _Control
);
size_t __cdecl wcslen(
wchar_t const* _String
);
# 150 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wstring.h" 3
size_t __cdecl wcsnlen(
wchar_t const* _Source,
size_t _MaxCount
);
# 166 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wstring.h" 3
static __inline size_t __cdecl wcsnlen_s(
wchar_t const* _Source,
size_t _MaxCount
)
{
return (_Source == 0) ? 0 : wcsnlen(_Source, _MaxCount);
}
extern "C++" { template <size_t _Size> inline errno_t __cdecl wcsncat_s(wchar_t (&_Destination)[_Size], wchar_t const* _Source, size_t _Count) throw() { return wcsncat_s(_Destination, _Size, _Source, _Count); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t* __cdecl wcsncat( wchar_t *_Destination, wchar_t const* _Source, size_t _Count);
# 192 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wstring.h" 3
int __cdecl wcsncmp(
wchar_t const* _String1,
wchar_t const* _String2,
size_t _MaxCount
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl wcsncpy_s(wchar_t (&_Destination)[_Size], wchar_t const* _Source, size_t _Count) throw() { return wcsncpy_s(_Destination, _Size, _Source, _Count); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t* __cdecl wcsncpy( wchar_t *_Destination, wchar_t const* _Source, size_t _Count);
# 214 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wstring.h" 3
wchar_t const* __cdecl wcspbrk(
wchar_t const* _String,
wchar_t const* _Control
);
size_t __cdecl wcsspn(
wchar_t const* _String,
wchar_t const* _Control
);
__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details."))
wchar_t* __cdecl wcstok(
wchar_t* _String,
wchar_t const* _Delimiter,
wchar_t** _Context
);
# 243 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wstring.h" 3
#pragma warning(push)
#pragma warning(disable: 4141 4996)
__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details."))
static __inline wchar_t* __cdecl _wcstok(
wchar_t* const _String,
wchar_t const* const _Delimiter
)
{
return wcstok(_String, _Delimiter, 0);
}
extern "C++" __declspec(deprecated("wcstok has been changed to conform with the ISO C standard, " "adding an extra context parameter. To use the legacy Microsoft " "wcstok, define _CRT_NON_CONFORMING_WCSTOK."))
inline wchar_t* __cdecl wcstok(
wchar_t* _String,
wchar_t const* _Delimiter
) throw()
{
return wcstok(_String, _Delimiter, 0);
}
#pragma warning(pop)
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details."))
wchar_t* __cdecl _wcserror(
int _ErrorNumber
);
errno_t __cdecl _wcserror_s(
wchar_t* _Buffer,
size_t _SizeInWords,
int _ErrorNumber
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _wcserror_s(wchar_t (&_Buffer)[_Size], int _Error) throw() { return _wcserror_s(_Buffer, _Size, _Error); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details."))
wchar_t* __cdecl __wcserror(
wchar_t const* _String
);
errno_t __cdecl __wcserror_s(
wchar_t* _Buffer,
size_t _SizeInWords,
wchar_t const* _ErrorMessage
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl __wcserror_s(wchar_t (&_Buffer)[_Size], wchar_t const* _ErrorMessage) throw() { return __wcserror_s(_Buffer, _Size, _ErrorMessage); } }
int __cdecl _wcsicmp(
wchar_t const* _String1,
wchar_t const* _String2
);
int __cdecl _wcsicmp_l(
wchar_t const* _String1,
wchar_t const* _String2,
_locale_t _Locale
);
int __cdecl _wcsnicmp(
wchar_t const* _String1,
wchar_t const* _String2,
size_t _MaxCount
);
int __cdecl _wcsnicmp_l(
wchar_t const* _String1,
wchar_t const* _String2,
size_t _MaxCount,
_locale_t _Locale
);
errno_t __cdecl _wcsnset_s(
wchar_t* _Destination,
size_t _SizeInWords,
wchar_t _Value,
size_t _MaxCount
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _wcsnset_s(wchar_t (&_Destination)[_Size], wchar_t _Value, size_t _MaxCount) throw() { return _wcsnset_s(_Destination, _Size, _Value, _MaxCount); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t* __cdecl _wcsnset( wchar_t *_String, wchar_t _Value, size_t _MaxCount);
wchar_t* __cdecl _wcsrev(
wchar_t* _String
);
errno_t __cdecl _wcsset_s(
wchar_t* _Destination,
size_t _SizeInWords,
wchar_t _Value
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _wcsset_s(wchar_t (&_String)[_Size], wchar_t _Value) throw() { return _wcsset_s(_String, _Size, _Value); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t* __cdecl _wcsset( wchar_t *_String, wchar_t _Value);
errno_t __cdecl _wcslwr_s(
wchar_t* _String,
size_t _SizeInWords
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _wcslwr_s(wchar_t (&_String)[_Size]) throw() { return _wcslwr_s(_String, _Size); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t* __cdecl _wcslwr( wchar_t *_String);
errno_t __cdecl _wcslwr_s_l(
wchar_t* _String,
size_t _SizeInWords,
_locale_t _Locale
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _wcslwr_s_l(wchar_t (&_String)[_Size], _locale_t _Locale) throw() { return _wcslwr_s_l(_String, _Size, _Locale); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t* __cdecl _wcslwr_l( wchar_t *_String, _locale_t _Locale);
errno_t __cdecl _wcsupr_s(
wchar_t* _String,
size_t _Size
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _wcsupr_s(wchar_t (&_String)[_Size]) throw() { return _wcsupr_s(_String, _Size); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t* __cdecl _wcsupr( wchar_t *_String);
errno_t __cdecl _wcsupr_s_l(
wchar_t* _String,
size_t _Size,
_locale_t _Locale
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _wcsupr_s_l(wchar_t (&_String)[_Size], _locale_t _Locale) throw() { return _wcsupr_s_l(_String, _Size, _Locale); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t* __cdecl _wcsupr_l( wchar_t *_String, _locale_t _Locale);
# 456 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wstring.h" 3
size_t __cdecl wcsxfrm(
wchar_t* _Destination,
wchar_t const* _Source,
size_t _MaxCount
);
size_t __cdecl _wcsxfrm_l(
wchar_t* _Destination,
wchar_t const* _Source,
size_t _MaxCount,
_locale_t _Locale
);
int __cdecl wcscoll(
wchar_t const* _String1,
wchar_t const* _String2
);
int __cdecl _wcscoll_l(
wchar_t const* _String1,
wchar_t const* _String2,
_locale_t _Locale
);
int __cdecl _wcsicoll(
wchar_t const* _String1,
wchar_t const* _String2
);
int __cdecl _wcsicoll_l(
wchar_t const* _String1,
wchar_t const* _String2,
_locale_t _Locale
);
int __cdecl _wcsncoll(
wchar_t const* _String1,
wchar_t const* _String2,
size_t _MaxCount
);
int __cdecl _wcsncoll_l(
wchar_t const* _String1,
wchar_t const* _String2,
size_t _MaxCount,
_locale_t _Locale
);
int __cdecl _wcsnicoll(
wchar_t const* _String1,
wchar_t const* _String2,
size_t _MaxCount
);
int __cdecl _wcsnicoll_l(
wchar_t const* _String1,
wchar_t const* _String2,
size_t _MaxCount,
_locale_t _Locale
);
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Inline C++ Overloads
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
extern "C++" {
inline wchar_t* __cdecl wcschr( wchar_t* _String, wchar_t _C)
{
return const_cast<wchar_t*>(wcschr(static_cast<wchar_t const*>(_String), _C));
}
inline wchar_t* __cdecl wcspbrk( wchar_t* _String, wchar_t const* _Control)
{
return const_cast<wchar_t*>(wcspbrk(static_cast<wchar_t const*>(_String), _Control));
}
inline wchar_t* __cdecl wcsrchr( wchar_t* _String, wchar_t _C)
{
return const_cast<wchar_t*>(wcsrchr(static_cast<wchar_t const*>(_String), _C));
}
inline wchar_t* __cdecl wcsstr( wchar_t* _String, wchar_t const*_SubStr)
{
return const_cast<wchar_t*>(wcsstr(static_cast<wchar_t const*>(_String), _SubStr));
}
}
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Non-Standard Names
//
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details."))
wchar_t* __cdecl wcsdup(
wchar_t const* _String
);
// Declarations of functions defined in oldnames.lib:
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details."))
int __cdecl wcsicmp(
wchar_t const* _String1,
wchar_t const* _String2
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details."))
int __cdecl wcsnicmp(
wchar_t const* _String1,
wchar_t const* _String2,
size_t _MaxCount
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details."))
wchar_t* __cdecl wcsnset(
wchar_t* _String,
wchar_t _Value,
size_t _MaxCount
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details."))
wchar_t* __cdecl wcsrev(
wchar_t* _String
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details."))
wchar_t* __cdecl wcsset(
wchar_t* _String,
wchar_t _Value
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details."))
wchar_t* __cdecl wcslwr(
wchar_t* _String
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details."))
wchar_t* __cdecl wcsupr(
wchar_t* _String
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details."))
int __cdecl wcsicoll(
wchar_t const* _String1,
wchar_t const* _String2
);
}
# 647 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\corecrt_wstring.h" 3
#pragma pack(pop)
# 13 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\string.h" 2 3
#pragma pack(push, 8)
# 18 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\string.h" 3
extern "C" {
# 27 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\string.h" 3
errno_t __cdecl strcpy_s(
char* _Destination,
rsize_t _SizeInBytes,
char const* _Source
);
errno_t __cdecl strcat_s(
char* _Destination,
rsize_t _SizeInBytes,
char const* _Source
);
errno_t __cdecl strerror_s(
char* _Buffer,
size_t _SizeInBytes,
int _ErrorNumber);
errno_t __cdecl strncat_s(
char* _Destination,
rsize_t _SizeInBytes,
char const* _Source,
rsize_t _MaxCount
);
errno_t __cdecl strncpy_s(
char* _Destination,
rsize_t _SizeInBytes,
char const* _Source,
rsize_t _MaxCount
);
char* __cdecl strtok_s(
char* _String,
char const* _Delimiter,
char** _Context
);
void* __cdecl _memccpy(
void* _Dst,
void const* _Src,
int _Val,
size_t _MaxCount
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl strcat_s(char (&_Destination)[_Size], char const* _Source) throw() { return strcat_s(_Destination, _Size, _Source); } }
#pragma warning(push)
#pragma warning(disable: 28719)
#pragma warning(disable: 28726)
__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char* __cdecl strcat( char *_Destination, char const* _Source);
#pragma warning(pop)
int __cdecl strcmp(
char const* _Str1,
char const* _Str2
);
int __cdecl _strcmpi(
char const* _String1,
char const* _String2
);
int __cdecl strcoll(
char const* _String1,
char const* _String2
);
int __cdecl _strcoll_l(
char const* _String1,
char const* _String2,
_locale_t _Locale
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl strcpy_s(char (&_Destination)[_Size], char const* _Source) throw() { return strcpy_s(_Destination, _Size, _Source); } }
#pragma warning(push)
#pragma warning(disable: 28719)
#pragma warning(disable: 28726)
__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char* __cdecl strcpy( char *_Destination, char const* _Source);
#pragma warning(pop)
size_t __cdecl strcspn(
char const* _Str,
char const* _Control
);
__declspec(allocator) char* __cdecl _strdup(
char const* _Source
);
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details."))
char* __cdecl _strerror(
char const* _ErrorMessage
);
errno_t __cdecl _strerror_s(
char* _Buffer,
size_t _SizeInBytes,
char const* _ErrorMessage
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _strerror_s(char (&_Buffer)[_Size], char const* _ErrorMessage) throw() { return _strerror_s(_Buffer, _Size, _ErrorMessage); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details."))
char* __cdecl strerror(
int _ErrorMessage
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl strerror_s(char (&_Buffer)[_Size], int _ErrorMessage) throw() { return strerror_s(_Buffer, _Size, _ErrorMessage); } }
int __cdecl _stricmp(
char const* _String1,
char const* _String2
);
int __cdecl _stricoll(
char const* _String1,
char const* _String2
);
int __cdecl _stricoll_l(
char const* _String1,
char const* _String2,
_locale_t _Locale
);
int __cdecl _stricmp_l(
char const* _String1,
char const* _String2,
_locale_t _Locale
);
size_t __cdecl strlen(
char const* _Str
);
errno_t __cdecl _strlwr_s(
char* _String,
size_t _Size
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _strlwr_s(char (&_String)[_Size]) throw() { return _strlwr_s(_String, _Size); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char* __cdecl _strlwr( char *_String);
errno_t __cdecl _strlwr_s_l(
char* _String,
size_t _Size,
_locale_t _Locale
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _strlwr_s_l(char (&_String)[_Size], _locale_t _Locale) throw() { return _strlwr_s_l(_String, _Size, _Locale); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char* __cdecl _strlwr_l( char *_String, _locale_t _Locale);
extern "C++" { template <size_t _Size> inline errno_t __cdecl strncat_s(char (&_Destination)[_Size], char const* _Source, size_t _Count) throw() { return strncat_s(_Destination, _Size, _Source, _Count); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char* __cdecl strncat( char *_Destination, char const* _Source, size_t _Count);
# 274 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\string.h" 3
int __cdecl strncmp(
char const* _Str1,
char const* _Str2,
size_t _MaxCount
);
int __cdecl _strnicmp(
char const* _String1,
char const* _String2,
size_t _MaxCount
);
int __cdecl _strnicmp_l(
char const* _String1,
char const* _String2,
size_t _MaxCount,
_locale_t _Locale
);
int __cdecl _strnicoll(
char const* _String1,
char const* _String2,
size_t _MaxCount
);
int __cdecl _strnicoll_l(
char const* _String1,
char const* _String2,
size_t _MaxCount,
_locale_t _Locale
);
int __cdecl _strncoll(
char const* _String1,
char const* _String2,
size_t _MaxCount
);
int __cdecl _strncoll_l(
char const* _String1,
char const* _String2,
size_t _MaxCount,
_locale_t _Locale
);
size_t __cdecl __strncnt(
char const* _String,
size_t _Count
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl strncpy_s(char (&_Destination)[_Size], char const* _Source, size_t _Count) throw() { return strncpy_s(_Destination, _Size, _Source, _Count); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char* __cdecl strncpy( char *_Destination, char const* _Source, size_t _Count);
# 354 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\string.h" 3
size_t __cdecl strnlen(
char const* _String,
size_t _MaxCount
);
# 370 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\string.h" 3
static __inline size_t __cdecl strnlen_s(
char const* _String,
size_t _MaxCount
)
{
return _String == 0 ? 0 : strnlen(_String, _MaxCount);
}
errno_t __cdecl _strnset_s(
char* _String,
size_t _SizeInBytes,
int _Value,
size_t _MaxCount
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _strnset_s(char (&_Destination)[_Size], int _Value, size_t _Count) throw() { return _strnset_s(_Destination, _Size, _Value, _Count); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char* __cdecl _strnset( char *_Destination, int _Value, size_t _Count);
# 404 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\string.h" 3
char const* __cdecl strpbrk(
char const* _Str,
char const* _Control
);
char* __cdecl _strrev(
char* _Str
);
errno_t __cdecl _strset_s(
char* _Destination,
size_t _DestinationSize,
int _Value
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _strset_s(char (&_Destination)[_Size], int _Value) throw() { return _strset_s(_Destination, _Size, _Value); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char* __cdecl _strset( char *_Destination, int _Value);
size_t __cdecl strspn(
char const* _Str,
char const* _Control
);
__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details."))
char* __cdecl strtok(
char* _String,
char const* _Delimiter
);
errno_t __cdecl _strupr_s(
char* _String,
size_t _Size
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _strupr_s(char (&_String)[_Size]) throw() { return _strupr_s(_String, _Size); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char* __cdecl _strupr( char *_String);
errno_t __cdecl _strupr_s_l(
char* _String,
size_t _Size,
_locale_t _Locale
);
extern "C++" { template <size_t _Size> inline errno_t __cdecl _strupr_s_l(char (&_String)[_Size], _locale_t _Locale) throw() { return _strupr_s_l(_String, _Size, _Locale); } }
__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char* __cdecl _strupr_l( char *_String, _locale_t _Locale);
# 482 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\string.h" 3
size_t __cdecl strxfrm(
char* _Destination,
char const* _Source,
size_t _MaxCount
);
size_t __cdecl _strxfrm_l(
char* _Destination,
char const* _Source,
size_t _MaxCount,
_locale_t _Locale
);
extern "C++"
{
inline char* __cdecl strchr( char* const _String, int const _Ch)
{
return const_cast<char*>(strchr(static_cast<char const*>(_String), _Ch));
}
inline char* __cdecl strpbrk( char* const _String, char const* const _Control)
{
return const_cast<char*>(strpbrk(static_cast<char const*>(_String), _Control));
}
inline char* __cdecl strrchr( char* const _String, int const _Ch)
{
return const_cast<char*>(strrchr(static_cast<char const*>(_String), _Ch));
}
inline char* __cdecl strstr( char* const _String, char const* const _SubString)
{
return const_cast<char*>(strstr(static_cast<char const*>(_String), _SubString));
}
}
# 537 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\string.h" 3
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details."))
char* __cdecl strdup(
char const* _String
);
// Declarations of functions defined in oldnames.lib:
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details."))
int __cdecl strcmpi(
char const* _String1,
char const* _String2
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details."))
int __cdecl stricmp(
char const* _String1,
char const* _String2
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details."))
char* __cdecl strlwr(
char* _String
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details."))
int __cdecl strnicmp(
char const* _String1,
char const* _String2,
size_t _MaxCount
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details."))
char* __cdecl strnset(
char* _String,
int _Value,
size_t _MaxCount
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details."))
char* __cdecl strrev(
char* _String
);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details."))
char* __cdecl strset(
char* _String,
int _Value);
__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details."))
char* __cdecl strupr(
char* _String
);
}
# 597 "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.15063.0\\ucrt\\string.h" 3
#pragma pack(pop)
# 146 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\guiddef.h" 2 3
// Faster (but makes code fatter) inline version...use sparingly
__inline int InlineIsEqualGUID(const GUID & rguid1, const GUID & rguid2)
{
return (
((unsigned long *) &rguid1)[0] == ((unsigned long *) &rguid2)[0] &&
((unsigned long *) &rguid1)[1] == ((unsigned long *) &rguid2)[1] &&
((unsigned long *) &rguid1)[2] == ((unsigned long *) &rguid2)[2] &&
((unsigned long *) &rguid1)[3] == ((unsigned long *) &rguid2)[3]);
}
__inline int IsEqualGUID(const GUID & rguid1, const GUID & rguid2)
{
return !memcmp(&rguid1, &rguid2, sizeof(GUID));
}
# 181 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\guiddef.h" 3
// Same type, different name
// A couple of C++ helpers
__inline bool operator==(const GUID & guidOne, const GUID & guidOther)
{
return !!IsEqualGUID(guidOne,guidOther);
}
__inline bool operator!=(const GUID & guidOne, const GUID & guidOther)
{
return !(guidOne == guidOther);
}
# 1143 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
typedef struct _OBJECTID { // size is 20
GUID Lineage;
DWORD Uniquifier;
} OBJECTID;
# 1163 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// begin_ntoshvp
//
// Calculate the byte offset of a field in a structure of type type.
//
//
// Calculate the size of a field in a structure of type type, without
// knowing or stating the type of the field.
//
//
// Calculate the size of a structure of type type up through and
// including a field.
//
// end_ntoshvp
//
// RTL_CONTAINS_FIELD usage:
//
// if (RTL_CONTAINS_FIELD(pBlock, pBlock->cbSize, dwMumble))
// // safe to use pBlock->dwMumble
//
//
// Return the number of elements in a statically sized array.
// DWORD Buffer[100];
// RTL_NUMBER_OF(Buffer) == 100
// This is also popularly known as: NUMBER_OF, ARRSIZE, _countof, NELEM, etc.
//
# 1209 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// RtlpNumberOf is a function that takes a reference to an array of N Ts.
//
// typedef T array_of_T[N];
// typedef array_of_T &reference_to_array_of_T;
//
// RtlpNumberOf returns a pointer to an array of N chars.
// We could return a reference instead of a pointer but older compilers do not accept that.
//
// typedef char array_of_char[N];
// typedef array_of_char *pointer_to_array_of_char;
//
// sizeof(array_of_char) == N
// sizeof(*pointer_to_array_of_char) == N
//
// pointer_to_array_of_char RtlpNumberOf(reference_to_array_of_T);
//
// We never even call RtlpNumberOf, we just take the size of dereferencing its return type.
// We do not even implement RtlpNumberOf, we just declare it.
//
// Attempts to pass pointers instead of arrays to this macro result in compile time errors.
// That is the point.
//
// end_ntndis end_ntminiport
// begin_ntndis begin_ntminiport
extern "C++" // templates cannot be declared to have 'C' linkage
template <typename T, size_t N>
char (*RtlpNumberOf( __unaligned T (&)[N] ))[N];
// end_ntndis end_ntminiport
// begin_ntndis begin_ntminiport
//
// This does not work with:
//
// void Foo()
// {
// struct { int x; } y[2];
// RTL_NUMBER_OF_V2(y); // illegal use of anonymous local type in template instantiation
// }
//
// You must instead do:
//
// struct Foo1 { int x; };
//
// void Foo()
// {
// Foo1 y[2];
// RTL_NUMBER_OF_V2(y); // ok
// }
//
// OR
//
// void Foo()
// {
// struct { int x; } y[2];
// RTL_NUMBER_OF_V1(y); // ok
// }
//
// OR
//
// void Foo()
// {
// struct { int x; } y[2];
// _ARRAYSIZE(y); // ok
// }
//
# 1299 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// ARRAYSIZE is more readable version of RTL_NUMBER_OF_V2, and uses
// it regardless of ENABLE_RTL_NUMBER_OF_V2
//
// _ARRAYSIZE is a version useful for anonymous types
//
//
// An expression that yields the type of a field in a struct.
//
// RTL_ to avoid collisions in the global namespace.
//
// Given typedef struct _FOO { BYTE Bar[123]; } FOO;
// RTL_NUMBER_OF_FIELD(FOO, Bar) == 123
//
//
// eg:
// typedef struct FOO {
// DWORD Integer;
// PVOID Pointer;
// } FOO;
//
// RTL_PADDING_BETWEEN_FIELDS(FOO, Integer, Pointer) == 0 for Win32, 4 for Win64
//
// RTL_ to avoid collisions in the global namespace.
// like sizeof
// usually this would be * CHAR_BIT, but we don't necessarily have #include <limits.h>
// begin_ntoshvp
//
// Calculate the address of the base of the structure given its type, and an
// address of a field within the structure.
//
// end_ntoshvp
// end_ntminiport end_ntndis
//
// Exception handler routine definition.
//
typedef
EXCEPTION_DISPOSITION
__stdcall
EXCEPTION_ROUTINE (
struct _EXCEPTION_RECORD *ExceptionRecord,
PVOID EstablisherFrame,
struct _CONTEXT *ContextRecord,
PVOID DispatcherContext
);
typedef EXCEPTION_ROUTINE *PEXCEPTION_ROUTINE;
# 1403 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Product types
// This list grows with each OS release.
//
// There is no ordering of values to ensure callers
// do an equality test i.e. greater-than and less-than
// comparisons are not useful.
//
// NOTE: Values in this list should never be deleted.
// When a product-type 'X' gets dropped from a
// OS release onwards, the value of 'X' continues
// to be used in the mapping table of GetProductInfo.
//
# 1568 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Language IDs.
//
// Note that the named locale APIs (eg GetLocaleInfoEx) are preferred.
//
// Not all locales have unique Language IDs
//
// The following two combinations of primary language ID and
// sublanguage ID have special semantics:
//
// Primary Language ID Sublanguage ID Result
// ------------------- --------------- ------------------------
// LANG_NEUTRAL SUBLANG_NEUTRAL Language neutral
// LANG_NEUTRAL SUBLANG_DEFAULT User default language
// LANG_NEUTRAL SUBLANG_SYS_DEFAULT System default language
// LANG_INVARIANT SUBLANG_NEUTRAL Invariant locale
//
// It is recommended that applications test for locale names instead of
// Language IDs / LCIDs.
//
// Primary language IDs.
//
// WARNING: These aren't always unique. Bosnian, Serbian & Croation for example.
//
// It is recommended that applications test for locale names or actual LCIDs.
//
// Note that the LANG, SUBLANG construction is not always consistent.
// The named locale APIs (eg GetLocaleInfoEx) are recommended.
//
# 1740 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Sublanguage IDs.
//
// The name immediately following SUBLANG_ dictates which primary
// language ID that sublanguage ID can be combined with to form a
// valid language ID.
//
// Note that the LANG, SUBLANG construction is not always consistent.
// The named locale APIs (eg GetLocaleInfoEx) are recommended.
//
# 2001 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Sorting IDs.
//
// Note that the named locale APIs (eg CompareStringExEx) are recommended.
//
# 2033 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_r_winnt
//
// A language ID is a 16 bit value which is the combination of a
// primary language ID and a secondary language ID. The bits are
// allocated as follows:
//
// +-----------------------+-------------------------+
// | Sublanguage ID | Primary Language ID |
// +-----------------------+-------------------------+
// 15 10 9 0 bit
//
// WARNING: This pattern isn't always follows, Serbina, Bosnian & Croation
// for example.
//
// It is recommended that applications test for locale names or actual LCIDs.
//
// Language ID creation/extraction macros:
//
// MAKELANGID - construct language id from a primary language id and
// a sublanguage id.
// PRIMARYLANGID - extract primary language id from a language id.
// SUBLANGID - extract sublanguage id from a language id.
//
// Note that the LANG, SUBLANG construction is not always consistent.
// The named locale APIs (eg GetLocaleInfoEx) are recommended.
//
// Language IDs do not exist for all locales
//
//
// A locale ID is a 32 bit value which is the combination of a
// language ID, a sort ID, and a reserved area. The bits are
// allocated as follows:
//
// +-------------+---------+-------------------------+
// | Reserved | Sort ID | Language ID |
// +-------------+---------+-------------------------+
// 31 20 19 16 15 0 bit
//
// WARNING: This pattern isn't always followed (es-ES_tradnl vs es-ES for example)
//
// It is recommended that applications test for locale names or actual LCIDs.
//
// Locale ID creation/extraction macros:
//
// MAKELCID - construct the locale id from a language id and a sort id.
// MAKESORTLCID - construct the locale id from a language id, sort id, and sort version.
// LANGIDFROMLCID - extract the language id from a locale id.
// SORTIDFROMLCID - extract the sort id from a locale id.
// SORTVERSIONFROMLCID - extract the sort version from a locale id.
//
// Note that the LANG, SUBLANG construction is not always consistent.
// The named locale APIs (eg GetLocaleInfoEx) are recommended.
//
// LCIDs do not exist for all locales.
//
# 2105 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// 8 characters for language
// 8 characters for region
// 64 characters for suffix (script)
// 2 characters for '-' separators
// 2 characters for prefix like "i-" or "x-"
// 1 null termination
//
// Default System and User IDs for language and locale.
// Locale names such as LOCALE_NAME_SYSTEM_DEFAULT, LOCALE_NAME_USER_DEFAULT,
// and LOCALE_NAME_INVARIANT are preferred.
//
//
// Other special IDs for language and locale.
//
# 2143 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Transient keyboard Locale IDs (LCIDs)
// Should only be used for keyboard layout identification
//
//
// Locale with an unassigned LCID
// These locales cannot be queried by LCID
// Currently same as LOCALE_CUSTOM_UNSPECIFIED
//
// begin_ntminiport begin_ntndis begin_ntminitape
//
// Macros used to eliminate compiler warning generated when formal
// parameters or local variables are not declared.
//
// Use DBG_UNREFERENCED_PARAMETER() when a parameter is not yet
// referenced but will be once the module is completely developed.
//
// Use DBG_UNREFERENCED_LOCAL_VARIABLE() when a local variable is not yet
// referenced but will be once the module is completely developed.
//
// Use UNREFERENCED_PARAMETER() if a parameter will never be referenced.
//
// DBG_UNREFERENCED_PARAMETER and DBG_UNREFERENCED_LOCAL_VARIABLE will
// eventually be made into a null macro to help determine whether there
// is unfinished work.
//
// begin_ntoshvp
# 2224 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_ntoshvp
//
// Macro used to eliminate compiler warning 4715 within a switch statement
// when all possible cases have already been accounted for.
//
// switch (a & 3) {
// case 0: return 1;
// case 1: return Foo();
// case 2: return Bar();
// case 3: return 1;
// DEFAULT_UNREACHABLE;
//
# 2253 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// Define operator overloads to enable bit operations on enum values that are
// used to define flags. Use DEFINE_ENUM_FLAG_OPERATORS(YOUR_TYPE) to enable these
// operators on YOUR_TYPE.
// Moved here from objbase.w.
// Templates are defined here in order to avoid a dependency on C++ <type_traits> header file,
// or on compiler-specific constructs.
extern "C++" {
template <size_t S>
struct _ENUM_FLAG_INTEGER_FOR_SIZE;
template <>
struct _ENUM_FLAG_INTEGER_FOR_SIZE<1>
{
typedef INT8 type;
};
template <>
struct _ENUM_FLAG_INTEGER_FOR_SIZE<2>
{
typedef INT16 type;
};
template <>
struct _ENUM_FLAG_INTEGER_FOR_SIZE<4>
{
typedef INT32 type;
};
template <>
struct _ENUM_FLAG_INTEGER_FOR_SIZE<8>
{
typedef INT64 type;
};
// used as an approximation of std::underlying_type<T>
template <class T>
struct _ENUM_FLAG_SIZED_INTEGER
{
typedef typename _ENUM_FLAG_INTEGER_FOR_SIZE<sizeof(T)>::type type;
};
}
# 2319 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// Compile-time macros for initializing flag values in const data.
//
// When using DEFINE_ENUM_FLAG_OPERATORS for enum values you should use the macros below
// when you need to initialize global const data. Without these macros the inline operators
// from DEFINE_ENUM_FLAG_OPERATORS force a runtime initialization rather than a
// compile time initialization. This applies even if you have declared the data as const.
//
// This is no longer necessary for compilers that support constexpr.
# 2336 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
/*lint -save -e767 */
# 2398 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
/*lint -restore */
typedef ULONG_PTR KSPIN_LOCK;
typedef KSPIN_LOCK *PKSPIN_LOCK;
// begin_ntoshvp
//
// Define 128-bit 16-byte aligned xmm register type.
//
typedef struct __declspec(align(16)) _M128A {
ULONGLONG Low;
LONGLONG High;
} M128A, *PM128A;
//
// Format of data for (F)XSAVE/(F)XRSTOR instruction
//
typedef struct __declspec(align(16)) _XSAVE_FORMAT {
WORD ControlWord;
WORD StatusWord;
BYTE TagWord;
BYTE Reserved1;
WORD ErrorOpcode;
DWORD ErrorOffset;
WORD ErrorSelector;
WORD Reserved2;
DWORD DataOffset;
WORD DataSelector;
WORD Reserved3;
DWORD MxCsr;
DWORD MxCsr_Mask;
M128A FloatRegisters[8];
M128A XmmRegisters[16];
BYTE Reserved4[96];
# 2452 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
} XSAVE_FORMAT, *PXSAVE_FORMAT;
// end_ntoshvp
typedef struct __declspec(align(8)) _XSAVE_AREA_HEADER {
DWORD64 Mask;
DWORD64 CompactionMask;
DWORD64 Reserved2[6];
} XSAVE_AREA_HEADER, *PXSAVE_AREA_HEADER;
typedef struct __declspec(align(16)) _XSAVE_AREA {
XSAVE_FORMAT LegacyState;
XSAVE_AREA_HEADER Header;
} XSAVE_AREA, *PXSAVE_AREA;
typedef struct _XSTATE_CONTEXT {
DWORD64 Mask;
DWORD Length;
DWORD Reserved1;
PXSAVE_AREA Area;
PVOID Buffer;
} XSTATE_CONTEXT, *PXSTATE_CONTEXT;
//
// Scope table structure definition.
//
typedef struct _SCOPE_TABLE_AMD64 {
DWORD Count;
struct {
DWORD BeginAddress;
DWORD EndAddress;
DWORD HandlerAddress;
DWORD JumpTarget;
} ScopeRecord[1];
} SCOPE_TABLE_AMD64, *PSCOPE_TABLE_AMD64;
// begin_ntoshvp
//
// Define bit test intrinsics.
//
extern "C" {
# 2541 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
BOOLEAN
_bittest (
LONG const *Base,
LONG Offset
);
BOOLEAN
_bittestandcomplement (
LONG *Base,
LONG Offset
);
BOOLEAN
_bittestandset (
LONG *Base,
LONG Offset
);
BOOLEAN
_bittestandreset (
LONG *Base,
LONG Offset
);
BOOLEAN
_interlockedbittestandset (
LONG volatile *Base,
LONG Offset
);
BOOLEAN
_interlockedbittestandreset (
LONG volatile *Base,
LONG Offset
);
BOOLEAN
_bittest64 (
LONG64 const *Base,
LONG64 Offset
);
BOOLEAN
_bittestandcomplement64 (
LONG64 *Base,
LONG64 Offset
);
BOOLEAN
_bittestandset64 (
LONG64 *Base,
LONG64 Offset
);
BOOLEAN
_bittestandreset64 (
LONG64 *Base,
LONG64 Offset
);
BOOLEAN
_interlockedbittestandset64 (
LONG64 volatile *Base,
LONG64 Offset
);
BOOLEAN
_interlockedbittestandreset64 (
LONG64 volatile *Base,
LONG64 Offset
);
#pragma intrinsic(_bittest)
#pragma intrinsic(_bittestandcomplement)
#pragma intrinsic(_bittestandset)
#pragma intrinsic(_bittestandreset)
#pragma intrinsic(_interlockedbittestandset)
#pragma intrinsic(_interlockedbittestandreset)
#pragma intrinsic(_bittest64)
#pragma intrinsic(_bittestandcomplement64)
#pragma intrinsic(_bittestandset64)
#pragma intrinsic(_bittestandreset64)
#pragma intrinsic(_interlockedbittestandset64)
#pragma intrinsic(_interlockedbittestandreset64)
//
// Define bit scan intrinsics.
//
BOOLEAN
_BitScanForward (
DWORD *Index,
DWORD Mask
);
BOOLEAN
_BitScanReverse (
DWORD *Index,
DWORD Mask
);
BOOLEAN
_BitScanForward64 (
DWORD *Index,
DWORD64 Mask
);
BOOLEAN
_BitScanReverse64 (
DWORD *Index,
DWORD64 Mask
);
#pragma intrinsic(_BitScanForward)
#pragma intrinsic(_BitScanReverse)
#pragma intrinsic(_BitScanForward64)
#pragma intrinsic(_BitScanReverse64)
//
// Interlocked intrinsic functions.
//
# 2777 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
SHORT
_InterlockedIncrement16 (
SHORT volatile *Addend
);
SHORT
_InterlockedDecrement16 (
SHORT volatile *Addend
);
SHORT
_InterlockedCompareExchange16 (
SHORT volatile *Destination,
SHORT ExChange,
SHORT Comperand
);
LONG
_InterlockedAnd (
LONG volatile *Destination,
LONG Value
);
LONG
_InterlockedOr (
LONG volatile *Destination,
LONG Value
);
LONG
_InterlockedXor (
LONG volatile *Destination,
LONG Value
);
LONG64
_InterlockedAnd64 (
LONG64 volatile *Destination,
LONG64 Value
);
LONG64
_InterlockedOr64 (
LONG64 volatile *Destination,
LONG64 Value
);
LONG64
_InterlockedXor64 (
LONG64 volatile *Destination,
LONG64 Value
);
LONG
_InterlockedIncrement (
LONG volatile *Addend
);
LONG
_InterlockedDecrement (
LONG volatile *Addend
);
LONG
_InterlockedExchange (
LONG volatile *Target,
LONG Value
);
LONG
_InterlockedExchangeAdd (
LONG volatile *Addend,
LONG Value
);
__forceinline
LONG
_InlineInterlockedAdd (
LONG volatile *Addend,
LONG Value
)
{
return _InterlockedExchangeAdd(Addend, Value) + Value;
}
LONG
_InterlockedCompareExchange (
LONG volatile *Destination,
LONG ExChange,
LONG Comperand
);
LONG64
_InterlockedIncrement64 (
LONG64 volatile *Addend
);
LONG64
_InterlockedDecrement64 (
LONG64 volatile *Addend
);
LONG64
_InterlockedExchange64 (
LONG64 volatile *Target,
LONG64 Value
);
LONG64
_InterlockedExchangeAdd64 (
LONG64 volatile *Addend,
LONG64 Value
);
__forceinline
LONG64
_InlineInterlockedAdd64 (
LONG64 volatile *Addend,
LONG64 Value
)
{
return _InterlockedExchangeAdd64(Addend, Value) + Value;
}
LONG64
_InterlockedCompareExchange64 (
LONG64 volatile *Destination,
LONG64 ExChange,
LONG64 Comperand
);
BOOLEAN
_InterlockedCompareExchange128 (
LONG64 volatile *Destination,
LONG64 ExchangeHigh,
LONG64 ExchangeLow,
LONG64 *ComparandResult
);
PVOID
_InterlockedCompareExchangePointer (
PVOID volatile *Destination,
PVOID Exchange,
PVOID Comperand
);
PVOID
_InterlockedExchangePointer(
PVOID volatile *Target,
PVOID Value
);
#pragma intrinsic(_InterlockedIncrement16)
#pragma intrinsic(_InterlockedDecrement16)
#pragma intrinsic(_InterlockedCompareExchange16)
#pragma intrinsic(_InterlockedAnd)
#pragma intrinsic(_InterlockedOr)
#pragma intrinsic(_InterlockedXor)
#pragma intrinsic(_InterlockedIncrement)
#pragma intrinsic(_InterlockedDecrement)
#pragma intrinsic(_InterlockedExchange)
#pragma intrinsic(_InterlockedExchangeAdd)
#pragma intrinsic(_InterlockedCompareExchange)
#pragma intrinsic(_InterlockedAnd64)
#pragma intrinsic(_InterlockedOr64)
#pragma intrinsic(_InterlockedXor64)
#pragma intrinsic(_InterlockedIncrement64)
#pragma intrinsic(_InterlockedDecrement64)
#pragma intrinsic(_InterlockedExchange64)
#pragma intrinsic(_InterlockedExchangeAdd64)
#pragma intrinsic(_InterlockedCompareExchange64)
#pragma intrinsic(_InterlockedCompareExchange128)
#pragma intrinsic(_InterlockedExchangePointer)
#pragma intrinsic(_InterlockedCompareExchangePointer)
CHAR
_InterlockedExchange8 (
CHAR volatile *Target,
CHAR Value
);
SHORT
_InterlockedExchange16 (
SHORT volatile *Destination,
SHORT ExChange
);
#pragma intrinsic(_InterlockedExchange8)
#pragma intrinsic(_InterlockedExchange16)
# 3006 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
char
_InterlockedExchangeAdd8 (
char volatile * _Addend,
char _Value
);
char
_InterlockedAnd8 (
char volatile *Destination,
char Value
);
char
_InterlockedOr8 (
char volatile *Destination,
char Value
);
char
_InterlockedXor8 (
char volatile *Destination,
char Value
);
SHORT
_InterlockedAnd16(
SHORT volatile *Destination,
SHORT Value
);
SHORT
_InterlockedOr16(
SHORT volatile *Destination,
SHORT Value
);
SHORT
_InterlockedXor16(
SHORT volatile *Destination,
SHORT Value
);
#pragma intrinsic (_InterlockedExchangeAdd8)
#pragma intrinsic (_InterlockedAnd8)
#pragma intrinsic (_InterlockedOr8)
#pragma intrinsic (_InterlockedXor8)
#pragma intrinsic (_InterlockedAnd16)
#pragma intrinsic (_InterlockedOr16)
#pragma intrinsic (_InterlockedXor16)
// end_ntoshvp
//
// Define extended CPUID intrinsic.
//
void
__cpuidex (
int CPUInfo[4],
int Function,
int SubLeaf
);
#pragma intrinsic(__cpuidex)
// begin_ntoshvp
//
// Define function to flush a cache line.
//
void
_mm_clflush (
void const *Address
);
#pragma intrinsic(_mm_clflush)
// begin_sdfwdm
// begin_wudfpwdm
void
_ReadWriteBarrier (
void
);
#pragma intrinsic(_ReadWriteBarrier)
//
// Define memory fence intrinsics
//
// end_wudfpwdm
// end_sdfwdm
// begin_sdfwdm
// begin_wudfpwdm
void
__faststorefence (
void
);
// end_wudfpwdm
// end_sdfwdm
void
_mm_lfence (
void
);
void
_mm_mfence (
void
);
void
_mm_sfence (
void
);
void
_mm_pause (
void
);
void
_mm_prefetch (
CHAR const *a,
int sel
);
void
_m_prefetchw (
volatile const void *Source
);
//
// Define constants for use with _mm_prefetch.
//
// begin_sdfwdm
// begin_wudfpwdm
#pragma intrinsic(__faststorefence)
// end_wudfpwdm
// end_sdfwdm
#pragma intrinsic(_mm_pause)
#pragma intrinsic(_mm_prefetch)
#pragma intrinsic(_mm_lfence)
#pragma intrinsic(_mm_mfence)
#pragma intrinsic(_mm_sfence)
#pragma intrinsic(_m_prefetchw)
//
// PreFetchCacheLine level defines.
//
//
// Define get/set MXCSR intrinsics.
//
unsigned int
_mm_getcsr (
void
);
void
_mm_setcsr (
unsigned int MxCsr
);
#pragma intrinsic(_mm_getcsr)
#pragma intrinsic(_mm_setcsr)
//
// Define function to get the caller's EFLAGs value.
//
unsigned __int32
__getcallerseflags (
void
);
#pragma intrinsic(__getcallerseflags)
//
// Define function to get segment limit.
//
DWORD
__segmentlimit (
DWORD Selector
);
#pragma intrinsic(__segmentlimit)
//
// Define function to read the value of a performance counter.
//
DWORD64
__readpmc (
DWORD Counter
);
#pragma intrinsic(__readpmc)
//
// Define function to read the value of the time stamp counter
//
DWORD64
__rdtsc (
void
);
#pragma intrinsic(__rdtsc)
//
// Define functions to move strings as bytes, words, dwords, and qwords.
//
void
__movsb (
PBYTE Destination,
BYTE const *Source,
SIZE_T Count
);
void
__movsw (
PWORD Destination,
WORD const *Source,
SIZE_T Count
);
void
__movsd (
PDWORD Destination,
DWORD const *Source,
SIZE_T Count
);
void
__movsq (
PDWORD64 Destination,
DWORD64 const *Source,
SIZE_T Count
);
#pragma intrinsic(__movsb)
#pragma intrinsic(__movsw)
#pragma intrinsic(__movsd)
#pragma intrinsic(__movsq)
//
// Define functions to store strings as bytes, words, dwords, and qwords.
//
void
__stosb (
PBYTE Destination,
BYTE Value,
SIZE_T Count
);
void
__stosw (
PWORD Destination,
WORD Value,
SIZE_T Count
);
void
__stosd (
PDWORD Destination,
DWORD Value,
SIZE_T Count
);
void
__stosq (
PDWORD64 Destination,
DWORD64 Value,
SIZE_T Count
);
#pragma intrinsic(__stosb)
#pragma intrinsic(__stosw)
#pragma intrinsic(__stosd)
#pragma intrinsic(__stosq)
//
// Define functions to capture the high 64-bits of a 128-bit multiply.
//
LONGLONG
__mulh (
LONG64 Multiplier,
LONG64 Multiplicand
);
ULONGLONG
__umulh (
DWORD64 Multiplier,
DWORD64 Multiplicand
);
#pragma intrinsic(__mulh)
#pragma intrinsic(__umulh)
//
// Define population count intrinsic.
//
DWORD64
__popcnt64 (
DWORD64 operand
);
#pragma intrinsic(__popcnt64)
//
// Define functions to perform 128-bit shifts
//
DWORD64
__shiftleft128 (
DWORD64 LowPart,
DWORD64 HighPart,
BYTE Shift
);
DWORD64
__shiftright128 (
DWORD64 LowPart,
DWORD64 HighPart,
BYTE Shift
);
#pragma intrinsic(__shiftleft128)
#pragma intrinsic(__shiftright128)
//
// Define functions to perform 128-bit multiplies.
//
LONG64
_mul128 (
LONG64 Multiplier,
LONG64 Multiplicand,
LONG64 *HighProduct
);
#pragma intrinsic(_mul128)
DWORD64
_umul128 (
DWORD64 Multiplier,
DWORD64 Multiplicand,
DWORD64 *HighProduct
);
#pragma intrinsic(_umul128)
__forceinline
LONG64
MultiplyExtract128 (
LONG64 Multiplier,
LONG64 Multiplicand,
BYTE Shift
)
{
LONG64 extractedProduct;
LONG64 highProduct;
LONG64 lowProduct;
BOOLEAN negate;
DWORD64 uhighProduct;
DWORD64 ulowProduct;
lowProduct = _mul128(Multiplier, Multiplicand, &highProduct);
negate = 0;
uhighProduct = (DWORD64)highProduct;
ulowProduct = (DWORD64)lowProduct;
if (highProduct < 0) {
negate = 1;
uhighProduct = (DWORD64)(-highProduct);
ulowProduct = (DWORD64)(-lowProduct);
if (ulowProduct != 0) {
uhighProduct -= 1;
}
}
extractedProduct = (LONG64)__shiftright128(ulowProduct, uhighProduct, Shift);
if (negate != 0) {
extractedProduct = -extractedProduct;
}
return extractedProduct;
}
__forceinline
DWORD64
UnsignedMultiplyExtract128 (
DWORD64 Multiplier,
DWORD64 Multiplicand,
BYTE Shift
)
{
DWORD64 extractedProduct;
DWORD64 highProduct;
DWORD64 lowProduct;
lowProduct = _umul128(Multiplier, Multiplicand, &highProduct);
extractedProduct = __shiftright128(lowProduct, highProduct, Shift);
return extractedProduct;
}
//
// Define functions to read and write the uer TEB and the system PCR/PRCB.
//
BYTE
__readgsbyte (
DWORD Offset
);
WORD
__readgsword (
DWORD Offset
);
DWORD
__readgsdword (
DWORD Offset
);
DWORD64
__readgsqword (
DWORD Offset
);
void
__writegsbyte (
DWORD Offset,
BYTE Data
);
void
__writegsword (
DWORD Offset,
WORD Data
);
void
__writegsdword (
DWORD Offset,
DWORD Data
);
void
__writegsqword (
DWORD Offset,
DWORD64 Data
);
#pragma intrinsic(__readgsbyte)
#pragma intrinsic(__readgsword)
#pragma intrinsic(__readgsdword)
#pragma intrinsic(__readgsqword)
#pragma intrinsic(__writegsbyte)
#pragma intrinsic(__writegsword)
#pragma intrinsic(__writegsdword)
#pragma intrinsic(__writegsqword)
void
__incgsbyte (
DWORD Offset
);
void
__addgsbyte (
DWORD Offset,
BYTE Value
);
void
__incgsword (
DWORD Offset
);
void
__addgsword (
DWORD Offset,
WORD Value
);
void
__incgsdword (
DWORD Offset
);
void
__addgsdword (
DWORD Offset,
DWORD Value
);
void
__incgsqword (
DWORD Offset
);
void
__addgsqword (
DWORD Offset,
DWORD64 Value
);
# 3608 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
}
// end_ntoshvp
//
// The following values specify the type of access in the first parameter
// of the exception record whan the exception code specifies an access
// violation.
//
// begin_wx86
//
// The following flags control the contents of the CONTEXT structure.
//
// end_wx86
# 3661 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// begin_wx86
//
// Define initial MxCsr and FpCsr control.
//
// end_ntddk
// begin_wdm begin_ntosp
// begin_ntoshvp
typedef XSAVE_FORMAT XMM_SAVE_AREA32, *PXMM_SAVE_AREA32;
// end_wdm end_ntosp
// begin_ntddk
//
// Context Frame
//
// This frame has a several purposes: 1) it is used as an argument to
// NtContinue, 2) it is used to constuct a call frame for APC delivery,
// and 3) it is used in the user level thread creation routines.
//
//
// The flags field within this record controls the contents of a CONTEXT
// record.
//
// If the context record is used as an input parameter, then for each
// portion of the context record controlled by a flag whose value is
// set, it is assumed that that portion of the context record contains
// valid context. If the context record is being used to modify a threads
// context, then only that portion of the threads context is modified.
//
// If the context record is used as an output parameter to capture the
// context of a thread, then only those portions of the thread's context
// corresponding to set flags will be returned.
//
// CONTEXT_CONTROL specifies SegSs, Rsp, SegCs, Rip, and EFlags.
//
// CONTEXT_INTEGER specifies Rax, Rcx, Rdx, Rbx, Rbp, Rsi, Rdi, and R8-R15.
//
// CONTEXT_SEGMENTS specifies SegDs, SegEs, SegFs, and SegGs.
//
// CONTEXT_FLOATING_POINT specifies Xmm0-Xmm15.
//
// CONTEXT_DEBUG_REGISTERS specifies Dr0-Dr3 and Dr6-Dr7.
//
typedef struct __declspec(align(16)) _CONTEXT {
//
// Register parameter home addresses.
//
// N.B. These fields are for convience - they could be used to extend the
// context record in the future.
//
DWORD64 P1Home;
DWORD64 P2Home;
DWORD64 P3Home;
DWORD64 P4Home;
DWORD64 P5Home;
DWORD64 P6Home;
//
// Control flags.
//
DWORD ContextFlags;
DWORD MxCsr;
//
// Segment Registers and processor flags.
//
WORD SegCs;
WORD SegDs;
WORD SegEs;
WORD SegFs;
WORD SegGs;
WORD SegSs;
DWORD EFlags;
//
// Debug registers
//
DWORD64 Dr0;
DWORD64 Dr1;
DWORD64 Dr2;
DWORD64 Dr3;
DWORD64 Dr6;
DWORD64 Dr7;
//
// Integer registers.
//
DWORD64 Rax;
DWORD64 Rcx;
DWORD64 Rdx;
DWORD64 Rbx;
DWORD64 Rsp;
DWORD64 Rbp;
DWORD64 Rsi;
DWORD64 Rdi;
DWORD64 R8;
DWORD64 R9;
DWORD64 R10;
DWORD64 R11;
DWORD64 R12;
DWORD64 R13;
DWORD64 R14;
DWORD64 R15;
//
// Program counter.
//
DWORD64 Rip;
//
// Floating point state.
//
union {
XMM_SAVE_AREA32 FltSave;
struct {
M128A Header[2];
M128A Legacy[8];
M128A Xmm0;
M128A Xmm1;
M128A Xmm2;
M128A Xmm3;
M128A Xmm4;
M128A Xmm5;
M128A Xmm6;
M128A Xmm7;
M128A Xmm8;
M128A Xmm9;
M128A Xmm10;
M128A Xmm11;
M128A Xmm12;
M128A Xmm13;
M128A Xmm14;
M128A Xmm15;
} ;
} ;
//
// Vector registers.
//
M128A VectorRegister[26];
DWORD64 VectorControl;
//
// Special debug control registers.
//
DWORD64 DebugControl;
DWORD64 LastBranchToRip;
DWORD64 LastBranchFromRip;
DWORD64 LastExceptionToRip;
DWORD64 LastExceptionFromRip;
} CONTEXT, *PCONTEXT;
// end_ntoshvp
//
// Select platform-specific definitions
//
typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
typedef SCOPE_TABLE_AMD64 SCOPE_TABLE, *PSCOPE_TABLE;
//
// Define unwind information flags.
//
# 3853 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Define unwind history table structure.
//
typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
DWORD64 ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
typedef struct _UNWIND_HISTORY_TABLE {
DWORD Count;
BYTE LocalHint;
BYTE GlobalHint;
BYTE Search;
BYTE Once;
DWORD64 LowAddress;
DWORD64 HighAddress;
UNWIND_HISTORY_TABLE_ENTRY Entry[12];
} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
//
// Define dynamic function table entry.
//
typedef
PRUNTIME_FUNCTION
GET_RUNTIME_FUNCTION_CALLBACK (
DWORD64 ControlPc,
PVOID Context
);
typedef GET_RUNTIME_FUNCTION_CALLBACK *PGET_RUNTIME_FUNCTION_CALLBACK;
typedef
DWORD
OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK (
HANDLE Process,
PVOID TableAddress,
PDWORD Entries,
PRUNTIME_FUNCTION* Functions
);
typedef OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK *POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK;
//
// Define exception dispatch context structure.
//
typedef struct _DISPATCHER_CONTEXT {
DWORD64 ControlPc;
DWORD64 ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
DWORD64 EstablisherFrame;
DWORD64 TargetIp;
PCONTEXT ContextRecord;
PEXCEPTION_ROUTINE LanguageHandler;
PVOID HandlerData;
PUNWIND_HISTORY_TABLE HistoryTable;
DWORD ScopeIndex;
DWORD Fill0;
} DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT;
//
// Define exception filter and termination handler function types.
//
struct _EXCEPTION_POINTERS;
typedef
LONG
(*PEXCEPTION_FILTER) (
struct _EXCEPTION_POINTERS *ExceptionPointers,
PVOID EstablisherFrame
);
typedef
void
(*PTERMINATION_HANDLER) (
BOOLEAN _abnormal_termination,
PVOID EstablisherFrame
);
//
// Nonvolatile context pointer record.
//
typedef struct _KNONVOLATILE_CONTEXT_POINTERS {
union {
PM128A FloatingContext[16];
struct {
PM128A Xmm0;
PM128A Xmm1;
PM128A Xmm2;
PM128A Xmm3;
PM128A Xmm4;
PM128A Xmm5;
PM128A Xmm6;
PM128A Xmm7;
PM128A Xmm8;
PM128A Xmm9;
PM128A Xmm10;
PM128A Xmm11;
PM128A Xmm12;
PM128A Xmm13;
PM128A Xmm14;
PM128A Xmm15;
} ;
} ;
union {
PDWORD64 IntegerContext[16];
struct {
PDWORD64 Rax;
PDWORD64 Rcx;
PDWORD64 Rdx;
PDWORD64 Rbx;
PDWORD64 Rsp;
PDWORD64 Rbp;
PDWORD64 Rsi;
PDWORD64 Rdi;
PDWORD64 R8;
PDWORD64 R9;
PDWORD64 R10;
PDWORD64 R11;
PDWORD64 R12;
PDWORD64 R13;
PDWORD64 R14;
PDWORD64 R15;
} ;
} ;
} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
//
// Scope table structure definition.
//
typedef struct _SCOPE_TABLE_ARM {
DWORD Count;
struct
{
DWORD BeginAddress;
DWORD EndAddress;
DWORD HandlerAddress;
DWORD JumpTarget;
} ScopeRecord[1];
} SCOPE_TABLE_ARM, *PSCOPE_TABLE_ARM;
# 4965 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Scope table structure definition.
//
typedef struct _SCOPE_TABLE_ARM64 {
DWORD Count;
struct
{
DWORD BeginAddress;
DWORD EndAddress;
DWORD HandlerAddress;
DWORD JumpTarget;
} ScopeRecord[1];
} SCOPE_TABLE_ARM64, *PSCOPE_TABLE_ARM64;
// begin_ntddk begin_wdm begin_nthal begin_ntminiport begin_wx86
# 6126 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_ntoshvp
//
// Nonvolatile context pointer record.
//
typedef struct _KNONVOLATILE_CONTEXT_POINTERS_ARM64 {
PDWORD64 X19;
PDWORD64 X20;
PDWORD64 X21;
PDWORD64 X22;
PDWORD64 X23;
PDWORD64 X24;
PDWORD64 X25;
PDWORD64 X26;
PDWORD64 X27;
PDWORD64 X28;
PDWORD64 Fp;
PDWORD64 Lr;
PDWORD64 D8;
PDWORD64 D9;
PDWORD64 D10;
PDWORD64 D11;
PDWORD64 D12;
PDWORD64 D13;
PDWORD64 D14;
PDWORD64 D15;
} KNONVOLATILE_CONTEXT_POINTERS_ARM64, *PKNONVOLATILE_CONTEXT_POINTERS_ARM64;
# 6179 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
extern "C" {
//
// Assert exception.
//
# 6205 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
void
__int2c (
void
);
#pragma intrinsic(__int2c)
# 6329 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
}
// begin_ntoshvp
# 7493 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _LDT_ENTRY {
WORD LimitLow;
WORD BaseLow;
union {
struct {
BYTE BaseMid;
BYTE Flags1; // Declare as bytes to avoid alignment
BYTE Flags2; // Problems.
BYTE BaseHi;
} Bytes;
struct {
DWORD BaseMid : 8;
DWORD Type : 5;
DWORD Dpl : 2;
DWORD Pres : 1;
DWORD LimitHi : 4;
DWORD Sys : 1;
DWORD Reserved_0 : 1;
DWORD Default_Big : 1;
DWORD Granularity : 1;
DWORD BaseHi : 8;
} Bits;
} HighWord;
} LDT_ENTRY, *PLDT_ENTRY;
// begin_wdm begin_ntminiport
extern "C" {
__forceinline
CHAR
ReadAcquire8 (
CHAR const volatile *Source
)
{
CHAR Value;
Value = *Source;
return Value;
}
__forceinline
CHAR
ReadNoFence8 (
CHAR const volatile *Source
)
{
CHAR Value;
Value = *Source;
return Value;
}
__forceinline
void
WriteRelease8 (
CHAR volatile *Destination,
CHAR Value
)
{
*Destination = Value;
return;
}
__forceinline
void
WriteNoFence8 (
CHAR volatile *Destination,
CHAR Value
)
{
*Destination = Value;
return;
}
__forceinline
SHORT
ReadAcquire16 (
SHORT const volatile *Source
)
{
SHORT Value;
Value = *Source;
return Value;
}
__forceinline
SHORT
ReadNoFence16 (
SHORT const volatile *Source
)
{
SHORT Value;
Value = *Source;
return Value;
}
__forceinline
void
WriteRelease16 (
SHORT volatile *Destination,
SHORT Value
)
{
*Destination = Value;
return;
}
__forceinline
void
WriteNoFence16 (
SHORT volatile *Destination,
SHORT Value
)
{
*Destination = Value;
return;
}
__forceinline
LONG
ReadAcquire (
LONG const volatile *Source
)
{
LONG Value;
Value = *Source;
return Value;
}
__forceinline
LONG
ReadNoFence (
LONG const volatile *Source
)
{
LONG Value;
Value = *Source;
return Value;
}
__forceinline
void
WriteRelease (
LONG volatile *Destination,
LONG Value
)
{
*Destination = Value;
return;
}
__forceinline
void
WriteNoFence (
LONG volatile *Destination,
LONG Value
)
{
*Destination = Value;
return;
}
__forceinline
LONG64
ReadAcquire64 (
LONG64 const volatile *Source
)
{
LONG64 Value;
Value = *Source;
return Value;
}
__forceinline
LONG64
ReadNoFence64 (
LONG64 const volatile *Source
)
{
LONG64 Value;
Value = *Source;
return Value;
}
__forceinline
void
WriteRelease64 (
LONG64 volatile *Destination,
LONG64 Value
)
{
*Destination = Value;
return;
}
__forceinline
void
WriteNoFence64 (
LONG64 volatile *Destination,
LONG64 Value
)
{
*Destination = Value;
return;
}
}
//
// Define "raw" operations which have no ordering or atomicity semantics.
//
__forceinline
CHAR
ReadRaw8 (
CHAR const volatile *Source
)
{
CHAR Value;
Value = *(CHAR *)Source;
return Value;
}
__forceinline
void
WriteRaw8 (
CHAR volatile *Destination,
CHAR Value
)
{
*(CHAR *)Destination = Value;
return;
}
__forceinline
SHORT
ReadRaw16 (
SHORT const volatile *Source
)
{
SHORT Value;
Value = *(SHORT *)Source;
return Value;
}
__forceinline
void
WriteRaw16 (
SHORT volatile *Destination,
SHORT Value
)
{
*(SHORT *)Destination = Value;
return;
}
__forceinline
LONG
ReadRaw (
LONG const volatile *Source
)
{
LONG Value;
Value = *(LONG *)Source;
return Value;
}
__forceinline
void
WriteRaw (
LONG volatile *Destination,
LONG Value
)
{
*(LONG *)Destination = Value;
return;
}
__forceinline
LONG64
ReadRaw64 (
LONG64 const volatile *Source
)
{
LONG64 Value;
Value = *(LONG64 *)Source;
return Value;
}
__forceinline
void
WriteRaw64 (
LONG64 volatile *Destination,
LONG64 Value
)
{
*(LONG64 *)Destination = Value;
return;
}
//
// Define explicit read and write operations for derived types.
//
__forceinline
BYTE
ReadUCharAcquire (
BYTE const volatile *Source
)
{
return (BYTE )ReadAcquire8((PCHAR)Source);
}
__forceinline
BYTE
ReadUCharNoFence (
BYTE const volatile *Source
)
{
return (BYTE )ReadNoFence8((PCHAR)Source);
}
__forceinline
BYTE
ReadBooleanAcquire (
BOOLEAN const volatile *Source
)
{
return (BOOLEAN)ReadAcquire8((PCHAR)Source);
}
__forceinline
BYTE
ReadBooleanNoFence (
BOOLEAN const volatile *Source
)
{
return (BOOLEAN)ReadNoFence8((PCHAR)Source);
}
__forceinline
BYTE
ReadUCharRaw (
BYTE const volatile *Source
)
{
return (BYTE )ReadRaw8((PCHAR)Source);
}
__forceinline
void
WriteUCharRelease (
BYTE volatile *Destination,
BYTE Value
)
{
WriteRelease8((PCHAR)Destination, (CHAR)Value);
return;
}
__forceinline
void
WriteUCharNoFence (
BYTE volatile *Destination,
BYTE Value
)
{
WriteNoFence8((PCHAR)Destination, (CHAR)Value);
return;
}
__forceinline
void
WriteBooleanRelease (
BOOLEAN volatile *Destination,
BOOLEAN Value
)
{
WriteRelease8((PCHAR)Destination, (CHAR)Value);
return;
}
__forceinline
void
WriteBooleanNoFence (
BOOLEAN volatile *Destination,
BOOLEAN Value
)
{
WriteNoFence8((PCHAR)Destination, (CHAR)Value);
return;
}
__forceinline
void
WriteUCharRaw (
BYTE volatile *Destination,
BYTE Value
)
{
WriteRaw8((PCHAR)Destination, (CHAR)Value);
return;
}
__forceinline
WORD
ReadUShortAcquire (
WORD const volatile *Source
)
{
return (WORD )ReadAcquire16((PSHORT)Source);
}
__forceinline
WORD
ReadUShortNoFence (
WORD const volatile *Source
)
{
return (WORD )ReadNoFence16((PSHORT)Source);
}
__forceinline
WORD
ReadUShortRaw (
WORD const volatile *Source
)
{
return (WORD )ReadRaw16((PSHORT)Source);
}
__forceinline
void
WriteUShortRelease (
WORD volatile *Destination,
WORD Value
)
{
WriteRelease16((PSHORT)Destination, (SHORT)Value);
return;
}
__forceinline
void
WriteUShortNoFence (
WORD volatile *Destination,
WORD Value
)
{
WriteNoFence16((PSHORT)Destination, (SHORT)Value);
return;
}
__forceinline
void
WriteUShortRaw (
WORD volatile *Destination,
WORD Value
)
{
WriteRaw16((PSHORT)Destination, (SHORT)Value);
return;
}
__forceinline
DWORD
ReadULongAcquire (
DWORD const volatile *Source
)
{
return (DWORD)ReadAcquire((PLONG)Source);
}
__forceinline
DWORD
ReadULongNoFence (
DWORD const volatile *Source
)
{
return (DWORD)ReadNoFence((PLONG)Source);
}
__forceinline
DWORD
ReadULongRaw (
DWORD const volatile *Source
)
{
return (DWORD)ReadRaw((PLONG)Source);
}
__forceinline
void
WriteULongRelease (
DWORD volatile *Destination,
DWORD Value
)
{
WriteRelease((PLONG)Destination, (LONG)Value);
return;
}
__forceinline
void
WriteULongNoFence (
DWORD volatile *Destination,
DWORD Value
)
{
WriteNoFence((PLONG)Destination, (LONG)Value);
return;
}
__forceinline
void
WriteULongRaw (
DWORD volatile *Destination,
DWORD Value
)
{
WriteRaw((PLONG)Destination, (LONG)Value);
return;
}
__forceinline
DWORD64
ReadULong64Acquire (
DWORD64 const volatile *Source
)
{
return (DWORD64)ReadAcquire64((PLONG64)Source);
}
__forceinline
DWORD64
ReadULong64NoFence (
DWORD64 const volatile *Source
)
{
return (DWORD64)ReadNoFence64((PLONG64)Source);
}
__forceinline
DWORD64
ReadULong64Raw (
DWORD64 const volatile *Source
)
{
return (DWORD64)ReadRaw64((PLONG64)Source);
}
__forceinline
void
WriteULong64Release (
DWORD64 volatile *Destination,
DWORD64 Value
)
{
WriteRelease64((PLONG64)Destination, (LONG64)Value);
return;
}
__forceinline
void
WriteULong64NoFence (
DWORD64 volatile *Destination,
DWORD64 Value
)
{
WriteNoFence64((PLONG64)Destination, (LONG64)Value);
return;
}
__forceinline
void
WriteULong64Raw (
DWORD64 volatile *Destination,
DWORD64 Value
)
{
WriteRaw64((PLONG64)Destination, (LONG64)Value);
return;
}
# 8316 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__forceinline
PVOID
ReadPointerAcquire (
PVOID const volatile *Source
)
{
return (PVOID)ReadAcquire64((PLONG64)Source);
}
__forceinline
PVOID
ReadPointerNoFence (
PVOID const volatile *Source
)
{
return (PVOID)ReadNoFence64((PLONG64)Source);
}
__forceinline
PVOID
ReadPointerRaw (
PVOID const volatile *Source
)
{
return (PVOID)ReadRaw64((PLONG64)Source);
}
__forceinline
void
WritePointerRelease (
PVOID volatile *Destination,
PVOID Value
)
{
WriteRelease64((PLONG64)Destination, (LONG64)Value);
return;
}
__forceinline
void
WritePointerNoFence (
PVOID volatile *Destination,
PVOID Value
)
{
WriteNoFence64((PLONG64)Destination, (LONG64)Value);
return;
}
__forceinline
void
WritePointerRaw (
PVOID volatile *Destination,
PVOID Value
)
{
WriteRaw64((PLONG64)Destination, (LONG64)Value);
return;
}
# 8416 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_ntddk end_wdm end_ntminiport
# 8446 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Define the size of the 80387 save area, which is in the context frame.
//
typedef struct _WOW64_FLOATING_SAVE_AREA {
DWORD ControlWord;
DWORD StatusWord;
DWORD TagWord;
DWORD ErrorOffset;
DWORD ErrorSelector;
DWORD DataOffset;
DWORD DataSelector;
BYTE RegisterArea[80];
DWORD Cr0NpxState;
} WOW64_FLOATING_SAVE_AREA;
typedef WOW64_FLOATING_SAVE_AREA *PWOW64_FLOATING_SAVE_AREA;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared/pshpack4.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack4.h
Abstract:
This file turns 4 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#pragma warning(disable: 4103)
#pragma pack(push,4)
# 8468 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
//
// Context Frame
//
// This frame has a several purposes: 1) it is used as an argument to
// NtContinue, 2) is is used to constuct a call frame for APC delivery,
// and 3) it is used in the user level thread creation routines.
//
// The layout of the record conforms to a standard call frame.
//
typedef struct _WOW64_CONTEXT {
//
// The flags values within this flag control the contents of
// a CONTEXT record.
//
// If the context record is used as an input parameter, then
// for each portion of the context record controlled by a flag
// whose value is set, it is assumed that that portion of the
// context record contains valid context. If the context record
// is being used to modify a threads context, then only that
// portion of the threads context will be modified.
//
// If the context record is used as an IN OUT parameter to capture
// the context of a thread, then only those portions of the thread's
// context corresponding to set flags will be returned.
//
// The context record is never used as an OUT only parameter.
//
DWORD ContextFlags;
//
// This section is specified/returned if CONTEXT_DEBUG_REGISTERS is
// set in ContextFlags. Note that CONTEXT_DEBUG_REGISTERS is NOT
// included in CONTEXT_FULL.
//
DWORD Dr0;
DWORD Dr1;
DWORD Dr2;
DWORD Dr3;
DWORD Dr6;
DWORD Dr7;
//
// This section is specified/returned if the
// ContextFlags word contians the flag CONTEXT_FLOATING_POINT.
//
WOW64_FLOATING_SAVE_AREA FloatSave;
//
// This section is specified/returned if the
// ContextFlags word contians the flag CONTEXT_SEGMENTS.
//
DWORD SegGs;
DWORD SegFs;
DWORD SegEs;
DWORD SegDs;
//
// This section is specified/returned if the
// ContextFlags word contians the flag CONTEXT_INTEGER.
//
DWORD Edi;
DWORD Esi;
DWORD Ebx;
DWORD Edx;
DWORD Ecx;
DWORD Eax;
//
// This section is specified/returned if the
// ContextFlags word contians the flag CONTEXT_CONTROL.
//
DWORD Ebp;
DWORD Eip;
DWORD SegCs; // MUST BE SANITIZED
DWORD EFlags; // MUST BE SANITIZED
DWORD Esp;
DWORD SegSs;
//
// This section is specified/returned if the ContextFlags word
// contains the flag CONTEXT_EXTENDED_REGISTERS.
// The format and contexts are processor specific
//
BYTE ExtendedRegisters[512];
} WOW64_CONTEXT;
typedef WOW64_CONTEXT *PWOW64_CONTEXT;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared/poppack.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
poppack.h
Abstract:
This file turns packing of structures off. (That is, it enables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways.
poppack.h is the complement to pshpack?.h. An inclusion of poppack.h
MUST ALWAYS be preceded by an inclusion of one of pshpack?.h, in one-to-one
correspondence.
For Microsoft compatible compilers, this file uses the pop option
to the pack pragma so that it can restore the previous saved by the
pshpack?.h include file.
--*/
#pragma warning(disable: 4103)
#pragma pack(pop)
# 8568 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
typedef struct _WOW64_LDT_ENTRY {
WORD LimitLow;
WORD BaseLow;
union {
struct {
BYTE BaseMid;
BYTE Flags1; // Declare as bytes to avoid alignment
BYTE Flags2; // Problems.
BYTE BaseHi;
} Bytes;
struct {
DWORD BaseMid : 8;
DWORD Type : 5;
DWORD Dpl : 2;
DWORD Pres : 1;
DWORD LimitHi : 4;
DWORD Sys : 1;
DWORD Reserved_0 : 1;
DWORD Default_Big : 1;
DWORD Granularity : 1;
DWORD BaseHi : 8;
} Bits;
} HighWord;
} WOW64_LDT_ENTRY, *PWOW64_LDT_ENTRY;
typedef struct _WOW64_DESCRIPTOR_TABLE_ENTRY {
DWORD Selector;
WOW64_LDT_ENTRY Descriptor;
} WOW64_DESCRIPTOR_TABLE_ENTRY, *PWOW64_DESCRIPTOR_TABLE_ENTRY;
# 8618 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Exception record definition.
//
typedef struct _EXCEPTION_RECORD {
DWORD ExceptionCode;
DWORD ExceptionFlags;
struct _EXCEPTION_RECORD *ExceptionRecord;
PVOID ExceptionAddress;
DWORD NumberParameters;
ULONG_PTR ExceptionInformation[15];
} EXCEPTION_RECORD;
typedef EXCEPTION_RECORD *PEXCEPTION_RECORD;
typedef struct _EXCEPTION_RECORD32 {
DWORD ExceptionCode;
DWORD ExceptionFlags;
DWORD ExceptionRecord;
DWORD ExceptionAddress;
DWORD NumberParameters;
DWORD ExceptionInformation[15];
} EXCEPTION_RECORD32, *PEXCEPTION_RECORD32;
typedef struct _EXCEPTION_RECORD64 {
DWORD ExceptionCode;
DWORD ExceptionFlags;
DWORD64 ExceptionRecord;
DWORD64 ExceptionAddress;
DWORD NumberParameters;
DWORD __unusedAlignment;
DWORD64 ExceptionInformation[15];
} EXCEPTION_RECORD64, *PEXCEPTION_RECORD64;
//
// Typedef for pointer returned by exception_info()
//
typedef struct _EXCEPTION_POINTERS {
PEXCEPTION_RECORD ExceptionRecord;
PCONTEXT ContextRecord;
} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;
// end_ntoshvp
// end_wdm
# 8680 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef PVOID PACCESS_TOKEN;
typedef PVOID PSECURITY_DESCRIPTOR;
typedef PVOID PSID;
typedef PVOID PCLAIMS_BLOB;
////////////////////////////////////////////////////////////////////////
// //
// ACCESS MASK //
// //
////////////////////////////////////////////////////////////////////////
//
// Define the access mask as a longword sized structure divided up as
// follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---------------+---------------+-------------------------------+
// |G|G|G|G|Res'd|A| StandardRights| SpecificRights |
// |R|W|E|A| |S| | |
// +-+-------------+---------------+-------------------------------+
//
// typedef struct _ACCESS_MASK {
// WORD SpecificRights;
// BYTE StandardRights;
// BYTE AccessSystemAcl : 1;
// BYTE Reserved : 3;
// BYTE GenericAll : 1;
// BYTE GenericExecute : 1;
// BYTE GenericWrite : 1;
// BYTE GenericRead : 1;
// } ACCESS_MASK;
// typedef ACCESS_MASK *PACCESS_MASK;
//
// but to make life simple for programmer's we'll allow them to specify
// a desired access mask by simply OR'ing together mulitple single rights
// and treat an access mask as a DWORD. For example
//
// DesiredAccess = DELETE | READ_CONTROL
//
// So we'll declare ACCESS_MASK as DWORD
//
// begin_wdm
// begin_ntoshvp
typedef DWORD ACCESS_MASK;
typedef ACCESS_MASK *PACCESS_MASK;
// end_ntoshvp
// begin_access
////////////////////////////////////////////////////////////////////////
// //
// ACCESS TYPES //
// //
////////////////////////////////////////////////////////////////////////
// begin_wdm
//
// The following are masks for the predefined standard access types
//
# 8757 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// AccessSystemAcl access type
//
//
// MaximumAllowed access type
//
//
// These are the generic rights.
//
//
// Define the generic mapping array. This is used to denote the
// mapping of each generic access right to a specific access mask.
//
typedef struct _GENERIC_MAPPING {
ACCESS_MASK GenericRead;
ACCESS_MASK GenericWrite;
ACCESS_MASK GenericExecute;
ACCESS_MASK GenericAll;
} GENERIC_MAPPING;
typedef GENERIC_MAPPING *PGENERIC_MAPPING;
////////////////////////////////////////////////////////////////////////
// //
// LUID_AND_ATTRIBUTES //
// //
////////////////////////////////////////////////////////////////////////
//
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\pshpack4.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack4.h
Abstract:
This file turns 4 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#pragma warning(disable: 4103)
#pragma pack(push,4)
# 8802 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
typedef struct _LUID_AND_ATTRIBUTES {
LUID Luid;
DWORD Attributes;
} LUID_AND_ATTRIBUTES, * PLUID_AND_ATTRIBUTES;
typedef LUID_AND_ATTRIBUTES LUID_AND_ATTRIBUTES_ARRAY[1];
typedef LUID_AND_ATTRIBUTES_ARRAY *PLUID_AND_ATTRIBUTES_ARRAY;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\poppack.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
poppack.h
Abstract:
This file turns packing of structures off. (That is, it enables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways.
poppack.h is the complement to pshpack?.h. An inclusion of poppack.h
MUST ALWAYS be preceded by an inclusion of one of pshpack?.h, in one-to-one
correspondence.
For Microsoft compatible compilers, this file uses the pop option
to the pack pragma so that it can restore the previous saved by the
pshpack?.h include file.
--*/
#pragma warning(disable: 4103)
#pragma pack(pop)
# 8811 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
////////////////////////////////////////////////////////////////////////
// //
// Security Id (SID) //
// //
////////////////////////////////////////////////////////////////////////
//
//
// Pictorially the structure of an SID is as follows:
//
// 1 1 1 1 1 1
// 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---------------------------------------------------------------+
// | SubAuthorityCount |Reserved1 (SBZ)| Revision |
// +---------------------------------------------------------------+
// | IdentifierAuthority[0] |
// +---------------------------------------------------------------+
// | IdentifierAuthority[1] |
// +---------------------------------------------------------------+
// | IdentifierAuthority[2] |
// +---------------------------------------------------------------+
// | |
// +- - - - - - - - SubAuthority[] - - - - - - - - -+
// | |
// +---------------------------------------------------------------+
//
//
// begin_ntifs
typedef struct _SID_IDENTIFIER_AUTHORITY {
BYTE Value[6];
} SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
typedef struct _SID {
BYTE Revision;
BYTE SubAuthorityCount;
SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
DWORD SubAuthority[1];
} SID, *PISID;
// in a future release.
// 2 (S-)
// 4 (Rev(max: 255)-)
// 15 (
// If (Auth < 2^32): Auth(max:4294967295)-
// Else: 0xAuth(max:FFFFFFFFFFFF)-
// )
// (11 * SID_MAX_SUB_AUTHORITIES) (SubN(max:4294967295)-)
// 1 (NULL character)
// = 187 (assuming SID_MAX_SUB_AUTHORITIES = 15)
//
// Union which can hold any valid sid.
//
typedef union _SE_SID {
SID Sid;
BYTE Buffer[(sizeof(SID) - sizeof(DWORD) + ((15) * sizeof(DWORD)))];
} SE_SID, *PSE_SID;
typedef enum _SID_NAME_USE {
SidTypeUser = 1,
SidTypeGroup,
SidTypeDomain,
SidTypeAlias,
SidTypeWellKnownGroup,
SidTypeDeletedAccount,
SidTypeInvalid,
SidTypeUnknown,
SidTypeComputer,
SidTypeLabel,
SidTypeLogonSession
} SID_NAME_USE, *PSID_NAME_USE;
typedef struct _SID_AND_ATTRIBUTES {
PSID Sid;
DWORD Attributes;
} SID_AND_ATTRIBUTES, * PSID_AND_ATTRIBUTES;
typedef SID_AND_ATTRIBUTES SID_AND_ATTRIBUTES_ARRAY[1];
typedef SID_AND_ATTRIBUTES_ARRAY *PSID_AND_ATTRIBUTES_ARRAY;
typedef ULONG_PTR SID_HASH_ENTRY, *PSID_HASH_ENTRY;
typedef struct _SID_AND_ATTRIBUTES_HASH {
DWORD SidCount;
PSID_AND_ATTRIBUTES SidAttr;
SID_HASH_ENTRY Hash[32];
} SID_AND_ATTRIBUTES_HASH, *PSID_AND_ATTRIBUTES_HASH;
/////////////////////////////////////////////////////////////////////////////
// //
// Universal well-known SIDs //
// //
// Null SID S-1-0-0 //
// World S-1-1-0 //
// Local S-1-2-0 //
// Creator Owner ID S-1-3-0 //
// Creator Group ID S-1-3-1 //
// Creator Owner Server ID S-1-3-2 //
// Creator Group Server ID S-1-3-3 //
// //
// (Non-unique IDs) S-1-4 //
// //
/////////////////////////////////////////////////////////////////////////////
# 8975 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
///////////////////////////////////////////////////////////////////////////////
// //
// NT well-known SIDs //
// //
// NT Authority S-1-5 //
// Dialup S-1-5-1 //
// //
// Network S-1-5-2 //
// Batch S-1-5-3 //
// Interactive S-1-5-4 //
// (Logon IDs) S-1-5-5-X-Y //
// Service S-1-5-6 //
// AnonymousLogon S-1-5-7 (aka null logon session) //
// Proxy S-1-5-8 //
// Enterprise DC (EDC) S-1-5-9 (aka domain controller account) //
// Self S-1-5-10 (self RID) //
// Authenticated User S-1-5-11 (Authenticated user somewhere) //
// Restricted Code S-1-5-12 (Running restricted code) //
// Terminal Server S-1-5-13 (Running on Terminal Server) //
// Remote Logon S-1-5-14 (Remote Interactive Logon) //
// This Organization S-1-5-15 //
// //
// IUser S-1-5-17
// Local System S-1-5-18 //
// Local Service S-1-5-19 //
// Network Service S-1-5-20 //
// //
// (NT non-unique IDs) S-1-5-0x15-... (NT Domain Sids) //
// //
// (Built-in domain) S-1-5-0x20 //
// //
// (Security Package IDs) S-1-5-0x40 //
// NTLM Authentication S-1-5-0x40-10 //
// SChannel Authentication S-1-5-0x40-14 //
// Digest Authentication S-1-5-0x40-21 //
// //
// Other Organization S-1-5-1000 (>=1000 can not be filtered) //
// //
// //
// NOTE: the relative identifier values (RIDs) determine which security //
// boundaries the SID is allowed to cross. Before adding new RIDs, //
// a determination needs to be made regarding which range they should //
// be added to in order to ensure proper "SID filtering" //
// //
///////////////////////////////////////////////////////////////////////////////
# 9117 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
//Service SID type RIDs are in the range 0x50- 0x6F. Therefore, we are giving the next available RID to Windows Mobile team.
//
//
// Installer Capability Group Sid related. Currently Base RID is same as LOCAL DOMAIN.
//
// Note: This is because the App Capability Rid is S-1-15-3-1024-...
// whereas the service group rid is S-1-5-32-...
// The number of RIDs from hash (8) are the same for both
//
//Well-known group for local accounts
//
/////////////////////////////////////////////////////////////////////////////
// //
// well-known domain relative sub-authority values (RIDs)... //
// //
/////////////////////////////////////////////////////////////////////////////
# 9152 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// Well-known users ...
# 9162 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// well-known groups ...
# 9180 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// well-known aliases ...
# 9219 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Application Package Authority.
//
# 9235 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Built-in Packages.
//
//
// Built-in Capabilities.
//
# 9261 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Mandatory Label Authority.
//
# 9274 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// SECURITY_MANDATORY_MAXIMUM_USER_RID is the highest RID that
// can be set by a usermode caller.
//
//
// Authentication Authority
//
# 9298 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Process Trust Authority
//
# 9314 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Trusted Installer RIDs
//
# 9328 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Well known SID definitions for lookup.
//
typedef enum {
WinNullSid = 0,
WinWorldSid = 1,
WinLocalSid = 2,
WinCreatorOwnerSid = 3,
WinCreatorGroupSid = 4,
WinCreatorOwnerServerSid = 5,
WinCreatorGroupServerSid = 6,
WinNtAuthoritySid = 7,
WinDialupSid = 8,
WinNetworkSid = 9,
WinBatchSid = 10,
WinInteractiveSid = 11,
WinServiceSid = 12,
WinAnonymousSid = 13,
WinProxySid = 14,
WinEnterpriseControllersSid = 15,
WinSelfSid = 16,
WinAuthenticatedUserSid = 17,
WinRestrictedCodeSid = 18,
WinTerminalServerSid = 19,
WinRemoteLogonIdSid = 20,
WinLogonIdsSid = 21,
WinLocalSystemSid = 22,
WinLocalServiceSid = 23,
WinNetworkServiceSid = 24,
WinBuiltinDomainSid = 25,
WinBuiltinAdministratorsSid = 26,
WinBuiltinUsersSid = 27,
WinBuiltinGuestsSid = 28,
WinBuiltinPowerUsersSid = 29,
WinBuiltinAccountOperatorsSid = 30,
WinBuiltinSystemOperatorsSid = 31,
WinBuiltinPrintOperatorsSid = 32,
WinBuiltinBackupOperatorsSid = 33,
WinBuiltinReplicatorSid = 34,
WinBuiltinPreWindows2000CompatibleAccessSid = 35,
WinBuiltinRemoteDesktopUsersSid = 36,
WinBuiltinNetworkConfigurationOperatorsSid = 37,
WinAccountAdministratorSid = 38,
WinAccountGuestSid = 39,
WinAccountKrbtgtSid = 40,
WinAccountDomainAdminsSid = 41,
WinAccountDomainUsersSid = 42,
WinAccountDomainGuestsSid = 43,
WinAccountComputersSid = 44,
WinAccountControllersSid = 45,
WinAccountCertAdminsSid = 46,
WinAccountSchemaAdminsSid = 47,
WinAccountEnterpriseAdminsSid = 48,
WinAccountPolicyAdminsSid = 49,
WinAccountRasAndIasServersSid = 50,
WinNTLMAuthenticationSid = 51,
WinDigestAuthenticationSid = 52,
WinSChannelAuthenticationSid = 53,
WinThisOrganizationSid = 54,
WinOtherOrganizationSid = 55,
WinBuiltinIncomingForestTrustBuildersSid = 56,
WinBuiltinPerfMonitoringUsersSid = 57,
WinBuiltinPerfLoggingUsersSid = 58,
WinBuiltinAuthorizationAccessSid = 59,
WinBuiltinTerminalServerLicenseServersSid = 60,
WinBuiltinDCOMUsersSid = 61,
WinBuiltinIUsersSid = 62,
WinIUserSid = 63,
WinBuiltinCryptoOperatorsSid = 64,
WinUntrustedLabelSid = 65,
WinLowLabelSid = 66,
WinMediumLabelSid = 67,
WinHighLabelSid = 68,
WinSystemLabelSid = 69,
WinWriteRestrictedCodeSid = 70,
WinCreatorOwnerRightsSid = 71,
WinCacheablePrincipalsGroupSid = 72,
WinNonCacheablePrincipalsGroupSid = 73,
WinEnterpriseReadonlyControllersSid = 74,
WinAccountReadonlyControllersSid = 75,
WinBuiltinEventLogReadersGroup = 76,
WinNewEnterpriseReadonlyControllersSid = 77,
WinBuiltinCertSvcDComAccessGroup = 78,
WinMediumPlusLabelSid = 79,
WinLocalLogonSid = 80,
WinConsoleLogonSid = 81,
WinThisOrganizationCertificateSid = 82,
WinApplicationPackageAuthoritySid = 83,
WinBuiltinAnyPackageSid = 84,
WinCapabilityInternetClientSid = 85,
WinCapabilityInternetClientServerSid = 86,
WinCapabilityPrivateNetworkClientServerSid = 87,
WinCapabilityPicturesLibrarySid = 88,
WinCapabilityVideosLibrarySid = 89,
WinCapabilityMusicLibrarySid = 90,
WinCapabilityDocumentsLibrarySid = 91,
WinCapabilitySharedUserCertificatesSid = 92,
WinCapabilityEnterpriseAuthenticationSid = 93,
WinCapabilityRemovableStorageSid = 94,
WinBuiltinRDSRemoteAccessServersSid = 95,
WinBuiltinRDSEndpointServersSid = 96,
WinBuiltinRDSManagementServersSid = 97,
WinUserModeDriversSid = 98,
WinBuiltinHyperVAdminsSid = 99,
WinAccountCloneableControllersSid = 100,
WinBuiltinAccessControlAssistanceOperatorsSid = 101,
WinBuiltinRemoteManagementUsersSid = 102,
WinAuthenticationAuthorityAssertedSid = 103,
WinAuthenticationServiceAssertedSid = 104,
WinLocalAccountSid = 105,
WinLocalAccountAndAdministratorSid = 106,
WinAccountProtectedUsersSid = 107,
WinCapabilityAppointmentsSid = 108,
WinCapabilityContactsSid = 109,
WinAccountDefaultSystemManagedSid = 110,
WinBuiltinDefaultSystemManagedGroupSid = 111,
WinBuiltinStorageReplicaAdminsSid = 112,
WinAccountKeyAdminsSid = 113,
WinAccountEnterpriseKeyAdminsSid = 114,
WinAuthenticationKeyTrustSid = 115,
WinAuthenticationKeyPropertyMFASid = 116,
WinAuthenticationKeyPropertyAttestationSid = 117,
WinAuthenticationFreshKeyAuthSid = 118,
} WELL_KNOWN_SID_TYPE;
//
// Allocate the System Luid. The first 1000 LUIDs are reserved.
// Use #999 here (0x3e7 = 999)
//
// end_ntifs
////////////////////////////////////////////////////////////////////////
// //
// User and Group related SID attributes //
// //
////////////////////////////////////////////////////////////////////////
//
// Group attributes
//
# 9498 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// User attributes
//
// (None yet defined.)
////////////////////////////////////////////////////////////////////////
// //
// ACL and ACE //
// //
////////////////////////////////////////////////////////////////////////
//
// Define an ACL and the ACE format. The structure of an ACL header
// followed by one or more ACEs. Pictorally the structure of an ACL header
// is as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +-------------------------------+---------------+---------------+
// | AclSize | Sbz1 | AclRevision |
// +-------------------------------+---------------+---------------+
// | Sbz2 | AceCount |
// +-------------------------------+-------------------------------+
//
// The current AclRevision is defined to be ACL_REVISION.
//
// AclSize is the size, in bytes, allocated for the ACL. This includes
// the ACL header, ACES, and remaining free space in the buffer.
//
// AceCount is the number of ACES in the ACL.
//
// begin_wdm
// This is the *current* ACL revision
// This is the history of ACL revisions. Add a new one whenever
// ACL_REVISION is updated
# 9550 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _ACL {
BYTE AclRevision;
BYTE Sbz1;
WORD AclSize;
WORD AceCount;
WORD Sbz2;
} ACL;
typedef ACL *PACL;
// end_wdm
// begin_ntifs
//
// The structure of an ACE is a common ace header followed by ace type
// specific data. Pictorally the structure of the common ace header is
// as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---------------+-------+-------+---------------+---------------+
// | AceSize | AceFlags | AceType |
// +---------------+-------+-------+---------------+---------------+
//
// AceType denotes the type of the ace, there are some predefined ace
// types
//
// AceSize is the size, in bytes, of ace.
//
// AceFlags are the Ace flags for audit and inheritance, defined shortly.
typedef struct _ACE_HEADER {
BYTE AceType;
BYTE AceFlags;
WORD AceSize;
} ACE_HEADER;
typedef ACE_HEADER *PACE_HEADER;
//
// The following are the predefined ace types that go into the AceType
// field of an Ace header.
//
# 9629 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// The following are the inherit flags that go into the AceFlags field
// of an Ace header.
//
# 9642 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// The following are the currently defined ACE flags that go into the
// AceFlags field of an ACE header. Each ACE type has its own set of
// AceFlags.
//
//
//
// SYSTEM_AUDIT and SYSTEM_ALARM AceFlags
//
// These control the signaling of audit and alarms for success or failure.
//
// SUCCESSFUL_ACCESS_ACE_FLAG - used only with system audit and alarm ACE
// types to indicate that a message is generated for successful accesses.
//
// FAILED_ACCESS_ACE_FLAG - used only with system audit and alarm ACE types
// to indicate that a message is generated for failed accesses.
//
//
// SYSTEM_ACCESS_FILTER_ACE AceFlags
//
// These control the behaviour of SYSTEM_ACCESS_FILTER_ACE .
//
// TRUST_PROTECTED_FILTER_ACE_FLAG - used only with SYSTEM_FILTERING_ACE_TYPE
// ACEs to indicate that this ACE may not be deleted/modified except when the,
// the current Trust Level dominates the one specified in the Ace SID.
// If this flag is set then the SID in the ACE should be a valid TrustLevelSid.
//
//
// We'll define the structure of the predefined ACE types. Pictorally
// the structure of the predefined ACE's is as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---------------+-------+-------+---------------+---------------+
// | AceFlags | Resd |Inherit| AceSize | AceType |
// +---------------+-------+-------+---------------+---------------+
// | Mask |
// +---------------------------------------------------------------+
// | |
// + +
// | |
// + Sid +
// | |
// + +
// | |
// +---------------------------------------------------------------+
//
// Mask is the access mask associated with the ACE. This is either the
// access allowed, access denied, audit, or alarm mask.
//
// Sid is the Sid associated with the ACE.
//
// The following are the four predefined ACE types.
// Examine the AceType field in the Header to determine
// which structure is appropriate to use for casting.
typedef struct _ACCESS_ALLOWED_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} ACCESS_ALLOWED_ACE;
typedef ACCESS_ALLOWED_ACE *PACCESS_ALLOWED_ACE;
typedef struct _ACCESS_DENIED_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} ACCESS_DENIED_ACE;
typedef ACCESS_DENIED_ACE *PACCESS_DENIED_ACE;
typedef struct _SYSTEM_AUDIT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_AUDIT_ACE;
typedef SYSTEM_AUDIT_ACE *PSYSTEM_AUDIT_ACE;
typedef struct _SYSTEM_ALARM_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_ALARM_ACE;
typedef SYSTEM_ALARM_ACE *PSYSTEM_ALARM_ACE;
typedef struct _SYSTEM_RESOURCE_ATTRIBUTE_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
// Sid followed by CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 structure
} SYSTEM_RESOURCE_ATTRIBUTE_ACE, *PSYSTEM_RESOURCE_ATTRIBUTE_ACE;
typedef struct _SYSTEM_SCOPED_POLICY_ID_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_SCOPED_POLICY_ID_ACE, *PSYSTEM_SCOPED_POLICY_ID_ACE;
typedef struct _SYSTEM_MANDATORY_LABEL_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_MANDATORY_LABEL_ACE, *PSYSTEM_MANDATORY_LABEL_ACE;
typedef struct _SYSTEM_PROCESS_TRUST_LABEL_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_PROCESS_TRUST_LABEL_ACE, *PSYSTEM_PROCESS_TRUST_LABEL_ACE;
typedef struct _SYSTEM_ACCESS_FILTER_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
// Filter Condition follows the SID
} SYSTEM_ACCESS_FILTER_ACE, *PSYSTEM_ACCESS_FILTER_ACE;
# 9778 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// Placeholder value that allows all ranges
// end_ntifs
typedef struct _ACCESS_ALLOWED_OBJECT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} ACCESS_ALLOWED_OBJECT_ACE, *PACCESS_ALLOWED_OBJECT_ACE;
typedef struct _ACCESS_DENIED_OBJECT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} ACCESS_DENIED_OBJECT_ACE, *PACCESS_DENIED_OBJECT_ACE;
typedef struct _SYSTEM_AUDIT_OBJECT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} SYSTEM_AUDIT_OBJECT_ACE, *PSYSTEM_AUDIT_OBJECT_ACE;
typedef struct _SYSTEM_ALARM_OBJECT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} SYSTEM_ALARM_OBJECT_ACE, *PSYSTEM_ALARM_OBJECT_ACE;
//
// Callback ace support in post Win2000.
// Resource managers can put their own data after Sidstart + Length of the sid
//
typedef struct _ACCESS_ALLOWED_CALLBACK_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
// Opaque resource manager specific data
} ACCESS_ALLOWED_CALLBACK_ACE, *PACCESS_ALLOWED_CALLBACK_ACE;
typedef struct _ACCESS_DENIED_CALLBACK_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
// Opaque resource manager specific data
} ACCESS_DENIED_CALLBACK_ACE, *PACCESS_DENIED_CALLBACK_ACE;
typedef struct _SYSTEM_AUDIT_CALLBACK_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
// Opaque resource manager specific data
} SYSTEM_AUDIT_CALLBACK_ACE, *PSYSTEM_AUDIT_CALLBACK_ACE;
typedef struct _SYSTEM_ALARM_CALLBACK_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
// Opaque resource manager specific data
} SYSTEM_ALARM_CALLBACK_ACE, *PSYSTEM_ALARM_CALLBACK_ACE;
typedef struct _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
// Opaque resource manager specific data
} ACCESS_ALLOWED_CALLBACK_OBJECT_ACE, *PACCESS_ALLOWED_CALLBACK_OBJECT_ACE;
typedef struct _ACCESS_DENIED_CALLBACK_OBJECT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
// Opaque resource manager specific data
} ACCESS_DENIED_CALLBACK_OBJECT_ACE, *PACCESS_DENIED_CALLBACK_OBJECT_ACE;
typedef struct _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
// Opaque resource manager specific data
} SYSTEM_AUDIT_CALLBACK_OBJECT_ACE, *PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE;
typedef struct _SYSTEM_ALARM_CALLBACK_OBJECT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
// Opaque resource manager specific data
} SYSTEM_ALARM_CALLBACK_OBJECT_ACE, *PSYSTEM_ALARM_CALLBACK_OBJECT_ACE;
//
// Currently define Flags for "OBJECT" ACE types.
//
//
// The following declarations are used for setting and querying information
// about and ACL. First are the various information classes available to
// the user.
//
typedef enum _ACL_INFORMATION_CLASS {
AclRevisionInformation = 1,
AclSizeInformation
} ACL_INFORMATION_CLASS;
//
// This record is returned/sent if the user is requesting/setting the
// AclRevisionInformation
//
typedef struct _ACL_REVISION_INFORMATION {
DWORD AclRevision;
} ACL_REVISION_INFORMATION;
typedef ACL_REVISION_INFORMATION *PACL_REVISION_INFORMATION;
//
// This record is returned if the user is requesting AclSizeInformation
//
typedef struct _ACL_SIZE_INFORMATION {
DWORD AceCount;
DWORD AclBytesInUse;
DWORD AclBytesFree;
} ACL_SIZE_INFORMATION;
typedef ACL_SIZE_INFORMATION *PACL_SIZE_INFORMATION;
////////////////////////////////////////////////////////////////////////
// //
// SECURITY_DESCRIPTOR //
// //
////////////////////////////////////////////////////////////////////////
//
// Define the Security Descriptor and related data types.
// This is an opaque data structure.
//
// begin_wdm
//
// Current security descriptor revision value
//
// end_wdm
// begin_ntifs
typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
# 9977 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Where:
//
// SE_OWNER_DEFAULTED - This boolean flag, when set, indicates that the
// SID pointed to by the Owner field was provided by a
// defaulting mechanism rather than explicitly provided by the
// original provider of the security descriptor. This may
// affect the treatment of the SID with respect to inheritence
// of an owner.
//
// SE_GROUP_DEFAULTED - This boolean flag, when set, indicates that the
// SID in the Group field was provided by a defaulting mechanism
// rather than explicitly provided by the original provider of
// the security descriptor. This may affect the treatment of
// the SID with respect to inheritence of a primary group.
//
// SE_DACL_PRESENT - This boolean flag, when set, indicates that the
// security descriptor contains a discretionary ACL. If this
// flag is set and the Dacl field of the SECURITY_DESCRIPTOR is
// null, then a null ACL is explicitly being specified.
//
// SE_DACL_DEFAULTED - This boolean flag, when set, indicates that the
// ACL pointed to by the Dacl field was provided by a defaulting
// mechanism rather than explicitly provided by the original
// provider of the security descriptor. This may affect the
// treatment of the ACL with respect to inheritence of an ACL.
// This flag is ignored if the DaclPresent flag is not set.
//
// SE_SACL_PRESENT - This boolean flag, when set, indicates that the
// security descriptor contains a system ACL pointed to by the
// Sacl field. If this flag is set and the Sacl field of the
// SECURITY_DESCRIPTOR is null, then an empty (but present)
// ACL is being specified.
//
// SE_SACL_DEFAULTED - This boolean flag, when set, indicates that the
// ACL pointed to by the Sacl field was provided by a defaulting
// mechanism rather than explicitly provided by the original
// provider of the security descriptor. This may affect the
// treatment of the ACL with respect to inheritence of an ACL.
// This flag is ignored if the SaclPresent flag is not set.
//
// SE_SELF_RELATIVE - This boolean flag, when set, indicates that the
// security descriptor is in self-relative form. In this form,
// all fields of the security descriptor are contiguous in memory
// and all pointer fields are expressed as offsets from the
// beginning of the security descriptor. This form is useful
// for treating security descriptors as opaque data structures
// for transmission in communication protocol or for storage on
// secondary media.
//
//
//
// Pictorially the structure of a security descriptor is as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---------------------------------------------------------------+
// | Control |Reserved1 (SBZ)| Revision |
// +---------------------------------------------------------------+
// | Owner |
// +---------------------------------------------------------------+
// | Group |
// +---------------------------------------------------------------+
// | Sacl |
// +---------------------------------------------------------------+
// | Dacl |
// +---------------------------------------------------------------+
//
// In general, this data structure should be treated opaquely to ensure future
// compatibility.
//
//
typedef struct _SECURITY_DESCRIPTOR_RELATIVE {
BYTE Revision;
BYTE Sbz1;
SECURITY_DESCRIPTOR_CONTROL Control;
DWORD Owner;
DWORD Group;
DWORD Sacl;
DWORD Dacl;
} SECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE;
typedef struct _SECURITY_DESCRIPTOR {
BYTE Revision;
BYTE Sbz1;
SECURITY_DESCRIPTOR_CONTROL Control;
PSID Owner;
PSID Group;
PACL Sacl;
PACL Dacl;
} SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
typedef struct _SECURITY_OBJECT_AI_PARAMS {
DWORD Size; //Set to sizeof(SECURITY_OBJECT_AI_PARAMS)
DWORD ConstraintMask;
} SECURITY_OBJECT_AI_PARAMS, *PSECURITY_OBJECT_AI_PARAMS;
// end_ntifs
// Where:
//
// Revision - Contains the revision level of the security
// descriptor. This allows this structure to be passed between
// systems or stored on disk even though it is expected to
// change in the future.
//
// Control - A set of flags which qualify the meaning of the
// security descriptor or individual fields of the security
// descriptor.
//
// Owner - is a pointer to an SID representing an object's owner.
// If this field is null, then no owner SID is present in the
// security descriptor. If the security descriptor is in
// self-relative form, then this field contains an offset to
// the SID, rather than a pointer.
//
// Group - is a pointer to an SID representing an object's primary
// group. If this field is null, then no primary group SID is
// present in the security descriptor. If the security descriptor
// is in self-relative form, then this field contains an offset to
// the SID, rather than a pointer.
//
// Sacl - is a pointer to a system ACL. This field value is only
// valid if the DaclPresent control flag is set. If the
// SaclPresent flag is set and this field is null, then a null
// ACL is specified. If the security descriptor is in
// self-relative form, then this field contains an offset to
// the ACL, rather than a pointer.
//
// Dacl - is a pointer to a discretionary ACL. This field value is
// only valid if the DaclPresent control flag is set. If the
// DaclPresent flag is set and this field is null, then a null
// ACL (unconditionally granting access) is specified. If the
// security descriptor is in self-relative form, then this field
// contains an offset to the ACL, rather than a pointer.
//
////////////////////////////////////////////////////////////////////////
// //
// Object Type list for AccessCheckByType //
// //
////////////////////////////////////////////////////////////////////////
typedef struct _OBJECT_TYPE_LIST {
WORD Level;
WORD Sbz;
GUID *ObjectType;
} OBJECT_TYPE_LIST, *POBJECT_TYPE_LIST;
//
// DS values for Level
//
//
// Parameters to NtAccessCheckByTypeAndAditAlarm
//
typedef enum _AUDIT_EVENT_TYPE {
AuditEventObjectAccess,
AuditEventDirectoryServiceAccess
} AUDIT_EVENT_TYPE, *PAUDIT_EVENT_TYPE;
//
// DS values for Source and ObjectTypeName
//
////////////////////////////////////////////////////////////////////////
// //
// Privilege Related Data Structures //
// //
////////////////////////////////////////////////////////////////////////
// end_ntifs
// begin_wdm
//
// Privilege attributes
//
# 10186 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Privilege Set Control flags
//
//
// Privilege Set - This is defined for a privilege set of one.
// If more than one privilege is needed, then this structure
// will need to be allocated with more space.
//
// Note: don't change this structure without fixing the INITIAL_PRIVILEGE_SET
// structure (defined in se.h)
//
typedef struct _PRIVILEGE_SET {
DWORD PrivilegeCount;
DWORD Control;
LUID_AND_ATTRIBUTES Privilege[1];
} PRIVILEGE_SET, * PPRIVILEGE_SET;
//
// Values for different access granted\denied reasons:
// AccessReasonAceN = AccessReasonAce + N.
// AccessReasonPrivilegeN = AccessReasonPrivilege + N.
//
typedef enum _ACCESS_REASON_TYPE{
AccessReasonNone = 0x00000000, // Indicate no reason for the bit. The bit may not be checked, or just no known reason.
//
// The lowest 2 bytes store the index of the ACE that grant/deny this bit.
// If the corresponding access mask is zero, then it is deny ACE; otherwise,
// it is allow ACE.
//
AccessReasonAllowedAce = 0x00010000, // Granted a permission.
AccessReasonDeniedAce = 0x00020000, // Denied a permission.
AccessReasonAllowedParentAce = 0x00030000, // Granted a permission from parent ACE
AccessReasonDeniedParentAce = 0x00040000, // Denied a permission from parent ACE
AccessReasonNotGrantedByCape = 0x00050000, // A CAPE didn't grant the permission
AccessReasonNotGrantedByParentCape = 0x00060000, // A CAPE from the parent's SD didn't grant the permission
AccessReasonNotGrantedToAppContainer = 0x00070000, // This is an AppContainer and no ACE granted the permission.
AccessReasonMissingPrivilege = 0x00100000,
AccessReasonFromPrivilege = 0x00200000,
AccessReasonIntegrityLevel = 0x00300000,
AccessReasonOwnership = 0x00400000,
AccessReasonNullDacl = 0x00500000,
AccessReasonEmptyDacl = 0x00600000,
AccessReasonNoSD = 0x00700000,
AccessReasonNoGrant = 0x00800000, // this access bit is not granted by any ACE.
AccessReasonTrustLabel = 0x00900000, // The trust label ACE did not grant this access.
AccessReasonFilterAce = 0x00a00000 // The filtering ACE did not grant this access
}
ACCESS_REASON_TYPE;
//
// Structure to hold access denied\granted reason for every bit of ACCESS_MASK.
// There are 32-bits in ACCESS_MASK and only 27-bits are actually valid on
// return from AccessCheck because MAXIMUM_ALLOWED, GENERIC_READ,
// GENERIC_WRITE, GENERIC_EXECUTE, and GENERIC_ALL are never returned.
//
// The content in Data fields depends on the Access Reason, for example,
// if the reason is AccessReasonAce, the Data will be the ACE ID.
// If there are more than one reason (more than one bit is set), the array size
// of the Data is equal to the number of bits set (or number of reasons).
// The Data could be null for a particular reason.
//
typedef DWORD ACCESS_REASON;
typedef struct _ACCESS_REASONS{
ACCESS_REASON Data[32];
} ACCESS_REASONS, *PACCESS_REASONS;
/*
The following data structures are defined to consolidate various falvors of
access check functions. In particular for Windows 7, the new access check
function will enable security attribute check, plus returning the reason
for a access check result.
The new access check function based on these data structures will
form the foundation to reimplement other flavors of access check
functions.
*/
//
// Structure to hold pointer to security descriptor and its unique id, which
// can be used for caching access check results.
// (NOTE NOTE) The cache key can be constructed by SecurityDescriptorId, Token and
// PrincipalSelfSid. Watch how GenericMapping affects the cache results.
//
typedef struct _SE_SECURITY_DESCRIPTOR
{
DWORD Size;
DWORD Flags;
PSECURITY_DESCRIPTOR SecurityDescriptor;
} SE_SECURITY_DESCRIPTOR, *PSE_SECURITY_DESCRIPTOR;
typedef struct _SE_ACCESS_REQUEST
{
DWORD Size;
PSE_SECURITY_DESCRIPTOR SeSecurityDescriptor;
ACCESS_MASK DesiredAccess;
ACCESS_MASK PreviouslyGrantedAccess;
PSID PrincipalSelfSid; // Need to watch how this field affects the cache.
PGENERIC_MAPPING GenericMapping;
DWORD ObjectTypeListCount;
POBJECT_TYPE_LIST ObjectTypeList;
} SE_ACCESS_REQUEST, *PSE_ACCESS_REQUEST;
typedef struct _SE_ACCESS_REPLY
{
DWORD Size;
DWORD ResultListCount; // Indicate the array size of GrantedAccess and AccessStatus, it only can be either 1 or ObjectTypeListCount.
PACCESS_MASK GrantedAccess;
PDWORD AccessStatus;
PACCESS_REASONS AccessReason;
PPRIVILEGE_SET* Privileges;
} SE_ACCESS_REPLY, *PSE_ACCESS_REPLY;
////////////////////////////////////////////////////////////////////////
// //
// NT Defined Privileges //
// //
////////////////////////////////////////////////////////////////////////
# 10380 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// begin_ntosifs
//
// List Of String Capabilities.
//
// end_ntosifs
////////////////////////////////////////////////////////////////////
// //
// Security Quality Of Service //
// //
// //
////////////////////////////////////////////////////////////////////
// begin_wdm
//
// Impersonation Level
//
// Impersonation level is represented by a pair of bits in Windows.
// If a new impersonation level is added or lowest value is changed from
// 0 to something else, fix the Windows CreateFile call.
//
typedef enum _SECURITY_IMPERSONATION_LEVEL {
SecurityAnonymous,
SecurityIdentification,
SecurityImpersonation,
SecurityDelegation
} SECURITY_IMPERSONATION_LEVEL, * PSECURITY_IMPERSONATION_LEVEL;
////////////////////////////////////////////////////////////////////
// //
// Token Object Definitions //
// //
// //
////////////////////////////////////////////////////////////////////
// begin_access
//
// Token Specific Access Rights.
//
# 10486 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// end_access
//
//
// Token Types
//
typedef enum _TOKEN_TYPE {
TokenPrimary = 1,
TokenImpersonation
} TOKEN_TYPE;
typedef TOKEN_TYPE *PTOKEN_TYPE;
//
// Token elevation values describe the relative strength of a given token.
// A full token is a token with all groups and privileges to which the principal
// is authorized. A limited token is one with some groups or privileges removed.
//
typedef enum _TOKEN_ELEVATION_TYPE {
TokenElevationTypeDefault = 1,
TokenElevationTypeFull,
TokenElevationTypeLimited,
} TOKEN_ELEVATION_TYPE, *PTOKEN_ELEVATION_TYPE;
//
// Token Information Classes.
//
typedef enum _TOKEN_INFORMATION_CLASS {
TokenUser = 1,
TokenGroups,
TokenPrivileges,
TokenOwner,
TokenPrimaryGroup,
TokenDefaultDacl,
TokenSource,
TokenType,
TokenImpersonationLevel,
TokenStatistics,
TokenRestrictedSids,
TokenSessionId,
TokenGroupsAndPrivileges,
TokenSessionReference,
TokenSandBoxInert,
TokenAuditPolicy,
TokenOrigin,
TokenElevationType,
TokenLinkedToken,
TokenElevation,
TokenHasRestrictions,
TokenAccessInformation,
TokenVirtualizationAllowed,
TokenVirtualizationEnabled,
TokenIntegrityLevel,
TokenUIAccess,
TokenMandatoryPolicy,
TokenLogonSid,
TokenIsAppContainer,
TokenCapabilities,
TokenAppContainerSid,
TokenAppContainerNumber,
TokenUserClaimAttributes,
TokenDeviceClaimAttributes,
TokenRestrictedUserClaimAttributes,
TokenRestrictedDeviceClaimAttributes,
TokenDeviceGroups,
TokenRestrictedDeviceGroups,
TokenSecurityAttributes,
TokenIsRestricted,
TokenProcessTrustLevel,
TokenPrivateNameSpace,
TokenSingletonAttributes,
TokenBnoIsolation,
MaxTokenInfoClass // MaxTokenInfoClass should always be the last enum
} TOKEN_INFORMATION_CLASS, *PTOKEN_INFORMATION_CLASS;
//
// Token information class structures
//
typedef struct _TOKEN_USER {
SID_AND_ATTRIBUTES User;
} TOKEN_USER, *PTOKEN_USER;
typedef struct _SE_TOKEN_USER {
union {
TOKEN_USER TokenUser;
SID_AND_ATTRIBUTES User;
} ;
union {
SID Sid;
BYTE Buffer[(sizeof(SID) - sizeof(DWORD) + ((15) * sizeof(DWORD)))];
} ;
} SE_TOKEN_USER , PSE_TOKEN_USER;
typedef struct _TOKEN_GROUPS {
DWORD GroupCount;
SID_AND_ATTRIBUTES Groups[1];
} TOKEN_GROUPS, *PTOKEN_GROUPS;
typedef struct _TOKEN_PRIVILEGES {
DWORD PrivilegeCount;
LUID_AND_ATTRIBUTES Privileges[1];
} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
typedef struct _TOKEN_OWNER {
PSID Owner;
} TOKEN_OWNER, *PTOKEN_OWNER;
typedef struct _TOKEN_PRIMARY_GROUP {
PSID PrimaryGroup;
} TOKEN_PRIMARY_GROUP, *PTOKEN_PRIMARY_GROUP;
typedef struct _TOKEN_DEFAULT_DACL {
PACL DefaultDacl;
} TOKEN_DEFAULT_DACL, *PTOKEN_DEFAULT_DACL;
typedef struct _TOKEN_USER_CLAIMS {
PCLAIMS_BLOB UserClaims;
} TOKEN_USER_CLAIMS, *PTOKEN_USER_CLAIMS;
typedef struct _TOKEN_DEVICE_CLAIMS {
PCLAIMS_BLOB DeviceClaims;
} TOKEN_DEVICE_CLAIMS, *PTOKEN_DEVICE_CLAIMS;
typedef struct _TOKEN_GROUPS_AND_PRIVILEGES {
DWORD SidCount;
DWORD SidLength;
PSID_AND_ATTRIBUTES Sids;
DWORD RestrictedSidCount;
DWORD RestrictedSidLength;
PSID_AND_ATTRIBUTES RestrictedSids;
DWORD PrivilegeCount;
DWORD PrivilegeLength;
PLUID_AND_ATTRIBUTES Privileges;
LUID AuthenticationId;
} TOKEN_GROUPS_AND_PRIVILEGES, *PTOKEN_GROUPS_AND_PRIVILEGES;
typedef struct _TOKEN_LINKED_TOKEN {
HANDLE LinkedToken;
} TOKEN_LINKED_TOKEN, *PTOKEN_LINKED_TOKEN;
typedef struct _TOKEN_ELEVATION {
DWORD TokenIsElevated;
} TOKEN_ELEVATION, *PTOKEN_ELEVATION;
typedef struct _TOKEN_MANDATORY_LABEL {
SID_AND_ATTRIBUTES Label;
} TOKEN_MANDATORY_LABEL, *PTOKEN_MANDATORY_LABEL;
# 10668 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _TOKEN_MANDATORY_POLICY {
DWORD Policy;
} TOKEN_MANDATORY_POLICY, *PTOKEN_MANDATORY_POLICY;
typedef PVOID PSECURITY_ATTRIBUTES_OPAQUE;
typedef struct _TOKEN_ACCESS_INFORMATION {
PSID_AND_ATTRIBUTES_HASH SidHash;
PSID_AND_ATTRIBUTES_HASH RestrictedSidHash;
PTOKEN_PRIVILEGES Privileges;
LUID AuthenticationId;
TOKEN_TYPE TokenType;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
TOKEN_MANDATORY_POLICY MandatoryPolicy;
DWORD Flags;
DWORD AppContainerNumber;
PSID PackageSid;
PSID_AND_ATTRIBUTES_HASH CapabilitiesHash;
PSID TrustLevelSid;
PSECURITY_ATTRIBUTES_OPAQUE SecurityAttributes;
} TOKEN_ACCESS_INFORMATION, *PTOKEN_ACCESS_INFORMATION;
//
// Valid bits for each TOKEN_AUDIT_POLICY policy mask field.
//
typedef struct _TOKEN_AUDIT_POLICY {
BYTE PerUserPolicy[(((59)) >> 1) + 1];
} TOKEN_AUDIT_POLICY, *PTOKEN_AUDIT_POLICY;
typedef struct _TOKEN_SOURCE {
CHAR SourceName[8];
LUID SourceIdentifier;
} TOKEN_SOURCE, *PTOKEN_SOURCE;
typedef struct _TOKEN_STATISTICS {
LUID TokenId;
LUID AuthenticationId;
LARGE_INTEGER ExpirationTime;
TOKEN_TYPE TokenType;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
DWORD DynamicCharged;
DWORD DynamicAvailable;
DWORD GroupCount;
DWORD PrivilegeCount;
LUID ModifiedId;
} TOKEN_STATISTICS, *PTOKEN_STATISTICS;
typedef struct _TOKEN_CONTROL {
LUID TokenId;
LUID AuthenticationId;
LUID ModifiedId;
TOKEN_SOURCE TokenSource;
} TOKEN_CONTROL, *PTOKEN_CONTROL;
typedef struct _TOKEN_ORIGIN {
LUID OriginatingLogonSession ;
} TOKEN_ORIGIN, * PTOKEN_ORIGIN ;
typedef enum _MANDATORY_LEVEL {
MandatoryLevelUntrusted = 0,
MandatoryLevelLow,
MandatoryLevelMedium,
MandatoryLevelHigh,
MandatoryLevelSystem,
MandatoryLevelSecureProcess,
MandatoryLevelCount
} MANDATORY_LEVEL, *PMANDATORY_LEVEL;
typedef struct _TOKEN_APPCONTAINER_INFORMATION {
PSID TokenAppContainer;
} TOKEN_APPCONTAINER_INFORMATION, *PTOKEN_APPCONTAINER_INFORMATION;
typedef struct _TOKEN_SID_INFORMATION {
PSID Sid;
} TOKEN_SID_INFORMATION, *PTOKEN_SID_INFORMATION;
typedef struct _TOKEN_BNO_ISOLATION_INFORMATION {
PWSTR IsolationPrefix;
BOOLEAN IsolationEnabled;
} TOKEN_BNO_ISOLATION_INFORMATION, *PTOKEN_BNO_ISOLATION_INFORMATION;
//
// *** Claim Security attributes ***
//
// These #defines and data structures (almost) exactly mirror
// the Token_XXX definitions (except for PWSTR/PUNICODE changes)
// in ntseapi.w as well as AUTHZ_XXX in authz.w.
// Keep them in sync.
//
//
// Security attribute data types ...
//
//
// Case insensitive attribute value string by default.
// Unless the flag CLAIM_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE
// is set indicating otherwise.
//
//
// Fully-qualified binary name.
//
typedef struct _CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE {
DWORD64 Version;
PWSTR Name;
} CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE, *PCLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE;
# 10803 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE {
PVOID pValue; // Pointer is BYTE aligned.
DWORD ValueLength; // In bytes
} CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE,
*PCLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE;
//
// Attribute Flags
//
//
// Attribute must not be inherited across process spawns.
//
//
// Attribute value is compared in a case sensitive way. It is valid with string value
// or composite type containing string value. For other types of value, this flag
// will be ignored. Currently, it is valid with the two types:
// CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING and CLAIM_SECURITY_ATTRIBUTE_TYPE_FQBN.
//
//
// Attribute is considered only for Deny Aces.
//
//
// Attribute is disabled by default.
//
//
// Attribute is disabled.
//
//
// Attribute is mandatory.
//
# 10864 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Reserve upper 16 bits for custom flags. These should be preserved but not
// validated as they do not affect security in any way.
//
//
// An individual security attribute.
//
typedef struct _CLAIM_SECURITY_ATTRIBUTE_V1 {
//
// Name of the attribute.
// Case insensitive Unicode string.
//
PWSTR Name;
//
// Data type of attribute.
//
WORD ValueType;
//
// Pass 0 in a set operation and check for 0 in
// a get operation.
//
WORD Reserved;
//
// Attribute Flags
//
DWORD Flags;
//
// Number of values.
//
DWORD ValueCount;
//
// The actual value itself.
//
union {
PLONG64 pInt64;
PDWORD64 pUint64;
PWSTR *ppString;
PCLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE pFqbn;
PCLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE pOctetString;
} Values;
} CLAIM_SECURITY_ATTRIBUTE_V1, *PCLAIM_SECURITY_ATTRIBUTE_V1;
//
// Relative form of the security attribute.
//
typedef struct _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 {
//
// Name of the attribute.
// Offset from beginning of structure.
//
DWORD Name;
//
// Data type of attribute.
//
WORD ValueType;
//
// Pass 0 in a set operation and check for 0 in
// a get operation.
//
WORD Reserved;
//
// Attribute Flags
//
DWORD Flags;
//
// Number of values.
//
DWORD ValueCount;
//
// The actual value itself.
//
union {
DWORD pInt64[1];
DWORD pUint64[1];
DWORD ppString[1];
DWORD pFqbn[1];
DWORD pOctetString[1];
} Values;
} CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1, *PCLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1;
//
// Set of security attributes.
//
//
// Versioning. The interpretation of the pointers in the
// Attribute field below is dependent on the version field.
//
// Get operations return the version while the set operation
// MUST specify the version of the data structure passed in.
//
# 10994 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _CLAIM_SECURITY_ATTRIBUTES_INFORMATION {
//
// MUST BE first.
//
WORD Version;
//
// Pass 0 in set operations and ignore on get operations.
//
WORD Reserved;
DWORD AttributeCount;
union {
PCLAIM_SECURITY_ATTRIBUTE_V1 pAttributeV1;
} Attribute;
} CLAIM_SECURITY_ATTRIBUTES_INFORMATION, *PCLAIM_SECURITY_ATTRIBUTES_INFORMATION;
//
// Security Tracking Mode
//
typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE,
* PSECURITY_CONTEXT_TRACKING_MODE;
//
// Quality Of Service
//
typedef struct _SECURITY_QUALITY_OF_SERVICE {
DWORD Length;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
BOOLEAN EffectiveOnly;
} SECURITY_QUALITY_OF_SERVICE, * PSECURITY_QUALITY_OF_SERVICE;
//
// Used to represent information related to a thread impersonation
//
typedef struct _SE_IMPERSONATION_STATE {
PACCESS_TOKEN Token;
BOOLEAN CopyOnOpen;
BOOLEAN EffectiveOnly;
SECURITY_IMPERSONATION_LEVEL Level;
} SE_IMPERSONATION_STATE, *PSE_IMPERSONATION_STATE;
typedef DWORD SECURITY_INFORMATION, *PSECURITY_INFORMATION;
# 11073 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Base signing levels.
//
typedef BYTE SE_SIGNING_LEVEL, *PSE_SIGNING_LEVEL;
# 11097 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Image signature types.
//
typedef enum _SE_IMAGE_SIGNATURE_TYPE
{
SeImageSignatureNone = 0,
SeImageSignatureEmbedded,
SeImageSignatureCache,
SeImageSignatureCatalogCached,
SeImageSignatureCatalogNotCached,
SeImageSignatureCatalogHint,
SeImageSignaturePackageCatalog,
} SE_IMAGE_SIGNATURE_TYPE, *PSE_IMAGE_SIGNATURE_TYPE;
//
// Learning Mode Types.
//
typedef enum _SE_LEARNING_MODE_DATA_TYPE {
SeLearningModeInvalidType = 0,
SeLearningModeSettings,
SeLearningModeMax
} SE_LEARNING_MODE_DATA_TYPE;
typedef struct _SECURITY_CAPABILITIES {
PSID AppContainerSid;
PSID_AND_ATTRIBUTES Capabilities;
DWORD CapabilityCount;
DWORD Reserved;
} SECURITY_CAPABILITIES, *PSECURITY_CAPABILITIES, *LPSECURITY_CAPABILITIES;
# 11169 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// begin_wdm
# 11189 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_access
typedef struct _JOB_SET_ARRAY {
HANDLE JobHandle; // Handle to job object to insert
DWORD MemberLevel; // Level of this job in the set. Must be > 0. Can be sparse.
DWORD Flags; // Unused. Must be zero
} JOB_SET_ARRAY, *PJOB_SET_ARRAY;
typedef struct _EXCEPTION_REGISTRATION_RECORD {
struct _EXCEPTION_REGISTRATION_RECORD *Next;
PEXCEPTION_ROUTINE Handler;
} EXCEPTION_REGISTRATION_RECORD;
typedef EXCEPTION_REGISTRATION_RECORD *PEXCEPTION_REGISTRATION_RECORD;
typedef struct _NT_TIB {
struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
PVOID StackBase;
PVOID StackLimit;
PVOID SubSystemTib;
union {
PVOID FiberData;
DWORD Version;
};
PVOID ArbitraryUserPointer;
struct _NT_TIB *Self;
} NT_TIB;
typedef NT_TIB *PNT_TIB;
//
// 32 and 64 bit specific version for wow64 and the debugger
//
typedef struct _NT_TIB32 {
DWORD ExceptionList;
DWORD StackBase;
DWORD StackLimit;
DWORD SubSystemTib;
union {
DWORD FiberData;
DWORD Version;
};
DWORD ArbitraryUserPointer;
DWORD Self;
} NT_TIB32, *PNT_TIB32;
typedef struct _NT_TIB64 {
DWORD64 ExceptionList;
DWORD64 StackBase;
DWORD64 StackLimit;
DWORD64 SubSystemTib;
union {
DWORD64 FiberData;
DWORD Version;
};
DWORD64 ArbitraryUserPointer;
DWORD64 Self;
} NT_TIB64, *PNT_TIB64;
# 11276 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _UMS_CREATE_THREAD_ATTRIBUTES {
DWORD UmsVersion;
PVOID UmsContext;
PVOID UmsCompletionList;
} UMS_CREATE_THREAD_ATTRIBUTES, *PUMS_CREATE_THREAD_ATTRIBUTES;
typedef struct _WOW64_ARCHITECTURE_INFORMATION {
DWORD Machine : 16;
DWORD KernelMode : 1;
DWORD UserMode : 1;
DWORD Native : 1;
DWORD Process : 1;
DWORD ReservedZero0 : 12;
} WOW64_ARCHITECTURE_INFORMATION;
//
// Page/memory priorities.
//
# 11304 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _QUOTA_LIMITS {
SIZE_T PagedPoolLimit;
SIZE_T NonPagedPoolLimit;
SIZE_T MinimumWorkingSetSize;
SIZE_T MaximumWorkingSetSize;
SIZE_T PagefileLimit;
LARGE_INTEGER TimeLimit;
} QUOTA_LIMITS, *PQUOTA_LIMITS;
typedef union _RATE_QUOTA_LIMIT {
DWORD RateData;
struct {
DWORD RatePercent : 7;
DWORD Reserved0 : 25;
} ;
} RATE_QUOTA_LIMIT, *PRATE_QUOTA_LIMIT;
typedef struct _QUOTA_LIMITS_EX {
SIZE_T PagedPoolLimit;
SIZE_T NonPagedPoolLimit;
SIZE_T MinimumWorkingSetSize;
SIZE_T MaximumWorkingSetSize;
SIZE_T PagefileLimit; // Limit expressed in pages
LARGE_INTEGER TimeLimit;
SIZE_T WorkingSetLimit; // Limit expressed in pages
SIZE_T Reserved2;
SIZE_T Reserved3;
SIZE_T Reserved4;
DWORD Flags;
RATE_QUOTA_LIMIT CpuRateLimit;
} QUOTA_LIMITS_EX, *PQUOTA_LIMITS_EX;
typedef struct _IO_COUNTERS {
ULONGLONG ReadOperationCount;
ULONGLONG WriteOperationCount;
ULONGLONG OtherOperationCount;
ULONGLONG ReadTransferCount;
ULONGLONG WriteTransferCount;
ULONGLONG OtherTransferCount;
} IO_COUNTERS;
typedef IO_COUNTERS *PIO_COUNTERS;
typedef enum _HARDWARE_COUNTER_TYPE {
PMCCounter,
MaxHardwareCounterType
} HARDWARE_COUNTER_TYPE, *PHARDWARE_COUNTER_TYPE;
typedef enum _PROCESS_MITIGATION_POLICY {
ProcessDEPPolicy,
ProcessASLRPolicy,
ProcessDynamicCodePolicy,
ProcessStrictHandleCheckPolicy,
ProcessSystemCallDisablePolicy,
ProcessMitigationOptionsMask,
ProcessExtensionPointDisablePolicy,
ProcessControlFlowGuardPolicy,
ProcessSignaturePolicy,
ProcessFontDisablePolicy,
ProcessImageLoadPolicy,
MaxProcessMitigationPolicy
} PROCESS_MITIGATION_POLICY, *PPROCESS_MITIGATION_POLICY;
//
// N.B. High entropy mode is read only and can only be set at creation time
// and not via the ProcessMitigationPolicy APIs.
//
typedef struct _PROCESS_MITIGATION_ASLR_POLICY {
union {
DWORD Flags;
struct {
DWORD EnableBottomUpRandomization : 1;
DWORD EnableForceRelocateImages : 1;
DWORD EnableHighEntropy : 1;
DWORD DisallowStrippedImages : 1;
DWORD ReservedFlags : 28;
} ;
} ;
} PROCESS_MITIGATION_ASLR_POLICY, *PPROCESS_MITIGATION_ASLR_POLICY;
typedef struct _PROCESS_MITIGATION_DEP_POLICY {
union {
DWORD Flags;
struct {
DWORD Enable : 1;
DWORD DisableAtlThunkEmulation : 1;
DWORD ReservedFlags : 30;
} ;
} ;
BOOLEAN Permanent;
} PROCESS_MITIGATION_DEP_POLICY, *PPROCESS_MITIGATION_DEP_POLICY;
typedef struct _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY {
union {
DWORD Flags;
struct {
DWORD RaiseExceptionOnInvalidHandleReference : 1;
DWORD HandleExceptionsPermanentlyEnabled : 1;
DWORD ReservedFlags : 30;
} ;
} ;
} PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY, *PPROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY;
typedef struct _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY {
union {
DWORD Flags;
struct {
DWORD DisallowWin32kSystemCalls : 1;
DWORD ReservedFlags : 31;
} ;
} ;
} PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY, *PPROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY;
typedef struct _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY {
union {
DWORD Flags;
struct {
DWORD DisableExtensionPoints : 1;
DWORD ReservedFlags : 31;
} ;
} ;
} PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY, *PPROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY;
typedef struct _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY {
union {
DWORD Flags;
struct {
DWORD ProhibitDynamicCode : 1;
DWORD AllowThreadOptOut : 1;
DWORD AllowRemoteDowngrade : 1;
DWORD ReservedFlags : 29;
} ;
} ;
} PROCESS_MITIGATION_DYNAMIC_CODE_POLICY, *PPROCESS_MITIGATION_DYNAMIC_CODE_POLICY;
typedef struct _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY {
union {
DWORD Flags;
struct {
DWORD EnableControlFlowGuard : 1;
DWORD EnableExportSuppression : 1;
DWORD StrictMode : 1;
DWORD ReservedFlags : 29;
} ;
} ;
} PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY, *PPROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY;
typedef struct _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY {
union {
DWORD Flags;
struct {
DWORD MicrosoftSignedOnly : 1;
DWORD StoreSignedOnly : 1;
DWORD MitigationOptIn : 1;
DWORD ReservedFlags : 29;
} ;
} ;
} PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY, *PPROCESS_MITIGATION_BINARY_SIGNATURE_POLICY;
typedef struct _PROCESS_MITIGATION_FONT_DISABLE_POLICY {
union {
DWORD Flags;
struct {
DWORD DisableNonSystemFonts : 1;
DWORD AuditNonSystemFontLoading : 1;
DWORD ReservedFlags : 30;
} ;
} ;
} PROCESS_MITIGATION_FONT_DISABLE_POLICY, *PPROCESS_MITIGATION_FONT_DISABLE_POLICY;
typedef struct _PROCESS_MITIGATION_IMAGE_LOAD_POLICY {
union {
DWORD Flags;
struct {
DWORD NoRemoteImages : 1;
DWORD NoLowMandatoryLabelImages : 1;
DWORD PreferSystem32Images : 1;
DWORD ReservedFlags : 29;
} ;
} ;
} PROCESS_MITIGATION_IMAGE_LOAD_POLICY, *PPROCESS_MITIGATION_IMAGE_LOAD_POLICY;
typedef struct _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION {
LARGE_INTEGER TotalUserTime;
LARGE_INTEGER TotalKernelTime;
LARGE_INTEGER ThisPeriodTotalUserTime;
LARGE_INTEGER ThisPeriodTotalKernelTime;
DWORD TotalPageFaultCount;
DWORD TotalProcesses;
DWORD ActiveProcesses;
DWORD TotalTerminatedProcesses;
} JOBOBJECT_BASIC_ACCOUNTING_INFORMATION, *PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
typedef struct _JOBOBJECT_BASIC_LIMIT_INFORMATION {
LARGE_INTEGER PerProcessUserTimeLimit;
LARGE_INTEGER PerJobUserTimeLimit;
DWORD LimitFlags;
SIZE_T MinimumWorkingSetSize;
SIZE_T MaximumWorkingSetSize;
DWORD ActiveProcessLimit;
ULONG_PTR Affinity;
DWORD PriorityClass;
DWORD SchedulingClass;
} JOBOBJECT_BASIC_LIMIT_INFORMATION, *PJOBOBJECT_BASIC_LIMIT_INFORMATION;
typedef struct _JOBOBJECT_EXTENDED_LIMIT_INFORMATION {
JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;
IO_COUNTERS IoInfo;
SIZE_T ProcessMemoryLimit;
SIZE_T JobMemoryLimit;
SIZE_T PeakProcessMemoryUsed;
SIZE_T PeakJobMemoryUsed;
} JOBOBJECT_EXTENDED_LIMIT_INFORMATION, *PJOBOBJECT_EXTENDED_LIMIT_INFORMATION;
typedef struct _JOBOBJECT_BASIC_PROCESS_ID_LIST {
DWORD NumberOfAssignedProcesses;
DWORD NumberOfProcessIdsInList;
ULONG_PTR ProcessIdList[1];
} JOBOBJECT_BASIC_PROCESS_ID_LIST, *PJOBOBJECT_BASIC_PROCESS_ID_LIST;
typedef struct _JOBOBJECT_BASIC_UI_RESTRICTIONS {
DWORD UIRestrictionsClass;
} JOBOBJECT_BASIC_UI_RESTRICTIONS, *PJOBOBJECT_BASIC_UI_RESTRICTIONS;
//
// N.B. The JOBOBJECT_SECURITY_LIMIT_INFORMATION information class is no longer supported.
//
typedef struct _JOBOBJECT_SECURITY_LIMIT_INFORMATION {
DWORD SecurityLimitFlags ;
HANDLE JobToken ;
PTOKEN_GROUPS SidsToDisable ;
PTOKEN_PRIVILEGES PrivilegesToDelete ;
PTOKEN_GROUPS RestrictedSids ;
} JOBOBJECT_SECURITY_LIMIT_INFORMATION, *PJOBOBJECT_SECURITY_LIMIT_INFORMATION ;
typedef struct _JOBOBJECT_END_OF_JOB_TIME_INFORMATION {
DWORD EndOfJobTimeAction;
} JOBOBJECT_END_OF_JOB_TIME_INFORMATION, *PJOBOBJECT_END_OF_JOB_TIME_INFORMATION;
typedef struct _JOBOBJECT_ASSOCIATE_COMPLETION_PORT {
PVOID CompletionKey;
HANDLE CompletionPort;
} JOBOBJECT_ASSOCIATE_COMPLETION_PORT, *PJOBOBJECT_ASSOCIATE_COMPLETION_PORT;
typedef struct _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION {
JOBOBJECT_BASIC_ACCOUNTING_INFORMATION BasicInfo;
IO_COUNTERS IoInfo;
} JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION, *PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
typedef struct _JOBOBJECT_JOBSET_INFORMATION {
DWORD MemberLevel;
} JOBOBJECT_JOBSET_INFORMATION, *PJOBOBJECT_JOBSET_INFORMATION;
typedef enum _JOBOBJECT_RATE_CONTROL_TOLERANCE {
ToleranceLow = 1,
ToleranceMedium,
ToleranceHigh
} JOBOBJECT_RATE_CONTROL_TOLERANCE, *PJOBOBJECT_RATE_CONTROL_TOLERANCE;
typedef enum _JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL {
ToleranceIntervalShort = 1,
ToleranceIntervalMedium,
ToleranceIntervalLong
} JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL,
*PJOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL;
typedef struct _JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION {
DWORD64 IoReadBytesLimit;
DWORD64 IoWriteBytesLimit;
LARGE_INTEGER PerJobUserTimeLimit;
DWORD64 JobMemoryLimit;
JOBOBJECT_RATE_CONTROL_TOLERANCE RateControlTolerance;
JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL RateControlToleranceInterval;
DWORD LimitFlags;
} JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION, *PJOBOBJECT_NOTIFICATION_LIMIT_INFORMATION;
typedef struct JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION_2 {
DWORD64 IoReadBytesLimit;
DWORD64 IoWriteBytesLimit;
LARGE_INTEGER PerJobUserTimeLimit;
union {
DWORD64 JobHighMemoryLimit;
DWORD64 JobMemoryLimit;
} ;
union {
JOBOBJECT_RATE_CONTROL_TOLERANCE RateControlTolerance;
JOBOBJECT_RATE_CONTROL_TOLERANCE CpuRateControlTolerance;
} ;
union {
JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL RateControlToleranceInterval;
JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL
CpuRateControlToleranceInterval;
} ;
DWORD LimitFlags;
JOBOBJECT_RATE_CONTROL_TOLERANCE IoRateControlTolerance;
DWORD64 JobLowMemoryLimit;
JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL IoRateControlToleranceInterval;
JOBOBJECT_RATE_CONTROL_TOLERANCE NetRateControlTolerance;
JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL NetRateControlToleranceInterval;
} JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION_2;
typedef struct _JOBOBJECT_LIMIT_VIOLATION_INFORMATION {
DWORD LimitFlags;
DWORD ViolationLimitFlags;
DWORD64 IoReadBytes;
DWORD64 IoReadBytesLimit;
DWORD64 IoWriteBytes;
DWORD64 IoWriteBytesLimit;
LARGE_INTEGER PerJobUserTime;
LARGE_INTEGER PerJobUserTimeLimit;
DWORD64 JobMemory;
DWORD64 JobMemoryLimit;
JOBOBJECT_RATE_CONTROL_TOLERANCE RateControlTolerance;
JOBOBJECT_RATE_CONTROL_TOLERANCE RateControlToleranceLimit;
} JOBOBJECT_LIMIT_VIOLATION_INFORMATION, *PJOBOBJECT_LIMIT_VIOLATION_INFORMATION;
typedef struct JOBOBJECT_LIMIT_VIOLATION_INFORMATION_2 {
DWORD LimitFlags;
DWORD ViolationLimitFlags;
DWORD64 IoReadBytes;
DWORD64 IoReadBytesLimit;
DWORD64 IoWriteBytes;
DWORD64 IoWriteBytesLimit;
LARGE_INTEGER PerJobUserTime;
LARGE_INTEGER PerJobUserTimeLimit;
DWORD64 JobMemory;
union {
DWORD64 JobHighMemoryLimit;
DWORD64 JobMemoryLimit;
} ;
union {
JOBOBJECT_RATE_CONTROL_TOLERANCE RateControlTolerance;
JOBOBJECT_RATE_CONTROL_TOLERANCE CpuRateControlTolerance;
} ;
union {
JOBOBJECT_RATE_CONTROL_TOLERANCE RateControlToleranceLimit;
JOBOBJECT_RATE_CONTROL_TOLERANCE CpuRateControlToleranceLimit;
} ;
DWORD64 JobLowMemoryLimit;
JOBOBJECT_RATE_CONTROL_TOLERANCE IoRateControlTolerance;
JOBOBJECT_RATE_CONTROL_TOLERANCE IoRateControlToleranceLimit;
JOBOBJECT_RATE_CONTROL_TOLERANCE NetRateControlTolerance;
JOBOBJECT_RATE_CONTROL_TOLERANCE NetRateControlToleranceLimit;
} JOBOBJECT_LIMIT_VIOLATION_INFORMATION_2;
typedef struct _JOBOBJECT_CPU_RATE_CONTROL_INFORMATION {
DWORD ControlFlags;
union {
DWORD CpuRate;
DWORD Weight;
struct {
WORD MinRate;
WORD MaxRate;
} ;
} ;
} JOBOBJECT_CPU_RATE_CONTROL_INFORMATION, *PJOBOBJECT_CPU_RATE_CONTROL_INFORMATION;
//
// Control flags for network rate control.
//
typedef enum JOB_OBJECT_NET_RATE_CONTROL_FLAGS {
JOB_OBJECT_NET_RATE_CONTROL_ENABLE = 0x1,
JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH = 0x2,
JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG = 0x4,
JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS = 0x7
} JOB_OBJECT_NET_RATE_CONTROL_FLAGS;
extern "C++" { inline constexpr JOB_OBJECT_NET_RATE_CONTROL_FLAGS operator | (JOB_OBJECT_NET_RATE_CONTROL_FLAGS a, JOB_OBJECT_NET_RATE_CONTROL_FLAGS b) throw() { return JOB_OBJECT_NET_RATE_CONTROL_FLAGS(((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type)a) | ((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type)b)); } inline JOB_OBJECT_NET_RATE_CONTROL_FLAGS &operator |= (JOB_OBJECT_NET_RATE_CONTROL_FLAGS &a, JOB_OBJECT_NET_RATE_CONTROL_FLAGS b) throw() { return (JOB_OBJECT_NET_RATE_CONTROL_FLAGS &)(((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type &)a) |= ((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type)b)); } inline constexpr JOB_OBJECT_NET_RATE_CONTROL_FLAGS operator & (JOB_OBJECT_NET_RATE_CONTROL_FLAGS a, JOB_OBJECT_NET_RATE_CONTROL_FLAGS b) throw() { return JOB_OBJECT_NET_RATE_CONTROL_FLAGS(((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type)a) & ((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type)b)); } inline JOB_OBJECT_NET_RATE_CONTROL_FLAGS &operator &= (JOB_OBJECT_NET_RATE_CONTROL_FLAGS &a, JOB_OBJECT_NET_RATE_CONTROL_FLAGS b) throw() { return (JOB_OBJECT_NET_RATE_CONTROL_FLAGS &)(((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type &)a) &= ((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type)b)); } inline constexpr JOB_OBJECT_NET_RATE_CONTROL_FLAGS operator ~ (JOB_OBJECT_NET_RATE_CONTROL_FLAGS a) throw() { return JOB_OBJECT_NET_RATE_CONTROL_FLAGS(~((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type)a)); } inline constexpr JOB_OBJECT_NET_RATE_CONTROL_FLAGS operator ^ (JOB_OBJECT_NET_RATE_CONTROL_FLAGS a, JOB_OBJECT_NET_RATE_CONTROL_FLAGS b) throw() { return JOB_OBJECT_NET_RATE_CONTROL_FLAGS(((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type)a) ^ ((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type)b)); } inline JOB_OBJECT_NET_RATE_CONTROL_FLAGS &operator ^= (JOB_OBJECT_NET_RATE_CONTROL_FLAGS &a, JOB_OBJECT_NET_RATE_CONTROL_FLAGS b) throw() { return (JOB_OBJECT_NET_RATE_CONTROL_FLAGS &)(((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type &)a) ^= ((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_NET_RATE_CONTROL_FLAGS>::type)b)); } }
typedef char __C_ASSERT__[(JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS == (JOB_OBJECT_NET_RATE_CONTROL_ENABLE + JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH + JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG))?1:-1];
# 11703 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct JOBOBJECT_NET_RATE_CONTROL_INFORMATION {
DWORD64 MaxBandwidth;
JOB_OBJECT_NET_RATE_CONTROL_FLAGS ControlFlags;
BYTE DscpTag;
} JOBOBJECT_NET_RATE_CONTROL_INFORMATION;
//
// Control flags for IO rate control.
//
// begin_ntosifs
typedef enum JOB_OBJECT_IO_RATE_CONTROL_FLAGS {
JOB_OBJECT_IO_RATE_CONTROL_ENABLE = 0x1,
JOB_OBJECT_IO_RATE_CONTROL_STANDALONE_VOLUME = 0x2,
JOB_OBJECT_IO_RATE_CONTROL_VALID_FLAGS = JOB_OBJECT_IO_RATE_CONTROL_ENABLE |
JOB_OBJECT_IO_RATE_CONTROL_STANDALONE_VOLUME
} JOB_OBJECT_IO_RATE_CONTROL_FLAGS;
extern "C++" { inline constexpr JOB_OBJECT_IO_RATE_CONTROL_FLAGS operator | (JOB_OBJECT_IO_RATE_CONTROL_FLAGS a, JOB_OBJECT_IO_RATE_CONTROL_FLAGS b) throw() { return JOB_OBJECT_IO_RATE_CONTROL_FLAGS(((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type)a) | ((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type)b)); } inline JOB_OBJECT_IO_RATE_CONTROL_FLAGS &operator |= (JOB_OBJECT_IO_RATE_CONTROL_FLAGS &a, JOB_OBJECT_IO_RATE_CONTROL_FLAGS b) throw() { return (JOB_OBJECT_IO_RATE_CONTROL_FLAGS &)(((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type &)a) |= ((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type)b)); } inline constexpr JOB_OBJECT_IO_RATE_CONTROL_FLAGS operator & (JOB_OBJECT_IO_RATE_CONTROL_FLAGS a, JOB_OBJECT_IO_RATE_CONTROL_FLAGS b) throw() { return JOB_OBJECT_IO_RATE_CONTROL_FLAGS(((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type)a) & ((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type)b)); } inline JOB_OBJECT_IO_RATE_CONTROL_FLAGS &operator &= (JOB_OBJECT_IO_RATE_CONTROL_FLAGS &a, JOB_OBJECT_IO_RATE_CONTROL_FLAGS b) throw() { return (JOB_OBJECT_IO_RATE_CONTROL_FLAGS &)(((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type &)a) &= ((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type)b)); } inline constexpr JOB_OBJECT_IO_RATE_CONTROL_FLAGS operator ~ (JOB_OBJECT_IO_RATE_CONTROL_FLAGS a) throw() { return JOB_OBJECT_IO_RATE_CONTROL_FLAGS(~((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type)a)); } inline constexpr JOB_OBJECT_IO_RATE_CONTROL_FLAGS operator ^ (JOB_OBJECT_IO_RATE_CONTROL_FLAGS a, JOB_OBJECT_IO_RATE_CONTROL_FLAGS b) throw() { return JOB_OBJECT_IO_RATE_CONTROL_FLAGS(((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type)a) ^ ((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type)b)); } inline JOB_OBJECT_IO_RATE_CONTROL_FLAGS &operator ^= (JOB_OBJECT_IO_RATE_CONTROL_FLAGS &a, JOB_OBJECT_IO_RATE_CONTROL_FLAGS b) throw() { return (JOB_OBJECT_IO_RATE_CONTROL_FLAGS &)(((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type &)a) ^= ((_ENUM_FLAG_SIZED_INTEGER<JOB_OBJECT_IO_RATE_CONTROL_FLAGS>::type)b)); } }
typedef struct JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE {
LONG64 MaxIops;
LONG64 MaxBandwidth;
LONG64 ReservationIops;
PWSTR VolumeName;
DWORD BaseIoSize;
JOB_OBJECT_IO_RATE_CONTROL_FLAGS ControlFlags;
WORD VolumeNameLength;
} JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE;
typedef JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE
JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V1;
typedef struct JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V2 {
LONG64 MaxIops;
LONG64 MaxBandwidth;
LONG64 ReservationIops;
PWSTR VolumeName;
DWORD BaseIoSize;
JOB_OBJECT_IO_RATE_CONTROL_FLAGS ControlFlags;
WORD VolumeNameLength;
LONG64 CriticalReservationIops;
LONG64 ReservationBandwidth;
LONG64 CriticalReservationBandwidth;
LONG64 MaxTimePercent;
LONG64 ReservationTimePercent;
LONG64 CriticalReservationTimePercent;
} JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V2;
typedef struct JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3 {
LONG64 MaxIops;
LONG64 MaxBandwidth;
LONG64 ReservationIops;
PWSTR VolumeName;
DWORD BaseIoSize;
JOB_OBJECT_IO_RATE_CONTROL_FLAGS ControlFlags;
WORD VolumeNameLength;
LONG64 CriticalReservationIops;
LONG64 ReservationBandwidth;
LONG64 CriticalReservationBandwidth;
LONG64 MaxTimePercent;
LONG64 ReservationTimePercent;
LONG64 CriticalReservationTimePercent;
LONG64 SoftMaxIops;
LONG64 SoftMaxBandwidth;
LONG64 SoftMaxTimePercent;
LONG64 LimitExcessNotifyIops;
LONG64 LimitExcessNotifyBandwidth;
LONG64 LimitExcessNotifyTimePercent;
} JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3;
// end_ntosifs
typedef enum JOBOBJECT_IO_ATTRIBUTION_CONTROL_FLAGS {
JOBOBJECT_IO_ATTRIBUTION_CONTROL_ENABLE = 0x1,
JOBOBJECT_IO_ATTRIBUTION_CONTROL_DISABLE = 0x2,
JOBOBJECT_IO_ATTRIBUTION_CONTROL_VALID_FLAGS = 0x3
} JOBOBJECT_IO_ATTRIBUTION_CONTROL_FLAGS;
typedef struct _JOBOBJECT_IO_ATTRIBUTION_STATS {
ULONG_PTR IoCount;
ULONGLONG TotalNonOverlappedQueueTime;
ULONGLONG TotalNonOverlappedServiceTime;
ULONGLONG TotalSize;
} JOBOBJECT_IO_ATTRIBUTION_STATS, *PJOBOBJECT_IO_ATTRIBUTION_STATS;
typedef struct _JOBOBJECT_IO_ATTRIBUTION_INFORMATION {
DWORD ControlFlags;
JOBOBJECT_IO_ATTRIBUTION_STATS ReadStats;
JOBOBJECT_IO_ATTRIBUTION_STATS WriteStats;
} JOBOBJECT_IO_ATTRIBUTION_INFORMATION, *PJOBOBJECT_IO_ATTRIBUTION_INFORMATION;
//
// Completion Port Messages for job objects
//
// These values are returned via the lpNumberOfBytesTransferred parameter
//
# 11828 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Define the valid notification filter values.
//
# 11839 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Basic Limits
//
# 11851 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Extended Limits
//
# 11864 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Notification Limits
//
# 11876 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Valid Job Object Limits
//
# 11894 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// UI restrictions for jobs
//
# 11920 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Control flags for CPU rate control.
//
# 11932 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef enum _JOBOBJECTINFOCLASS {
JobObjectBasicAccountingInformation = 1,
JobObjectBasicLimitInformation,
JobObjectBasicProcessIdList,
JobObjectBasicUIRestrictions,
JobObjectSecurityLimitInformation, // deprecated
JobObjectEndOfJobTimeInformation,
JobObjectAssociateCompletionPortInformation,
JobObjectBasicAndIoAccountingInformation,
JobObjectExtendedLimitInformation,
JobObjectJobSetInformation,
JobObjectGroupInformation,
JobObjectNotificationLimitInformation,
JobObjectLimitViolationInformation,
JobObjectGroupInformationEx,
JobObjectCpuRateControlInformation,
JobObjectCompletionFilter,
JobObjectCompletionCounter,
JobObjectReserved1Information = 18,
JobObjectReserved2Information,
JobObjectReserved3Information,
JobObjectReserved4Information,
JobObjectReserved5Information,
JobObjectReserved6Information,
JobObjectReserved7Information,
JobObjectReserved8Information,
JobObjectReserved9Information,
JobObjectReserved10Information,
JobObjectReserved11Information,
JobObjectReserved12Information,
JobObjectReserved13Information,
JobObjectReserved14Information = 31,
JobObjectNetRateControlInformation,
JobObjectNotificationLimitInformation2,
JobObjectLimitViolationInformation2,
JobObjectCreateSilo,
JobObjectSiloBasicInformation,
JobObjectReserved15Information = 37,
JobObjectReserved16Information = 38,
JobObjectReserved17Information = 39,
JobObjectReserved18Information = 40,
JobObjectReserved19Information = 41,
JobObjectReserved20Information = 42,
JobObjectReserved21Information = 43,
JobObjectReserved22Information = 44,
JobObjectReserved23Information = 45,
JobObjectReserved24Information = 46,
JobObjectReserved25Information = 47,
MaxJobObjectInfoClass
} JOBOBJECTINFOCLASS;
typedef struct _SILOOBJECT_BASIC_INFORMATION {
DWORD SiloId;
DWORD SiloParentId;
DWORD NumberOfProcesses;
BOOLEAN IsInServerSilo;
BYTE Reserved[3];
} SILOOBJECT_BASIC_INFORMATION, *PSILOOBJECT_BASIC_INFORMATION;
typedef enum _SERVERSILO_STATE {
SERVERSILO_INITING = 0,
SERVERSILO_STARTED,
SERVERSILO_SHUTTING_DOWN,
SERVERSILO_TERMINATING,
SERVERSILO_TERMINATED,
} SERVERSILO_STATE, *PSERVERSILO_STATE;
typedef struct _SERVERSILO_BASIC_INFORMATION {
DWORD ServiceSessionId;
SERVERSILO_STATE State;
DWORD ExitStatus;
} SERVERSILO_BASIC_INFORMATION, *PSERVERSILO_BASIC_INFORMATION;
typedef enum _FIRMWARE_TYPE {
FirmwareTypeUnknown,
FirmwareTypeBios,
FirmwareTypeUefi,
FirmwareTypeMax
} FIRMWARE_TYPE, *PFIRMWARE_TYPE;
//
// Mutant Specific Access Rights
//
# 12029 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Timer Specific Access Rights.
//
// begin_nthal
// end_nthal
typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP {
RelationProcessorCore,
RelationNumaNode,
RelationCache,
RelationProcessorPackage,
RelationGroup,
RelationAll = 0xffff
} LOGICAL_PROCESSOR_RELATIONSHIP;
typedef enum _PROCESSOR_CACHE_TYPE {
CacheUnified,
CacheInstruction,
CacheData,
CacheTrace
} PROCESSOR_CACHE_TYPE;
typedef struct _CACHE_DESCRIPTOR {
BYTE Level;
BYTE Associativity;
WORD LineSize;
DWORD Size;
PROCESSOR_CACHE_TYPE Type;
} CACHE_DESCRIPTOR, *PCACHE_DESCRIPTOR;
typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION {
ULONG_PTR ProcessorMask;
LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
union {
struct {
BYTE Flags;
} ProcessorCore;
struct {
DWORD NodeNumber;
} NumaNode;
CACHE_DESCRIPTOR Cache;
ULONGLONG Reserved[2];
} ;
} SYSTEM_LOGICAL_PROCESSOR_INFORMATION, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION;
typedef struct _PROCESSOR_RELATIONSHIP {
BYTE Flags;
BYTE EfficiencyClass;
BYTE Reserved[20];
WORD GroupCount;
GROUP_AFFINITY GroupMask[1];
} PROCESSOR_RELATIONSHIP, *PPROCESSOR_RELATIONSHIP;
typedef struct _NUMA_NODE_RELATIONSHIP {
DWORD NodeNumber;
BYTE Reserved[20];
GROUP_AFFINITY GroupMask;
} NUMA_NODE_RELATIONSHIP, *PNUMA_NODE_RELATIONSHIP;
typedef struct _CACHE_RELATIONSHIP {
BYTE Level;
BYTE Associativity;
WORD LineSize;
DWORD CacheSize;
PROCESSOR_CACHE_TYPE Type;
BYTE Reserved[20];
GROUP_AFFINITY GroupMask;
} CACHE_RELATIONSHIP, *PCACHE_RELATIONSHIP;
typedef struct _PROCESSOR_GROUP_INFO {
BYTE MaximumProcessorCount;
BYTE ActiveProcessorCount;
BYTE Reserved[38];
KAFFINITY ActiveProcessorMask;
} PROCESSOR_GROUP_INFO, *PPROCESSOR_GROUP_INFO;
typedef struct _GROUP_RELATIONSHIP {
WORD MaximumGroupCount;
WORD ActiveGroupCount;
BYTE Reserved[20];
PROCESSOR_GROUP_INFO GroupInfo[1];
} GROUP_RELATIONSHIP, *PGROUP_RELATIONSHIP;
struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX {
LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
DWORD Size;
union {
PROCESSOR_RELATIONSHIP Processor;
NUMA_NODE_RELATIONSHIP NumaNode;
CACHE_RELATIONSHIP Cache;
GROUP_RELATIONSHIP Group;
} ;
};
typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX;
typedef enum _CPU_SET_INFORMATION_TYPE {
CpuSetInformation
} CPU_SET_INFORMATION_TYPE, *PCPU_SET_INFORMATION_TYPE;
struct _SYSTEM_CPU_SET_INFORMATION {
DWORD Size;
CPU_SET_INFORMATION_TYPE Type;
union {
struct {
DWORD Id;
WORD Group;
BYTE LogicalProcessorIndex;
BYTE CoreIndex;
BYTE LastLevelCacheIndex;
BYTE NumaNodeIndex;
BYTE EfficiencyClass;
union {
BYTE AllFlags;
struct {
BYTE Parked : 1;
BYTE Allocated : 1;
BYTE AllocatedToTargetProcess : 1;
BYTE RealTime : 1;
BYTE ReservedFlags : 4;
} ;
} ;
DWORD Reserved;
DWORD64 AllocationTag;
} CpuSet;
} ;
};
typedef struct _SYSTEM_CPU_SET_INFORMATION SYSTEM_CPU_SET_INFORMATION, *PSYSTEM_CPU_SET_INFORMATION;
// end_wdm end_ntminiport
typedef struct _SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION {
DWORD64 CycleTime;
} SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION, *PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION;
# 12263 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Known extended CPU state feature BITs
//
// 0 x87
// 1 SSE
// 2 AVX
// 3 BNDREGS (B0.LB-B3.LB B0.UB-B3.UB)
// 4 BNDCSR (BNDCFGU + BNDSTATUS) Persistent
// 5 KMASK (KMASK [63:0][0-7])
// 6 ZMM_H (ZMM_H[511:256][0-15])
// 7 ZMM (ZMM[511:0][16-31])
// 8 IPT Supervisor
//
// 62 LWP Persistent
//
// 63 RZ0 Reserved
//
# 12294 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Known extended CPU state feature MASKs
//
# 12325 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Flags associated with compaction mask
//
# 12340 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Extended processor state configuration
//
typedef struct _XSTATE_FEATURE {
DWORD Offset;
DWORD Size;
} XSTATE_FEATURE, *PXSTATE_FEATURE;
typedef struct _XSTATE_CONFIGURATION {
// Mask of all enabled features
DWORD64 EnabledFeatures;
// Mask of volatile enabled features
DWORD64 EnabledVolatileFeatures;
// Total size of the save area for user states
DWORD Size;
// Control Flags
union {
DWORD ControlFlags;
struct
{
DWORD OptimizedSave : 1;
DWORD CompactionEnabled : 1;
};
};
// List of features
XSTATE_FEATURE Features[(64)];
// Mask of all supervisor features
DWORD64 EnabledSupervisorFeatures;
// Mask of features that require start address to be 64 byte aligned
DWORD64 AlignedFeatures;
// Total size of the save area for user and supervisor states
DWORD AllFeatureSize;
// List which holds size of each user and supervisor state supported by CPU
DWORD AllFeatures[(64)];
} XSTATE_CONFIGURATION, *PXSTATE_CONFIGURATION;
// begin_ntifs
typedef struct _MEMORY_BASIC_INFORMATION {
PVOID BaseAddress;
PVOID AllocationBase;
DWORD AllocationProtect;
SIZE_T RegionSize;
DWORD State;
DWORD Protect;
DWORD Type;
} MEMORY_BASIC_INFORMATION, *PMEMORY_BASIC_INFORMATION;
// end_ntifs
typedef struct _MEMORY_BASIC_INFORMATION32 {
DWORD BaseAddress;
DWORD AllocationBase;
DWORD AllocationProtect;
DWORD RegionSize;
DWORD State;
DWORD Protect;
DWORD Type;
} MEMORY_BASIC_INFORMATION32, *PMEMORY_BASIC_INFORMATION32;
typedef struct __declspec(align(16)) _MEMORY_BASIC_INFORMATION64 {
ULONGLONG BaseAddress;
ULONGLONG AllocationBase;
DWORD AllocationProtect;
DWORD __alignment1;
ULONGLONG RegionSize;
DWORD State;
DWORD Protect;
DWORD Type;
DWORD __alignment2;
} MEMORY_BASIC_INFORMATION64, *PMEMORY_BASIC_INFORMATION64;
//
// Define flags for setting process CFG valid call target entries.
//
//
// Call target should be made valid. If not set, the call target is made
// invalid. Input flag.
//
//
// Call target has been successfully processed. Used to report to the caller
// how much progress has been made. Output flag.
//
//
// Call target should be made valid only if it is suppressed export.
// What this flag means is that it can *only* be used on a cell which is
// currently in the CFG export suppressed state (only considered for export
// suppressed processes and not legacy CFG processes!), and it is also
// allowed to be used even if the process is a restricted (i.e. no ACG) process.
//
typedef struct _CFG_CALL_TARGET_INFO {
ULONG_PTR Offset;
ULONG_PTR Flags;
} CFG_CALL_TARGET_INFO, *PCFG_CALL_TARGET_INFO;
# 12468 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Session Specific Access Rights.
//
# 12479 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Partition Specific Access Rights.
//
# 12491 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_access
# 12541 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _ENCLAVE_CREATE_INFO_SGX {
BYTE Secs[4096];
} ENCLAVE_CREATE_INFO_SGX, *PENCLAVE_CREATE_INFO_SGX;
typedef struct _ENCLAVE_INIT_INFO_SGX {
BYTE SigStruct[1808];
BYTE Reserved1[240];
BYTE EInitToken[304];
BYTE Reserved2[1744];
} ENCLAVE_INIT_INFO_SGX, *PENCLAVE_INIT_INFO_SGX;
// begin_access
//
// Define access rights to files and directories
//
//
// The FILE_READ_DATA and FILE_WRITE_DATA constants are also defined in
// devioctl.h as FILE_READ_ACCESS and FILE_WRITE_ACCESS. The values for these
// constants *MUST* always be in sync.
// The values are redefined in devioctl.h because they must be available to
// both DOS and NT.
//
# 12612 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_access
# 12686 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _FILE_ID_128 {
BYTE Identifier[16];
} FILE_ID_128, *PFILE_ID_128;
//
// Define the file notification information structure
//
typedef struct _FILE_NOTIFY_INFORMATION {
DWORD NextEntryOffset;
DWORD Action;
DWORD FileNameLength;
WCHAR FileName[1];
} FILE_NOTIFY_INFORMATION, *PFILE_NOTIFY_INFORMATION;
//
// Define segement buffer structure for scatter/gather read/write.
//
typedef union _FILE_SEGMENT_ELEMENT {
PVOID64 Buffer;
ULONGLONG Alignment;
}FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT;
//
// Flag defintions for NtFlushBuffersFileEx
//
// If none of the below flags are specified the following will occur for a
// given file handle:
// - Write any modified data for the given file from the Windows in-memory
// cache.
// - Commit all pending metadata changes for the given file from the
// Windows in-memory cache.
// - Send a SYNC command to the underlying storage device to commit all
// written data in the devices cache to persistent storage.
//
// If a volume handle is specified:
// - Write all modified data for all files on the volume from the Windows
// in-memory cache.
// - Commit all pending metadata changes for all files on the volume from
// the Windows in-memory cache.
// - Send a SYNC command to the underlying storage device to commit all
// written data in the devices cache to persistent storage.
//
// This is equivalent to how NtFlushBuffersFile has always worked.
//
//
// If set, this operation will write the data for the given file from the
// Windows in-memory cache. This will NOT commit any associated metadata
// changes. This will NOT send a SYNC to the storage device to flush its
// cache. Not supported on volume handles. Only supported by the NTFS
// filesystem.
//
//
// If set, this operation will commit both the data and metadata changes for
// the given file from the Windows in-memory cache. This will NOT send a SYNC
// to the storage device to flush its cache. Not supported on volume handles.
// Only supported by the NTFS filesystem.
//
//
// If set, this operation will write the data for the given file from the
// Windows in-memory cache. It will also try to skip updating the timestamp
// as much as possible. This will send a SYNC to the storage device to flush its
// cache. Not supported on volume or directory handles. Only supported by the NTFS
// filesystem.
//
//
// The reparse GUID structure is used by all 3rd party layered drivers to
// store data in a reparse point. For non-Microsoft tags, The GUID field
// cannot be GUID_NULL.
// The constraints on reparse tags are defined below.
// Microsoft tags can also be used with this format of the reparse point buffer.
//
typedef struct _REPARSE_GUID_DATA_BUFFER {
DWORD ReparseTag;
WORD ReparseDataLength;
WORD Reserved;
GUID ReparseGuid;
struct {
BYTE DataBuffer[1];
} GenericReparseBuffer;
} REPARSE_GUID_DATA_BUFFER, *PREPARSE_GUID_DATA_BUFFER;
//
// Maximum allowed size of the reparse data.
//
//
// Predefined reparse tags.
// These tags need to avoid conflicting with IO_REMOUNT defined in ntos\inc\io.h
//
//
// The value of the following constant needs to satisfy the following conditions:
// (1) Be at least as large as the largest of the reserved tags.
// (2) Be strictly smaller than all the tags in use.
//
//
// The reparse tags are a DWORD. The 32 bits are laid out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +-+-+-+-+-----------------------+-------------------------------+
// |M|R|N|D| Reserved bits | Reparse Tag Value |
// +-+-+-+-+-----------------------+-------------------------------+
//
// M is the Microsoft bit. When set to 1, it denotes a tag owned by Microsoft.
// All ISVs must use a tag with a 0 in this position.
// Note: If a Microsoft tag is used by non-Microsoft software, the
// behavior is not defined.
//
// R is reserved. Must be zero for non-Microsoft tags.
//
// N is name surrogate. When set to 1, the file represents another named
// entity in the system.
//
// D is the directory bit. When set to 1, indicates that any directory
// with this reparse tag can have children. Has no special meaning when used
// on a non-directory file. Not compatible with the name surrogate bit.
//
// The M and N bits are OR-able.
// The following macros check for the M and N bit values:
//
//
// Macro to determine whether a reparse point tag corresponds to a tag
// owned by Microsoft.
//
//
// Macro to determine whether a reparse point tag is a name surrogate
//
//
// Macro to determine whether a directory with this reparse point can have
// children.
//
# 12896 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//======================= FSCTL_SCRUB_DATA =============================
# 12910 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _SCRUB_DATA_INPUT {
//
// sizeof(SCRUB_DATA_INPUT)
//
DWORD Size;
//
// Zero for the initial call.
//
// SCRUB_DATA_INPUT_FLAG_RESUME has to be specified when
// ResumeContext is provided from the previous call
//
DWORD Flags;
//
// Maximum number of IOs in a single call. This is a hint to a
// file system to halt the operation with a restart context if the
// operation takes too long.
//
DWORD MaximumIos;
//
// Reserved
//
DWORD Reserved[17];
//
// Opaque data returned from the previous call to restart the
// operation. Only valid when SCRUB_DATA_FLAG_RESUME is set
// at Flags field.
//
BYTE ResumeContext[816];
} SCRUB_DATA_INPUT, *PSCRUB_DATA_INPUT;
typedef struct _SCRUB_PARITY_EXTENT {
LONGLONG Offset;
ULONGLONG Length;
} SCRUB_PARITY_EXTENT, *PSCRUB_PARITY_EXTENT;
typedef struct _SCRUB_PARITY_EXTENT_DATA {
//
// sizeof(SCRUB_PARITY_EXTENT_DATA)
//
WORD Size;
//
// Reserved
//
WORD Flags;
//
// Number of parity extents
//
WORD NumberOfParityExtents;
//
// Maximum number of parity extents in ParityExtents buffer
//
WORD MaximumNumberOfParityExtents;
//
// Output buffer for parity extents
//
SCRUB_PARITY_EXTENT ParityExtents[1];
} SCRUB_PARITY_EXTENT_DATA, *PSCRUB_PARITY_EXTENT_DATA;
typedef struct _SCRUB_DATA_OUTPUT {
//
// sizeof(SCRUB_DATA_OUTPUT)
//
DWORD Size;
//
// Output Flags
//
// SCRUB_DATA_OUTPUT_FLAG_INCOMPLETE will be set if there are
// remaining ranges. ResumeContext provided for the subsequent
// call.
//
DWORD Flags;
//
// Operational status
//
DWORD Status;
//
// Offset of the error range of the user data where the operational errors were found.
// This value may be -1 if the error were found in non-user data area
//
ULONGLONG ErrorFileOffset;
//
// Length of the error range of the user data where the operational errors were found.
// This value may be 0 if the error were found in non-user data area
//
ULONGLONG ErrorLength;
//
// Number of bytes successfully repaired in the operational error range
//
ULONGLONG NumberOfBytesRepaired;
//
// Number of bytes failed due to an error in the operational error range
//
ULONGLONG NumberOfBytesFailed;
//
// Reference number for the file system specific internal file
//
ULONGLONG InternalFileReference;
//
// Resume context length
//
// Only valid if SCRUB_DATA_OUTPUT_FLAG_RESUME_CONTEXT_LENGTH_SPECIFIED
// is specified in the Flags.
//
WORD ResumeContextLength;
//
// Offset for the parity extent data in the output buffer
// Only valid if SCRUB_DATA_OUTPUT_FLAG_PARITY_EXTENT_DATA_RETURNED
// is specified in the Flags.
//
WORD ParityExtentDataOffset;
//
// Reserved
//
DWORD Reserved[5];
# 13088 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Opaque data that the file system returns to the user so that
// subsequent call can use this data to resume from the previous
// point for the operation.
//
// Resume operation can be requested on a different handle and
// across the reboot. However, file system may not honor the
// resume context if not feasible and start from the beginning.
//
// This field is only valid when SCRUB_DATA_OUTPUT_FLAG_INCOMPLETE
// is set.
//
BYTE ResumeContext[816];
} SCRUB_DATA_OUTPUT, *PSCRUB_DATA_OUTPUT;
//
//=============== FSCTL_QUERY_SHARED_VIRTUAL_DISK_SUPPORT ====================
//
//
// Whether the file system supports shared virtual disks.
//
typedef enum _SharedVirtualDiskSupportType
{
//
// Shared virtual disks are not supported.
//
SharedVirtualDisksUnsupported = 0,
//
// Shared virtual disks are supported.
//
SharedVirtualDisksSupported = 1,
//
// The target device supports taking virtual disk
// snapshots.
//
SharedVirtualDiskSnapshotsSupported = 3,
//
// The target device supports Continuous Data
// Protection (log based) snapshots.
//
SharedVirtualDiskCDPSnapshotsSupported = 7
} SharedVirtualDiskSupportType;
typedef enum _SharedVirtualDiskHandleState
{
//
// The file handle is not related to a shared virtual disk.
//
SharedVirtualDiskHandleStateNone = 0,
//
// This handle is for the same file where at least one handle is
// accessing the file in shared mode.
//
SharedVirtualDiskHandleStateFileShared = 1,
//
// This handle is currently being used to access a shared
// virtual disk.
//
SharedVirtualDiskHandleStateHandleShared = 3
} SharedVirtualDiskHandleState;
//
// Response to FSCTL_QUERY_SHARED_VIRTUAL_DISK_SUPPORT that indicates the level
// of support for shared virtual disks on the target file system.
//
typedef struct _SHARED_VIRTUAL_DISK_SUPPORT {
//
// One or more of the above SharedVirtualDiskSupportType flags that indicate the
// level of shared virtual disk support on this file system.
//
SharedVirtualDiskSupportType SharedVirtualDiskSupport;
//
// The state of the current shared virtual disk handle. This is one or more of the
// above SharedVirtualDiskHandleState flags.
//
SharedVirtualDiskHandleState HandleState;
} SHARED_VIRTUAL_DISK_SUPPORT, *PSHARED_VIRTUAL_DISK_SUPPORT;
//
// Determines if the provided virtual disk handle state, from FSCTL_QUERY_SHARED_VIRTUAL_DISK_SUPPORT,
// indicates that the target virtual disk file is opened in shared mode.
//
// begin_access
//
// I/O Completion Specific Access Rights.
//
//
// Some applications include both ntioapi_x.h and winioctl.h
//
# 13211 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Define the SMB Cluster Client Failover AppInstance Extended Attribute name
// newer version of input payload assumes that EA is not just a GUID,
// but instead is a structure that contains additional information
//
//
// Is used only when file is opened directly on CSVFS. This flag is ignored when file
// is opened over SMB.
// Tells CSVFS that this file open should be valid only on coordinating node.
// If open comes to CSVFS, and this node is not a coordinating then open would fail.
// If file is opened, and coordinating node is moved then file open will be invalidated
//
typedef struct _NETWORK_APP_INSTANCE_EA {
//
// The caller places a GUID that should always be unique for a single instance of
// the application.
//
GUID AppInstanceID;
//
// Combination of the NETWORK_APP_INSTANCE_CSV_FLAGS_* flags
//
DWORD CsvFlags;
} NETWORK_APP_INSTANCE_EA, *PNETWORK_APP_INSTANCE_EA;
// begin_access
//
// Object Manager Symbolic Link Specific Access Rights.
//
//
// =========================================
// Define GUIDs which represent well-known power schemes
// =========================================
//
//
// Maximum Power Savings - indicates that very aggressive power savings measures will be used to help
// stretch battery life.
//
// {a1841308-3541-4fab-bc81-f71556f20b4a}
//
extern "C" const GUID GUID_MAX_POWER_SAVINGS;
//
// No Power Savings - indicates that almost no power savings measures will be used.
//
// {8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c}
//
extern "C" const GUID GUID_MIN_POWER_SAVINGS;
//
// Typical Power Savings - indicates that fairly aggressive power savings measures will be used.
//
// {381b4222-f694-41f0-9685-ff5bb260df2e}
//
extern "C" const GUID GUID_TYPICAL_POWER_SAVINGS;
//
// This is a special GUID that represents "no subgroup" of settings. That is, it indicates
// that settings that are in the root of the power policy hierarchy as opposed to settings
// that are buried under a subgroup of settings. This should be used when querying for
// power settings that may not fall into a subgroup.
//
extern "C" const GUID NO_SUBGROUP_GUID;
//
// This is a special GUID that represents "every power scheme". That is, it indicates
// that any write to this power scheme should be reflected to every scheme present.
// This allows users to write a single setting once and have it apply to all schemes. They
// can then apply custom settings to specific power schemes that they care about.
//
extern "C" const GUID ALL_POWERSCHEMES_GUID;
//
// This is a special GUID that represents a 'personality' that each power scheme will have.
// In other words, each power scheme will have this key indicating "I'm most like *this* base
// power scheme." This individual setting will have one of three settings:
// GUID_MAX_POWER_SAVINGS
// GUID_MIN_POWER_SAVINGS
// GUID_TYPICAL_POWER_SAVINGS
//
// This allows several features:
// 1. Drivers and applications can register for notification of this GUID. So when this power
// scheme is activiated, this GUID's setting will be sent across the system and drivers/applications
// can see "GUID_MAX_POWER_SAVINGS" which will tell them in a generic fashion "get real aggressive
// about conserving power".
// 2. UserB may install a driver or application which creates power settings, and UserB may modify
// those power settings. Now UserA logs in. How does he see those settings? They simply don't
// exist in his private power key. Well they do exist over in the system power key. When we
// enumerate all the power settings in this system power key and don't find a corresponding entry
// in the user's private power key, then we can go look at this "personality" key in the users
// power scheme. We can then go get a default value for the power setting, depending on which
// "personality" power scheme is being operated on. Here's an example:
// A. UserB installs an application that creates a power setting Seetting1
// B. UserB changes Setting1 to have a value of 50 because that's one of the possible settings
// available for setting1.
// C. UserB logs out
// D. UserA logs in and his active power scheme is some custom scheme that was derived from
// the GUID_TYPICAL_POWER_SAVINGS. But remember that UserA has no setting1 in his
// private power key.
// E. When activating UserA's selected power scheme, all power settings in the system power key will
// be enumerated (including Setting1).
// F. The power manager will see that UserA has no Setting1 power setting in his private power scheme.
// G. The power manager will query UserA's power scheme for its personality and retrieve
// GUID_TYPICAL_POWER_SAVINGS.
// H. The power manager then looks in Setting1 in the system power key and looks in its set of default
// values for the corresponding value for GUID_TYPICAL_POWER_SAVINGS power schemes.
// I. This derived power setting is applied.
extern "C" const GUID GUID_POWERSCHEME_PERSONALITY;
//
// Define a special GUID which will be used to define the active power scheme.
// User will register for this power setting GUID, and when the active power
// scheme changes, they'll get a callback where the payload is the GUID
// representing the active powerscheme.
// ( 31F9F286-5084-42FE-B720-2B0264993763 }
//
extern "C" const GUID GUID_ACTIVE_POWERSCHEME;
//
// =========================================
// Define GUIDs which represent well-known power settings
// =========================================
//
// Idle resiliency settings
// -------------------------
//
// Specifies the subgroup which will contain all of the idle resiliency
// settings for a single policy.
//
// {2E601130-5351-4d9d-8E04-252966BAD054}
extern "C" const GUID GUID_IDLE_RESILIENCY_SUBGROUP;
//
// Specifies the maximum clock interrupt period (in ms)
//
// N.B. This power setting is DEPRECATED.
//
// {C42B79AA-AA3A-484b-A98F-2CF32AA90A28}
extern "C" const GUID GUID_IDLE_RESILIENCY_PERIOD;
//
// Specifies the deep sleep policy setting.
// This is intended to override the GUID_IDLE_RESILIENCY_PERIOD
// {d502f7ee-1dc7-4efd-a55d-f04b6f5c0545}
extern "C" const GUID GUID_DEEP_SLEEP_ENABLED;
//
// Specifies the platform idle state index associated with idle resiliency
// period.
//
// N.B. This power setting is DEPRECATED.
//
// {D23F2FB8-9536-4038-9C94-1CE02E5C2152}
extern "C" const GUID GUID_DEEP_SLEEP_PLATFORM_STATE;
//
// Specifies (in milliseconds) how long we wait after the last disk access
// before we power off the disk in case when IO coalescing is active.
//
// {C36F0EB4-2988-4a70-8EEE-0884FC2C2433}
extern "C" const GUID GUID_DISK_COALESCING_POWERDOWN_TIMEOUT;
//
// Specifies (in seconds) how long we wait after the CS Enter before
// we deactivate execution required request.
//
// 0 : implies execution power requests are disabled and have no effect
// -1 : implies execution power requests are never deactivated
//
// Note: Execution required power requests are mapped into system required
// power requests on non-AoAc machines and this value has no effect.
//
// {3166BC41-7E98-4e03-B34E-EC0F5F2B218E}
extern "C" const GUID GUID_EXECUTION_REQUIRED_REQUEST_TIMEOUT;
// Video settings
// --------------
//
// Specifies the subgroup which will contain all of the video
// settings for a single policy.
//
// {7516b95f-f776-4464-8c53-06167f40cc99}
//
extern "C" const GUID GUID_VIDEO_SUBGROUP;
//
// Specifies (in seconds) how long we wait after the last user input has been
// received before we power off the video.
//
// {3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e}
//
extern "C" const GUID GUID_VIDEO_POWERDOWN_TIMEOUT;
//
// Specifies whether adaptive display dimming is turned on or off.
//
// N.B. This setting is DEPRECATED in Windows 8.1
//
// {82DBCF2D-CD67-40C5-BFDC-9F1A5CCD4663}
//
extern "C" const GUID GUID_VIDEO_ANNOYANCE_TIMEOUT;
//
// Specifies how much adaptive dim time out will be increased by.
//
// N.B. This setting is DEPRECATED in Windows 8.1
//
// {EED904DF-B142-4183-B10B-5A1197A37864}
//
extern "C" const GUID GUID_VIDEO_ADAPTIVE_PERCENT_INCREASE;
//
// Specifies (in seconds) how long we wait after the last user input has been
// received before we dim the video.
//
// {17aaa29b-8b43-4b94-aafe-35f64daaf1ee}
//
extern "C" const GUID GUID_VIDEO_DIM_TIMEOUT;
//
// Specifies if the operating system should use adaptive timers (based on
// previous behavior) to power down the video.
//
// {90959d22-d6a1-49b9-af93-bce885ad335b}
//
extern "C" const GUID GUID_VIDEO_ADAPTIVE_POWERDOWN;
//
// Specifies if the monitor is currently being powered or not.
//
// {02731015-4510-4526-99E6-E5A17EBD1AEA}
//
extern "C" const GUID GUID_MONITOR_POWER_ON;
//
// Monitor brightness policy when in normal state.
//
// {aded5e82-b909-4619-9949-f5d71dac0bcb}
//
extern "C" const GUID GUID_DEVICE_POWER_POLICY_VIDEO_BRIGHTNESS;
//
// Monitor brightness policy when in dim state.
//
// {f1fbfde2-a960-4165-9f88-50667911ce96}
//
extern "C" const GUID GUID_DEVICE_POWER_POLICY_VIDEO_DIM_BRIGHTNESS;
//
// Current monitor brightness.
//
// {8ffee2c6-2d01-46be-adb9-398addc5b4ff}
//
extern "C" const GUID GUID_VIDEO_CURRENT_MONITOR_BRIGHTNESS;
//
// Specifies if the operating system should use ambient light sensor to change
// adaptively the display's brightness.
//
// {FBD9AA66-9553-4097-BA44-ED6E9D65EAB8}
//
extern "C" const GUID GUID_VIDEO_ADAPTIVE_DISPLAY_BRIGHTNESS;
//
// Specifies a change in the current monitor's display state.
//
// {6fe69556-704a-47a0-8f24-c28d936fda47}
//
extern "C" const GUID GUID_CONSOLE_DISPLAY_STATE;
//
// Defines a guid for enabling/disabling the ability to create display required
// power requests.
//
// {A9CEB8DA-CD46-44FB-A98B-02AF69DE4623}
//
extern "C" const GUID GUID_ALLOW_DISPLAY_REQUIRED;
//
// Specifies the video power down timeout (in seconds) after the interactive
// console is locked (and sensors indicate UserNotPresent). Value 0
// effectively disables this feature.
//
// {8EC4B3A5-6868-48c2-BE75-4F3044BE88A7}
//
extern "C" const GUID GUID_VIDEO_CONSOLE_LOCK_TIMEOUT;
// Adaptive power behavior settings
// --------------------------------
//
// {8619B916-E004-4dd8-9B66-DAE86F806698}
extern "C" const GUID GUID_ADAPTIVE_POWER_BEHAVIOR_SUBGROUP;
//
// Specifies the input timeout (in seconds) to be used to indicate UserUnkown.
// Value 0 effectively disables this feature.
//
// {5ADBBFBC-074E-4da1-BA38-DB8B36B2C8F3}
extern "C" const GUID GUID_NON_ADAPTIVE_INPUT_TIMEOUT;
//
// Specifies a change in the input controller(s) global system's state:
// e.g. enabled, suppressed, filtered.
//
// {0E98FAE9-F45A-4DE1-A757-6031F197F6EA}
extern "C" const GUID GUID_ADAPTIVE_INPUT_CONTROLLER_STATE;
// Harddisk settings
// -----------------
//
// Specifies the subgroup which will contain all of the harddisk
// settings for a single policy.
//
extern "C" const GUID GUID_DISK_SUBGROUP;
//
// Specifies a maximum power consumption level.
//
extern "C" const GUID GUID_DISK_MAX_POWER;
//
// Specifies (in seconds) how long we wait after the last disk access
// before we power off the disk.
//
extern "C" const GUID GUID_DISK_POWERDOWN_TIMEOUT;
//
// Specifies (in milliseconds) how long we wait after the last disk access
// before we power off the disk taking into account if IO coalescing is active.
//
// {58E39BA8-B8E6-4EF6-90D0-89AE32B258D6}
extern "C" const GUID GUID_DISK_IDLE_TIMEOUT;
//
// Specifies the amount of contiguous disk activity time to ignore when
// calculating disk idleness.
//
// 80e3c60e-bb94-4ad8-bbe0-0d3195efc663
//
extern "C" const GUID GUID_DISK_BURST_IGNORE_THRESHOLD;
//
// Specifies if the operating system should use adaptive timers (based on
// previous behavior) to power down the disk,
//
extern "C" const GUID GUID_DISK_ADAPTIVE_POWERDOWN;
// System sleep settings
// ---------------------
//
// Specifies the subgroup which will contain all of the sleep
// settings for a single policy.
// { 238C9FA8-0AAD-41ED-83F4-97BE242C8F20 }
//
extern "C" const GUID GUID_SLEEP_SUBGROUP;
//
// Specifies an idle treshold percentage (0-100). The system must be this idle
// over a period of time in order to idle to sleep.
//
// N.B. DEPRECATED IN WINDOWS 6.1
//
extern "C" const GUID GUID_SLEEP_IDLE_THRESHOLD;
//
// Specifies (in seconds) how long we wait after the system is deemed
// "idle" before moving to standby (S1, S2 or S3).
//
extern "C" const GUID GUID_STANDBY_TIMEOUT;
//
// Specifies (in seconds) how long the system should go back to sleep after
// waking unattended. 0 indicates that the standard standby/hibernate idle
// policy should be used instead.
//
// {7bc4a2f9-d8fc-4469-b07b-33eb785aaca0}
//
extern "C" const GUID GUID_UNATTEND_SLEEP_TIMEOUT;
//
// Specifies (in seconds) how long we wait after the system is deemed
// "idle" before moving to hibernate (S4).
//
extern "C" const GUID GUID_HIBERNATE_TIMEOUT;
//
// Specifies whether or not Fast S4 should be enabled if the system supports it
// 94AC6D29-73CE-41A6-809F-6363BA21B47E
//
extern "C" const GUID GUID_HIBERNATE_FASTS4_POLICY;
//
// Define a GUID for controlling the criticality of sleep state transitions.
// Critical sleep transitions do not query applications, services or drivers
// before transitioning the platform to a sleep state.
//
// {B7A27025-E569-46c2-A504-2B96CAD225A1}
//
extern "C" const GUID GUID_CRITICAL_POWER_TRANSITION;
//
// Specifies if the system is entering or exiting 'away mode'.
// 98A7F580-01F7-48AA-9C0F-44352C29E5C0
//
extern "C" const GUID GUID_SYSTEM_AWAYMODE;
//
// Specify whether away mode is allowed
//
// {25DFA149-5DD1-4736-B5AB-E8A37B5B8187}
//
extern "C" const GUID GUID_ALLOW_AWAYMODE;
//
// Defines a guid to control User Presence Prediction mode.
//
// {82011705-FB95-4D46-8D35-4042B1D20DEF}
//
extern "C" const GUID GUID_USER_PRESENCE_PREDICTION;
//
// Defines a guid to control Standby Budget Grace Period.
//
// {60C07FE1-0556-45CF-9903-D56E32210242}
//
extern "C" const GUID GUID_STANDBY_BUDGET_GRACE_PERIOD;
//
// Defines a guid to control Standby Budget Percent.
//
// {9FE527BE-1B70-48DA-930D-7BCF17B44990}
//
extern "C" const GUID GUID_STANDBY_BUDGET_PERCENT;
//
// Defines a guid to control Standby Reserve Grace Period.
//
// {C763EE92-71E8-4127-84EB-F6ED043A3E3D}
//
extern "C" const GUID GUID_STANDBY_RESERVE_GRACE_PERIOD;
//
// Defines a guid to control Standby Reserve Time.
//
// {468FE7E5-1158-46EC-88BC-5B96C9E44FD0}
//
extern "C" const GUID GUID_STANDBY_RESERVE_TIME;
//
// Defines a guid to control Standby Reset Percentage.
//
// {49CB11A5-56E2-4AFB-9D38-3DF47872E21B}
//
extern "C" const GUID GUID_STANDBY_RESET_PERCENT;
//
// Defines a guid for enabling/disabling standby (S1-S3) states. This does not
// affect hibernation (S4).
//
// {abfc2519-3608-4c2a-94ea-171b0ed546ab}
//
extern "C" const GUID GUID_ALLOW_STANDBY_STATES;
//
// Defines a guid for enabling/disabling the ability to wake via RTC.
//
// {BD3B718A-0680-4D9D-8AB2-E1D2B4AC806D}
//
extern "C" const GUID GUID_ALLOW_RTC_WAKE;
//
// Defines a guid for enabling/disabling the ability to create system required
// power requests.
//
// {A4B195F5-8225-47D8-8012-9D41369786E2}
//
extern "C" const GUID GUID_ALLOW_SYSTEM_REQUIRED;
// Energy Saver settings
// ---------------------
//
// Indicates if Enegry Saver is ON or OFF.
//
// {E00958C0-C213-4ACE-AC77-FECCED2EEEA5}
//
extern "C" const GUID GUID_POWER_SAVING_STATUS;
//
// Specifies the subgroup which will contain all of the Energy Saver settings
// for a single policy.
//
// {DE830923-A562-41AF-A086-E3A2C6BAD2DA}
//
extern "C" const GUID GUID_ENERGY_SAVER_SUBGROUP;
//
// Defines a guid to engage Energy Saver at specific battery charge level
//
// {E69653CA-CF7F-4F05-AA73-CB833FA90AD4}
//
extern "C" const GUID GUID_ENERGY_SAVER_BATTERY_THRESHOLD;
//
// Defines a guid to specify display brightness weight when Energy Saver is engaged
//
// {13D09884-F74E-474A-A852-B6BDE8AD03A8}
//
extern "C" const GUID GUID_ENERGY_SAVER_BRIGHTNESS;
//
// Defines a guid to specify the Energy Saver policy
//
// {5C5BB349-AD29-4ee2-9D0B-2B25270F7A81}
//
extern "C" const GUID GUID_ENERGY_SAVER_POLICY;
// System button actions
// ---------------------
//
//
// Specifies the subgroup which will contain all of the system button
// settings for a single policy.
//
extern "C" const GUID GUID_SYSTEM_BUTTON_SUBGROUP;
//
// System button values which contain the PowerAction* value for each action.
//
// Specifies (in a POWER_ACTION_POLICY structure) the appropriate action to
// take when the system power button is pressed.
//
extern "C" const GUID GUID_POWERBUTTON_ACTION;
//
// Specifies (in a POWER_ACTION_POLICY structure) the appropriate action to
// take when the system sleep button is pressed.
//
extern "C" const GUID GUID_SLEEPBUTTON_ACTION;
//
// Specifies (in a POWER_ACTION_POLICY structure) the appropriate action to
// take when the system sleep button is pressed.
// { A7066653-8D6C-40A8-910E-A1F54B84C7E5 }
//
extern "C" const GUID GUID_USERINTERFACEBUTTON_ACTION;
//
// Specifies (in a POWER_ACTION_POLICY structure) the appropriate action to
// take when the system lid is closed.
//
extern "C" const GUID GUID_LIDCLOSE_ACTION;
extern "C" const GUID GUID_LIDOPEN_POWERSTATE;
// Battery Discharge Settings
// --------------------------
//
// Specifies the subgroup which will contain all of the battery discharge
// settings for a single policy.
//
extern "C" const GUID GUID_BATTERY_SUBGROUP;
//
// 4 battery discharge alarm settings.
//
// GUID_BATTERY_DISCHARGE_ACTION_x - This is the action to take. It is a value
// of type POWER_ACTION
// GUID_BATTERY_DISCHARGE_LEVEL_x - This is the battery level (%)
// GUID_BATTERY_DISCHARGE_FLAGS_x - Flags defined below:
// POWER_ACTION_POLICY->EventCode flags
// BATTERY_DISCHARGE_FLAGS_EVENTCODE_MASK
// BATTERY_DISCHARGE_FLAGS_ENABLE
extern "C" const GUID GUID_BATTERY_DISCHARGE_ACTION_0;
extern "C" const GUID GUID_BATTERY_DISCHARGE_LEVEL_0;
extern "C" const GUID GUID_BATTERY_DISCHARGE_FLAGS_0;
extern "C" const GUID GUID_BATTERY_DISCHARGE_ACTION_1;
extern "C" const GUID GUID_BATTERY_DISCHARGE_LEVEL_1;
extern "C" const GUID GUID_BATTERY_DISCHARGE_FLAGS_1;
extern "C" const GUID GUID_BATTERY_DISCHARGE_ACTION_2;
extern "C" const GUID GUID_BATTERY_DISCHARGE_LEVEL_2;
extern "C" const GUID GUID_BATTERY_DISCHARGE_FLAGS_2;
extern "C" const GUID GUID_BATTERY_DISCHARGE_ACTION_3;
extern "C" const GUID GUID_BATTERY_DISCHARGE_LEVEL_3;
extern "C" const GUID GUID_BATTERY_DISCHARGE_FLAGS_3;
// Processor power settings
// ------------------------
//
// Specifies the subgroup which will contain all of the processor
// settings for a single policy.
//
// {54533251-82be-4824-96c1-47b60b740d00}
//
extern "C" const GUID GUID_PROCESSOR_SETTINGS_SUBGROUP;
//
// Specifies various attributes that control processor performance/throttle
// states.
//
extern "C" const GUID GUID_PROCESSOR_THROTTLE_POLICY;
# 13860 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Specifies a percentage (between 0 and 100) that the processor frequency
// should never go above. For example, if this value is set to 80, then
// the processor frequency will never be throttled above 80 percent of its
// maximum frequency by the system.
//
// {bc5038f7-23e0-4960-96da-33abaf5935ec}
//
extern "C" const GUID GUID_PROCESSOR_THROTTLE_MAXIMUM;
//
// Specifies a percentage (between 0 and 100) that the processor frequency
// should never go above for Processor Power Efficiency Class 1.
// For example, if this value is set to 80, then the processor frequency will
// never be throttled above 80 percent of its maximum frequency by the system.
//
// {bc5038f7-23e0-4960-96da-33abaf5935ed}
//
extern "C" const GUID GUID_PROCESSOR_THROTTLE_MAXIMUM_1;
//
// Specifies a percentage (between 0 and 100) that the processor frequency
// should not drop below. For example, if this value is set to 50, then the
// processor frequency will never be throttled below 50 percent of its
// maximum frequency by the system.
//
// {893dee8e-2bef-41e0-89c6-b55d0929964c}
//
extern "C" const GUID GUID_PROCESSOR_THROTTLE_MINIMUM;
//
// Specifies a percentage (between 0 and 100) that the processor frequency
// should not drop below for Processor Power Efficiency Class 1.
// For example, if this value is set to 50, then the processor frequency will
// never be throttled below 50 percent of its maximum frequency by the system.
//
// {893dee8e-2bef-41e0-89c6-b55d0929964d}
//
extern "C" const GUID GUID_PROCESSOR_THROTTLE_MINIMUM_1;
//
// Specifies the maximum processor frequency (expresssed in MHz).
//
// {75B0AE3F-BCE0-45a7-8C89-C9611C25E100}
extern "C" const GUID GUID_PROCESSOR_FREQUENCY_LIMIT;
// {75B0AE3F-BCE0-45a7-8C89-C9611C25E101}
extern "C" const GUID GUID_PROCESSOR_FREQUENCY_LIMIT_1;
//
// Specifies whether throttle states are allowed to be used even when
// performance states are available.
//
// {3b04d4fd-1cc7-4f23-ab1c-d1337819c4bb}
//
extern "C" const GUID GUID_PROCESSOR_ALLOW_THROTTLING;
//
// Specifies processor power settings for CState policy data
// {68F262A7-F621-4069-B9A5-4874169BE23C}
//
extern "C" const GUID GUID_PROCESSOR_IDLESTATE_POLICY;
//
// Specifies processor power settings for PerfState policy data
// {BBDC3814-18E9-4463-8A55-D197327C45C0}
//
extern "C" const GUID GUID_PROCESSOR_PERFSTATE_POLICY;
//
// Specifies the increase busy percentage threshold that must be met before
// increasing the processor performance state.
//
// {06cadf0e-64ed-448a-8927-ce7bf90eb35d}
//
extern "C" const GUID GUID_PROCESSOR_PERF_INCREASE_THRESHOLD;
//
// Specifies the increase busy percentage threshold that must be met before
// increasing the processor performance state for Processor Power Efficiency
// Class 1.
//
// {06cadf0e-64ed-448a-8927-ce7bf90eb35e}
//
extern "C" const GUID GUID_PROCESSOR_PERF_INCREASE_THRESHOLD_1;
//
// Specifies the decrease busy percentage threshold that must be met before
// decreasing the processor performance state.
//
// {12a0ab44-fe28-4fa9-b3bd-4b64f44960a6}
//
extern "C" const GUID GUID_PROCESSOR_PERF_DECREASE_THRESHOLD;
//
// Specifies the decrease busy percentage threshold that must be met before
// decreasing the processor performance state for Processor Power Efficiency
// Class 1.
//
// {12a0ab44-fe28-4fa9-b3bd-4b64f44960a7}
//
extern "C" const GUID GUID_PROCESSOR_PERF_DECREASE_THRESHOLD_1;
//
// Specifies, either as ideal, single or rocket, how aggressive performance
// states should be selected when increasing the processor performance state.
//
// {465E1F50-B610-473a-AB58-00D1077DC418}
//
extern "C" const GUID GUID_PROCESSOR_PERF_INCREASE_POLICY;
//
// Specifies, either as ideal, single or rocket, how aggressive performance
// states should be selected when increasing the processor performance state
// for Processor Power Efficiency Class 1.
//
// {465E1F50-B610-473a-AB58-00D1077DC419}
//
extern "C" const GUID GUID_PROCESSOR_PERF_INCREASE_POLICY_1;
//
// Specifies, either as ideal, single or rocket, how aggressive performance
// states should be selected when decreasing the processor performance state.
//
// {40FBEFC7-2E9D-4d25-A185-0CFD8574BAC6}
//
extern "C" const GUID GUID_PROCESSOR_PERF_DECREASE_POLICY;
//
// Specifies, either as ideal, single or rocket, how aggressive performance
// states should be selected when decreasing the processor performance state for
// Processor Power Efficiency Class 1.
//
// {40FBEFC7-2E9D-4d25-A185-0CFD8574BAC7}
//
extern "C" const GUID GUID_PROCESSOR_PERF_DECREASE_POLICY_1;
//
// Specifies, in milliseconds, the minimum amount of time that must elapse after
// the last processor performance state change before increasing the processor
// performance state.
//
// {984CF492-3BED-4488-A8F9-4286C97BF5AA}
//
extern "C" const GUID GUID_PROCESSOR_PERF_INCREASE_TIME;
//
// Specifies, in milliseconds, the minimum amount of time that must elapse after
// the last processor performance state change before increasing the processor
// performance state for Processor Power Efficiency Class 1.
//
// {984CF492-3BED-4488-A8F9-4286C97BF5AB}
//
extern "C" const GUID GUID_PROCESSOR_PERF_INCREASE_TIME_1;
//
// Specifies, in milliseconds, the minimum amount of time that must elapse after
// the last processor performance state change before increasing the processor
// performance state.
//
// {D8EDEB9B-95CF-4f95-A73C-B061973693C8}
//
extern "C" const GUID GUID_PROCESSOR_PERF_DECREASE_TIME;
//
// Specifies, in milliseconds, the minimum amount of time that must elapse after
// the last processor performance state change before increasing the processor
// performance state for Processor Power Efficiency Class 1.
//
// {D8EDEB9B-95CF-4f95-A73C-B061973693C9}
//
extern "C" const GUID GUID_PROCESSOR_PERF_DECREASE_TIME_1;
//
// Specifies the time, in milliseconds, that must expire before considering
// a change in the processor performance states or parked core set.
//
// {4D2B0152-7D5C-498b-88E2-34345392A2C5}
//
extern "C" const GUID GUID_PROCESSOR_PERF_TIME_CHECK;
//
// Specifies how the processor should manage performance and efficiency
// tradeoffs when boosting frequency above the maximum.
//
// {45BCC044-D885-43e2-8605-EE0EC6E96B59}
//
extern "C" const GUID GUID_PROCESSOR_PERF_BOOST_POLICY;
//
// Specifies how a processor opportunistically increases frequency above
// the maximum when operating contitions allow it to do so safely.
//
// {BE337238-0D82-4146-A960-4F3749D470C7}
//
extern "C" const GUID GUID_PROCESSOR_PERF_BOOST_MODE;
# 14078 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Specifies whether or not a procesor should autonomously select its
// operating performance state.
//
// {8BAA4A8A-14C6-4451-8E8B-14BDBD197537}
//
extern "C" const GUID GUID_PROCESSOR_PERF_AUTONOMOUS_MODE;
//
// Specifies the tradeoff between performance and energy the processor should
// make when operating in autonomous mode.
//
// {36687F9E-E3A5-4dbf-B1DC-15EB381C6863}
extern "C" const GUID GUID_PROCESSOR_PERF_ENERGY_PERFORMANCE_PREFERENCE;
//
// Specifies the window over which the processor should observe utilization when
// operating in autonomous mode, in microseconds.
//
// {CFEDA3D0-7697-4566-A922-A9086CD49DFA}
extern "C" const GUID GUID_PROCESSOR_PERF_AUTONOMOUS_ACTIVITY_WINDOW;
//
// Specifies whether the processor should perform duty cycling.
//
// {4E4450B3-6179-4e91-B8F1-5BB9938F81A1}
extern "C" const GUID GUID_PROCESSOR_DUTY_CYCLING;
//
// Specifies if idle state promotion and demotion values should be scaled based
// on the current peformance state.
//
// {6C2993B0-8F48-481f-BCC6-00DD2742AA06}
//
extern "C" const GUID GUID_PROCESSOR_IDLE_ALLOW_SCALING;
//
// Specifies if idle states should be disabled.
//
// {5D76A2CA-E8C0-402f-A133-2158492D58AD}
//
extern "C" const GUID GUID_PROCESSOR_IDLE_DISABLE;
//
// Specifies the deepest idle state type that should be used. If this value is
// set to zero, this setting is ignored. Values higher than supported by the
// processor then this setting has no effect.
//
// {9943e905-9a30-4ec1-9b99-44dd3b76f7a2}
//
extern "C" const GUID GUID_PROCESSOR_IDLE_STATE_MAXIMUM;
//
// Specifies the time that elapsed since the last idle state promotion or
// demotion before idle states may be promoted or demoted again (in
// microseconds).
//
// {C4581C31-89AB-4597-8E2B-9C9CAB440E6B}
//
extern "C" const GUID GUID_PROCESSOR_IDLE_TIME_CHECK;
//
// Specifies the upper busy threshold that must be met before demoting the
// processor to a lighter idle state (in percentage).
//
// {4B92D758-5A24-4851-A470-815D78AEE119}
//
extern "C" const GUID GUID_PROCESSOR_IDLE_DEMOTE_THRESHOLD;
//
// Specifies the lower busy threshold that must be met before promoting the
// processor to a deeper idle state (in percentage).
//
// {7B224883-B3CC-4d79-819F-8374152CBE7C}
//
extern "C" const GUID GUID_PROCESSOR_IDLE_PROMOTE_THRESHOLD;
//
// Specifies the utilization threshold in percent that must be crossed in order to un-park cores.
//
// N.B. This power setting is DEPRECATED.
//
// {df142941-20f3-4edf-9a4a-9c83d3d717d1}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_INCREASE_THRESHOLD;
//
// Specifies the utilization threshold in percent that must be crossed in order to park cores.
//
// N.B. This power setting is DEPRECATED.
//
// {68dd2f27-a4ce-4e11-8487-3794e4135dfa}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_DECREASE_THRESHOLD;
//
// Specifies, either as ideal, single or rocket, how aggressive core parking is when cores must be unparked.
//
// {c7be0679-2817-4d69-9d02-519a537ed0c6}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_INCREASE_POLICY;
//
// Specifies, either as ideal, single or rocket, how aggressive core parking is when cores must be parked.
//
// {71021b41-c749-4d21-be74-a00f335d582b}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_DECREASE_POLICY;
//
// Specifies, on a per processor group basis, the maximum number of cores that can be kept unparked.
//
// {ea062031-0e34-4ff1-9b6d-eb1059334028}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_MAX_CORES;
//
// Specifies, on a per processor group basis, the maximum number of cores that
// can be kept unparked for Processor Power Efficiency Class 1.
//
// {ea062031-0e34-4ff1-9b6d-eb1059334029}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_MAX_CORES_1;
//
// Specifies, on a per processor group basis, the minimum number of cores that must be kept unparked.
//
// {0cc5b647-c1df-4637-891a-dec35c318583}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_MIN_CORES;
//
// Specifies, on a per processor group basis, the minimum number of cores that
// must be kept unparked in Processor Power Efficiency Class 1.
//
// {0cc5b647-c1df-4637-891a-dec35c318584}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_MIN_CORES_1;
//
// Specifies, in milliseconds, the minimum amount of time a core must be parked before it can be unparked.
//
// {2ddd5a84-5a71-437e-912a-db0b8c788732}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_INCREASE_TIME;
//
// Specifies, in milliseconds, the minimum amount of time a core must be unparked before it can be parked.
//
// {dfd10d17-d5eb-45dd-877a-9a34ddd15c82}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_DECREASE_TIME;
//
// Specifies the factor by which to decrease affinity history on each core after each check.
//
// {8f7b45e3-c393-480a-878c-f67ac3d07082}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_AFFINITY_HISTORY_DECREASE_FACTOR;
//
// Specifies the threshold above which a core is considered to have had significant affinitized work scheduled to it while parked.
//
// {5b33697b-e89d-4d38-aa46-9e7dfb7cd2f9}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_AFFINITY_HISTORY_THRESHOLD;
//
// Specifies the weighting given to each occurence where affinitized work was scheduled to a parked core.
//
// {e70867f1-fa2f-4f4e-aea1-4d8a0ba23b20}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_AFFINITY_WEIGHTING;
//
// Specifies the factor by which to decrease the over utilization history on each core after the current performance check.
//
// {1299023c-bc28-4f0a-81ec-d3295a8d815d}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_HISTORY_DECREASE_FACTOR;
//
// Specifies the threshold above which a core is considered to have been recently over utilized while parked.
//
// {9ac18e92-aa3c-4e27-b307-01ae37307129}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_HISTORY_THRESHOLD;
//
// Specifies the weighting given to each occurence where a parked core is found to be over utilized.
//
// {8809c2d8-b155-42d4-bcda-0d345651b1db}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_WEIGHTING;
//
// Specifies, in percentage, the busy threshold that must be met before a parked core is considered over utilized.
//
// {943c8cb6-6f93-4227-ad87-e9a3feec08d1}
//
extern "C" const GUID GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_THRESHOLD;
//
// Specifies if at least one processor per core should always remain unparked.
//
// {a55612aa-f624-42c6-a443-7397d064c04f}
//
extern "C" const GUID GUID_PROCESSOR_PARKING_CORE_OVERRIDE;
//
// Specifies what performance state a processor should enter when first parked.
//
// {447235c7-6a8d-4cc0-8e24-9eaf70b96e2b}
//
extern "C" const GUID GUID_PROCESSOR_PARKING_PERF_STATE;
//
// Specifies what performance state a processor should enter when first parked
// for Processor Power Efficiency Class 1.
//
// {447235c7-6a8d-4cc0-8e24-9eaf70b96e2c}
//
extern "C" const GUID GUID_PROCESSOR_PARKING_PERF_STATE_1;
//
// Specify the busy threshold that must be met when calculating the concurrency of a node's workload.
//
// {2430ab6f-a520-44a2-9601-f7f23b5134b1}
//
extern "C" const GUID GUID_PROCESSOR_PARKING_CONCURRENCY_THRESHOLD;
//
// Specify the busy threshold that must be met by all cores in a concurrency set to unpark an extra core.
//
// {f735a673-2066-4f80-a0c5-ddee0cf1bf5d}
//
extern "C" const GUID GUID_PROCESSOR_PARKING_HEADROOM_THRESHOLD;
//
// Specify the percentage utilization used to calculate the distribution concurrency.
//
// {4bdaf4e9-d103-46d7-a5f0-6280121616ef}
//
extern "C" const GUID GUID_PROCESSOR_PARKING_DISTRIBUTION_THRESHOLD;
//
// Specifies the number of perf time check intervals to average utility over.
//
// {7d24baa7-0b84-480f-840c-1b0743c00f5f}
//
extern "C" const GUID GUID_PROCESSOR_PERF_HISTORY;
//
// Specifies the number of perf time check intervals to average utility over in
// Processor Power Efficiency Class 1.
//
// {7d24baa7-0b84-480f-840c-1b0743c00f60}
//
extern "C" const GUID GUID_PROCESSOR_PERF_HISTORY_1;
//
// Specifies the number of perf time check intervals to average utility over to
// determine performance increase.
//
// N.B. This power setting is DEPRECATED.
//
// {99B3EF01-752F-46a1-80FB-7730011F2354}
//
extern "C" const GUID GUID_PROCESSOR_PERF_INCREASE_HISTORY;
//
// Specifies the number of perf time check intervals to average utility over to
// determine performance decrease.
//
// N.B. This power setting is DEPRECATED.
//
// {0300F6F8-ABD6-45a9-B74F-4908691A40B5}
//
extern "C" const GUID GUID_PROCESSOR_PERF_DECREASE_HISTORY;
//
// Specifies the number of perf time check intervals to average utility over for
// core parking.
//
// N.B. This power setting is DEPRECATED.
//
// {77D7F282-8F1A-42cd-8537-45450A839BE8}
//
extern "C" const GUID GUID_PROCESSOR_PERF_CORE_PARKING_HISTORY;
//
// Specifies whether latency sensitivity hints should be taken into account by
// the perf state engine.
//
// N.B. This power setting is DEPRECATED.
//
// {0822df31-9c83-441c-a079-0de4cf009c7b}
//
extern "C" const GUID GUID_PROCESSOR_PERF_LATENCY_HINT;
//
// Specifies the processor performance state in response to latency sensitivity hints.
//
// {619b7505-003b-4e82-b7a6-4dd29c300971}
//
extern "C" const GUID GUID_PROCESSOR_PERF_LATENCY_HINT_PERF;
//
// Specifies the processor performance state in response to latency sensitivity
// hints for Processor Power Efficiency Class 1.
//
// {619b7505-003b-4e82-b7a6-4dd29c300972}
//
extern "C" const GUID GUID_PROCESSOR_PERF_LATENCY_HINT_PERF_1;
//
// Specifies the minimum unparked processors when a latency hint is active
// (in a percentage).
//
// {616cdaa5-695e-4545-97ad-97dc2d1bdd88}
//
extern "C" const GUID GUID_PROCESSOR_LATENCY_HINT_MIN_UNPARK;
//
// Specifies the minimum unparked processors when a latency hint is active
// for Processor Power Efficiency Class 1 (in a percentage).
//
// {616cdaa5-695e-4545-97ad-97dc2d1bdd89}
//
extern "C" const GUID GUID_PROCESSOR_LATENCY_HINT_MIN_UNPARK_1;
//
// Specifies whether the core parking engine should distribute processor
// utility.
//
// {e0007330-f589-42ed-a401-5ddb10e785d3}
//
extern "C" const GUID GUID_PROCESSOR_DISTRIBUTE_UTILITY;
//
// GUIDS to control PPM settings on computer system with more than one
// Processor Power Efficiency Classes (heterogeneous system).
// -----------------
//
// Specifies the current active heterogeneous policy.
//
// {7f2f5cfa-f10c-4823-b5e1-e93ae85f46b5}
//
extern "C" const GUID GUID_PROCESSOR_HETEROGENEOUS_POLICY;
//
// Specifies the number of perf check cycles required to decrease the number of
// Processor Power Efficiency Class 1 processors.
//
// {7f2492b6-60b1-45e5-ae55-773f8cd5caec}
//
extern "C" const GUID GUID_PROCESSOR_HETERO_DECREASE_TIME;
//
// Specifies the number of perf check cycles required to increase the number of
// Processor Power Efficiency Class 1 processors.
//
// {4009efa7-e72d-4cba-9edf-91084ea8cbc3}
//
extern "C" const GUID GUID_PROCESSOR_HETERO_INCREASE_TIME;
//
// Specifies the performance level (in units of Processor Power Efficiency
// Class 0 processor performance) at which the number of Processor Power
// Efficiency Class 1 processors is decreased.
//
// {f8861c27-95e7-475c-865b-13c0cb3f9d6b}
//
extern "C" const GUID GUID_PROCESSOR_HETERO_DECREASE_THRESHOLD;
//
// Specifies the performance level (in units of Processor Power Efficiency
// Class 0 processor performance) at which the number of Processor Power
// Efficiency Class 1 processors is increased.
//
// {b000397d-9b0b-483d-98c9-692a6060cfbf}
//
extern "C" const GUID GUID_PROCESSOR_HETERO_INCREASE_THRESHOLD;
//
// Specifies the performance target floor of a Processor Power Efficiency
// Class 0 processor when the system unparks Processor Power Efficiency Class 1
// processor(s).
//
// {fddc842b-8364-4edc-94cf-c17f60de1c80}
//
extern "C" const GUID GUID_PROCESSOR_CLASS0_FLOOR_PERF;
//
// Specifies the initial performance target of a Processor Power Efficiency
// Class 1 processor when the system makes a transition up from zero Processor
// Power Efficiency Class 1 processors.
//
// {1facfc65-a930-4bc5-9f38-504ec097bbc0}
//
extern "C" const GUID GUID_PROCESSOR_CLASS1_INITIAL_PERF;
//
// Specifies active vs passive cooling. Although not directly related to
// processor settings, it is the processor that gets throttled if we're doing
// passive cooling, so it is fairly strongly related.
// {94D3A615-A899-4AC5-AE2B-E4D8F634367F}
//
extern "C" const GUID GUID_SYSTEM_COOLING_POLICY;
// Lock Console on Wake
// --------------------
//
// Specifies the behavior of the system when we wake from standby or
// hibernate. If this is set, then we will cause the console to lock
// after we resume.
//
extern "C" const GUID GUID_LOCK_CONSOLE_ON_WAKE;
// Device idle characteristics
// ---------------------------
//
// Specifies whether to use the "performance" or "conservative" timeouts for
// device idle management.
//
// 4faab71a-92e5-4726-b531-224559672d19
//
extern "C" const GUID GUID_DEVICE_IDLE_POLICY;
//
// Specifies standby connectivity preference.
//
// F15576E8-98B7-4186-B944-EAFA664402D9
extern "C" const GUID GUID_CONNECTIVITY_IN_STANDBY;
//
// Specifies the mode for disconnected standby.
//
// 68AFB2D9-EE95-47A8-8F50-4115088073B1
extern "C" const GUID GUID_DISCONNECTED_STANDBY_MODE;
// AC/DC power source
// ------------------
//
// Specifies the power source for the system. consumers may register for
// notification when the power source changes and will be notified with
// one of 3 values:
// 0 - Indicates the system is being powered by an AC power source.
// 1 - Indicates the system is being powered by a DC power source.
// 2 - Indicates the system is being powered by a short-term DC power
// source. For example, this would be the case if the system is
// being powed by a short-term battery supply in a backing UPS
// system. When this value is recieved, the consumer should make
// preparations for either a system hibernate or system shutdown.
//
// { 5D3E9A59-E9D5-4B00-A6BD-FF34FF516548 }
extern "C" const GUID GUID_ACDC_POWER_SOURCE;
// Lid state changes
// -----------------
//
// Specifies the current state of the lid (open or closed). The callback won't
// be called at all until a lid device is found and its current state is known.
//
// Values:
//
// 0 - closed
// 1 - opened
//
// { BA3E0F4D-B817-4094-A2D1-D56379E6A0F3 }
//
extern "C" const GUID GUID_LIDSWITCH_STATE_CHANGE;
// Battery status changes
// ----------------------
//
// Specifies the percentage of battery life remaining. The consumer
// may register for notification in order to track battery life in
// a fine-grained manner.
//
// Once registered, the consumer can expect to be notified as the battery
// life percentage changes.
//
// The consumer will recieve a value between 0 and 100 (inclusive) which
// indicates percent battery life remaining.
//
// { A7AD8041-B45A-4CAE-87A3-EECBB468A9E1 }
extern "C" const GUID GUID_BATTERY_PERCENTAGE_REMAINING;
// Specifies change in number of batteries present on the system. The consumer
// may register for notification in order to track change in number of batteries
// available on a system.
//
// Once registered, the consumer can expect to be notified whenever the
// batteries are added or removed from the system.
//
// The consumer will recieve a value indicating number of batteries currently
// present on the system.
//
// {7D263F15-FCA4-49E5-854B-A9F2BFBD5C24}
extern "C" const GUID GUID_BATTERY_COUNT;
//
// Global notification indicating to listeners user activity/presence accross
// all sessions in the system (Present, NotPresent, Inactive)
//
// {786E8A1D-B427-4344-9207-09E70BDCBEA9}
extern "C" const GUID GUID_GLOBAL_USER_PRESENCE;
//
// Session specific notification indicating to listeners whether or not the display
// related to the given session is on/off/dim
//
// N.B. This is a session-specific notification, sent only to interactive
// session registrants. Session 0 and kernel mode consumers do not receive
// this notification.
//
// {2B84C20E-AD23-4ddf-93DB-05FFBD7EFCA5}
extern "C" const GUID GUID_SESSION_DISPLAY_STATUS;
//
// Session specific notification indicating to listeners user activity/presence
//(Present, NotPresent, Inactive)
//
// N.B. This is a session-specific notification, sent only to interactive
// session registrants. Session 0 and kernel mode consumers do not receive
// this notification.
// {3C0F4548-C03F-4c4d-B9F2-237EDE686376}
extern "C" const GUID GUID_SESSION_USER_PRESENCE;
// Notification to listeners that the system is fairly busy and won't be moving
// into an idle state any time soon. This can be used as a hint to listeners
// that now might be a good time to do background tasks.
//
extern "C" const GUID GUID_IDLE_BACKGROUND_TASK;
// Notification to listeners that the system is fairly busy and won't be moving
// into an idle state any time soon. This can be used as a hint to listeners
// that now might be a good time to do background tasks.
//
// { CF23F240-2A54-48D8-B114-DE1518FF052E }
extern "C" const GUID GUID_BACKGROUND_TASK_NOTIFICATION;
// Define a GUID that will represent the action of a direct experience button
// on the platform. Users will register for this DPPE setting and recieve
// notification when the h/w button is pressed.
//
// { 1A689231-7399-4E9A-8F99-B71F999DB3FA }
//
extern "C" const GUID GUID_APPLAUNCH_BUTTON;
// PCI Express power settings
// ------------------------
//
// Specifies the subgroup which will contain all of the PCI Express
// settings for a single policy.
//
// {501a4d13-42af-4429-9fd1-a8218c268e20}
//
extern "C" const GUID GUID_PCIEXPRESS_SETTINGS_SUBGROUP;
// Specifies the PCI Express ASPM power policy.
//
// {ee12f906-d277-404b-b6da-e5fa1a576df5}
//
extern "C" const GUID GUID_PCIEXPRESS_ASPM_POLICY;
// POWER Shutdown settings
// ------------------------
//
// Specifies if forced shutdown should be used for all button and lid initiated
// shutdown actions.
//
// {833a6b62-dfa4-46d1-82f8-e09e34d029d6}
//
extern "C" const GUID GUID_ENABLE_SWITCH_FORCED_SHUTDOWN;
// Interrupt Steering power settings
// ------------------------
//
// {48672F38-7A9A-4bb2-8BF8-3D85BE19DE4E}
extern "C" const GUID GUID_INTSTEER_SUBGROUP;
// {2BFC24F9-5EA2-4801-8213-3DBAE01AA39D}
extern "C" const GUID GUID_INTSTEER_MODE;
// {73CDE64D-D720-4bb2-A860-C755AFE77EF2}
extern "C" const GUID GUID_INTSTEER_LOAD_PER_PROC_TRIGGER;
// {D6BA4903-386F-4c2c-8ADB-5C21B3328D25}
extern "C" const GUID GUID_INTSTEER_TIME_UNPARK_TRIGGER;
typedef enum _SYSTEM_POWER_STATE {
PowerSystemUnspecified = 0,
PowerSystemWorking = 1,
PowerSystemSleeping1 = 2,
PowerSystemSleeping2 = 3,
PowerSystemSleeping3 = 4,
PowerSystemHibernate = 5,
PowerSystemShutdown = 6,
PowerSystemMaximum = 7
} SYSTEM_POWER_STATE, *PSYSTEM_POWER_STATE;
typedef enum {
PowerActionNone = 0,
PowerActionReserved,
PowerActionSleep,
PowerActionHibernate,
PowerActionShutdown,
PowerActionShutdownReset,
PowerActionShutdownOff,
PowerActionWarmEject,
PowerActionDisplayOff
} POWER_ACTION, *PPOWER_ACTION;
typedef enum _DEVICE_POWER_STATE {
PowerDeviceUnspecified = 0,
PowerDeviceD0,
PowerDeviceD1,
PowerDeviceD2,
PowerDeviceD3,
PowerDeviceMaximum
} DEVICE_POWER_STATE, *PDEVICE_POWER_STATE;
typedef enum _MONITOR_DISPLAY_STATE {
PowerMonitorOff = 0,
PowerMonitorOn,
PowerMonitorDim
} MONITOR_DISPLAY_STATE, *PMONITOR_DISPLAY_STATE;
typedef enum _USER_ACTIVITY_PRESENCE {
PowerUserPresent = 0,
PowerUserNotPresent,
PowerUserInactive,
PowerUserMaximum,
PowerUserInvalid = PowerUserMaximum
} USER_ACTIVITY_PRESENCE, *PUSER_ACTIVITY_PRESENCE;
# 14778 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef DWORD EXECUTION_STATE, *PEXECUTION_STATE;
typedef enum {
LT_DONT_CARE,
LT_LOWEST_LATENCY
} LATENCY_TIME;
# 14793 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Defines for power request APIs
//
typedef enum _POWER_REQUEST_TYPE {
PowerRequestDisplayRequired,
PowerRequestSystemRequired,
PowerRequestAwayModeRequired,
PowerRequestExecutionRequired
} POWER_REQUEST_TYPE, *PPOWER_REQUEST_TYPE;
// end_ntminiport
//-----------------------------------------------------------------------------
// Device Power Information
// Accessable via CM_Get_DevInst_Registry_Property_Ex(CM_DRP_DEVICE_POWER_DATA)
//-----------------------------------------------------------------------------
# 14828 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct CM_Power_Data_s {
DWORD PD_Size;
DEVICE_POWER_STATE PD_MostRecentPowerState;
DWORD PD_Capabilities;
DWORD PD_D1Latency;
DWORD PD_D2Latency;
DWORD PD_D3Latency;
DEVICE_POWER_STATE PD_PowerStateMapping[7];
SYSTEM_POWER_STATE PD_DeepestSystemWake;
} CM_POWER_DATA, *PCM_POWER_DATA;
// begin_wdm
typedef enum {
SystemPowerPolicyAc,
SystemPowerPolicyDc,
VerifySystemPolicyAc,
VerifySystemPolicyDc,
SystemPowerCapabilities,
SystemBatteryState,
SystemPowerStateHandler,
ProcessorStateHandler,
SystemPowerPolicyCurrent,
AdministratorPowerPolicy,
SystemReserveHiberFile,
ProcessorInformation,
SystemPowerInformation,
ProcessorStateHandler2,
LastWakeTime, // Compare with KeQueryInterruptTime()
LastSleepTime, // Compare with KeQueryInterruptTime()
SystemExecutionState,
SystemPowerStateNotifyHandler,
ProcessorPowerPolicyAc,
ProcessorPowerPolicyDc,
VerifyProcessorPowerPolicyAc,
VerifyProcessorPowerPolicyDc,
ProcessorPowerPolicyCurrent,
SystemPowerStateLogging,
SystemPowerLoggingEntry,
SetPowerSettingValue,
NotifyUserPowerSetting,
PowerInformationLevelUnused0,
SystemMonitorHiberBootPowerOff,
SystemVideoState,
TraceApplicationPowerMessage,
TraceApplicationPowerMessageEnd,
ProcessorPerfStates,
ProcessorIdleStates,
ProcessorCap,
SystemWakeSource,
SystemHiberFileInformation,
TraceServicePowerMessage,
ProcessorLoad,
PowerShutdownNotification,
MonitorCapabilities,
SessionPowerInit,
SessionDisplayState,
PowerRequestCreate,
PowerRequestAction,
GetPowerRequestList,
ProcessorInformationEx,
NotifyUserModeLegacyPowerEvent,
GroupPark,
ProcessorIdleDomains,
WakeTimerList,
SystemHiberFileSize,
ProcessorIdleStatesHv,
ProcessorPerfStatesHv,
ProcessorPerfCapHv,
ProcessorSetIdle,
LogicalProcessorIdling,
UserPresence,
PowerSettingNotificationName,
GetPowerSettingValue,
IdleResiliency,
SessionRITState,
SessionConnectNotification,
SessionPowerCleanup,
SessionLockState,
SystemHiberbootState,
PlatformInformation,
PdcInvocation,
MonitorInvocation,
FirmwareTableInformationRegistered,
SetShutdownSelectedTime,
SuspendResumeInvocation,
PlmPowerRequestCreate,
ScreenOff,
CsDeviceNotification,
PlatformRole,
LastResumePerformance,
DisplayBurst,
ExitLatencySamplingPercentage,
RegisterSpmPowerSettings,
PlatformIdleStates,
ProcessorIdleVeto,
PlatformIdleVeto,
SystemBatteryStatePrecise,
ThermalEvent,
PowerRequestActionInternal,
BatteryDeviceState,
PowerInformationInternal,
ThermalStandby,
SystemHiberFileType,
PhysicalPowerButtonPress,
QueryPotentialDripsConstraint,
EnergyTrackerCreate,
EnergyTrackerQuery,
UpdateBlackBoxRecorder,
PowerInformationLevelMaximum
} POWER_INFORMATION_LEVEL;
//
// User Presence Values
//
typedef enum {
UserNotPresent = 0,
UserPresent = 1,
UserUnknown = 0xff
} POWER_USER_PRESENCE_TYPE, *PPOWER_USER_PRESENCE_TYPE;
typedef struct _POWER_USER_PRESENCE {
POWER_USER_PRESENCE_TYPE UserPresence;
} POWER_USER_PRESENCE, *PPOWER_USER_PRESENCE;
//
// Session Connect/Disconnect
//
typedef struct _POWER_SESSION_CONNECT {
BOOLEAN Connected; // TRUE - connected, FALSE - disconnected
BOOLEAN Console; // TRUE - console, FALSE - TS (not used for Connected = FALSE)
} POWER_SESSION_CONNECT, *PPOWER_SESSION_CONNECT;
typedef struct _POWER_SESSION_TIMEOUTS {
DWORD InputTimeout;
DWORD DisplayTimeout;
} POWER_SESSION_TIMEOUTS, *PPOWER_SESSION_TIMEOUTS;
//
// Session RIT State
//
typedef struct _POWER_SESSION_RIT_STATE {
BOOLEAN Active; // TRUE - RIT input received, FALSE - RIT timeout
DWORD LastInputTime; // last input time held for this session
} POWER_SESSION_RIT_STATE, *PPOWER_SESSION_RIT_STATE;
//
// Winlogon notifications
//
typedef struct _POWER_SESSION_WINLOGON {
DWORD SessionId; // the Win32k session identifier
BOOLEAN Console; // TRUE - for console session, FALSE - for remote session
BOOLEAN Locked; // TRUE - lock, FALSE - unlock
} POWER_SESSION_WINLOGON, *PPOWER_SESSION_WINLOGON;
//
// Idle resiliency
//
typedef struct _POWER_IDLE_RESILIENCY {
DWORD CoalescingTimeout;
DWORD IdleResiliencyPeriod;
} POWER_IDLE_RESILIENCY, *PPOWER_IDLE_RESILIENCY;
//
// Monitor on/off reasons
//
typedef enum {
MonitorRequestReasonUnknown,
MonitorRequestReasonPowerButton,
MonitorRequestReasonRemoteConnection,
MonitorRequestReasonScMonitorpower,
MonitorRequestReasonUserInput,
MonitorRequestReasonAcDcDisplayBurst,
MonitorRequestReasonUserDisplayBurst,
MonitorRequestReasonPoSetSystemState,
MonitorRequestReasonSetThreadExecutionState,
MonitorRequestReasonFullWake,
MonitorRequestReasonSessionUnlock,
MonitorRequestReasonScreenOffRequest,
MonitorRequestReasonIdleTimeout,
MonitorRequestReasonPolicyChange,
MonitorRequestReasonSleepButton,
MonitorRequestReasonLid,
MonitorRequestReasonBatteryCountChange,
MonitorRequestReasonGracePeriod,
MonitorRequestReasonPnP,
MonitorRequestReasonDP,
MonitorRequestReasonSxTransition,
MonitorRequestReasonSystemIdle,
MonitorRequestReasonNearProximity,
MonitorRequestReasonThermalStandby,
MonitorRequestReasonResumePdc,
MonitorRequestReasonResumeS4,
MonitorRequestReasonTerminal,
MonitorRequestReasonPdcSignal,
MonitorRequestReasonAcDcDisplayBurstSuppressed,
MonitorRequestReasonSystemStateEntered, // When CS exit happens because system
// transition to S4/S5, please note this
// reason is different than ReasonSxTransition.
MonitorRequestReasonWinrt,
MonitorRequestReasonMax
} POWER_MONITOR_REQUEST_REASON;
typedef enum _POWER_MONITOR_REQUEST_TYPE {
MonitorRequestTypeOff,
MonitorRequestTypeOnAndPresent,
MonitorRequestTypeToggleOn
} POWER_MONITOR_REQUEST_TYPE;
//
// Monitor invocation
//
typedef struct _POWER_MONITOR_INVOCATION {
BOOLEAN Console;
POWER_MONITOR_REQUEST_REASON RequestReason;
} POWER_MONITOR_INVOCATION, *PPOWER_MONITOR_INVOCATION;
//
// Last resume performance structure
//
typedef struct _RESUME_PERFORMANCE {
DWORD PostTimeMs;
ULONGLONG TotalResumeTimeMs;
ULONGLONG ResumeCompleteTimestamp;
} RESUME_PERFORMANCE, *PRESUME_PERFORMANCE;
//
// Power Setting definitions
//
typedef enum {
PoAc,
PoDc,
PoHot,
PoConditionMaximum
} SYSTEM_POWER_CONDITION;
typedef struct {
//
// Version of this structure. Currently should be set to
// POWER_SETTING_VALUE_VERSION.
//
DWORD Version;
//
// GUID representing the power setting being applied.
//
GUID Guid;
//
// What power state should this setting be applied to? E.g.
// AC, DC, thermal, ...
//
SYSTEM_POWER_CONDITION PowerCondition;
//
// Length (in bytes) of the 'Data' member.
//
DWORD DataLength;
//
// Data which contains the actual setting value.
//
BYTE Data[1];
} SET_POWER_SETTING_VALUE, *PSET_POWER_SETTING_VALUE;
typedef struct {
GUID Guid;
} NOTIFY_USER_POWER_SETTING, *PNOTIFY_USER_POWER_SETTING;
//
// Package definition for an experience button device notification. When
// someone registers for GUID_EXPERIENCE_BUTTON, this is the definition of
// the setting data they'll get.
//
typedef struct _APPLICATIONLAUNCH_SETTING_VALUE {
//
// System time when the most recent button press ocurred. Note that this is
// specified in 100ns internvals since January 1, 1601.
//
LARGE_INTEGER ActivationTime;
//
// Reserved for internal use.
//
DWORD Flags;
//
// which instance of this device was pressed?
//
DWORD ButtonInstanceID;
} APPLICATIONLAUNCH_SETTING_VALUE, *PAPPLICATIONLAUNCH_SETTING_VALUE;
//
// define platform roles
//
typedef enum _POWER_PLATFORM_ROLE {
PlatformRoleUnspecified = 0,
PlatformRoleDesktop,
PlatformRoleMobile,
PlatformRoleWorkstation,
PlatformRoleEnterpriseServer,
PlatformRoleSOHOServer,
PlatformRoleAppliancePC,
PlatformRolePerformanceServer, // v1 last supported
PlatformRoleSlate, // v2 last supported
PlatformRoleMaximum
} POWER_PLATFORM_ROLE, *PPOWER_PLATFORM_ROLE;
# 15168 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _POWER_PLATFORM_INFORMATION {
BOOLEAN AoAc;
} POWER_PLATFORM_INFORMATION, *PPOWER_PLATFORM_INFORMATION;
//
// System power manager capabilities
//
typedef struct {
DWORD Granularity;
DWORD Capacity;
} BATTERY_REPORTING_SCALE, *PBATTERY_REPORTING_SCALE;
//
typedef struct {
DWORD Frequency;
DWORD Flags;
DWORD PercentFrequency;
} PPM_WMI_LEGACY_PERFSTATE, *PPPM_WMI_LEGACY_PERFSTATE;
typedef struct {
DWORD Latency;
DWORD Power;
DWORD TimeCheck;
BYTE PromotePercent;
BYTE DemotePercent;
BYTE StateType;
BYTE Reserved;
DWORD StateFlags;
DWORD Context;
DWORD IdleHandler;
DWORD Reserved1; // reserved for future use
} PPM_WMI_IDLE_STATE, *PPPM_WMI_IDLE_STATE;
typedef struct {
DWORD Type;
DWORD Count;
DWORD TargetState; // current idle state
DWORD OldState; // previous idle state
DWORD64 TargetProcessors;
PPM_WMI_IDLE_STATE State[1];
} PPM_WMI_IDLE_STATES, *PPPM_WMI_IDLE_STATES;
typedef struct {
DWORD Type;
DWORD Count;
DWORD TargetState; // current idle state
DWORD OldState; // previous idle state
PVOID TargetProcessors;
PPM_WMI_IDLE_STATE State[1];
} PPM_WMI_IDLE_STATES_EX, *PPPM_WMI_IDLE_STATES_EX;
typedef struct {
DWORD Frequency; // in Mhz
DWORD Power; // in milliwatts
BYTE PercentFrequency;
BYTE IncreaseLevel; // goto higher state
BYTE DecreaseLevel; // goto lower state
BYTE Type; // performance or throttle
DWORD IncreaseTime; // in tick counts
DWORD DecreaseTime; // in tick counts
DWORD64 Control; // control value
DWORD64 Status; // control value
DWORD HitCount;
DWORD Reserved1; // reserved for future use
DWORD64 Reserved2;
DWORD64 Reserved3;
} PPM_WMI_PERF_STATE, *PPPM_WMI_PERF_STATE;
typedef struct {
DWORD Count;
DWORD MaxFrequency;
DWORD CurrentState; // current state
DWORD MaxPerfState; // fastest state considering policy restrictions
DWORD MinPerfState; // slowest state considering policy restrictions
DWORD LowestPerfState; // slowest perf state, fixed, aka the "knee"
DWORD ThermalConstraint;
BYTE BusyAdjThreshold;
BYTE PolicyType; // domain coordination
BYTE Type;
BYTE Reserved;
DWORD TimerInterval;
DWORD64 TargetProcessors; // domain affinity
DWORD PStateHandler;
DWORD PStateContext;
DWORD TStateHandler;
DWORD TStateContext;
DWORD FeedbackHandler;
DWORD Reserved1;
DWORD64 Reserved2;
PPM_WMI_PERF_STATE State[1];
} PPM_WMI_PERF_STATES, *PPPM_WMI_PERF_STATES;
typedef struct {
DWORD Count;
DWORD MaxFrequency;
DWORD CurrentState; // current state
DWORD MaxPerfState; // fastest state considering policy restrictions
DWORD MinPerfState; // slowest state considering policy restrictions
DWORD LowestPerfState; // slowest perf state, fixed, aka the "knee"
DWORD ThermalConstraint;
BYTE BusyAdjThreshold;
BYTE PolicyType; // domain coordination
BYTE Type;
BYTE Reserved;
DWORD TimerInterval;
PVOID TargetProcessors; // domain affinity
DWORD PStateHandler;
DWORD PStateContext;
DWORD TStateHandler;
DWORD TStateContext;
DWORD FeedbackHandler;
DWORD Reserved1;
DWORD64 Reserved2;
PPM_WMI_PERF_STATE State[1];
} PPM_WMI_PERF_STATES_EX, *PPPM_WMI_PERF_STATES_EX;
//
// Legacy processor idle accounting.
//
typedef struct {
DWORD IdleTransitions;
DWORD FailedTransitions;
DWORD InvalidBucketIndex;
DWORD64 TotalTime;
DWORD IdleTimeBuckets[6];
} PPM_IDLE_STATE_ACCOUNTING, *PPPM_IDLE_STATE_ACCOUNTING;
typedef struct {
DWORD StateCount;
DWORD TotalTransitions;
DWORD ResetCount;
DWORD64 StartTime;
PPM_IDLE_STATE_ACCOUNTING State[1];
} PPM_IDLE_ACCOUNTING, *PPPM_IDLE_ACCOUNTING;
//
// Processor idle accounting.
//
typedef struct {
DWORD64 TotalTimeUs;
DWORD MinTimeUs;
DWORD MaxTimeUs;
DWORD Count;
} PPM_IDLE_STATE_BUCKET_EX, *PPPM_IDLE_STATE_BUCKET_EX;
typedef struct {
DWORD64 TotalTime;
DWORD IdleTransitions;
DWORD FailedTransitions;
DWORD InvalidBucketIndex;
DWORD MinTimeUs;
DWORD MaxTimeUs;
DWORD CancelledTransitions;
PPM_IDLE_STATE_BUCKET_EX IdleTimeBuckets[16];
} PPM_IDLE_STATE_ACCOUNTING_EX, *PPPM_IDLE_STATE_ACCOUNTING_EX;
typedef struct {
DWORD StateCount;
DWORD TotalTransitions;
DWORD ResetCount;
DWORD AbortCount;
DWORD64 StartTime;
PPM_IDLE_STATE_ACCOUNTING_EX State[1];
} PPM_IDLE_ACCOUNTING_EX, *PPPM_IDLE_ACCOUNTING_EX;
//
// Definitions of coordination types for _PSD, _TSD, and _CSD BIOS objects from
// the Acpi 3.0 specification
//
//
// Definition of Microsoft PPM coordination types.
//
//
// Processor firmware rundown feature bit definitions.
//
# 15383 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Processor performance and idle controls implementations.
//
# 15399 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Processor Power Management WMI interface.
//
// {A5B32DDD-7F39-4abc-B892-900E43B59EBB}
extern "C" const GUID PPM_PERFSTATE_CHANGE_GUID;
// {995e6b7f-d653-497a-b978-36a30c29bf01}
extern "C" const GUID PPM_PERFSTATE_DOMAIN_CHANGE_GUID;
// {4838fe4f-f71c-4e51-9ecc-8430a7ac4c6c}
extern "C" const GUID PPM_IDLESTATE_CHANGE_GUID;
// {5708cc20-7d40-4bf4-b4aa-2b01338d0126}
extern "C" const GUID PPM_PERFSTATES_DATA_GUID;
// {ba138e10-e250-4ad7-8616-cf1a7ad410e7}
extern "C" const GUID PPM_IDLESTATES_DATA_GUID;
// {e2a26f78-ae07-4ee0-a30f-ce354f5a94cd}
extern "C" const GUID PPM_IDLE_ACCOUNTING_GUID;
// {d67abd39-81f8-4a5e-8152-72e31ec912ee}
extern "C" const GUID PPM_IDLE_ACCOUNTING_EX_GUID;
// {a852c2c8-1a4c-423b-8c2c-f30d82931a88}
extern "C" const GUID PPM_THERMALCONSTRAINT_GUID;
// {7fd18652-0cfe-40d2-b0a1-0b066a87759e}
extern "C" const GUID PPM_PERFMON_PERFSTATE_GUID;
// {48f377b8-6880-4c7b-8bdc-380176c6654d}
extern "C" const GUID PPM_THERMAL_POLICY_CHANGE_GUID;
typedef struct {
DWORD State;
DWORD Status;
DWORD Latency;
DWORD Speed;
DWORD Processor;
} PPM_PERFSTATE_EVENT, *PPPM_PERFSTATE_EVENT;
typedef struct {
DWORD State;
DWORD Latency;
DWORD Speed;
DWORD64 Processors;
} PPM_PERFSTATE_DOMAIN_EVENT, *PPPM_PERFSTATE_DOMAIN_EVENT;
typedef struct {
DWORD NewState;
DWORD OldState;
DWORD64 Processors;
} PPM_IDLESTATE_EVENT, *PPPM_IDLESTATE_EVENT;
typedef struct {
DWORD ThermalConstraint;
DWORD64 Processors;
} PPM_THERMALCHANGE_EVENT, *PPPM_THERMALCHANGE_EVENT;
#pragma warning(push)
#pragma warning(disable: 4121)
typedef struct {
BYTE Mode;
DWORD64 Processors;
} PPM_THERMAL_POLICY_EVENT, *PPPM_THERMAL_POLICY_EVENT;
#pragma warning(pop)
// Power Policy Management interfaces
//
typedef struct {
POWER_ACTION Action;
DWORD Flags;
DWORD EventCode;
} POWER_ACTION_POLICY, *PPOWER_ACTION_POLICY;
// POWER_ACTION_POLICY->Flags:
# 15502 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// POWER_ACTION_POLICY->EventCode flags
# 15511 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// Note: for battery alarm EventCodes, the ID of the battery alarm << 16 is ORed
// into the flags. For example: DISCHARGE_POLICY_LOW << 16
//
// The GUID_BATTERY_DISCHARGE_FLAGS_x power settings use a subset of EventCode
// flags. The POWER_FORCE_TRIGGER_RESET flag doesn't make sense for a battery
// alarm so it is overloaded for other purposes (gerneral enable/disable).
// system battery drain policies
typedef struct {
BOOLEAN Enable;
BYTE Spare[3];
DWORD BatteryLevel;
POWER_ACTION_POLICY PowerPolicy;
SYSTEM_POWER_STATE MinSystemState;
} SYSTEM_POWER_LEVEL, *PSYSTEM_POWER_LEVEL;
// Discharge policy constants
// system power policies
typedef struct _SYSTEM_POWER_POLICY {
DWORD Revision; // 1
// events
POWER_ACTION_POLICY PowerButton;
POWER_ACTION_POLICY SleepButton;
POWER_ACTION_POLICY LidClose;
SYSTEM_POWER_STATE LidOpenWake;
DWORD Reserved;
// "system idle" detection
POWER_ACTION_POLICY Idle;
DWORD IdleTimeout;
BYTE IdleSensitivity;
BYTE DynamicThrottle;
BYTE Spare2[2];
// meaning of power action "sleep"
SYSTEM_POWER_STATE MinSleep;
SYSTEM_POWER_STATE MaxSleep;
SYSTEM_POWER_STATE ReducedLatencySleep;
DWORD WinLogonFlags;
DWORD Spare3;
// parameters for dozing
//
DWORD DozeS4Timeout;
// battery policies
DWORD BroadcastCapacityResolution;
SYSTEM_POWER_LEVEL DischargePolicy[4];
// video policies
DWORD VideoTimeout;
BOOLEAN VideoDimDisplay;
DWORD VideoReserved[3];
// hard disk policies
DWORD SpindownTimeout;
// processor policies
BOOLEAN OptimizeForPower;
BYTE FanThrottleTolerance;
BYTE ForcedThrottle;
BYTE MinThrottle;
POWER_ACTION_POLICY OverThrottled;
} SYSTEM_POWER_POLICY, *PSYSTEM_POWER_POLICY;
// processor power policy state
//
// Processor Idle State Policy.
//
typedef struct {
DWORD TimeCheck;
BYTE DemotePercent;
BYTE PromotePercent;
BYTE Spare[2];
} PROCESSOR_IDLESTATE_INFO, *PPROCESSOR_IDLESTATE_INFO;
typedef struct {
WORD Revision;
union {
WORD AsWORD ;
struct {
WORD AllowScaling : 1;
WORD Disabled : 1;
WORD Reserved : 14;
} ;
} Flags;
DWORD PolicyCount;
PROCESSOR_IDLESTATE_INFO Policy[0x3];
} PROCESSOR_IDLESTATE_POLICY, *PPROCESSOR_IDLESTATE_POLICY;
//
// Legacy Processor Policy. This is only provided to allow legacy
// applications to compile. New applications must use
// PROCESSOR_IDLESTATE_POLICY.
//
# 15632 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _PROCESSOR_POWER_POLICY_INFO {
// Time based information (will be converted to kernel units)
DWORD TimeCheck; // in US
DWORD DemoteLimit; // in US
DWORD PromoteLimit; // in US
// Percentage based information
BYTE DemotePercent;
BYTE PromotePercent;
BYTE Spare[2];
// Flags
DWORD AllowDemotion:1;
DWORD AllowPromotion:1;
DWORD Reserved:30;
} PROCESSOR_POWER_POLICY_INFO, *PPROCESSOR_POWER_POLICY_INFO;
// processor power policy
typedef struct _PROCESSOR_POWER_POLICY {
DWORD Revision; // 1
// Dynamic Throttling Policy
BYTE DynamicThrottle;
BYTE Spare[3];
// Flags
DWORD DisableCStates:1;
DWORD Reserved:31;
// System policy information
// The Array is last, in case it needs to be grown and the structure
// revision incremented.
DWORD PolicyCount;
PROCESSOR_POWER_POLICY_INFO Policy[3];
} PROCESSOR_POWER_POLICY, *PPROCESSOR_POWER_POLICY;
//
// Processor Perf State Policy.
//
typedef struct {
DWORD Revision;
BYTE MaxThrottle;
BYTE MinThrottle;
BYTE BusyAdjThreshold;
union {
BYTE Spare;
union {
BYTE AsBYTE ;
struct {
BYTE NoDomainAccounting : 1;
BYTE IncreasePolicy: 2;
BYTE DecreasePolicy: 2;
BYTE Reserved : 3;
} ;
} Flags;
} ;
DWORD TimeCheck;
DWORD IncreaseTime;
DWORD DecreaseTime;
DWORD IncreasePercent;
DWORD DecreasePercent;
} PROCESSOR_PERFSTATE_POLICY, *PPROCESSOR_PERFSTATE_POLICY;
// administrator power policy overrides
typedef struct _ADMINISTRATOR_POWER_POLICY {
// meaning of power action "sleep"
SYSTEM_POWER_STATE MinSleep;
SYSTEM_POWER_STATE MaxSleep;
// video policies
DWORD MinVideoTimeout;
DWORD MaxVideoTimeout;
// disk policies
DWORD MinSpindownTimeout;
DWORD MaxSpindownTimeout;
} ADMINISTRATOR_POWER_POLICY, *PADMINISTRATOR_POWER_POLICY;
typedef enum _HIBERFILE_BUCKET_SIZE {
HiberFileBucket1GB = 0,
HiberFileBucket2GB,
HiberFileBucket4GB,
HiberFileBucket8GB,
HiberFileBucket16GB,
HiberFileBucket32GB,
HiberFileBucketUnlimited,
HiberFileBucketMax
} HIBERFILE_BUCKET_SIZE, *PHIBERFILE_BUCKET_SIZE;
typedef struct _HIBERFILE_BUCKET {
DWORD64 MaxPhysicalMemory;
DWORD PhysicalMemoryPercent[0x03];
} HIBERFILE_BUCKET, *PHIBERFILE_BUCKET;
typedef struct {
// Misc supported system features
BOOLEAN PowerButtonPresent;
BOOLEAN SleepButtonPresent;
BOOLEAN LidPresent;
BOOLEAN SystemS1;
BOOLEAN SystemS2;
BOOLEAN SystemS3;
BOOLEAN SystemS4; // hibernate
BOOLEAN SystemS5; // off
BOOLEAN HiberFilePresent;
BOOLEAN FullWake;
BOOLEAN VideoDimPresent;
BOOLEAN ApmPresent;
BOOLEAN UpsPresent;
// Processors
BOOLEAN ThermalControl;
BOOLEAN ProcessorThrottle;
BYTE ProcessorMinThrottle;
BYTE ProcessorMaxThrottle;
BOOLEAN FastSystemS4;
BOOLEAN Hiberboot;
BOOLEAN WakeAlarmPresent;
BOOLEAN AoAc;
// Disk
BOOLEAN DiskSpinDown;
// HiberFile
BYTE HiberFileType;
BOOLEAN AoAcConnectivitySupported;
BYTE spare3[6];
// System Battery
BOOLEAN SystemBatteriesPresent;
BOOLEAN BatteriesAreShortTerm;
BATTERY_REPORTING_SCALE BatteryScale[3];
// Wake
SYSTEM_POWER_STATE AcOnLineWake;
SYSTEM_POWER_STATE SoftLidWake;
SYSTEM_POWER_STATE RtcWake;
SYSTEM_POWER_STATE MinDeviceWakeState; // note this may change on driver load
SYSTEM_POWER_STATE DefaultLowLatencyWake;
} SYSTEM_POWER_CAPABILITIES, *PSYSTEM_POWER_CAPABILITIES;
typedef struct {
BOOLEAN AcOnLine;
BOOLEAN BatteryPresent;
BOOLEAN Charging;
BOOLEAN Discharging;
BOOLEAN Spare1[3];
BYTE Tag;
DWORD MaxCapacity;
DWORD RemainingCapacity;
DWORD Rate;
DWORD EstimatedTime;
DWORD DefaultAlert1;
DWORD DefaultAlert2;
} SYSTEM_BATTERY_STATE, *PSYSTEM_BATTERY_STATE;
//
// Image Format
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\pshpack4.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack4.h
Abstract:
This file turns 4 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#pragma warning(disable: 4103)
#pragma pack(push,4)
# 15822 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared/pshpack2.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack2.h
Abstract:
This file turns 2 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#pragma warning(disable: 4103)
#pragma pack(push,2)
# 15830 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
# 15842 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _IMAGE_DOS_HEADER { // DOS .EXE header
WORD e_magic; // Magic number
WORD e_cblp; // Bytes on last page of file
WORD e_cp; // Pages in file
WORD e_crlc; // Relocations
WORD e_cparhdr; // Size of header in paragraphs
WORD e_minalloc; // Minimum extra paragraphs needed
WORD e_maxalloc; // Maximum extra paragraphs needed
WORD e_ss; // Initial (relative) SS value
WORD e_sp; // Initial SP value
WORD e_csum; // Checksum
WORD e_ip; // Initial IP value
WORD e_cs; // Initial (relative) CS value
WORD e_lfarlc; // File address of relocation table
WORD e_ovno; // Overlay number
WORD e_res[4]; // Reserved words
WORD e_oemid; // OEM identifier (for e_oeminfo)
WORD e_oeminfo; // OEM information; e_oemid specific
WORD e_res2[10]; // Reserved words
LONG e_lfanew; // File address of new exe header
} IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
typedef struct _IMAGE_OS2_HEADER { // OS/2 .EXE header
WORD ne_magic; // Magic number
CHAR ne_ver; // Version number
CHAR ne_rev; // Revision number
WORD ne_enttab; // Offset of Entry Table
WORD ne_cbenttab; // Number of bytes in Entry Table
LONG ne_crc; // Checksum of whole file
WORD ne_flags; // Flag word
WORD ne_autodata; // Automatic data segment number
WORD ne_heap; // Initial heap allocation
WORD ne_stack; // Initial stack allocation
LONG ne_csip; // Initial CS:IP setting
LONG ne_sssp; // Initial SS:SP setting
WORD ne_cseg; // Count of file segments
WORD ne_cmod; // Entries in Module Reference Table
WORD ne_cbnrestab; // Size of non-resident name table
WORD ne_segtab; // Offset of Segment Table
WORD ne_rsrctab; // Offset of Resource Table
WORD ne_restab; // Offset of resident name table
WORD ne_modtab; // Offset of Module Reference Table
WORD ne_imptab; // Offset of Imported Names Table
LONG ne_nrestab; // Offset of Non-resident Names Table
WORD ne_cmovent; // Count of movable entries
WORD ne_align; // Segment alignment shift count
WORD ne_cres; // Count of resource segments
BYTE ne_exetyp; // Target Operating system
BYTE ne_flagsothers; // Other .EXE flags
WORD ne_pretthunks; // offset to return thunks
WORD ne_psegrefbytes; // offset to segment ref. bytes
WORD ne_swaparea; // Minimum code swap area size
WORD ne_expver; // Expected Windows version number
} IMAGE_OS2_HEADER, *PIMAGE_OS2_HEADER;
typedef struct _IMAGE_VXD_HEADER { // Windows VXD header
WORD e32_magic; // Magic number
BYTE e32_border; // The byte ordering for the VXD
BYTE e32_worder; // The word ordering for the VXD
DWORD e32_level; // The EXE format level for now = 0
WORD e32_cpu; // The CPU type
WORD e32_os; // The OS type
DWORD e32_ver; // Module version
DWORD e32_mflags; // Module flags
DWORD e32_mpages; // Module # pages
DWORD e32_startobj; // Object # for instruction pointer
DWORD e32_eip; // Extended instruction pointer
DWORD e32_stackobj; // Object # for stack pointer
DWORD e32_esp; // Extended stack pointer
DWORD e32_pagesize; // VXD page size
DWORD e32_lastpagesize; // Last page size in VXD
DWORD e32_fixupsize; // Fixup section size
DWORD e32_fixupsum; // Fixup section checksum
DWORD e32_ldrsize; // Loader section size
DWORD e32_ldrsum; // Loader section checksum
DWORD e32_objtab; // Object table offset
DWORD e32_objcnt; // Number of objects in module
DWORD e32_objmap; // Object page map offset
DWORD e32_itermap; // Object iterated data map offset
DWORD e32_rsrctab; // Offset of Resource Table
DWORD e32_rsrccnt; // Number of resource entries
DWORD e32_restab; // Offset of resident name table
DWORD e32_enttab; // Offset of Entry Table
DWORD e32_dirtab; // Offset of Module Directive Table
DWORD e32_dircnt; // Number of module directives
DWORD e32_fpagetab; // Offset of Fixup Page Table
DWORD e32_frectab; // Offset of Fixup Record Table
DWORD e32_impmod; // Offset of Import Module Name Table
DWORD e32_impmodcnt; // Number of entries in Import Module Name Table
DWORD e32_impproc; // Offset of Import Procedure Name Table
DWORD e32_pagesum; // Offset of Per-Page Checksum Table
DWORD e32_datapage; // Offset of Enumerated Data Pages
DWORD e32_preload; // Number of preload pages
DWORD e32_nrestab; // Offset of Non-resident Names Table
DWORD e32_cbnrestab; // Size of Non-resident Name Table
DWORD e32_nressum; // Non-resident Name Table Checksum
DWORD e32_autodata; // Object # for automatic data object
DWORD e32_debuginfo; // Offset of the debugging information
DWORD e32_debuglen; // The length of the debugging info. in bytes
DWORD e32_instpreload; // Number of instance pages in preload section of VXD file
DWORD e32_instdemand; // Number of instance pages in demand load section of VXD file
DWORD e32_heapsize; // Size of heap - for 16-bit apps
BYTE e32_res3[12]; // Reserved words
DWORD e32_winresoff;
DWORD e32_winreslen;
WORD e32_devid; // Device ID for VxD
WORD e32_ddkver; // DDK version for VxD
} IMAGE_VXD_HEADER, *PIMAGE_VXD_HEADER;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\poppack.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
poppack.h
Abstract:
This file turns packing of structures off. (That is, it enables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways.
poppack.h is the complement to pshpack?.h. An inclusion of poppack.h
MUST ALWAYS be preceded by an inclusion of one of pshpack?.h, in one-to-one
correspondence.
For Microsoft compatible compilers, this file uses the pop option
to the pack pragma so that it can restore the previous saved by the
pshpack?.h include file.
--*/
#pragma warning(disable: 4103)
#pragma pack(pop)
# 15952 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
//
// File header format.
//
typedef struct _IMAGE_FILE_HEADER {
WORD Machine;
WORD NumberOfSections;
DWORD TimeDateStamp;
DWORD PointerToSymbolTable;
DWORD NumberOfSymbols;
WORD SizeOfOptionalHeader;
WORD Characteristics;
} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
# 16021 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Directory format.
//
typedef struct _IMAGE_DATA_DIRECTORY {
DWORD VirtualAddress;
DWORD Size;
} IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY;
//
// Optional header format.
//
typedef struct _IMAGE_OPTIONAL_HEADER {
//
// Standard fields.
//
WORD Magic;
BYTE MajorLinkerVersion;
BYTE MinorLinkerVersion;
DWORD SizeOfCode;
DWORD SizeOfInitializedData;
DWORD SizeOfUninitializedData;
DWORD AddressOfEntryPoint;
DWORD BaseOfCode;
DWORD BaseOfData;
//
// NT additional fields.
//
DWORD ImageBase;
DWORD SectionAlignment;
DWORD FileAlignment;
WORD MajorOperatingSystemVersion;
WORD MinorOperatingSystemVersion;
WORD MajorImageVersion;
WORD MinorImageVersion;
WORD MajorSubsystemVersion;
WORD MinorSubsystemVersion;
DWORD Win32VersionValue;
DWORD SizeOfImage;
DWORD SizeOfHeaders;
DWORD CheckSum;
WORD Subsystem;
WORD DllCharacteristics;
DWORD SizeOfStackReserve;
DWORD SizeOfStackCommit;
DWORD SizeOfHeapReserve;
DWORD SizeOfHeapCommit;
DWORD LoaderFlags;
DWORD NumberOfRvaAndSizes;
IMAGE_DATA_DIRECTORY DataDirectory[16];
} IMAGE_OPTIONAL_HEADER32, *PIMAGE_OPTIONAL_HEADER32;
typedef struct _IMAGE_ROM_OPTIONAL_HEADER {
WORD Magic;
BYTE MajorLinkerVersion;
BYTE MinorLinkerVersion;
DWORD SizeOfCode;
DWORD SizeOfInitializedData;
DWORD SizeOfUninitializedData;
DWORD AddressOfEntryPoint;
DWORD BaseOfCode;
DWORD BaseOfData;
DWORD BaseOfBss;
DWORD GprMask;
DWORD CprMask[4];
DWORD GpValue;
} IMAGE_ROM_OPTIONAL_HEADER, *PIMAGE_ROM_OPTIONAL_HEADER;
typedef struct _IMAGE_OPTIONAL_HEADER64 {
WORD Magic;
BYTE MajorLinkerVersion;
BYTE MinorLinkerVersion;
DWORD SizeOfCode;
DWORD SizeOfInitializedData;
DWORD SizeOfUninitializedData;
DWORD AddressOfEntryPoint;
DWORD BaseOfCode;
ULONGLONG ImageBase;
DWORD SectionAlignment;
DWORD FileAlignment;
WORD MajorOperatingSystemVersion;
WORD MinorOperatingSystemVersion;
WORD MajorImageVersion;
WORD MinorImageVersion;
WORD MajorSubsystemVersion;
WORD MinorSubsystemVersion;
DWORD Win32VersionValue;
DWORD SizeOfImage;
DWORD SizeOfHeaders;
DWORD CheckSum;
WORD Subsystem;
WORD DllCharacteristics;
ULONGLONG SizeOfStackReserve;
ULONGLONG SizeOfStackCommit;
ULONGLONG SizeOfHeapReserve;
ULONGLONG SizeOfHeapCommit;
DWORD LoaderFlags;
DWORD NumberOfRvaAndSizes;
IMAGE_DATA_DIRECTORY DataDirectory[16];
} IMAGE_OPTIONAL_HEADER64, *PIMAGE_OPTIONAL_HEADER64;
typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER;
typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER;
typedef struct _IMAGE_NT_HEADERS64 {
DWORD Signature;
IMAGE_FILE_HEADER FileHeader;
IMAGE_OPTIONAL_HEADER64 OptionalHeader;
} IMAGE_NT_HEADERS64, *PIMAGE_NT_HEADERS64;
typedef struct _IMAGE_NT_HEADERS {
DWORD Signature;
IMAGE_FILE_HEADER FileHeader;
IMAGE_OPTIONAL_HEADER32 OptionalHeader;
} IMAGE_NT_HEADERS32, *PIMAGE_NT_HEADERS32;
typedef struct _IMAGE_ROM_HEADERS {
IMAGE_FILE_HEADER FileHeader;
IMAGE_ROM_OPTIONAL_HEADER OptionalHeader;
} IMAGE_ROM_HEADERS, *PIMAGE_ROM_HEADERS;
typedef IMAGE_NT_HEADERS64 IMAGE_NT_HEADERS;
typedef PIMAGE_NT_HEADERS64 PIMAGE_NT_HEADERS;
// IMAGE_FIRST_SECTION doesn't need 32/64 versions since the file header is the same either way.
// Subsystem Values
# 16193 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// DllCharacteristics Entries
// IMAGE_LIBRARY_PROCESS_INIT 0x0001 // Reserved.
// IMAGE_LIBRARY_PROCESS_TERM 0x0002 // Reserved.
// IMAGE_LIBRARY_THREAD_INIT 0x0004 // Reserved.
// IMAGE_LIBRARY_THREAD_TERM 0x0008 // Reserved.
# 16211 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// Directory Entries
# 16220 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7 // (X86 usage)
# 16230 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Non-COFF Object file header
//
typedef struct ANON_OBJECT_HEADER {
WORD Sig1; // Must be IMAGE_FILE_MACHINE_UNKNOWN
WORD Sig2; // Must be 0xffff
WORD Version; // >= 1 (implies the CLSID field is present)
WORD Machine;
DWORD TimeDateStamp;
CLSID ClassID; // Used to invoke CoCreateInstance
DWORD SizeOfData; // Size of data that follows the header
} ANON_OBJECT_HEADER;
typedef struct ANON_OBJECT_HEADER_V2 {
WORD Sig1; // Must be IMAGE_FILE_MACHINE_UNKNOWN
WORD Sig2; // Must be 0xffff
WORD Version; // >= 2 (implies the Flags field is present - otherwise V1)
WORD Machine;
DWORD TimeDateStamp;
CLSID ClassID; // Used to invoke CoCreateInstance
DWORD SizeOfData; // Size of data that follows the header
DWORD Flags; // 0x1 -> contains metadata
DWORD MetaDataSize; // Size of CLR metadata
DWORD MetaDataOffset; // Offset of CLR metadata
} ANON_OBJECT_HEADER_V2;
typedef struct ANON_OBJECT_HEADER_BIGOBJ {
/* same as ANON_OBJECT_HEADER_V2 */
WORD Sig1; // Must be IMAGE_FILE_MACHINE_UNKNOWN
WORD Sig2; // Must be 0xffff
WORD Version; // >= 2 (implies the Flags field is present)
WORD Machine; // Actual machine - IMAGE_FILE_MACHINE_xxx
DWORD TimeDateStamp;
CLSID ClassID; // {D1BAA1C7-BAEE-4ba9-AF20-FAF66AA4DCB8}
DWORD SizeOfData; // Size of data that follows the header
DWORD Flags; // 0x1 -> contains metadata
DWORD MetaDataSize; // Size of CLR metadata
DWORD MetaDataOffset; // Offset of CLR metadata
/* bigobj specifics */
DWORD NumberOfSections; // extended from WORD
DWORD PointerToSymbolTable;
DWORD NumberOfSymbols;
} ANON_OBJECT_HEADER_BIGOBJ;
//
// Section header format.
//
typedef struct _IMAGE_SECTION_HEADER {
BYTE Name[8];
union {
DWORD PhysicalAddress;
DWORD VirtualSize;
} Misc;
DWORD VirtualAddress;
DWORD SizeOfRawData;
DWORD PointerToRawData;
DWORD PointerToRelocations;
DWORD PointerToLinenumbers;
WORD NumberOfRelocations;
WORD NumberOfLinenumbers;
DWORD Characteristics;
} IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;
//
// Section characteristics.
//
// IMAGE_SCN_TYPE_REG 0x00000000 // Reserved.
// IMAGE_SCN_TYPE_DSECT 0x00000001 // Reserved.
// IMAGE_SCN_TYPE_NOLOAD 0x00000002 // Reserved.
// IMAGE_SCN_TYPE_GROUP 0x00000004 // Reserved.
// IMAGE_SCN_TYPE_COPY 0x00000010 // Reserved.
// IMAGE_SCN_TYPE_OVER 0x00000400 // Reserved.
// 0x00002000 // Reserved.
// IMAGE_SCN_MEM_PROTECTED - Obsolete 0x00004000
// IMAGE_SCN_MEM_SYSHEAP - Obsolete 0x00010000
# 16344 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// Unused 0x00F00000
# 16356 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// TLS Characteristic Flags
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared/pshpack2.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack2.h
Abstract:
This file turns 2 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#pragma warning(disable: 4103)
#pragma pack(push,2)
# 16362 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
//
// Symbol format.
//
typedef struct _IMAGE_SYMBOL {
union {
BYTE ShortName[8];
struct {
DWORD Short; // if 0, use LongName
DWORD Long; // offset into string table
} Name;
DWORD LongName[2]; // PBYTE [2]
} N;
DWORD Value;
SHORT SectionNumber;
WORD Type;
BYTE StorageClass;
BYTE NumberOfAuxSymbols;
} IMAGE_SYMBOL;
typedef IMAGE_SYMBOL __unaligned *PIMAGE_SYMBOL;
typedef struct _IMAGE_SYMBOL_EX {
union {
BYTE ShortName[8];
struct {
DWORD Short; // if 0, use LongName
DWORD Long; // offset into string table
} Name;
DWORD LongName[2]; // PBYTE [2]
} N;
DWORD Value;
LONG SectionNumber;
WORD Type;
BYTE StorageClass;
BYTE NumberOfAuxSymbols;
} IMAGE_SYMBOL_EX;
typedef IMAGE_SYMBOL_EX __unaligned *PIMAGE_SYMBOL_EX;
//
// Section values.
//
// Symbols have a section number of the section in which they are
// defined. Otherwise, section numbers have the following meanings:
//
//
// Type (fundamental) values.
//
# 16439 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Type (derived) values.
//
//
// Storage classes.
//
# 16478 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// new
// type packing constants
// MACROS
// Basic Type of x
// Is x a pointer?
// Is x a function?
// Is x an array?
// Is x a structure, union, or enumeration TAG?
# 16525 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\pshpack2.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack2.h
Abstract:
This file turns 2 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#pragma warning(disable: 4103)
#pragma pack(push,2)
# 16525 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
typedef struct IMAGE_AUX_SYMBOL_TOKEN_DEF {
BYTE bAuxType; // IMAGE_AUX_SYMBOL_TYPE
BYTE bReserved; // Must be 0
DWORD SymbolTableIndex;
BYTE rgbReserved[12]; // Must be 0
} IMAGE_AUX_SYMBOL_TOKEN_DEF;
typedef IMAGE_AUX_SYMBOL_TOKEN_DEF __unaligned *PIMAGE_AUX_SYMBOL_TOKEN_DEF;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\poppack.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
poppack.h
Abstract:
This file turns packing of structures off. (That is, it enables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways.
poppack.h is the complement to pshpack?.h. An inclusion of poppack.h
MUST ALWAYS be preceded by an inclusion of one of pshpack?.h, in one-to-one
correspondence.
For Microsoft compatible compilers, this file uses the pop option
to the pack pragma so that it can restore the previous saved by the
pshpack?.h include file.
--*/
#pragma warning(disable: 4103)
#pragma pack(pop)
# 16536 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
//
// Auxiliary entry format.
//
typedef union _IMAGE_AUX_SYMBOL {
struct {
DWORD TagIndex; // struct, union, or enum tag index
union {
struct {
WORD Linenumber; // declaration line number
WORD Size; // size of struct, union, or enum
} LnSz;
DWORD TotalSize;
} Misc;
union {
struct { // if ISFCN, tag, or .bb
DWORD PointerToLinenumber;
DWORD PointerToNextFunction;
} Function;
struct { // if ISARY, up to 4 dimen.
WORD Dimension[4];
} Array;
} FcnAry;
WORD TvIndex; // tv index
} Sym;
struct {
BYTE Name[18];
} File;
struct {
DWORD Length; // section length
WORD NumberOfRelocations; // number of relocation entries
WORD NumberOfLinenumbers; // number of line numbers
DWORD CheckSum; // checksum for communal
SHORT Number; // section number to associate with
BYTE Selection; // communal selection type
BYTE bReserved;
SHORT HighNumber; // high bits of the section number
} Section;
IMAGE_AUX_SYMBOL_TOKEN_DEF TokenDef;
struct {
DWORD crc;
BYTE rgbReserved[14];
} CRC;
} IMAGE_AUX_SYMBOL;
typedef IMAGE_AUX_SYMBOL __unaligned *PIMAGE_AUX_SYMBOL;
typedef union _IMAGE_AUX_SYMBOL_EX {
struct {
DWORD WeakDefaultSymIndex; // the weak extern default symbol index
DWORD WeakSearchType;
BYTE rgbReserved[12];
} Sym;
struct {
BYTE Name[sizeof(IMAGE_SYMBOL_EX)];
} File;
struct {
DWORD Length; // section length
WORD NumberOfRelocations; // number of relocation entries
WORD NumberOfLinenumbers; // number of line numbers
DWORD CheckSum; // checksum for communal
SHORT Number; // section number to associate with
BYTE Selection; // communal selection type
BYTE bReserved;
SHORT HighNumber; // high bits of the section number
BYTE rgbReserved[2];
} Section;
struct{
IMAGE_AUX_SYMBOL_TOKEN_DEF TokenDef;
BYTE rgbReserved[2];
} ;
struct {
DWORD crc;
BYTE rgbReserved[16];
} CRC;
} IMAGE_AUX_SYMBOL_EX;
typedef IMAGE_AUX_SYMBOL_EX __unaligned *PIMAGE_AUX_SYMBOL_EX;
typedef enum IMAGE_AUX_SYMBOL_TYPE {
IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF = 1,
} IMAGE_AUX_SYMBOL_TYPE;
//
// Communal selection types.
//
# 16636 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Relocation format.
//
typedef struct _IMAGE_RELOCATION {
union {
DWORD VirtualAddress;
DWORD RelocCount; // Set to the real count when IMAGE_SCN_LNK_NRELOC_OVFL is set
} ;
DWORD SymbolTableIndex;
WORD Type;
} IMAGE_RELOCATION;
typedef IMAGE_RELOCATION __unaligned *PIMAGE_RELOCATION;
//
// I386 relocation types.
//
# 16665 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// MIPS relocation types.
//
# 16685 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Alpha Relocation types.
//
# 16713 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// IBM PowerPC relocation types.
//
# 16743 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// Flag bits in IMAGE_RELOCATION.TYPE
//
// Hitachi SH3 relocation types.
//
# 16773 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// instruction in longwords
// if not NOMODE, insert the
// inverse of the low bit at
// bit 32 to select PTA/PTB
# 16820 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// ARM64 relocations types.
//
# 16841 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// x64 relocations
//
# 16862 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// IA64 relocation types.
//
# 16880 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
# 16896 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// CEF relocation types.
//
# 16907 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// clr relocation types.
//
# 17038 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Line number format.
//
typedef struct _IMAGE_LINENUMBER {
union {
DWORD SymbolTableIndex; // Symbol table index of function name if Linenumber is 0.
DWORD VirtualAddress; // Virtual address of line number.
} Type;
WORD Linenumber; // Line number.
} IMAGE_LINENUMBER;
typedef IMAGE_LINENUMBER __unaligned *PIMAGE_LINENUMBER;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\poppack.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
poppack.h
Abstract:
This file turns packing of structures off. (That is, it enables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways.
poppack.h is the complement to pshpack?.h. An inclusion of poppack.h
MUST ALWAYS be preceded by an inclusion of one of pshpack?.h, in one-to-one
correspondence.
For Microsoft compatible compilers, this file uses the pop option
to the pack pragma so that it can restore the previous saved by the
pshpack?.h include file.
--*/
#pragma warning(disable: 4103)
#pragma pack(pop)
# 17052 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
//
// Based relocation format.
//
typedef struct _IMAGE_BASE_RELOCATION {
DWORD VirtualAddress;
DWORD SizeOfBlock;
// WORD TypeOffset[1];
} IMAGE_BASE_RELOCATION;
typedef IMAGE_BASE_RELOCATION __unaligned * PIMAGE_BASE_RELOCATION;
//
// Based relocation types.
//
# 17082 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Platform-specific based relocation types.
//
# 17095 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Archive format.
//
# 17108 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _IMAGE_ARCHIVE_MEMBER_HEADER {
BYTE Name[16]; // File member name - `/' terminated.
BYTE Date[12]; // File member date - decimal.
BYTE UserID[6]; // File member user id - decimal.
BYTE GroupID[6]; // File member group id - decimal.
BYTE Mode[8]; // File member mode - octal.
BYTE Size[10]; // File member size - decimal.
BYTE EndHeader[2]; // String to end header.
} IMAGE_ARCHIVE_MEMBER_HEADER, *PIMAGE_ARCHIVE_MEMBER_HEADER;
//
// DLL support.
//
//
// Export Format
//
typedef struct _IMAGE_EXPORT_DIRECTORY {
DWORD Characteristics;
DWORD TimeDateStamp;
WORD MajorVersion;
WORD MinorVersion;
DWORD Name;
DWORD Base;
DWORD NumberOfFunctions;
DWORD NumberOfNames;
DWORD AddressOfFunctions; // RVA from base of image
DWORD AddressOfNames; // RVA from base of image
DWORD AddressOfNameOrdinals; // RVA from base of image
} IMAGE_EXPORT_DIRECTORY, *PIMAGE_EXPORT_DIRECTORY;
//
// Import Format
//
typedef struct _IMAGE_IMPORT_BY_NAME {
WORD Hint;
CHAR Name[1];
} IMAGE_IMPORT_BY_NAME, *PIMAGE_IMPORT_BY_NAME;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared/pshpack8.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack8.h
Abstract:
This file turns 8 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#pragma warning(disable: 4103)
#pragma pack(push,8)
# 17151 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
typedef struct _IMAGE_THUNK_DATA64 {
union {
ULONGLONG ForwarderString; // PBYTE
ULONGLONG Function; // PDWORD
ULONGLONG Ordinal;
ULONGLONG AddressOfData; // PIMAGE_IMPORT_BY_NAME
} u1;
} IMAGE_THUNK_DATA64;
typedef IMAGE_THUNK_DATA64 * PIMAGE_THUNK_DATA64;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\poppack.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
poppack.h
Abstract:
This file turns packing of structures off. (That is, it enables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways.
poppack.h is the complement to pshpack?.h. An inclusion of poppack.h
MUST ALWAYS be preceded by an inclusion of one of pshpack?.h, in one-to-one
correspondence.
For Microsoft compatible compilers, this file uses the pop option
to the pack pragma so that it can restore the previous saved by the
pshpack?.h include file.
--*/
#pragma warning(disable: 4103)
#pragma pack(pop)
# 17163 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
typedef struct _IMAGE_THUNK_DATA32 {
union {
DWORD ForwarderString; // PBYTE
DWORD Function; // PDWORD
DWORD Ordinal;
DWORD AddressOfData; // PIMAGE_IMPORT_BY_NAME
} u1;
} IMAGE_THUNK_DATA32;
typedef IMAGE_THUNK_DATA32 * PIMAGE_THUNK_DATA32;
# 17182 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Thread Local Storage
//
typedef void
(__stdcall *PIMAGE_TLS_CALLBACK) (
PVOID DllHandle,
DWORD Reason,
PVOID Reserved
);
typedef struct _IMAGE_TLS_DIRECTORY64 {
ULONGLONG StartAddressOfRawData;
ULONGLONG EndAddressOfRawData;
ULONGLONG AddressOfIndex; // PDWORD
ULONGLONG AddressOfCallBacks; // PIMAGE_TLS_CALLBACK *;
DWORD SizeOfZeroFill;
union {
DWORD Characteristics;
struct {
DWORD Reserved0 : 20;
DWORD Alignment : 4;
DWORD Reserved1 : 8;
} ;
} ;
} IMAGE_TLS_DIRECTORY64;
typedef IMAGE_TLS_DIRECTORY64 * PIMAGE_TLS_DIRECTORY64;
typedef struct _IMAGE_TLS_DIRECTORY32 {
DWORD StartAddressOfRawData;
DWORD EndAddressOfRawData;
DWORD AddressOfIndex; // PDWORD
DWORD AddressOfCallBacks; // PIMAGE_TLS_CALLBACK *
DWORD SizeOfZeroFill;
union {
DWORD Characteristics;
struct {
DWORD Reserved0 : 20;
DWORD Alignment : 4;
DWORD Reserved1 : 8;
} ;
} ;
} IMAGE_TLS_DIRECTORY32;
typedef IMAGE_TLS_DIRECTORY32 * PIMAGE_TLS_DIRECTORY32;
typedef IMAGE_THUNK_DATA64 IMAGE_THUNK_DATA;
typedef PIMAGE_THUNK_DATA64 PIMAGE_THUNK_DATA;
typedef IMAGE_TLS_DIRECTORY64 IMAGE_TLS_DIRECTORY;
typedef PIMAGE_TLS_DIRECTORY64 PIMAGE_TLS_DIRECTORY;
# 17248 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _IMAGE_IMPORT_DESCRIPTOR {
union {
DWORD Characteristics; // 0 for terminating null import descriptor
DWORD OriginalFirstThunk; // RVA to original unbound IAT (PIMAGE_THUNK_DATA)
} ;
DWORD TimeDateStamp; // 0 if not bound,
// -1 if bound, and real date\time stamp
// in IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT (new BIND)
// O.W. date/time stamp of DLL bound to (Old BIND)
DWORD ForwarderChain; // -1 if no forwarders
DWORD Name;
DWORD FirstThunk; // RVA to IAT (if bound this IAT has actual addresses)
} IMAGE_IMPORT_DESCRIPTOR;
typedef IMAGE_IMPORT_DESCRIPTOR __unaligned *PIMAGE_IMPORT_DESCRIPTOR;
//
// New format import descriptors pointed to by DataDirectory[ IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT ]
//
typedef struct _IMAGE_BOUND_IMPORT_DESCRIPTOR {
DWORD TimeDateStamp;
WORD OffsetModuleName;
WORD NumberOfModuleForwarderRefs;
// Array of zero or more IMAGE_BOUND_FORWARDER_REF follows
} IMAGE_BOUND_IMPORT_DESCRIPTOR, *PIMAGE_BOUND_IMPORT_DESCRIPTOR;
typedef struct _IMAGE_BOUND_FORWARDER_REF {
DWORD TimeDateStamp;
WORD OffsetModuleName;
WORD Reserved;
} IMAGE_BOUND_FORWARDER_REF, *PIMAGE_BOUND_FORWARDER_REF;
typedef struct _IMAGE_DELAYLOAD_DESCRIPTOR {
union {
DWORD AllAttributes;
struct {
DWORD RvaBased : 1; // Delay load version 2
DWORD ReservedAttributes : 31;
} ;
} Attributes;
DWORD DllNameRVA; // RVA to the name of the target library (NULL-terminate ASCII string)
DWORD ModuleHandleRVA; // RVA to the HMODULE caching location (PHMODULE)
DWORD ImportAddressTableRVA; // RVA to the start of the IAT (PIMAGE_THUNK_DATA)
DWORD ImportNameTableRVA; // RVA to the start of the name table (PIMAGE_THUNK_DATA::AddressOfData)
DWORD BoundImportAddressTableRVA; // RVA to an optional bound IAT
DWORD UnloadInformationTableRVA; // RVA to an optional unload info table
DWORD TimeDateStamp; // 0 if not bound,
// Otherwise, date/time of the target DLL
} IMAGE_DELAYLOAD_DESCRIPTOR, *PIMAGE_DELAYLOAD_DESCRIPTOR;
typedef const IMAGE_DELAYLOAD_DESCRIPTOR *PCIMAGE_DELAYLOAD_DESCRIPTOR;
//
// Resource Format.
//
//
// Resource directory consists of two counts, following by a variable length
// array of directory entries. The first count is the number of entries at
// beginning of the array that have actual names associated with each entry.
// The entries are in ascending order, case insensitive strings. The second
// count is the number of entries that immediately follow the named entries.
// This second count identifies the number of entries that have 16-bit integer
// Ids as their name. These entries are also sorted in ascending order.
//
// This structure allows fast lookup by either name or number, but for any
// given resource entry only one form of lookup is supported, not both.
// This is consistant with the syntax of the .RC file and the .RES file.
//
typedef struct _IMAGE_RESOURCE_DIRECTORY {
DWORD Characteristics;
DWORD TimeDateStamp;
WORD MajorVersion;
WORD MinorVersion;
WORD NumberOfNamedEntries;
WORD NumberOfIdEntries;
// IMAGE_RESOURCE_DIRECTORY_ENTRY DirectoryEntries[];
} IMAGE_RESOURCE_DIRECTORY, *PIMAGE_RESOURCE_DIRECTORY;
//
// Each directory contains the 32-bit Name of the entry and an offset,
// relative to the beginning of the resource directory of the data associated
// with this directory entry. If the name of the entry is an actual text
// string instead of an integer Id, then the high order bit of the name field
// is set to one and the low order 31-bits are an offset, relative to the
// beginning of the resource directory of the string, which is of type
// IMAGE_RESOURCE_DIRECTORY_STRING. Otherwise the high bit is clear and the
// low-order 16-bits are the integer Id that identify this resource directory
// entry. If the directory entry is yet another resource directory (i.e. a
// subdirectory), then the high order bit of the offset field will be
// set to indicate this. Otherwise the high bit is clear and the offset
// field points to a resource data entry.
//
typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY {
union {
struct {
DWORD NameOffset:31;
DWORD NameIsString:1;
} ;
DWORD Name;
WORD Id;
} ;
union {
DWORD OffsetToData;
struct {
DWORD OffsetToDirectory:31;
DWORD DataIsDirectory:1;
} ;
} ;
} IMAGE_RESOURCE_DIRECTORY_ENTRY, *PIMAGE_RESOURCE_DIRECTORY_ENTRY;
//
// For resource directory entries that have actual string names, the Name
// field of the directory entry points to an object of the following type.
// All of these string objects are stored together after the last resource
// directory entry and before the first resource data object. This minimizes
// the impact of these variable length objects on the alignment of the fixed
// size directory entry objects.
//
typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING {
WORD Length;
CHAR NameString[ 1 ];
} IMAGE_RESOURCE_DIRECTORY_STRING, *PIMAGE_RESOURCE_DIRECTORY_STRING;
typedef struct _IMAGE_RESOURCE_DIR_STRING_U {
WORD Length;
WCHAR NameString[ 1 ];
} IMAGE_RESOURCE_DIR_STRING_U, *PIMAGE_RESOURCE_DIR_STRING_U;
//
// Each resource data entry describes a leaf node in the resource directory
// tree. It contains an offset, relative to the beginning of the resource
// directory of the data for the resource, a size field that gives the number
// of bytes of data at that offset, a CodePage that should be used when
// decoding code point values within the resource data. Typically for new
// applications the code page would be the unicode code page.
//
typedef struct _IMAGE_RESOURCE_DATA_ENTRY {
DWORD OffsetToData;
DWORD Size;
DWORD CodePage;
DWORD Reserved;
} IMAGE_RESOURCE_DATA_ENTRY, *PIMAGE_RESOURCE_DATA_ENTRY;
// begin_ntoshvp
//
// Code Integrity in loadconfig (CI)
//
typedef struct _IMAGE_LOAD_CONFIG_CODE_INTEGRITY {
WORD Flags; // Flags to indicate if CI information is available, etc.
WORD Catalog; // 0xFFFF means not available
DWORD CatalogOffset;
DWORD Reserved; // Additional bitmask to be defined later
} IMAGE_LOAD_CONFIG_CODE_INTEGRITY, *PIMAGE_LOAD_CONFIG_CODE_INTEGRITY;
//
// Dynamic value relocation table in loadconfig
//
typedef struct _IMAGE_DYNAMIC_RELOCATION_TABLE {
DWORD Version;
DWORD Size;
// IMAGE_DYNAMIC_RELOCATION DynamicRelocations[0];
} IMAGE_DYNAMIC_RELOCATION_TABLE, *PIMAGE_DYNAMIC_RELOCATION_TABLE;
//
// Dynamic value relocation entries following IMAGE_DYNAMIC_RELOCATION_TABLE
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared/pshpack1.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack1.h
Abstract:
This file turns 1 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#pragma warning(disable: 4103)
#pragma pack(push,1)
# 17430 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
typedef struct _IMAGE_DYNAMIC_RELOCATION32 {
DWORD Symbol;
DWORD BaseRelocSize;
// IMAGE_BASE_RELOCATION BaseRelocations[0];
} IMAGE_DYNAMIC_RELOCATION32, *PIMAGE_DYNAMIC_RELOCATION32;
typedef struct _IMAGE_DYNAMIC_RELOCATION64 {
ULONGLONG Symbol;
DWORD BaseRelocSize;
// IMAGE_BASE_RELOCATION BaseRelocations[0];
} IMAGE_DYNAMIC_RELOCATION64, *PIMAGE_DYNAMIC_RELOCATION64;
typedef struct _IMAGE_DYNAMIC_RELOCATION32_V2 {
DWORD HeaderSize;
DWORD FixupInfoSize;
DWORD Symbol;
DWORD SymbolGroup;
DWORD Flags;
// ... variable length header fields
// BYTE FixupInfo[FixupInfoSize]
} IMAGE_DYNAMIC_RELOCATION32_V2, *PIMAGE_DYNAMIC_RELOCATION32_V2;
typedef struct _IMAGE_DYNAMIC_RELOCATION64_V2 {
DWORD HeaderSize;
DWORD FixupInfoSize;
ULONGLONG Symbol;
DWORD SymbolGroup;
DWORD Flags;
// ... variable length header fields
// BYTE FixupInfo[FixupInfoSize]
} IMAGE_DYNAMIC_RELOCATION64_V2, *PIMAGE_DYNAMIC_RELOCATION64_V2;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\poppack.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
poppack.h
Abstract:
This file turns packing of structures off. (That is, it enables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways.
poppack.h is the complement to pshpack?.h. An inclusion of poppack.h
MUST ALWAYS be preceded by an inclusion of one of pshpack?.h, in one-to-one
correspondence.
For Microsoft compatible compilers, this file uses the pop option
to the pack pragma so that it can restore the previous saved by the
pshpack?.h include file.
--*/
#pragma warning(disable: 4103)
#pragma pack(pop)
# 17464 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
typedef IMAGE_DYNAMIC_RELOCATION64 IMAGE_DYNAMIC_RELOCATION;
typedef PIMAGE_DYNAMIC_RELOCATION64 PIMAGE_DYNAMIC_RELOCATION;
typedef IMAGE_DYNAMIC_RELOCATION64_V2 IMAGE_DYNAMIC_RELOCATION_V2;
typedef PIMAGE_DYNAMIC_RELOCATION64_V2 PIMAGE_DYNAMIC_RELOCATION_V2;
//
// Defined symbolic dynamic relocation entries.
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared/pshpack1.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack1.h
Abstract:
This file turns 1 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#pragma warning(disable: 4103)
#pragma pack(push,1)
# 17485 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
typedef struct _IMAGE_PROLOGUE_DYNAMIC_RELOCATION_HEADER {
BYTE PrologueByteCount;
// BYTE PrologueBytes[PrologueByteCount];
} IMAGE_PROLOGUE_DYNAMIC_RELOCATION_HEADER;
typedef IMAGE_PROLOGUE_DYNAMIC_RELOCATION_HEADER __unaligned * PIMAGE_PROLOGUE_DYNAMIC_RELOCATION_HEADER;
typedef struct _IMAGE_EPILOGUE_DYNAMIC_RELOCATION_HEADER {
DWORD EpilogueCount;
BYTE EpilogueByteCount;
BYTE BranchDescriptorElementSize;
WORD BranchDescriptorCount;
// BYTE BranchDescriptors[...];
// BYTE BranchDescriptorBitMap[...];
} IMAGE_EPILOGUE_DYNAMIC_RELOCATION_HEADER;
typedef IMAGE_EPILOGUE_DYNAMIC_RELOCATION_HEADER __unaligned * PIMAGE_EPILOGUE_DYNAMIC_RELOCATION_HEADER;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\poppack.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
poppack.h
Abstract:
This file turns packing of structures off. (That is, it enables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways.
poppack.h is the complement to pshpack?.h. An inclusion of poppack.h
MUST ALWAYS be preceded by an inclusion of one of pshpack?.h, in one-to-one
correspondence.
For Microsoft compatible compilers, this file uses the pop option
to the pack pragma so that it can restore the previous saved by the
pshpack?.h include file.
--*/
#pragma warning(disable: 4103)
#pragma pack(pop)
# 17503 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
//
// Load Configuration Directory Entry
//
typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32 {
DWORD Size;
DWORD TimeDateStamp;
WORD MajorVersion;
WORD MinorVersion;
DWORD GlobalFlagsClear;
DWORD GlobalFlagsSet;
DWORD CriticalSectionDefaultTimeout;
DWORD DeCommitFreeBlockThreshold;
DWORD DeCommitTotalFreeThreshold;
DWORD LockPrefixTable; // VA
DWORD MaximumAllocationSize;
DWORD VirtualMemoryThreshold;
DWORD ProcessHeapFlags;
DWORD ProcessAffinityMask;
WORD CSDVersion;
WORD DependentLoadFlags;
DWORD EditList; // VA
DWORD SecurityCookie; // VA
DWORD SEHandlerTable; // VA
DWORD SEHandlerCount;
DWORD GuardCFCheckFunctionPointer; // VA
DWORD GuardCFDispatchFunctionPointer; // VA
DWORD GuardCFFunctionTable; // VA
DWORD GuardCFFunctionCount;
DWORD GuardFlags;
IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity;
DWORD GuardAddressTakenIatEntryTable; // VA
DWORD GuardAddressTakenIatEntryCount;
DWORD GuardLongJumpTargetTable; // VA
DWORD GuardLongJumpTargetCount;
DWORD DynamicValueRelocTable; // VA
DWORD CHPEMetadataPointer;
DWORD GuardRFFailureRoutine; // VA
DWORD GuardRFFailureRoutineFunctionPointer; // VA
DWORD DynamicValueRelocTableOffset;
WORD DynamicValueRelocTableSection;
WORD Reserved2;
DWORD GuardRFVerifyStackPointerFunctionPointer; // VA
DWORD HotPatchTableOffset;
} IMAGE_LOAD_CONFIG_DIRECTORY32, *PIMAGE_LOAD_CONFIG_DIRECTORY32;
typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64 {
DWORD Size;
DWORD TimeDateStamp;
WORD MajorVersion;
WORD MinorVersion;
DWORD GlobalFlagsClear;
DWORD GlobalFlagsSet;
DWORD CriticalSectionDefaultTimeout;
ULONGLONG DeCommitFreeBlockThreshold;
ULONGLONG DeCommitTotalFreeThreshold;
ULONGLONG LockPrefixTable; // VA
ULONGLONG MaximumAllocationSize;
ULONGLONG VirtualMemoryThreshold;
ULONGLONG ProcessAffinityMask;
DWORD ProcessHeapFlags;
WORD CSDVersion;
WORD DependentLoadFlags;
ULONGLONG EditList; // VA
ULONGLONG SecurityCookie; // VA
ULONGLONG SEHandlerTable; // VA
ULONGLONG SEHandlerCount;
ULONGLONG GuardCFCheckFunctionPointer; // VA
ULONGLONG GuardCFDispatchFunctionPointer; // VA
ULONGLONG GuardCFFunctionTable; // VA
ULONGLONG GuardCFFunctionCount;
DWORD GuardFlags;
IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity;
ULONGLONG GuardAddressTakenIatEntryTable; // VA
ULONGLONG GuardAddressTakenIatEntryCount;
ULONGLONG GuardLongJumpTargetTable; // VA
ULONGLONG GuardLongJumpTargetCount;
ULONGLONG DynamicValueRelocTable; // VA
ULONGLONG CHPEMetadataPointer; // VA
ULONGLONG GuardRFFailureRoutine; // VA
ULONGLONG GuardRFFailureRoutineFunctionPointer; // VA
DWORD DynamicValueRelocTableOffset;
WORD DynamicValueRelocTableSection;
WORD Reserved2;
ULONGLONG GuardRFVerifyStackPointerFunctionPointer; // VA
DWORD HotPatchTableOffset;
} IMAGE_LOAD_CONFIG_DIRECTORY64, *PIMAGE_LOAD_CONFIG_DIRECTORY64;
// end_ntoshvp
// begin_ntoshvp
typedef IMAGE_LOAD_CONFIG_DIRECTORY64 IMAGE_LOAD_CONFIG_DIRECTORY;
typedef PIMAGE_LOAD_CONFIG_DIRECTORY64 PIMAGE_LOAD_CONFIG_DIRECTORY;
// end_ntoshvp
typedef struct _IMAGE_HOT_PATCH_INFO {
DWORD Version;
DWORD Size;
DWORD SequenceNumber;
DWORD BaseImageList;
DWORD BaseImageCount;
} IMAGE_HOT_PATCH_INFO, *PIMAGE_HOT_PATCH_INFO;
typedef struct _IMAGE_HOT_PATCH_BASE {
DWORD SequenceNumber;
DWORD Flags;
DWORD OriginalTimeDateStamp;
DWORD OriginalCheckSum;
DWORD CodeIntegrityInfo;
DWORD CodeIntegritySize;
DWORD PatchTable;
} IMAGE_HOT_PATCH_BASE, *PIMAGE_HOT_PATCH_BASE;
typedef struct _IMAGE_HOT_PATCH_HASHES {
BYTE SHA256[32];
BYTE SHA1[20];
} IMAGE_HOT_PATCH_HASHES, *PIMAGE_HOT_PATCH_HASHES;
# 17655 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// taken IAT table is also present in the load config.
# 17664 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// GFIDS table entry flags.
//
//
// WIN CE Exception table format
//
//
// Function table entry format. Function table is pointed to by the
// IMAGE_DIRECTORY_ENTRY_EXCEPTION directory entry.
//
typedef struct _IMAGE_CE_RUNTIME_FUNCTION_ENTRY {
DWORD FuncStart;
DWORD PrologLen : 8;
DWORD FuncLen : 22;
DWORD ThirtyTwoBit : 1;
DWORD ExceptionFlag : 1;
} IMAGE_CE_RUNTIME_FUNCTION_ENTRY, * PIMAGE_CE_RUNTIME_FUNCTION_ENTRY;
typedef struct _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY {
DWORD BeginAddress;
union {
DWORD UnwindData;
struct {
DWORD Flag : 2;
DWORD FunctionLength : 11;
DWORD Ret : 2;
DWORD H : 1;
DWORD Reg : 3;
DWORD R : 1;
DWORD L : 1;
DWORD C : 1;
DWORD StackAdjust : 10;
} ;
} ;
} IMAGE_ARM_RUNTIME_FUNCTION_ENTRY, * PIMAGE_ARM_RUNTIME_FUNCTION_ENTRY;
typedef struct _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY {
DWORD BeginAddress;
union {
DWORD UnwindData;
struct {
DWORD Flag : 2;
DWORD FunctionLength : 11;
DWORD RegF : 3;
DWORD RegI : 4;
DWORD H : 1;
DWORD CR : 2;
DWORD FrameSize : 9;
} ;
} ;
} IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY, * PIMAGE_ARM64_RUNTIME_FUNCTION_ENTRY;
typedef struct _IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY {
ULONGLONG BeginAddress;
ULONGLONG EndAddress;
ULONGLONG ExceptionHandler;
ULONGLONG HandlerData;
ULONGLONG PrologEndAddress;
} IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY, *PIMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY;
typedef struct _IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY {
DWORD BeginAddress;
DWORD EndAddress;
DWORD ExceptionHandler;
DWORD HandlerData;
DWORD PrologEndAddress;
} IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY, *PIMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY;
typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY {
DWORD BeginAddress;
DWORD EndAddress;
union {
DWORD UnwindInfoAddress;
DWORD UnwindData;
} ;
} _IMAGE_RUNTIME_FUNCTION_ENTRY, *_PIMAGE_RUNTIME_FUNCTION_ENTRY;
typedef _IMAGE_RUNTIME_FUNCTION_ENTRY IMAGE_IA64_RUNTIME_FUNCTION_ENTRY;
typedef _PIMAGE_RUNTIME_FUNCTION_ENTRY PIMAGE_IA64_RUNTIME_FUNCTION_ENTRY;
# 17774 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef _IMAGE_RUNTIME_FUNCTION_ENTRY IMAGE_RUNTIME_FUNCTION_ENTRY;
typedef _PIMAGE_RUNTIME_FUNCTION_ENTRY PIMAGE_RUNTIME_FUNCTION_ENTRY;
//
// Debug Format
//
typedef struct _IMAGE_DEBUG_DIRECTORY {
DWORD Characteristics;
DWORD TimeDateStamp;
WORD MajorVersion;
WORD MinorVersion;
DWORD Type;
DWORD SizeOfData;
DWORD AddressOfRawData;
DWORD PointerToRawData;
} IMAGE_DEBUG_DIRECTORY, *PIMAGE_DEBUG_DIRECTORY;
# 17813 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _IMAGE_COFF_SYMBOLS_HEADER {
DWORD NumberOfSymbols;
DWORD LvaToFirstSymbol;
DWORD NumberOfLinenumbers;
DWORD LvaToFirstLinenumber;
DWORD RvaToFirstByteOfCode;
DWORD RvaToLastByteOfCode;
DWORD RvaToFirstByteOfData;
DWORD RvaToLastByteOfData;
} IMAGE_COFF_SYMBOLS_HEADER, *PIMAGE_COFF_SYMBOLS_HEADER;
typedef struct _FPO_DATA {
DWORD ulOffStart; // offset 1st byte of function code
DWORD cbProcSize; // # bytes in function
DWORD cdwLocals; // # bytes in locals/4
WORD cdwParams; // # bytes in params/4
WORD cbProlog : 8; // # bytes in prolog
WORD cbRegs : 3; // # regs saved
WORD fHasSEH : 1; // TRUE if SEH in func
WORD fUseBP : 1; // TRUE if EBP has been allocated
WORD reserved : 1; // reserved for future use
WORD cbFrame : 2; // frame type
} FPO_DATA, *PFPO_DATA;
typedef struct _IMAGE_DEBUG_MISC {
DWORD DataType; // type of misc data, see defines
DWORD Length; // total length of record, rounded to four
// byte multiple.
BOOLEAN Unicode; // TRUE if data is unicode string
BYTE Reserved[ 3 ];
BYTE Data[ 1 ]; // Actual data
} IMAGE_DEBUG_MISC, *PIMAGE_DEBUG_MISC;
//
// Function table extracted from MIPS/ALPHA/IA64 images. Does not contain
// information needed only for runtime support. Just those fields for
// each entry needed by a debugger.
//
typedef struct _IMAGE_FUNCTION_ENTRY {
DWORD StartingAddress;
DWORD EndingAddress;
DWORD EndOfPrologue;
} IMAGE_FUNCTION_ENTRY, *PIMAGE_FUNCTION_ENTRY;
typedef struct _IMAGE_FUNCTION_ENTRY64 {
ULONGLONG StartingAddress;
ULONGLONG EndingAddress;
union {
ULONGLONG EndOfPrologue;
ULONGLONG UnwindInfoAddress;
} ;
} IMAGE_FUNCTION_ENTRY64, *PIMAGE_FUNCTION_ENTRY64;
//
// Debugging information can be stripped from an image file and placed
// in a separate .DBG file, whose file name part is the same as the
// image file name part (e.g. symbols for CMD.EXE could be stripped
// and placed in CMD.DBG). This is indicated by the IMAGE_FILE_DEBUG_STRIPPED
// flag in the Characteristics field of the file header. The beginning of
// the .DBG file contains the following structure which captures certain
// information from the image file. This allows a debug to proceed even if
// the original image file is not accessable. This header is followed by
// zero of more IMAGE_SECTION_HEADER structures, followed by zero or more
// IMAGE_DEBUG_DIRECTORY structures. The latter structures and those in
// the image file contain file offsets relative to the beginning of the
// .DBG file.
//
// If symbols have been stripped from an image, the IMAGE_DEBUG_MISC structure
// is left in the image file, but not mapped. This allows a debugger to
// compute the name of the .DBG file, from the name of the image in the
// IMAGE_DEBUG_MISC structure.
//
typedef struct _IMAGE_SEPARATE_DEBUG_HEADER {
WORD Signature;
WORD Flags;
WORD Machine;
WORD Characteristics;
DWORD TimeDateStamp;
DWORD CheckSum;
DWORD ImageBase;
DWORD SizeOfImage;
DWORD NumberOfSections;
DWORD ExportedNamesSize;
DWORD DebugDirectorySize;
DWORD SectionAlignment;
DWORD Reserved[2];
} IMAGE_SEPARATE_DEBUG_HEADER, *PIMAGE_SEPARATE_DEBUG_HEADER;
// begin_ntoshvp
typedef struct _NON_PAGED_DEBUG_INFO {
WORD Signature;
WORD Flags;
DWORD Size;
WORD Machine;
WORD Characteristics;
DWORD TimeDateStamp;
DWORD CheckSum;
DWORD SizeOfImage;
ULONGLONG ImageBase;
//DebugDirectorySize
//IMAGE_DEBUG_DIRECTORY
} NON_PAGED_DEBUG_INFO, *PNON_PAGED_DEBUG_INFO;
// end_ntoshvp
# 17941 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// old checksum didn't match.
//
// The .arch section is made up of headers, each describing an amask position/value
// pointing to an array of IMAGE_ARCHITECTURE_ENTRY's. Each "array" (both the header
// and entry arrays) are terminiated by a quadword of 0xffffffffL.
//
// NOTE: There may be quadwords of 0 sprinkled around and must be skipped.
//
typedef struct _ImageArchitectureHeader {
unsigned int AmaskValue: 1; // 1 -> code section depends on mask bit
// 0 -> new instruction depends on mask bit
int :7; // MBZ
unsigned int AmaskShift: 8; // Amask bit in question for this fixup
int :16; // MBZ
DWORD FirstEntryRVA; // RVA into .arch section to array of ARCHITECTURE_ENTRY's
} IMAGE_ARCHITECTURE_HEADER, *PIMAGE_ARCHITECTURE_HEADER;
typedef struct _ImageArchitectureEntry {
DWORD FixupInstRVA; // RVA of instruction to fixup
DWORD NewInst; // fixup instruction (see alphaops.h)
} IMAGE_ARCHITECTURE_ENTRY, *PIMAGE_ARCHITECTURE_ENTRY;
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\poppack.h" 1 3
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
poppack.h
Abstract:
This file turns packing of structures off. (That is, it enables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways.
poppack.h is the complement to pshpack?.h. An inclusion of poppack.h
MUST ALWAYS be preceded by an inclusion of one of pshpack?.h, in one-to-one
correspondence.
For Microsoft compatible compilers, this file uses the pop option
to the pack pragma so that it can restore the previous saved by the
pshpack?.h include file.
--*/
#pragma warning(disable: 4103)
#pragma pack(pop)
# 17965 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
// The following structure defines the new import object. Note the values of the first two fields,
// which must be set as stated in order to differentiate old and new import members.
// Following this structure, the linker emits two null-terminated strings used to recreate the
// import at the time of use. The first string is the import's name, the second is the dll's name.
typedef struct IMPORT_OBJECT_HEADER {
WORD Sig1; // Must be IMAGE_FILE_MACHINE_UNKNOWN
WORD Sig2; // Must be IMPORT_OBJECT_HDR_SIG2.
WORD Version;
WORD Machine;
DWORD TimeDateStamp; // Time/date stamp
DWORD SizeOfData; // particularly useful for incremental links
union {
WORD Ordinal; // if grf & IMPORT_OBJECT_ORDINAL
WORD Hint;
} ;
WORD Type : 2; // IMPORT_TYPE
WORD NameType : 3; // IMPORT_NAME_TYPE
WORD Reserved : 11; // Reserved. Must be zero.
} IMPORT_OBJECT_HEADER;
typedef enum IMPORT_OBJECT_TYPE
{
IMPORT_OBJECT_CODE = 0,
IMPORT_OBJECT_DATA = 1,
IMPORT_OBJECT_CONST = 2,
} IMPORT_OBJECT_TYPE;
typedef enum IMPORT_OBJECT_NAME_TYPE
{
IMPORT_OBJECT_ORDINAL = 0, // Import by ordinal
IMPORT_OBJECT_NAME = 1, // Import name == public symbol name.
IMPORT_OBJECT_NAME_NO_PREFIX = 2, // Import name == public symbol name skipping leading ?, @, or optionally _.
IMPORT_OBJECT_NAME_UNDECORATE = 3, // Import name == public symbol name skipping leading ?, @, or optionally _
// and truncating at first @.
IMPORT_OBJECT_NAME_EXPORTAS = 4, // Import name == a name is explicitly provided after the DLL name.
} IMPORT_OBJECT_NAME_TYPE;
typedef enum ReplacesCorHdrNumericDefines
{
// COM+ Header entry point flags.
COMIMAGE_FLAGS_ILONLY =0x00000001,
COMIMAGE_FLAGS_32BITREQUIRED =0x00000002,
COMIMAGE_FLAGS_IL_LIBRARY =0x00000004,
COMIMAGE_FLAGS_STRONGNAMESIGNED =0x00000008,
COMIMAGE_FLAGS_NATIVE_ENTRYPOINT =0x00000010,
COMIMAGE_FLAGS_TRACKDEBUGDATA =0x00010000,
COMIMAGE_FLAGS_32BITPREFERRED =0x00020000,
// Version flags for image.
COR_VERSION_MAJOR_V2 =2,
COR_VERSION_MAJOR =COR_VERSION_MAJOR_V2,
COR_VERSION_MINOR =5,
COR_DELETED_NAME_LENGTH =8,
COR_VTABLEGAP_NAME_LENGTH =8,
// Maximum size of a NativeType descriptor.
NATIVE_TYPE_MAX_CB =1,
COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE=0xFF,
// #defines for the MIH FLAGS
IMAGE_COR_MIH_METHODRVA =0x01,
IMAGE_COR_MIH_EHRVA =0x02,
IMAGE_COR_MIH_BASICBLOCK =0x08,
// V-table constants
COR_VTABLE_32BIT =0x01, // V-table slots are 32-bits in size.
COR_VTABLE_64BIT =0x02, // V-table slots are 64-bits in size.
COR_VTABLE_FROM_UNMANAGED =0x04, // If set, transition from unmanaged.
COR_VTABLE_FROM_UNMANAGED_RETAIN_APPDOMAIN =0x08, // If set, transition from unmanaged with keeping the current appdomain.
COR_VTABLE_CALL_MOST_DERIVED =0x10, // Call most derived method described by
// EATJ constants
IMAGE_COR_EATJ_THUNK_SIZE =32, // Size of a jump thunk reserved range.
// Max name lengths
//@todo: Change to unlimited name lengths.
MAX_CLASS_NAME =1024,
MAX_PACKAGE_NAME =1024,
} ReplacesCorHdrNumericDefines;
// CLR 2.0 header structure.
typedef struct IMAGE_COR20_HEADER
{
// Header versioning
DWORD cb;
WORD MajorRuntimeVersion;
WORD MinorRuntimeVersion;
// Symbol table and startup information
IMAGE_DATA_DIRECTORY MetaData;
DWORD Flags;
// If COMIMAGE_FLAGS_NATIVE_ENTRYPOINT is not set, EntryPointToken represents a managed entrypoint.
// If COMIMAGE_FLAGS_NATIVE_ENTRYPOINT is set, EntryPointRVA represents an RVA to a native entrypoint.
union {
DWORD EntryPointToken;
DWORD EntryPointRVA;
} ;
// Binding information
IMAGE_DATA_DIRECTORY Resources;
IMAGE_DATA_DIRECTORY StrongNameSignature;
// Regular fixup and binding information
IMAGE_DATA_DIRECTORY CodeManagerTable;
IMAGE_DATA_DIRECTORY VTableFixups;
IMAGE_DATA_DIRECTORY ExportAddressTableJumps;
// Precompiled image info (internal use only - set to zero)
IMAGE_DATA_DIRECTORY ManagedNativeHeader;
} IMAGE_COR20_HEADER, *PIMAGE_COR20_HEADER;
//
// End Image Format
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\apiset.h" 1 3
/*++
Copyright (c) 2008 Microsoft Corporation
Module Name:
apiset.h
Abstract:
This module contains definitions related to the management of API namespaces.
Author:
Arun Kishan (arunki) 14-Sep-2008
--*/
//
// API set interface definitions.
//
# 18095 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
//
// prototypes
//
// begin_ntifs
# 18110 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__declspec(dllimport)
WORD
__stdcall
RtlCaptureStackBackTrace(
DWORD FramesToSkip,
DWORD FramesToCapture,
PVOID * BackTrace,
PDWORD BackTraceHash
);
# 18134 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__declspec(dllimport)
void
__stdcall
RtlCaptureContext(
PCONTEXT ContextRecord
);
// end_ntifs
__declspec(dllimport)
void
__stdcall
RtlUnwind(
PVOID TargetFrame,
PVOID TargetIp,
PEXCEPTION_RECORD ExceptionRecord,
PVOID ReturnValue
);
# 18174 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__declspec(dllimport)
BOOLEAN
__cdecl
RtlAddFunctionTable(
PRUNTIME_FUNCTION FunctionTable,
DWORD EntryCount,
DWORD64 BaseAddress
);
__declspec(dllimport)
BOOLEAN
__cdecl
RtlDeleteFunctionTable(
PRUNTIME_FUNCTION FunctionTable
);
__declspec(dllimport)
BOOLEAN
__cdecl
RtlInstallFunctionTableCallback(
DWORD64 TableIdentifier,
DWORD64 BaseAddress,
DWORD Length,
PGET_RUNTIME_FUNCTION_CALLBACK Callback,
PVOID Context,
PCWSTR OutOfProcessCallbackDll
);
// end_1_0
__declspec(dllimport)
DWORD
__stdcall
RtlAddGrowableFunctionTable(
PVOID * DynamicTable,
PRUNTIME_FUNCTION FunctionTable,
DWORD EntryCount,
DWORD MaximumEntryCount,
ULONG_PTR RangeBase,
ULONG_PTR RangeEnd
);
__declspec(dllimport)
void
__stdcall
RtlGrowFunctionTable(
PVOID DynamicTable,
DWORD NewEntryCount
);
__declspec(dllimport)
void
__stdcall
RtlDeleteGrowableFunctionTable(
PVOID DynamicTable
);
// begin_1_0
# 18251 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__declspec(dllimport)
PRUNTIME_FUNCTION
__stdcall
RtlLookupFunctionEntry(
DWORD64 ControlPc,
PDWORD64 ImageBase,
PUNWIND_HISTORY_TABLE HistoryTable
);
# 18268 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__declspec(dllimport)
void
__cdecl
RtlRestoreContext(
PCONTEXT ContextRecord,
struct _EXCEPTION_RECORD * ExceptionRecord
);
# 18284 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__declspec(dllimport)
void
__stdcall
RtlUnwindEx(
PVOID TargetFrame,
PVOID TargetIp,
PEXCEPTION_RECORD ExceptionRecord,
PVOID ReturnValue,
PCONTEXT ContextRecord,
PUNWIND_HISTORY_TABLE HistoryTable
);
# 18304 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__declspec(dllimport)
PEXCEPTION_ROUTINE
__stdcall
RtlVirtualUnwind(
DWORD HandlerType,
DWORD64 ImageBase,
DWORD64 ControlPc,
PRUNTIME_FUNCTION FunctionEntry,
PCONTEXT ContextRecord,
PVOID * HandlerData,
PDWORD64 EstablisherFrame,
PKNONVOLATILE_CONTEXT_POINTERS ContextPointers
);
# 18690 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__declspec(dllimport)
PVOID
__stdcall
RtlPcToFileHeader(
PVOID PcValue,
PVOID * BaseOfImage
);
# 18716 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__declspec(dllimport)
SIZE_T
__stdcall
RtlCompareMemory(
const void * Source1,
const void * Source2,
SIZE_T Length
);
# 18733 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// for move macros
//
# 18750 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// The type SINGLE_LIST_ENTRY is not suitable for use with SLISTs. For
// WIN64, an entry on an SLIST is required to be 16-byte aligned, while a
// SINGLE_LIST_ENTRY structure has only 8 byte alignment.
//
// Therefore, all SLIST code should use the SLIST_ENTRY type instead of the
// SINGLE_LIST_ENTRY type.
//
#pragma warning(push)
#pragma warning(disable: 4324)
typedef struct __declspec(align(16)) _SLIST_ENTRY {
struct _SLIST_ENTRY *Next;
} SLIST_ENTRY, *PSLIST_ENTRY;
#pragma warning(pop)
# 18776 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef union __declspec(align(16)) _SLIST_HEADER {
struct { // original struct
ULONGLONG Alignment;
ULONGLONG Region;
} ;
struct { // x64 16-byte header
ULONGLONG Depth:16;
ULONGLONG Sequence:48;
ULONGLONG Reserved:4;
ULONGLONG NextEntry:60; // last 4 bits are always 0's
} HeaderX64;
} SLIST_HEADER, *PSLIST_HEADER;
# 18835 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__declspec(dllimport)
void
__stdcall
RtlInitializeSListHead (
PSLIST_HEADER ListHead
);
__declspec(dllimport)
PSLIST_ENTRY
__stdcall
RtlFirstEntrySList (
const SLIST_HEADER *ListHead
);
__declspec(dllimport)
PSLIST_ENTRY
__stdcall
RtlInterlockedPopEntrySList (
PSLIST_HEADER ListHead
);
__declspec(dllimport)
PSLIST_ENTRY
__stdcall
RtlInterlockedPushEntrySList (
PSLIST_HEADER ListHead,
PSLIST_ENTRY ListEntry
);
__declspec(dllimport)
PSLIST_ENTRY
__stdcall
RtlInterlockedPushListSListEx (
PSLIST_HEADER ListHead,
PSLIST_ENTRY List,
PSLIST_ENTRY ListEnd,
DWORD Count
);
__declspec(dllimport)
PSLIST_ENTRY
__stdcall
RtlInterlockedFlushSList (
PSLIST_HEADER ListHead
);
__declspec(dllimport)
WORD
__stdcall
RtlQueryDepthSList (
PSLIST_HEADER ListHead
);
# 18896 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Run once
//
//
// Run once flags
//
//
// The context stored in the run once structure must leave the following number
// of low order bits unused.
//
typedef union _RTL_RUN_ONCE {
PVOID Ptr;
} RTL_RUN_ONCE, *PRTL_RUN_ONCE;
typedef struct _RTL_BARRIER {
DWORD Reserved1;
DWORD Reserved2;
ULONG_PTR Reserved3[2];
DWORD Reserved4;
DWORD Reserved5;
} RTL_BARRIER, *PRTL_BARRIER;
// begin_ntoshvp
// Include the more obscure SAL annotations (like __drv_aliasesMem) instead of assuming the crtdefs.h will include them.
//
// Fast fail failure codes.
//
// N.B. Failure code zero should not be used, but is required to be reserved
// for compatibility with previous handling of the
// STATUS_STACK_BUFFER_OVERRUN exception status code.
//
# 18992 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__declspec(noreturn)
void
__fastfail(
unsigned int Code
);
#pragma intrinsic(__fastfail)
# 19021 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__forceinline
DWORD
HEAP_MAKE_TAG_FLAGS (
DWORD TagBase,
DWORD Tag
)
{
return ((DWORD)((TagBase) + ((Tag) << 18)));
}
# 19100 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__forceinline
PVOID
RtlSecureZeroMemory(
PVOID ptr,
SIZE_T cnt
)
{
volatile char *vptr = (volatile char *)ptr;
__stosb((PBYTE )((DWORD64)vptr), 0, cnt);
# 19133 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
return ptr;
}
// begin_wdm
# 19157 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_wdm
typedef struct _MESSAGE_RESOURCE_ENTRY {
WORD Length;
WORD Flags;
BYTE Text[ 1 ];
} MESSAGE_RESOURCE_ENTRY, *PMESSAGE_RESOURCE_ENTRY;
typedef struct _MESSAGE_RESOURCE_BLOCK {
DWORD LowId;
DWORD HighId;
DWORD OffsetToEntries;
} MESSAGE_RESOURCE_BLOCK, *PMESSAGE_RESOURCE_BLOCK;
typedef struct _MESSAGE_RESOURCE_DATA {
DWORD NumberOfBlocks;
MESSAGE_RESOURCE_BLOCK Blocks[ 1 ];
} MESSAGE_RESOURCE_DATA, *PMESSAGE_RESOURCE_DATA;
typedef struct _OSVERSIONINFOA {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
CHAR szCSDVersion[ 128 ]; // Maintenance string for PSS usage
} OSVERSIONINFOA, *POSVERSIONINFOA, *LPOSVERSIONINFOA;
typedef struct _OSVERSIONINFOW {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
WCHAR szCSDVersion[ 128 ]; // Maintenance string for PSS usage
} OSVERSIONINFOW, *POSVERSIONINFOW, *LPOSVERSIONINFOW, RTL_OSVERSIONINFOW, *PRTL_OSVERSIONINFOW;
typedef OSVERSIONINFOA OSVERSIONINFO;
typedef POSVERSIONINFOA POSVERSIONINFO;
typedef LPOSVERSIONINFOA LPOSVERSIONINFO;
typedef struct _OSVERSIONINFOEXA {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
CHAR szCSDVersion[ 128 ]; // Maintenance string for PSS usage
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wSuiteMask;
BYTE wProductType;
BYTE wReserved;
} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA;
typedef struct _OSVERSIONINFOEXW {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
WCHAR szCSDVersion[ 128 ]; // Maintenance string for PSS usage
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wSuiteMask;
BYTE wProductType;
BYTE wReserved;
} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW, RTL_OSVERSIONINFOEXW, *PRTL_OSVERSIONINFOEXW;
typedef OSVERSIONINFOEXA OSVERSIONINFOEX;
typedef POSVERSIONINFOEXA POSVERSIONINFOEX;
typedef LPOSVERSIONINFOEXA LPOSVERSIONINFOEX;
// begin_wudfpwdm
//
// RtlVerifyVersionInfo() conditions
//
# 19258 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// RtlVerifyVersionInfo() type mask bits
//
# 19271 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// RtlVerifyVersionInfo() os product type values
//
//
// dwPlatformId defines:
//
# 19290 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
//
// VerifyVersionInfo() macro to set the condition mask
//
// For documentation sakes here's the old version of the macro that got
// changed to call an API
// #define VER_SET_CONDITION(_m_,_t_,_c_) _m_=(_m_|(_c_<<(1<<_t_)))
//
# 19306 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__declspec(dllimport)
ULONGLONG
__stdcall
VerSetConditionMask(
ULONGLONG ConditionMask,
DWORD TypeMask,
BYTE Condition
);
# 19322 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// begin_ntddk
__declspec(dllimport)
BOOLEAN
__stdcall
RtlGetProductInfo(
DWORD OSMajorVersion,
DWORD OSMinorVersion,
DWORD SpMajorVersion,
DWORD SpMinorVersion,
PDWORD ReturnedProductType
);
// end_ntddk
typedef enum _RTL_UMS_THREAD_INFO_CLASS {
UmsThreadInvalidInfoClass = 0,
UmsThreadUserContext,
UmsThreadPriority, // Reserved
UmsThreadAffinity, // Reserved
UmsThreadTeb,
UmsThreadIsSuspended,
UmsThreadIsTerminated,
UmsThreadMaxInfoClass
} RTL_UMS_THREAD_INFO_CLASS, *PRTL_UMS_THREAD_INFO_CLASS;
typedef enum _RTL_UMS_SCHEDULER_REASON {
UmsSchedulerStartup = 0,
UmsSchedulerThreadBlocked,
UmsSchedulerThreadYield,
} RTL_UMS_SCHEDULER_REASON, *PRTL_UMS_SCHEDULER_REASON;
typedef
void
__stdcall
RTL_UMS_SCHEDULER_ENTRY_POINT(
RTL_UMS_SCHEDULER_REASON Reason,
ULONG_PTR ActivationPayload,
PVOID SchedulerParam
);
typedef RTL_UMS_SCHEDULER_ENTRY_POINT *PRTL_UMS_SCHEDULER_ENTRY_POINT;
//
// Validation runlevel helper macro: checks if a particular level L enables the
// validation class C.
//
// Returns a non-zero scalar if class C is enabled, and zero otherwise.
//
//
// Validation classes are broken into:
// 8 predefined validation classes, spanning bits 0 to 7 of the level value
// 24 custom-defined validation classes, spanning bits 8 to 31
//
//
// The following are predefined validation classes.
//
//
// Do not ignore kernel breaks when kernel debugging is disabled (debug builds only)
//
# 19417 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// RtlCheckTokenMembership flags.
//
# 19430 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_ntosp
// begin_ntosp
//
// Crc32 and Crc64 routines that use standardized algorithms
//
__declspec(dllimport)
DWORD
__stdcall
RtlCrc32(
const void *Buffer,
size_t Size,
DWORD InitialCrc
);
__declspec(dllimport)
ULONGLONG
__stdcall
RtlCrc64(
const void *Buffer,
size_t Size,
ULONGLONG InitialCrc
);
// end_ntosp
// begin_ntosp
//
// API to detect what type of OS Deployment this is. Current valid values
// are listed below
//
//
// Valid OsDeployment values that can be returned
//
typedef enum _OS_DEPLOYEMENT_STATE_VALUES {
OS_DEPLOYMENT_STANDARD = 1,
OS_DEPLOYMENT_COMPACT
} OS_DEPLOYEMENT_STATE_VALUES;
__declspec(dllimport)
OS_DEPLOYEMENT_STATE_VALUES
__stdcall
RtlOsDeploymentState(
DWORD Flags /* No flags currently defined, passed 0 */
);
//
// Flush routines for DAX mapped files
//
typedef struct _NV_MEMORY_RANGE {
void *BaseAddress;
SIZE_T Length;
} NV_MEMORY_RANGE, *PNV_MEMORY_RANGE;
//
// Flags for RtlFlushNonVolatileMemory and RtlFlushNonVolatileMemoryRanges
//
//
// Default token is used to call the flush and drain routines without the
// RtlGetNonVolatileToken call, for callers who know the details about the
// region they are flushing.
//
__declspec(dllimport)
DWORD
__stdcall
RtlGetNonVolatileToken (
PVOID NvBuffer,
SIZE_T Size,
PVOID *NvToken
);
__declspec(dllimport)
DWORD
__stdcall
RtlFreeNonVolatileToken (
PVOID NvToken
);
__declspec(dllimport)
DWORD
__stdcall
RtlFlushNonVolatileMemory (
PVOID NvToken,
PVOID NvBuffer,
SIZE_T Size,
DWORD Flags
);
__declspec(dllimport)
DWORD
__stdcall
RtlDrainNonVolatileFlush (
PVOID NvToken
);
__declspec(dllimport)
DWORD
__stdcall
RtlWriteNonVolatileMemory (
PVOID NvToken,
void __unaligned *NvDestination,
void __unaligned *Source,
SIZE_T Size,
DWORD Flags
);
__declspec(dllimport)
DWORD
__stdcall
RtlFlushNonVolatileMemoryRanges (
PVOID NvToken,
PNV_MEMORY_RANGE NvRanges,
SIZE_T NumRanges,
DWORD Flags
);
typedef struct _RTL_CRITICAL_SECTION_DEBUG {
WORD Type;
WORD CreatorBackTraceIndex;
struct _RTL_CRITICAL_SECTION *CriticalSection;
LIST_ENTRY ProcessLocksList;
DWORD EntryCount;
DWORD ContentionCount;
DWORD Flags;
WORD CreatorBackTraceIndexHigh;
WORD SpareWORD ;
} RTL_CRITICAL_SECTION_DEBUG, *PRTL_CRITICAL_SECTION_DEBUG, RTL_RESOURCE_DEBUG, *PRTL_RESOURCE_DEBUG;
//
// These flags define the upper byte of the critical section SpinCount field
//
# 19604 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// These flags define possible values stored in the Flags field of a critsec debuginfo.
//
#pragma pack(push, 8)
typedef struct _RTL_CRITICAL_SECTION {
PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
//
// The following three fields control entering and exiting the critical
// section for the resource
//
LONG LockCount;
LONG RecursionCount;
HANDLE OwningThread; // from the thread's ClientId->UniqueThread
HANDLE LockSemaphore;
ULONG_PTR SpinCount; // force size on 64-bit systems when packed
} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
#pragma pack(pop)
typedef struct _RTL_SRWLOCK {
PVOID Ptr;
} RTL_SRWLOCK, *PRTL_SRWLOCK;
typedef struct _RTL_CONDITION_VARIABLE {
PVOID Ptr;
} RTL_CONDITION_VARIABLE, *PRTL_CONDITION_VARIABLE;
typedef
void
(__stdcall *PAPCFUNC)(
ULONG_PTR Parameter
);
typedef LONG (__stdcall *PVECTORED_EXCEPTION_HANDLER)(
struct _EXCEPTION_POINTERS *ExceptionInfo
);
typedef enum _HEAP_INFORMATION_CLASS {
HeapCompatibilityInformation = 0,
HeapEnableTerminationOnCorruption = 1
,
HeapOptimizeResources = 3
} HEAP_INFORMATION_CLASS;
typedef struct _HEAP_OPTIMIZE_RESOURCES_INFORMATION {
DWORD Version;
DWORD Flags;
} HEAP_OPTIMIZE_RESOURCES_INFORMATION, *PHEAP_OPTIMIZE_RESOURCES_INFORMATION;
# 19687 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef void (__stdcall * WAITORTIMERCALLBACKFUNC) (PVOID, BOOLEAN );
typedef void (__stdcall * WORKERCALLBACKFUNC) (PVOID );
typedef void (__stdcall * APC_CALLBACK_FUNCTION) (DWORD , PVOID, PVOID);
typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK;
typedef
void
(__stdcall *PFLS_CALLBACK_FUNCTION) (
PVOID lpFlsData
);
typedef
BOOLEAN
(__stdcall *PSECURE_MEMORY_CACHE_CALLBACK) (
PVOID Addr,
SIZE_T Range
);
typedef enum _ACTIVATION_CONTEXT_INFO_CLASS {
ActivationContextBasicInformation = 1,
ActivationContextDetailedInformation = 2,
AssemblyDetailedInformationInActivationContext = 3,
FileInformationInAssemblyOfAssemblyInActivationContext = 4,
RunlevelInformationInActivationContext = 5,
CompatibilityInformationInActivationContext = 6,
ActivationContextManifestResourceName = 7,
MaxActivationContextInfoClass,
//
// compatibility with old names
//
AssemblyDetailedInformationInActivationContxt = 3,
FileInformationInAssemblyOfAssemblyInActivationContxt = 4
} ACTIVATION_CONTEXT_INFO_CLASS;
typedef struct _ACTIVATION_CONTEXT_QUERY_INDEX {
DWORD ulAssemblyIndex;
DWORD ulFileIndexInAssembly;
} ACTIVATION_CONTEXT_QUERY_INDEX, * PACTIVATION_CONTEXT_QUERY_INDEX;
typedef const struct _ACTIVATION_CONTEXT_QUERY_INDEX * PCACTIVATION_CONTEXT_QUERY_INDEX;
typedef struct _ASSEMBLY_FILE_DETAILED_INFORMATION {
DWORD ulFlags;
DWORD ulFilenameLength;
DWORD ulPathLength;
PCWSTR lpFileName;
PCWSTR lpFilePath;
} ASSEMBLY_FILE_DETAILED_INFORMATION, *PASSEMBLY_FILE_DETAILED_INFORMATION;
typedef const ASSEMBLY_FILE_DETAILED_INFORMATION *PCASSEMBLY_FILE_DETAILED_INFORMATION;
//
// compatibility with old names
// The new names use "file" consistently.
//
typedef struct _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION {
DWORD ulFlags;
DWORD ulEncodedAssemblyIdentityLength; // in bytes
DWORD ulManifestPathType; // ACTIVATION_CONTEXT_PATH_TYPE_*
DWORD ulManifestPathLength; // in bytes
LARGE_INTEGER liManifestLastWriteTime; // FILETIME
DWORD ulPolicyPathType; // ACTIVATION_CONTEXT_PATH_TYPE_*
DWORD ulPolicyPathLength; // in bytes
LARGE_INTEGER liPolicyLastWriteTime; // FILETIME
DWORD ulMetadataSatelliteRosterIndex;
DWORD ulManifestVersionMajor; // 1
DWORD ulManifestVersionMinor; // 0
DWORD ulPolicyVersionMajor; // 0
DWORD ulPolicyVersionMinor; // 0
DWORD ulAssemblyDirectoryNameLength; // in bytes
PCWSTR lpAssemblyEncodedAssemblyIdentity;
PCWSTR lpAssemblyManifestPath;
PCWSTR lpAssemblyPolicyPath;
PCWSTR lpAssemblyDirectoryName;
DWORD ulFileCount;
} ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION, * PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
typedef const struct _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION * PCACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION ;
typedef enum
{
ACTCTX_RUN_LEVEL_UNSPECIFIED = 0,
ACTCTX_RUN_LEVEL_AS_INVOKER,
ACTCTX_RUN_LEVEL_HIGHEST_AVAILABLE,
ACTCTX_RUN_LEVEL_REQUIRE_ADMIN,
ACTCTX_RUN_LEVEL_NUMBERS
} ACTCTX_REQUESTED_RUN_LEVEL;
typedef struct _ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION {
DWORD ulFlags;
ACTCTX_REQUESTED_RUN_LEVEL RunLevel;
DWORD UiAccess;
} ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION, * PACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION;
typedef const struct _ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION * PCACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION ;
typedef enum
{
ACTCTX_COMPATIBILITY_ELEMENT_TYPE_UNKNOWN = 0,
ACTCTX_COMPATIBILITY_ELEMENT_TYPE_OS,
ACTCTX_COMPATIBILITY_ELEMENT_TYPE_MITIGATION
} ACTCTX_COMPATIBILITY_ELEMENT_TYPE;
typedef struct _COMPATIBILITY_CONTEXT_ELEMENT {
GUID Id;
ACTCTX_COMPATIBILITY_ELEMENT_TYPE Type;
} COMPATIBILITY_CONTEXT_ELEMENT, *PCOMPATIBILITY_CONTEXT_ELEMENT;
typedef const struct _COMPATIBILITY_CONTEXT_ELEMENT *PCCOMPATIBILITY_CONTEXT_ELEMENT;
#pragma warning(push)
#pragma warning(disable: 4200)
typedef struct _ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION {
DWORD ElementCount;
COMPATIBILITY_CONTEXT_ELEMENT Elements[];
} ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION, * PACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION;
#pragma warning(pop)
typedef const struct _ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION * PCACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION;
typedef struct _SUPPORTED_OS_INFO {
WORD MajorVersion;
WORD MinorVersion;
} SUPPORTED_OS_INFO, *PSUPPORTED_OS_INFO;
typedef struct _ACTIVATION_CONTEXT_DETAILED_INFORMATION {
DWORD dwFlags;
DWORD ulFormatVersion;
DWORD ulAssemblyCount;
DWORD ulRootManifestPathType;
DWORD ulRootManifestPathChars;
DWORD ulRootConfigurationPathType;
DWORD ulRootConfigurationPathChars;
DWORD ulAppDirPathType;
DWORD ulAppDirPathChars;
PCWSTR lpRootManifestPath;
PCWSTR lpRootConfigurationPath;
PCWSTR lpAppDirPath;
} ACTIVATION_CONTEXT_DETAILED_INFORMATION, *PACTIVATION_CONTEXT_DETAILED_INFORMATION;
typedef const struct _ACTIVATION_CONTEXT_DETAILED_INFORMATION *PCACTIVATION_CONTEXT_DETAILED_INFORMATION;
typedef struct _HARDWARE_COUNTER_DATA {
HARDWARE_COUNTER_TYPE Type;
DWORD Reserved;
DWORD64 Value;
} HARDWARE_COUNTER_DATA, *PHARDWARE_COUNTER_DATA;
typedef struct _PERFORMANCE_DATA {
WORD Size;
BYTE Version;
BYTE HwCountersCount;
DWORD ContextSwitchCount;
DWORD64 WaitReasonBitMap;
DWORD64 CycleTime;
DWORD RetryCount;
DWORD Reserved;
HARDWARE_COUNTER_DATA HwCounters[16];
} PERFORMANCE_DATA, *PPERFORMANCE_DATA;
# 19947 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
void
__stdcall
RtlGetDeviceFamilyInfoEnum(
ULONGLONG *pullUAPInfo,
DWORD *pulDeviceFamily,
DWORD *pulDeviceForm
);
DWORD
__stdcall
RtlConvertDeviceFamilyInfoToString(
PDWORD pulDeviceFamilyBufferSize,
PDWORD pulDeviceFormBufferSize,
PWSTR DeviceFamily,
PWSTR DeviceForm
);
DWORD
__stdcall
RtlSwitchedVVI(
PRTL_OSVERSIONINFOEXW VersionInfo,
DWORD TypeMask,
ULONGLONG ConditionMask
);
# 19984 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Defines for the READ flags for Eventlogging
//
//
// The types of events that can be logged.
//
//
// Defines for the WRITE flags used by Auditing for paired events
// These are not implemented in Product 1
//
//
// Structure that defines the header of the Eventlog record. This is the
// fixed-sized portion before all the variable-length strings, binary
// data and pad bytes.
//
// TimeGenerated is the time it was generated at the client.
// TimeWritten is the time it was put into the log at the server end.
//
typedef struct _EVENTLOGRECORD {
DWORD Length; // Length of full record
DWORD Reserved; // Used by the service
DWORD RecordNumber; // Absolute record number
DWORD TimeGenerated; // Seconds since 1-1-1970
DWORD TimeWritten; // Seconds since 1-1-1970
DWORD EventID;
WORD EventType;
WORD NumStrings;
WORD EventCategory;
WORD ReservedFlags; // For use with paired events (auditing)
DWORD ClosingRecordNumber; // For use with paired events (auditing)
DWORD StringOffset; // Offset from beginning of record
DWORD UserSidLength;
DWORD UserSidOffset;
DWORD DataLength;
DWORD DataOffset; // Offset from beginning of record
//
// Then follow:
//
// WCHAR SourceName[]
// WCHAR Computername[]
// SID UserSid
// WCHAR Strings[]
// BYTE Data[]
// CHAR Pad[]
// DWORD Length;
//
} EVENTLOGRECORD, *PEVENTLOGRECORD;
//SS: start of changes to support clustering
//SS: ideally the
#pragma warning(push)
#pragma warning(disable: 4200)
struct _EVENTSFORLOGFILE;
typedef struct _EVENTSFORLOGFILE EVENTSFORLOGFILE, *PEVENTSFORLOGFILE;
struct _PACKEDEVENTINFO;
typedef struct _PACKEDEVENTINFO PACKEDEVENTINFO, *PPACKEDEVENTINFO;
struct _EVENTSFORLOGFILE
{
DWORD ulSize;
WCHAR szLogicalLogFile[256]; //name of the logical file-security/application/system
DWORD ulNumRecords;
EVENTLOGRECORD pEventLogRecords[];
};
struct _PACKEDEVENTINFO
{
DWORD ulSize; //total size of the structure
DWORD ulNumEventsForLogFile; //number of EventsForLogFile structure that follow
DWORD ulOffsets[]; //the offsets from the start of this structure to the EVENTSFORLOGFILE structure
};
#pragma warning(pop)
//SS: end of changes to support clustering
//
// begin_wdm
// begin_access
//
// Registry Specific Access Rights.
//
# 20139 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_access
//
// Open/Create Options
//
// when system is rebooted
// when system is rebooted
// symbolic link
// special access rules
// privilege required
// virtualization for this
// open and the resulting
// handle.
# 20182 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Key creation/open disposition
//
//
// hive format to be used by Reg(Nt)SaveKeyEx
//
//
// Key restore & hive load flags
//
# 20217 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Unload Flags
//
//
// Notify filter values
//
// for async user event based notification
# 20241 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_wdm
//
//
// Predefined Value Types.
//
// (with environment variable references)
# 20264 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_wdm
// begin_wdm
//
// Service Types (Bit Mask)
//
# 20303 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Start Type
//
//
// Error control type
//
//
//
// Define the registry driver node enumerations
//
typedef enum _CM_SERVICE_NODE_TYPE {
DriverType = 0x00000001,
FileSystemType = 0x00000002,
Win32ServiceOwnProcess = 0x00000010,
Win32ServiceShareProcess = 0x00000020,
AdapterType = 0x00000004,
RecognizerType = 0x00000008
} SERVICE_NODE_TYPE;
typedef enum _CM_SERVICE_LOAD_TYPE {
BootLoad = 0x00000000,
SystemLoad = 0x00000001,
AutoLoad = 0x00000002,
DemandLoad = 0x00000003,
DisableLoad = 0x00000004
} SERVICE_LOAD_TYPE;
typedef enum _CM_ERROR_CONTROL_TYPE {
IgnoreError = 0x00000000,
NormalError = 0x00000001,
SevereError = 0x00000002,
CriticalError = 0x00000003
} SERVICE_ERROR_TYPE;
//
// Service node Flags. These flags are used by the OS loader to promote
// a driver's start type to boot start if the system is booting using
// the specified mechanism. The flags should be set in the driver's
// registry configuration.
//
// CM_SERVICE_NETWORK_BOOT_LOAD - Specified if a driver should be
// promoted on network boot.
//
// CM_SERVICE_VIRTUAL_DISK_BOOT_LOAD - Specified if a driver should be
// promoted on booting from a VHD.
//
// CM_SERVICE_USB_DISK_BOOT_LOAD - Specified if a driver should be promoted
// while booting from a USB disk.
//
// CM_SERVICE_SD_DISK_BOOT_LOAD - Specified if a driver should be promoted
// while booting from SD storage.
//
// CM_SERVICE_USB3_DISK_BOOT_LOAD - Specified if a driver should be promoted
// while booting from a disk on a USB3 controller.
//
// CM_SERVICE_MEASURED_BOOT_LOAD - Specified if a driver should be promoted
// while booting with measured boot enabled.
//
// CM_SERVICE_VERIFIER_BOOT_LOAD - Specified if a driver should be promoted
// while booting with verifier boot enabled.
//
// CM_SERVICE_WINPE_BOOT_LOAD - Specified if a driver should be promoted
// on WinPE boot.
//
# 20390 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Mask defining the legal promotion flag values.
//
# 20407 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// IOCTL_TAPE_ERASE definitions
//
typedef struct _TAPE_ERASE {
DWORD Type;
BOOLEAN Immediate;
} TAPE_ERASE, *PTAPE_ERASE;
//
// IOCTL_TAPE_PREPARE definitions
//
# 20430 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _TAPE_PREPARE {
DWORD Operation;
BOOLEAN Immediate;
} TAPE_PREPARE, *PTAPE_PREPARE;
//
// IOCTL_TAPE_WRITE_MARKS definitions
//
typedef struct _TAPE_WRITE_MARKS {
DWORD Type;
DWORD Count;
BOOLEAN Immediate;
} TAPE_WRITE_MARKS, *PTAPE_WRITE_MARKS;
//
// IOCTL_TAPE_GET_POSITION definitions
//
typedef struct _TAPE_GET_POSITION {
DWORD Type;
DWORD Partition;
LARGE_INTEGER Offset;
} TAPE_GET_POSITION, *PTAPE_GET_POSITION;
//
// IOCTL_TAPE_SET_POSITION definitions
//
# 20479 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _TAPE_SET_POSITION {
DWORD Method;
DWORD Partition;
LARGE_INTEGER Offset;
BOOLEAN Immediate;
} TAPE_SET_POSITION, *PTAPE_SET_POSITION;
//
// IOCTL_TAPE_GET_DRIVE_PARAMS definitions
//
//
// Definitions for FeaturesLow parameter
//
# 20525 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// //can't be a low features bit!
// //reserved; high features only
//
// Definitions for FeaturesHigh parameter
//
# 20572 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
typedef struct _TAPE_GET_DRIVE_PARAMETERS {
BOOLEAN ECC;
BOOLEAN Compression;
BOOLEAN DataPadding;
BOOLEAN ReportSetmarks;
DWORD DefaultBlockSize;
DWORD MaximumBlockSize;
DWORD MinimumBlockSize;
DWORD MaximumPartitionCount;
DWORD FeaturesLow;
DWORD FeaturesHigh;
DWORD EOTWarningZoneSize;
} TAPE_GET_DRIVE_PARAMETERS, *PTAPE_GET_DRIVE_PARAMETERS;
//
// IOCTL_TAPE_SET_DRIVE_PARAMETERS definitions
//
typedef struct _TAPE_SET_DRIVE_PARAMETERS {
BOOLEAN ECC;
BOOLEAN Compression;
BOOLEAN DataPadding;
BOOLEAN ReportSetmarks;
DWORD EOTWarningZoneSize;
} TAPE_SET_DRIVE_PARAMETERS, *PTAPE_SET_DRIVE_PARAMETERS;
//
// IOCTL_TAPE_GET_MEDIA_PARAMETERS definitions
//
typedef struct _TAPE_GET_MEDIA_PARAMETERS {
LARGE_INTEGER Capacity;
LARGE_INTEGER Remaining;
DWORD BlockSize;
DWORD PartitionCount;
BOOLEAN WriteProtected;
} TAPE_GET_MEDIA_PARAMETERS, *PTAPE_GET_MEDIA_PARAMETERS;
//
// IOCTL_TAPE_SET_MEDIA_PARAMETERS definitions
//
typedef struct _TAPE_SET_MEDIA_PARAMETERS {
DWORD BlockSize;
} TAPE_SET_MEDIA_PARAMETERS, *PTAPE_SET_MEDIA_PARAMETERS;
//
// IOCTL_TAPE_CREATE_PARTITION definitions
//
typedef struct _TAPE_CREATE_PARTITION {
DWORD Method;
DWORD Count;
DWORD Size;
} TAPE_CREATE_PARTITION, *PTAPE_CREATE_PARTITION;
//
// WMI Methods
//
typedef struct _TAPE_WMI_OPERATIONS {
DWORD Method;
DWORD DataBufferSize;
PVOID DataBuffer;
} TAPE_WMI_OPERATIONS, *PTAPE_WMI_OPERATIONS;
//
// Type of drive errors
//
typedef enum _TAPE_DRIVE_PROBLEM_TYPE {
TapeDriveProblemNone, TapeDriveReadWriteWarning,
TapeDriveReadWriteError, TapeDriveReadWarning,
TapeDriveWriteWarning, TapeDriveReadError,
TapeDriveWriteError, TapeDriveHardwareError,
TapeDriveUnsupportedMedia, TapeDriveScsiConnectionError,
TapeDriveTimetoClean, TapeDriveCleanDriveNow,
TapeDriveMediaLifeExpired, TapeDriveSnappedTape
} TAPE_DRIVE_PROBLEM_TYPE;
extern "C" {
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\ktmtypes.h" 1 3
/*++
Copyright (c) 2000 Microsoft Corporation
Module Name:
ktmtypes.h
Abstract:
Common types for KTM exposed at both the Nt- and Win32-layer.
Revision History:
--*/
// begin_wdm begin_winnt
extern "C" {
#pragma warning(push)
#pragma warning(disable: 4820)
typedef GUID UOW, *PUOW;
typedef GUID CRM_PROTOCOL_ID, *PCRM_PROTOCOL_ID;
//
// Define the TransactionManager option values
//
# 48 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\ktmtypes.h" 3
//
// Define the Transaction option values
//
//
// Define the ResourceManager option values
//
//
// Define the RegisterProtocol option values
//
//
// Define the Enlistment option values
//
typedef ULONG NOTIFICATION_MASK;
# 109 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\ktmtypes.h" 3
//
// Note that this flag is not included in the TRANSACTION_NOTIFY_MASK.
// The reason being that KTM does not understand this flag yet. This
// flag is strictly for the use of filter manager. In fact we mask it
// out before enlisting in any transaction.
//
//
// Path to the transaction manager objects in the NT
// object namespace.
//
//
// The following three defines are here to ease the allocation
// of string buffers which are to contain a fully qualified
// transaction manager object name, e.g., \Transaction\{GUID}
//
// TODO: warning, duplicated def in tm.h.
typedef struct _TRANSACTION_NOTIFICATION {
PVOID TransactionKey;
ULONG TransactionNotification;
LARGE_INTEGER TmVirtualClock;
ULONG ArgumentLength;
} TRANSACTION_NOTIFICATION, *PTRANSACTION_NOTIFICATION;
typedef struct _TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT {
GUID EnlistmentId;
UOW UOW;
} TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT, *PTRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT;
typedef struct _TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT {
GUID TmIdentity;
ULONG Flags;
} TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT, *PTRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT;
typedef ULONG SAVEPOINT_ID, *PSAVEPOINT_ID;
typedef struct _TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT {
SAVEPOINT_ID SavepointId;
} TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT, *PTRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT;
typedef struct _TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT {
ULONG PropagationCookie;
GUID UOW;
GUID TmIdentity;
ULONG BufferLength;
// Bufferlength bytes of Buffer follow
} TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT, *PTRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT;
typedef struct _TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT {
ULONG MarshalCookie;
GUID UOW;
} TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT, *PTRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT;
typedef TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT TRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT, *PTRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT;
typedef struct _KCRM_MARSHAL_HEADER {
ULONG VersionMajor;
ULONG VersionMinor;
ULONG NumProtocols;
ULONG Unused; // for alignment purposes
} KCRM_MARSHAL_HEADER, *PKCRM_MARSHAL_HEADER, * PRKCRM_MARSHAL_HEADER;
typedef struct _KCRM_TRANSACTION_BLOB {
UOW UOW;
GUID TmIdentity;
ULONG IsolationLevel;
ULONG IsolationFlags;
ULONG Timeout;
WCHAR Description[64];
} KCRM_TRANSACTION_BLOB, *PKCRM_TRANSACTION_BLOB, * PRKCRM_TRANSACTION_BLOB;
typedef struct _KCRM_PROTOCOL_BLOB {
CRM_PROTOCOL_ID ProtocolId;
ULONG StaticInfoLength;
ULONG TransactionIdInfoLength; //??? ProtocolDynamicInfoLength;
ULONG Unused1; // for alignment purposes
ULONG Unused2; // for alignment purposes
} KCRM_PROTOCOL_BLOB, *PKCRM_PROTOCOL_BLOB, * PRKCRM_PROTOCOL_BLOB;
#pragma warning(pop)
}
# 20671 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 2 3
#pragma warning(push)
#pragma warning(disable: 4820)
//
// Types for Nt level TM calls
//
// begin_access
//
// KTM Tm object rights
//
// The following right is intended for DTC's use only; it will be
// deprecated, and no one else should take a dependency on it.
//
// Generic mappings for transaction manager rights.
//
# 20719 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// KTM transaction object rights.
//
# 20730 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Generic mappings for transaction rights.
// Resource managers, when enlisting, should generally use the macro
// TRANSACTION_RESOURCE_MANAGER_RIGHTS when opening a transaction.
// It's the same as generic read and write except that it does not allow
// a commit decision to be made.
//
# 20768 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// KTM resource manager object rights.
//
# 20779 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// Generic mappings for resource manager rights.
//
# 20808 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
//
// KTM enlistment object rights.
//
//
// Generic mappings for enlistment rights.
//
# 20839 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
// end_access
//
// Transaction outcomes.
//
// TODO: warning, must match values in KTRANSACTION_OUTCOME duplicated def
// in tm.h.
//
typedef enum _TRANSACTION_OUTCOME {
TransactionOutcomeUndetermined = 1,
TransactionOutcomeCommitted,
TransactionOutcomeAborted,
} TRANSACTION_OUTCOME;
typedef enum _TRANSACTION_STATE {
TransactionStateNormal = 1,
TransactionStateIndoubt,
TransactionStateCommittedNotify,
} TRANSACTION_STATE;
typedef struct _TRANSACTION_BASIC_INFORMATION {
GUID TransactionId;
DWORD State;
DWORD Outcome;
} TRANSACTION_BASIC_INFORMATION, *PTRANSACTION_BASIC_INFORMATION;
typedef struct _TRANSACTIONMANAGER_BASIC_INFORMATION {
GUID TmIdentity;
LARGE_INTEGER VirtualClock;
} TRANSACTIONMANAGER_BASIC_INFORMATION, *PTRANSACTIONMANAGER_BASIC_INFORMATION;
typedef struct _TRANSACTIONMANAGER_LOG_INFORMATION {
GUID LogIdentity;
} TRANSACTIONMANAGER_LOG_INFORMATION, *PTRANSACTIONMANAGER_LOG_INFORMATION;
typedef struct _TRANSACTIONMANAGER_LOGPATH_INFORMATION {
DWORD LogPathLength;
WCHAR LogPath[1]; // Variable size
// Data[1]; // Variable size data not declared
} TRANSACTIONMANAGER_LOGPATH_INFORMATION, *PTRANSACTIONMANAGER_LOGPATH_INFORMATION;
typedef struct _TRANSACTIONMANAGER_RECOVERY_INFORMATION {
ULONGLONG LastRecoveredLsn;
} TRANSACTIONMANAGER_RECOVERY_INFORMATION, *PTRANSACTIONMANAGER_RECOVERY_INFORMATION;
// end_wdm
typedef struct _TRANSACTIONMANAGER_OLDEST_INFORMATION {
GUID OldestTransactionGuid;
} TRANSACTIONMANAGER_OLDEST_INFORMATION, *PTRANSACTIONMANAGER_OLDEST_INFORMATION;
// begin_wdm
typedef struct _TRANSACTION_PROPERTIES_INFORMATION {
DWORD IsolationLevel;
DWORD IsolationFlags;
LARGE_INTEGER Timeout;
DWORD Outcome;
DWORD DescriptionLength;
WCHAR Description[1]; // Variable size
// Data[1]; // Variable size data not declared
} TRANSACTION_PROPERTIES_INFORMATION, *PTRANSACTION_PROPERTIES_INFORMATION;
// The following info-class is intended for DTC's use only; it will be
// deprecated, and no one else should take a dependency on it.
typedef struct _TRANSACTION_BIND_INFORMATION {
HANDLE TmHandle;
} TRANSACTION_BIND_INFORMATION, *PTRANSACTION_BIND_INFORMATION;
typedef struct _TRANSACTION_ENLISTMENT_PAIR {
GUID EnlistmentId;
GUID ResourceManagerId;
} TRANSACTION_ENLISTMENT_PAIR, *PTRANSACTION_ENLISTMENT_PAIR;
typedef struct _TRANSACTION_ENLISTMENTS_INFORMATION {
DWORD NumberOfEnlistments;
TRANSACTION_ENLISTMENT_PAIR EnlistmentPair[1]; // Variable size
} TRANSACTION_ENLISTMENTS_INFORMATION, *PTRANSACTION_ENLISTMENTS_INFORMATION;
typedef struct _TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION {
TRANSACTION_ENLISTMENT_PAIR SuperiorEnlistmentPair;
} TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION, *PTRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION;
typedef struct _RESOURCEMANAGER_BASIC_INFORMATION {
GUID ResourceManagerId;
DWORD DescriptionLength;
WCHAR Description[1]; // Variable size
} RESOURCEMANAGER_BASIC_INFORMATION, *PRESOURCEMANAGER_BASIC_INFORMATION;
typedef struct _RESOURCEMANAGER_COMPLETION_INFORMATION {
HANDLE IoCompletionPortHandle;
ULONG_PTR CompletionKey;
} RESOURCEMANAGER_COMPLETION_INFORMATION, *PRESOURCEMANAGER_COMPLETION_INFORMATION;
// end_wdm
// begin_wdm
typedef enum _TRANSACTION_INFORMATION_CLASS {
TransactionBasicInformation,
TransactionPropertiesInformation,
TransactionEnlistmentInformation,
TransactionSuperiorEnlistmentInformation
// end_wdm
,
// The following info-classes are intended for DTC's use only; it will be
// deprecated, and no one else should take a dependency on it.
TransactionBindInformation, // private and deprecated
TransactionDTCPrivateInformation // private and deprecated
,
// begin_wdm
} TRANSACTION_INFORMATION_CLASS;
// begin_wdm
typedef enum _TRANSACTIONMANAGER_INFORMATION_CLASS {
TransactionManagerBasicInformation,
TransactionManagerLogInformation,
TransactionManagerLogPathInformation,
TransactionManagerRecoveryInformation = 4
// end_wdm
,
// The following info-classes are intended for internal use only; they
// are considered deprecated, and no one else should take a dependency
// on them.
TransactionManagerOnlineProbeInformation = 3,
TransactionManagerOldestTransactionInformation = 5
// end_wdm
// begin_wdm
} TRANSACTIONMANAGER_INFORMATION_CLASS;
// begin_wdm
typedef enum _RESOURCEMANAGER_INFORMATION_CLASS {
ResourceManagerBasicInformation,
ResourceManagerCompletionInformation,
} RESOURCEMANAGER_INFORMATION_CLASS;
typedef struct _ENLISTMENT_BASIC_INFORMATION {
GUID EnlistmentId;
GUID TransactionId;
GUID ResourceManagerId;
} ENLISTMENT_BASIC_INFORMATION, *PENLISTMENT_BASIC_INFORMATION;
typedef struct _ENLISTMENT_CRM_INFORMATION {
GUID CrmTransactionManagerId;
GUID CrmResourceManagerId;
GUID CrmEnlistmentId;
} ENLISTMENT_CRM_INFORMATION, *PENLISTMENT_CRM_INFORMATION;
// begin_wdm
typedef enum _ENLISTMENT_INFORMATION_CLASS {
EnlistmentBasicInformation,
EnlistmentRecoveryInformation,
EnlistmentCrmInformation
} ENLISTMENT_INFORMATION_CLASS;
typedef struct _TRANSACTION_LIST_ENTRY {
UOW UOW;
} TRANSACTION_LIST_ENTRY, *PTRANSACTION_LIST_ENTRY;
typedef struct _TRANSACTION_LIST_INFORMATION {
DWORD NumberOfTransactions;
TRANSACTION_LIST_ENTRY TransactionInformation[1]; // Var size
} TRANSACTION_LIST_INFORMATION, *PTRANSACTION_LIST_INFORMATION;
//
// Types of objects known to the kernel transaction manager.
//
typedef enum _KTMOBJECT_TYPE {
KTMOBJECT_TRANSACTION,
KTMOBJECT_TRANSACTION_MANAGER,
KTMOBJECT_RESOURCE_MANAGER,
KTMOBJECT_ENLISTMENT,
KTMOBJECT_INVALID
} KTMOBJECT_TYPE, *PKTMOBJECT_TYPE;
//
// KTMOBJECT_CURSOR
//
// Used by NtEnumerateTransactionObject to enumerate a transaction
// object namespace (e.g. enlistments in a resource manager).
//
typedef struct _KTMOBJECT_CURSOR {
//
// The last GUID enumerated; zero if beginning enumeration.
//
GUID LastQuery;
//
// A count of GUIDs filled in by this last enumeration.
//
DWORD ObjectIdCount;
//
// ObjectIdCount GUIDs from the namespace specified.
//
GUID ObjectIds[1];
} KTMOBJECT_CURSOR, *PKTMOBJECT_CURSOR;
// begin_wdm
#pragma warning(pop)
}
typedef DWORD TP_VERSION, *PTP_VERSION;
typedef struct _TP_CALLBACK_INSTANCE TP_CALLBACK_INSTANCE, *PTP_CALLBACK_INSTANCE;
typedef void (__stdcall *PTP_SIMPLE_CALLBACK)(
PTP_CALLBACK_INSTANCE Instance,
PVOID Context
);
typedef struct _TP_POOL TP_POOL, *PTP_POOL;
typedef enum _TP_CALLBACK_PRIORITY {
TP_CALLBACK_PRIORITY_HIGH,
TP_CALLBACK_PRIORITY_NORMAL,
TP_CALLBACK_PRIORITY_LOW,
TP_CALLBACK_PRIORITY_INVALID,
TP_CALLBACK_PRIORITY_COUNT = TP_CALLBACK_PRIORITY_INVALID
} TP_CALLBACK_PRIORITY;
typedef struct _TP_POOL_STACK_INFORMATION {
SIZE_T StackReserve;
SIZE_T StackCommit;
}TP_POOL_STACK_INFORMATION, *PTP_POOL_STACK_INFORMATION;
typedef struct _TP_CLEANUP_GROUP TP_CLEANUP_GROUP, *PTP_CLEANUP_GROUP;
typedef void (__stdcall *PTP_CLEANUP_GROUP_CANCEL_CALLBACK)(
PVOID ObjectContext,
PVOID CleanupContext
);
//
// Do not manipulate this structure directly! Allocate space for it
// and use the inline interfaces below.
//
typedef struct _TP_CALLBACK_ENVIRON_V3 {
TP_VERSION Version;
PTP_POOL Pool;
PTP_CLEANUP_GROUP CleanupGroup;
PTP_CLEANUP_GROUP_CANCEL_CALLBACK CleanupGroupCancelCallback;
PVOID RaceDll;
struct _ACTIVATION_CONTEXT *ActivationContext;
PTP_SIMPLE_CALLBACK FinalizationCallback;
union {
DWORD Flags;
struct {
DWORD LongFunction : 1;
DWORD Persistent : 1;
DWORD Private : 30;
} s;
} u;
TP_CALLBACK_PRIORITY CallbackPriority;
DWORD Size;
} TP_CALLBACK_ENVIRON_V3;
typedef TP_CALLBACK_ENVIRON_V3 TP_CALLBACK_ENVIRON, *PTP_CALLBACK_ENVIRON;
# 21152 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
__forceinline
void
TpInitializeCallbackEnviron(
PTP_CALLBACK_ENVIRON CallbackEnviron
)
{
CallbackEnviron->Version = 3;
CallbackEnviron->Pool = 0;
CallbackEnviron->CleanupGroup = 0;
CallbackEnviron->CleanupGroupCancelCallback = 0;
CallbackEnviron->RaceDll = 0;
CallbackEnviron->ActivationContext = 0;
CallbackEnviron->FinalizationCallback = 0;
CallbackEnviron->u.Flags = 0;
CallbackEnviron->CallbackPriority = TP_CALLBACK_PRIORITY_NORMAL;
CallbackEnviron->Size = sizeof(TP_CALLBACK_ENVIRON);
}
__forceinline
void
TpSetCallbackThreadpool(
PTP_CALLBACK_ENVIRON CallbackEnviron,
PTP_POOL Pool
)
{
CallbackEnviron->Pool = Pool;
}
__forceinline
void
TpSetCallbackCleanupGroup(
PTP_CALLBACK_ENVIRON CallbackEnviron,
PTP_CLEANUP_GROUP CleanupGroup,
PTP_CLEANUP_GROUP_CANCEL_CALLBACK CleanupGroupCancelCallback
)
{
CallbackEnviron->CleanupGroup = CleanupGroup;
CallbackEnviron->CleanupGroupCancelCallback = CleanupGroupCancelCallback;
}
__forceinline
void
TpSetCallbackActivationContext(
PTP_CALLBACK_ENVIRON CallbackEnviron,
struct _ACTIVATION_CONTEXT *ActivationContext
)
{
CallbackEnviron->ActivationContext = ActivationContext;
}
__forceinline
void
TpSetCallbackNoActivationContext(
PTP_CALLBACK_ENVIRON CallbackEnviron
)
{
CallbackEnviron->ActivationContext = (struct _ACTIVATION_CONTEXT *)(LONG_PTR) -1; // INVALID_ACTIVATION_CONTEXT
}
__forceinline
void
TpSetCallbackLongFunction(
PTP_CALLBACK_ENVIRON CallbackEnviron
)
{
CallbackEnviron->u.s.LongFunction = 1;
}
__forceinline
void
TpSetCallbackRaceWithDll(
PTP_CALLBACK_ENVIRON CallbackEnviron,
PVOID DllHandle
)
{
CallbackEnviron->RaceDll = DllHandle;
}
__forceinline
void
TpSetCallbackFinalizationCallback(
PTP_CALLBACK_ENVIRON CallbackEnviron,
PTP_SIMPLE_CALLBACK FinalizationCallback
)
{
CallbackEnviron->FinalizationCallback = FinalizationCallback;
}
__forceinline
void
TpSetCallbackPriority(
PTP_CALLBACK_ENVIRON CallbackEnviron,
TP_CALLBACK_PRIORITY Priority
)
{
CallbackEnviron->CallbackPriority = Priority;
}
__forceinline
void
TpSetCallbackPersistent(
PTP_CALLBACK_ENVIRON CallbackEnviron
)
{
CallbackEnviron->u.s.Persistent = 1;
}
__forceinline
void
TpDestroyCallbackEnviron(
PTP_CALLBACK_ENVIRON CallbackEnviron
)
{
//
// For the current version of the callback environment, no actions
// need to be taken to tear down an initialized structure. This
// may change in a future release.
//
(CallbackEnviron);
}
typedef struct _TP_WORK TP_WORK, *PTP_WORK;
typedef void (__stdcall *PTP_WORK_CALLBACK)(
PTP_CALLBACK_INSTANCE Instance,
PVOID Context,
PTP_WORK Work
);
typedef struct _TP_TIMER TP_TIMER, *PTP_TIMER;
typedef void (__stdcall *PTP_TIMER_CALLBACK)(
PTP_CALLBACK_INSTANCE Instance,
PVOID Context,
PTP_TIMER Timer
);
typedef DWORD TP_WAIT_RESULT;
typedef struct _TP_WAIT TP_WAIT, *PTP_WAIT;
typedef void (__stdcall *PTP_WAIT_CALLBACK)(
PTP_CALLBACK_INSTANCE Instance,
PVOID Context,
PTP_WAIT Wait,
TP_WAIT_RESULT WaitResult
);
typedef struct _TP_IO TP_IO, *PTP_IO;
__forceinline
struct _TEB *
NtCurrentTeb (
void
)
{
return (struct _TEB *)__readgsqword(((LONG)(LONG_PTR)&(((NT_TIB *)0)->Self)));
}
__forceinline
PVOID
GetCurrentFiber (
void
)
{
return (PVOID)__readgsqword(((LONG)(LONG_PTR)&(((NT_TIB *)0)->FiberData)));
}
__forceinline
PVOID
GetFiberData (
void
)
{
return *(PVOID *)GetCurrentFiber();
}
# 21457 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winnt.h" 3
}
#pragma warning(pop)
# 182 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\minwindef.h" 2 3
/* Types use for passing & returning polymorphic values */
typedef UINT_PTR WPARAM;
typedef LONG_PTR LPARAM;
typedef LONG_PTR LRESULT;
# 209 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\minwindef.h" 3
typedef HANDLE *SPHANDLE;
typedef HANDLE *LPHANDLE;
typedef HANDLE HGLOBAL;
typedef HANDLE HLOCAL;
typedef HANDLE GLOBALHANDLE;
typedef HANDLE LOCALHANDLE;
#pragma warning(push)
#pragma warning(disable: 4255)
typedef INT_PTR ( __stdcall *FARPROC)();
typedef INT_PTR ( __stdcall *NEARPROC)();
typedef INT_PTR (__stdcall *PROC)();
# 237 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\minwindef.h" 3
#pragma warning(pop)
typedef WORD ATOM; //BUGBUG - might want to remove this from minwin
struct HKEY__{int unused;}; typedef struct HKEY__ *HKEY;
typedef HKEY *PHKEY;
struct HMETAFILE__{int unused;}; typedef struct HMETAFILE__ *HMETAFILE;
struct HINSTANCE__{int unused;}; typedef struct HINSTANCE__ *HINSTANCE;
typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of HINSTANCEs */
struct HRGN__{int unused;}; typedef struct HRGN__ *HRGN;
struct HRSRC__{int unused;}; typedef struct HRSRC__ *HRSRC;
struct HSPRITE__{int unused;}; typedef struct HSPRITE__ *HSPRITE;
struct HLSURF__{int unused;}; typedef struct HLSURF__ *HLSURF;
struct HSTR__{int unused;}; typedef struct HSTR__ *HSTR;
struct HTASK__{int unused;}; typedef struct HTASK__ *HTASK;
struct HWINSTA__{int unused;}; typedef struct HWINSTA__ *HWINSTA;
struct HKL__{int unused;}; typedef struct HKL__ *HKL;
typedef int HFILE;
//
// File System time stamps are represented with the following structure:
//
typedef struct _FILETIME {
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME, *PFILETIME, *LPFILETIME;
}
# 24 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\windef.h" 2 3
# 39 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\windef.h" 3
struct HWND__{int unused;}; typedef struct HWND__ *HWND;
struct HHOOK__{int unused;}; typedef struct HHOOK__ *HHOOK;
# 63 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\windef.h" 3
typedef void * HGDIOBJ;
struct HACCEL__{int unused;}; typedef struct HACCEL__ *HACCEL;
struct HBITMAP__{int unused;}; typedef struct HBITMAP__ *HBITMAP;
struct HBRUSH__{int unused;}; typedef struct HBRUSH__ *HBRUSH;
struct HCOLORSPACE__{int unused;}; typedef struct HCOLORSPACE__ *HCOLORSPACE;
struct HDC__{int unused;}; typedef struct HDC__ *HDC;
struct HGLRC__{int unused;}; typedef struct HGLRC__ *HGLRC; // OpenGL
struct HDESK__{int unused;}; typedef struct HDESK__ *HDESK;
struct HENHMETAFILE__{int unused;}; typedef struct HENHMETAFILE__ *HENHMETAFILE;
struct HFONT__{int unused;}; typedef struct HFONT__ *HFONT;
struct HICON__{int unused;}; typedef struct HICON__ *HICON;
struct HMENU__{int unused;}; typedef struct HMENU__ *HMENU;
struct HPALETTE__{int unused;}; typedef struct HPALETTE__ *HPALETTE;
struct HPEN__{int unused;}; typedef struct HPEN__ *HPEN;
struct HWINEVENTHOOK__{int unused;}; typedef struct HWINEVENTHOOK__ *HWINEVENTHOOK;
# 110 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\windef.h" 3
struct HMONITOR__{int unused;}; typedef struct HMONITOR__ *HMONITOR;
# 120 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\windef.h" 3
struct HUMPD__{int unused;}; typedef struct HUMPD__ *HUMPD;
# 131 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\windef.h" 3
typedef HICON HCURSOR; /* HICONs & HCURSORs are polymorphic */
typedef DWORD COLORREF;
typedef DWORD *LPCOLORREF;
# 154 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\windef.h" 3
typedef struct tagRECT
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT, *PRECT, *NPRECT, *LPRECT;
typedef const RECT * LPCRECT;
typedef struct _RECTL /* rcl */
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECTL, *PRECTL, *LPRECTL;
typedef const RECTL * LPCRECTL;
typedef struct tagPOINT
{
LONG x;
LONG y;
} POINT, *PPOINT, *NPPOINT, *LPPOINT;
typedef struct _POINTL /* ptl */
{
LONG x;
LONG y;
} POINTL, *PPOINTL;
typedef struct tagSIZE
{
LONG cx;
LONG cy;
} SIZE, *PSIZE, *LPSIZE;
typedef SIZE SIZEL;
typedef SIZE *PSIZEL, *LPSIZEL;
typedef struct tagPOINTS
{
SHORT x;
SHORT y;
} POINTS, *PPOINTS, *LPPOINTS;
/* mode selections for the device mode function */
# 220 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\windef.h" 3
/* device capabilities indices */
# 241 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\windef.h" 3
}
# 250 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\windef.h" 3
struct DPI_AWARENESS_CONTEXT__{int unused;}; typedef struct DPI_AWARENESS_CONTEXT__ *DPI_AWARENESS_CONTEXT;
typedef enum DPI_AWARENESS {
DPI_AWARENESS_INVALID = -1,
DPI_AWARENESS_UNAWARE = 0,
DPI_AWARENESS_SYSTEM_AWARE = 1,
DPI_AWARENESS_PER_MONITOR_AWARE = 2
} DPI_AWARENESS;
# 168 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\windows.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 1 3
/************************************************************************
* *
* winbase.h -- This module defines the 32-Bit Windows Base APIs *
* *
* Copyright (c) Microsoft Corp. All rights reserved. *
* *
************************************************************************/
# 19 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
#pragma warning(push)
#pragma warning(disable: 4820)
#pragma warning(disable: 4668)
#pragma warning(disable: 4001)
#pragma warning(disable: 4201)
#pragma warning(disable: 4214)
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\apisetcconv.h" 1 3
/************************************************************************
* *
* apisetcconv.h -- Contains Win32 Calling Conventions for APISETs *
* that were a part of the old legacy APIs *
* Copyright (c) Microsoft Corp. All rights reserved. *
* *
************************************************************************/
# 32 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\minwinbase.h" 1 3
/************************************************************************
* *
* minwinbase.h -- This module defines the 32-Bit Windows Base APIs *
* *
* Copyright (c) Microsoft Corp. All rights reserved. *
* *
************************************************************************/
#pragma warning(disable: 4514)
#pragma warning(disable: 4103)
#pragma warning(push)
#pragma warning(disable: 4820)
#pragma warning(disable: 4001)
#pragma warning(disable: 4201)
#pragma warning(disable: 4214)
extern "C" {
//
// Constants
//
//
// Typedefs
//
typedef struct _SECURITY_ATTRIBUTES {
DWORD nLength;
LPVOID lpSecurityDescriptor;
BOOL bInheritHandle;
} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
typedef struct _OVERLAPPED {
ULONG_PTR Internal;
ULONG_PTR InternalHigh;
union {
struct {
DWORD Offset;
DWORD OffsetHigh;
} ;
PVOID Pointer;
} ;
HANDLE hEvent;
} OVERLAPPED, *LPOVERLAPPED;
typedef struct _OVERLAPPED_ENTRY {
ULONG_PTR lpCompletionKey;
LPOVERLAPPED lpOverlapped;
ULONG_PTR Internal;
DWORD dwNumberOfBytesTransferred;
} OVERLAPPED_ENTRY, *LPOVERLAPPED_ENTRY;
//
// File System time stamps are represented with the following structure:
//
# 86 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\minwinbase.h" 3
//
// System time is represented with the following structure:
//
typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
typedef struct _WIN32_FIND_DATAA {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
CHAR cFileName[ 260 ];
CHAR cAlternateFileName[ 14 ];
} WIN32_FIND_DATAA, *PWIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
typedef struct _WIN32_FIND_DATAW {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
WCHAR cFileName[ 260 ];
WCHAR cAlternateFileName[ 14 ];
} WIN32_FIND_DATAW, *PWIN32_FIND_DATAW, *LPWIN32_FIND_DATAW;
typedef WIN32_FIND_DATAA WIN32_FIND_DATA;
typedef PWIN32_FIND_DATAA PWIN32_FIND_DATA;
typedef LPWIN32_FIND_DATAA LPWIN32_FIND_DATA;
typedef enum _FINDEX_INFO_LEVELS {
FindExInfoStandard,
FindExInfoBasic,
FindExInfoMaxInfoLevel
} FINDEX_INFO_LEVELS;
typedef enum _FINDEX_SEARCH_OPS {
FindExSearchNameMatch,
FindExSearchLimitToDirectories,
FindExSearchLimitToDevices,
FindExSearchMaxSearchOp
} FINDEX_SEARCH_OPS;
typedef enum _GET_FILEEX_INFO_LEVELS {
GetFileExInfoStandard,
GetFileExMaxInfoLevel
} GET_FILEEX_INFO_LEVELS;
typedef enum _FILE_INFO_BY_HANDLE_CLASS {
FileBasicInfo,
FileStandardInfo,
FileNameInfo,
FileRenameInfo,
FileDispositionInfo,
FileAllocationInfo,
FileEndOfFileInfo,
FileStreamInfo,
FileCompressionInfo,
FileAttributeTagInfo,
FileIdBothDirectoryInfo,
FileIdBothDirectoryRestartInfo,
FileIoPriorityHintInfo,
FileRemoteProtocolInfo,
FileFullDirectoryInfo,
FileFullDirectoryRestartInfo,
FileStorageInfo,
FileAlignmentInfo,
FileIdInfo,
FileIdExtdDirectoryInfo,
FileIdExtdDirectoryRestartInfo,
FileDispositionInfoEx,
FileRenameInfoEx,
MaximumFileInfoByHandleClass
} FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;
typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;
typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;
typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG;
typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG;
typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG;
typedef
void
(__stdcall *LPOVERLAPPED_COMPLETION_ROUTINE)(
DWORD dwErrorCode,
DWORD dwNumberOfBytesTransfered,
LPOVERLAPPED lpOverlapped
);
typedef struct _PROCESS_HEAP_ENTRY {
PVOID lpData;
DWORD cbData;
BYTE cbOverhead;
BYTE iRegionIndex;
WORD wFlags;
union {
struct {
HANDLE hMem;
DWORD dwReserved[ 3 ];
} Block;
struct {
DWORD dwCommittedSize;
DWORD dwUnCommittedSize;
LPVOID lpFirstBlock;
LPVOID lpLastBlock;
} Region;
} ;
} PROCESS_HEAP_ENTRY, *LPPROCESS_HEAP_ENTRY, *PPROCESS_HEAP_ENTRY;
# 249 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\minwinbase.h" 3
typedef struct _REASON_CONTEXT {
ULONG Version;
DWORD Flags;
union {
struct {
HMODULE LocalizedReasonModule;
ULONG LocalizedReasonId;
ULONG ReasonStringCount;
LPWSTR *ReasonStrings;
} Detailed;
LPWSTR SimpleReasonString;
} Reason;
} REASON_CONTEXT, *PREASON_CONTEXT;
//
// Debug APIs
//
# 278 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\minwinbase.h" 3
typedef DWORD (__stdcall *PTHREAD_START_ROUTINE)(
LPVOID lpThreadParameter
);
typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
typedef struct _EXCEPTION_DEBUG_INFO {
EXCEPTION_RECORD ExceptionRecord;
DWORD dwFirstChance;
} EXCEPTION_DEBUG_INFO, *LPEXCEPTION_DEBUG_INFO;
typedef struct _CREATE_THREAD_DEBUG_INFO {
HANDLE hThread;
LPVOID lpThreadLocalBase;
LPTHREAD_START_ROUTINE lpStartAddress;
} CREATE_THREAD_DEBUG_INFO, *LPCREATE_THREAD_DEBUG_INFO;
typedef struct _CREATE_PROCESS_DEBUG_INFO {
HANDLE hFile;
HANDLE hProcess;
HANDLE hThread;
LPVOID lpBaseOfImage;
DWORD dwDebugInfoFileOffset;
DWORD nDebugInfoSize;
LPVOID lpThreadLocalBase;
LPTHREAD_START_ROUTINE lpStartAddress;
LPVOID lpImageName;
WORD fUnicode;
} CREATE_PROCESS_DEBUG_INFO, *LPCREATE_PROCESS_DEBUG_INFO;
typedef struct _EXIT_THREAD_DEBUG_INFO {
DWORD dwExitCode;
} EXIT_THREAD_DEBUG_INFO, *LPEXIT_THREAD_DEBUG_INFO;
typedef struct _EXIT_PROCESS_DEBUG_INFO {
DWORD dwExitCode;
} EXIT_PROCESS_DEBUG_INFO, *LPEXIT_PROCESS_DEBUG_INFO;
typedef struct _LOAD_DLL_DEBUG_INFO {
HANDLE hFile;
LPVOID lpBaseOfDll;
DWORD dwDebugInfoFileOffset;
DWORD nDebugInfoSize;
LPVOID lpImageName;
WORD fUnicode;
} LOAD_DLL_DEBUG_INFO, *LPLOAD_DLL_DEBUG_INFO;
typedef struct _UNLOAD_DLL_DEBUG_INFO {
LPVOID lpBaseOfDll;
} UNLOAD_DLL_DEBUG_INFO, *LPUNLOAD_DLL_DEBUG_INFO;
typedef struct _OUTPUT_DEBUG_STRING_INFO {
LPSTR lpDebugStringData;
WORD fUnicode;
WORD nDebugStringLength;
} OUTPUT_DEBUG_STRING_INFO, *LPOUTPUT_DEBUG_STRING_INFO;
typedef struct _RIP_INFO {
DWORD dwError;
DWORD dwType;
} RIP_INFO, *LPRIP_INFO;
typedef struct _DEBUG_EVENT {
DWORD dwDebugEventCode;
DWORD dwProcessId;
DWORD dwThreadId;
union {
EXCEPTION_DEBUG_INFO Exception;
CREATE_THREAD_DEBUG_INFO CreateThread;
CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
EXIT_THREAD_DEBUG_INFO ExitThread;
EXIT_PROCESS_DEBUG_INFO ExitProcess;
LOAD_DLL_DEBUG_INFO LoadDll;
UNLOAD_DLL_DEBUG_INFO UnloadDll;
OUTPUT_DEBUG_STRING_INFO DebugString;
RIP_INFO RipInfo;
} u;
} DEBUG_EVENT, *LPDEBUG_EVENT;
//
// Context definitions
//
typedef PCONTEXT LPCONTEXT;
//
// macros
//
/* compatibility macros */
# 397 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\minwinbase.h" 3
/* Local Memory Flags */
# 416 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\minwinbase.h" 3
/* Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) */
//
// NUMA values
//
}
#pragma warning(pop)
# 33 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
//
// APISET contracts
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processenv.h" 1 3
// begin_1_0
// begin2_0
/********************************************************************************
* *
* ProcessEnv.h -- ApiSet Contract for api-ms-win-core-processenvironment-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 25 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processenv.h" 3
/* APISET_NAME: api-ms-win-core-processenvironment-l1 */
/* APISET_TAG: public */
# 44 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processenv.h" 3
extern "C" {
// end_1_0
// end2_0
// begin_1_0
__declspec(dllimport)
LPCH
__stdcall
GetEnvironmentStrings(
void
);
__declspec(dllimport)
LPWCH
__stdcall
GetEnvironmentStringsW(
void
);
# 80 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processenv.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetEnvironmentStringsW(
LPWCH NewEnvironment
);
__declspec(dllimport)
BOOL
__stdcall
FreeEnvironmentStringsA(
LPCH penv
);
__declspec(dllimport)
BOOL
__stdcall
FreeEnvironmentStringsW(
LPWCH penv
);
__declspec(dllimport)
HANDLE
__stdcall
GetStdHandle(
DWORD nStdHandle
);
__declspec(dllimport)
BOOL
__stdcall
SetStdHandle(
DWORD nStdHandle,
HANDLE hHandle
);
__declspec(dllimport)
BOOL
__stdcall
SetStdHandleEx(
DWORD nStdHandle,
HANDLE hHandle,
PHANDLE phPrevValue
);
// end_1_0
# 152 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processenv.h" 3
// begin_1_0
__declspec(dllimport)
LPSTR
__stdcall
GetCommandLineA(
void
);
__declspec(dllimport)
LPWSTR
__stdcall
GetCommandLineW(
void
);
// end_1_0
# 183 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processenv.h" 3
// begin_1_0
__declspec(dllimport)
DWORD
__stdcall
GetEnvironmentVariableA(
LPCSTR lpName,
LPSTR lpBuffer,
DWORD nSize
);
__declspec(dllimport)
DWORD
__stdcall
GetEnvironmentVariableW(
LPCWSTR lpName,
LPWSTR lpBuffer,
DWORD nSize
);
__declspec(dllimport)
BOOL
__stdcall
SetEnvironmentVariableA(
LPCSTR lpName,
LPCSTR lpValue
);
__declspec(dllimport)
BOOL
__stdcall
SetEnvironmentVariableW(
LPCWSTR lpName,
LPCWSTR lpValue
);
__declspec(dllimport)
DWORD
__stdcall
ExpandEnvironmentStringsA(
LPCSTR lpSrc,
LPSTR lpDst,
DWORD nSize
);
__declspec(dllimport)
DWORD
__stdcall
ExpandEnvironmentStringsW(
LPCWSTR lpSrc,
LPWSTR lpDst,
DWORD nSize
);
// end_1_0
# 268 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processenv.h" 3
// begin_1_0
__declspec(dllimport)
BOOL
__stdcall
SetCurrentDirectoryA(
LPCSTR lpPathName
);
__declspec(dllimport)
BOOL
__stdcall
SetCurrentDirectoryW(
LPCWSTR lpPathName
);
# 291 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processenv.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetCurrentDirectoryA(
DWORD nBufferLength,
LPSTR lpBuffer
);
__declspec(dllimport)
DWORD
__stdcall
GetCurrentDirectoryW(
DWORD nBufferLength,
LPWSTR lpBuffer
);
// end_1_0
# 324 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processenv.h" 3
// begin_1_0
__declspec(dllimport)
DWORD
__stdcall
SearchPathW(
LPCWSTR lpPath,
LPCWSTR lpFileName,
LPCWSTR lpExtension,
DWORD nBufferLength,
LPWSTR lpBuffer,
LPWSTR * lpFilePart
);
# 345 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processenv.h" 3
// end_1_0
// begin2_0
__declspec(dllimport)
DWORD
__stdcall
SearchPathA(
LPCSTR lpPath,
LPCSTR lpFileName,
LPCSTR lpExtension,
DWORD nBufferLength,
LPSTR lpBuffer,
LPSTR * lpFilePart
);
__declspec(dllimport)
BOOL
__stdcall
NeedCurrentDirectoryForExePathA(
LPCSTR ExeName
);
__declspec(dllimport)
BOOL
__stdcall
NeedCurrentDirectoryForExePathW(
LPCWSTR ExeName
);
# 392 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processenv.h" 3
// end2_0
// begin_1_0
// begin2_0
}
// end_1_0
// end2_0
# 39 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 1 3
// begin_1_0
// begin_2_0
// begin_2_1
/********************************************************************************
* *
* FileApi.h -- ApiSet Contract for api-ms-win-core-file-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 26 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
/* APISET_NAME: api-ms-win-core-file-l1 */
/* APISET_TAG: public */
# 49 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
extern "C" {
//
// Constants
//
# 72 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
// end_1_0
// end_2_0
// end_2_1
// begin_1_0
__declspec(dllimport)
LONG
__stdcall
CompareFileTime(
const FILETIME * lpFileTime1,
const FILETIME * lpFileTime2
);
__declspec(dllimport)
BOOL
__stdcall
CreateDirectoryA(
LPCSTR lpPathName,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
__declspec(dllimport)
BOOL
__stdcall
CreateDirectoryW(
LPCWSTR lpPathName,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
# 120 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
HANDLE
__stdcall
CreateFileA(
LPCSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile
);
__declspec(dllimport)
HANDLE
__stdcall
CreateFileW(
LPCWSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile
);
__declspec(dllimport)
BOOL
__stdcall
DefineDosDeviceW(
DWORD dwFlags,
LPCWSTR lpDeviceName,
LPCWSTR lpTargetPath
);
# 173 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
DeleteFileA(
LPCSTR lpFileName
);
__declspec(dllimport)
BOOL
__stdcall
DeleteFileW(
LPCWSTR lpFileName
);
# 200 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
DeleteVolumeMountPointW(
LPCWSTR lpszVolumeMountPoint
);
# 219 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
FileTimeToLocalFileTime(
const FILETIME * lpFileTime,
LPFILETIME lpLocalFileTime
);
// end_1_0
// begin_1_0
__declspec(dllimport)
BOOL
__stdcall
FindClose(
HANDLE hFindFile
);
# 246 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
FindCloseChangeNotification(
HANDLE hChangeHandle
);
__declspec(dllimport)
HANDLE
__stdcall
FindFirstChangeNotificationA(
LPCSTR lpPathName,
BOOL bWatchSubtree,
DWORD dwNotifyFilter
);
__declspec(dllimport)
HANDLE
__stdcall
FindFirstChangeNotificationW(
LPCWSTR lpPathName,
BOOL bWatchSubtree,
DWORD dwNotifyFilter
);
# 285 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
HANDLE
__stdcall
FindFirstFileA(
LPCSTR lpFileName,
LPWIN32_FIND_DATAA lpFindFileData
);
__declspec(dllimport)
HANDLE
__stdcall
FindFirstFileW(
LPCWSTR lpFileName,
LPWIN32_FIND_DATAW lpFindFileData
);
# 310 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
HANDLE
__stdcall
FindFirstFileExA(
LPCSTR lpFileName,
FINDEX_INFO_LEVELS fInfoLevelId,
LPVOID lpFindFileData,
FINDEX_SEARCH_OPS fSearchOp,
LPVOID lpSearchFilter,
DWORD dwAdditionalFlags
);
__declspec(dllimport)
HANDLE
__stdcall
FindFirstFileExW(
LPCWSTR lpFileName,
FINDEX_INFO_LEVELS fInfoLevelId,
LPVOID lpFindFileData,
FINDEX_SEARCH_OPS fSearchOp,
LPVOID lpSearchFilter,
DWORD dwAdditionalFlags
);
# 349 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
HANDLE
__stdcall
FindFirstVolumeW(
LPWSTR lpszVolumeName,
DWORD cchBufferLength
);
__declspec(dllimport)
BOOL
__stdcall
FindNextChangeNotification(
HANDLE hChangeHandle
);
# 377 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
FindNextFileA(
HANDLE hFindFile,
LPWIN32_FIND_DATAA lpFindFileData
);
__declspec(dllimport)
BOOL
__stdcall
FindNextFileW(
HANDLE hFindFile,
LPWIN32_FIND_DATAW lpFindFileData
);
# 406 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
FindNextVolumeW(
HANDLE hFindVolume,
LPWSTR lpszVolumeName,
DWORD cchBufferLength
);
__declspec(dllimport)
BOOL
__stdcall
FindVolumeClose(
HANDLE hFindVolume
);
# 435 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
FlushFileBuffers(
HANDLE hFile
);
# 450 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetDiskFreeSpaceA(
LPCSTR lpRootPathName,
LPDWORD lpSectorsPerCluster,
LPDWORD lpBytesPerSector,
LPDWORD lpNumberOfFreeClusters,
LPDWORD lpTotalNumberOfClusters
);
__declspec(dllimport)
BOOL
__stdcall
GetDiskFreeSpaceW(
LPCWSTR lpRootPathName,
LPDWORD lpSectorsPerCluster,
LPDWORD lpBytesPerSector,
LPDWORD lpNumberOfFreeClusters,
LPDWORD lpTotalNumberOfClusters
);
__declspec(dllimport)
BOOL
__stdcall
GetDiskFreeSpaceExA(
LPCSTR lpDirectoryName,
PULARGE_INTEGER lpFreeBytesAvailableToCaller,
PULARGE_INTEGER lpTotalNumberOfBytes,
PULARGE_INTEGER lpTotalNumberOfFreeBytes
);
__declspec(dllimport)
BOOL
__stdcall
GetDiskFreeSpaceExW(
LPCWSTR lpDirectoryName,
PULARGE_INTEGER lpFreeBytesAvailableToCaller,
PULARGE_INTEGER lpTotalNumberOfBytes,
PULARGE_INTEGER lpTotalNumberOfFreeBytes
);
# 511 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
UINT
__stdcall
GetDriveTypeA(
LPCSTR lpRootPathName
);
__declspec(dllimport)
UINT
__stdcall
GetDriveTypeW(
LPCWSTR lpRootPathName
);
# 538 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
typedef struct _WIN32_FILE_ATTRIBUTE_DATA {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
} WIN32_FILE_ATTRIBUTE_DATA, *LPWIN32_FILE_ATTRIBUTE_DATA;
__declspec(dllimport)
DWORD
__stdcall
GetFileAttributesA(
LPCSTR lpFileName
);
__declspec(dllimport)
DWORD
__stdcall
GetFileAttributesW(
LPCWSTR lpFileName
);
__declspec(dllimport)
BOOL
__stdcall
GetFileAttributesExA(
LPCSTR lpFileName,
GET_FILEEX_INFO_LEVELS fInfoLevelId,
LPVOID lpFileInformation
);
__declspec(dllimport)
BOOL
__stdcall
GetFileAttributesExW(
LPCWSTR lpFileName,
GET_FILEEX_INFO_LEVELS fInfoLevelId,
LPVOID lpFileInformation
);
# 598 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
typedef struct _BY_HANDLE_FILE_INFORMATION {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD dwVolumeSerialNumber;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD nNumberOfLinks;
DWORD nFileIndexHigh;
DWORD nFileIndexLow;
} BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_INFORMATION;
__declspec(dllimport)
BOOL
__stdcall
GetFileInformationByHandle(
HANDLE hFile,
LPBY_HANDLE_FILE_INFORMATION lpFileInformation
);
__declspec(dllimport)
DWORD
__stdcall
GetFileSize(
HANDLE hFile,
LPDWORD lpFileSizeHigh
);
# 636 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetFileSizeEx(
HANDLE hFile,
PLARGE_INTEGER lpFileSize
);
__declspec(dllimport)
DWORD
__stdcall
GetFileType(
HANDLE hFile
);
__declspec(dllimport)
DWORD
__stdcall
GetFinalPathNameByHandleA(
HANDLE hFile,
LPSTR lpszFilePath,
DWORD cchFilePath,
DWORD dwFlags
);
__declspec(dllimport)
DWORD
__stdcall
GetFinalPathNameByHandleW(
HANDLE hFile,
LPWSTR lpszFilePath,
DWORD cchFilePath,
DWORD dwFlags
);
# 684 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetFileTime(
HANDLE hFile,
LPFILETIME lpCreationTime,
LPFILETIME lpLastAccessTime,
LPFILETIME lpLastWriteTime
);
__declspec(dllimport)
DWORD
__stdcall
GetFullPathNameW(
LPCWSTR lpFileName,
DWORD nBufferLength,
LPWSTR lpBuffer,
LPWSTR * lpFilePart
);
# 718 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetFullPathNameA(
LPCSTR lpFileName,
DWORD nBufferLength,
LPSTR lpBuffer,
LPSTR * lpFilePart
);
__declspec(dllimport)
DWORD
__stdcall
GetLogicalDrives(
void
);
__declspec(dllimport)
DWORD
__stdcall
GetLogicalDriveStringsW(
DWORD nBufferLength,
LPWSTR lpBuffer
);
__declspec(dllimport)
DWORD
__stdcall
GetLongPathNameA(
LPCSTR lpszShortPath,
LPSTR lpszLongPath,
DWORD cchBuffer
);
# 777 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetLongPathNameW(
LPCWSTR lpszShortPath,
LPWSTR lpszLongPath,
DWORD cchBuffer
);
# 799 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetShortPathNameW(
LPCWSTR lpszLongPath,
LPWSTR lpszShortPath,
DWORD cchBuffer
);
# 821 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
UINT
__stdcall
GetTempFileNameW(
LPCWSTR lpPathName,
LPCWSTR lpPrefixString,
UINT uUnique,
LPWSTR lpTempFileName
);
# 846 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetVolumeInformationByHandleW(
HANDLE hFile,
LPWSTR lpVolumeNameBuffer,
DWORD nVolumeNameSize,
LPDWORD lpVolumeSerialNumber,
LPDWORD lpMaximumComponentLength,
LPDWORD lpFileSystemFlags,
LPWSTR lpFileSystemNameBuffer,
DWORD nFileSystemNameSize
);
__declspec(dllimport)
BOOL
__stdcall
GetVolumeInformationW(
LPCWSTR lpRootPathName,
LPWSTR lpVolumeNameBuffer,
DWORD nVolumeNameSize,
LPDWORD lpVolumeSerialNumber,
LPDWORD lpMaximumComponentLength,
LPDWORD lpFileSystemFlags,
LPWSTR lpFileSystemNameBuffer,
DWORD nFileSystemNameSize
);
__declspec(dllimport)
BOOL
__stdcall
GetVolumePathNameW(
LPCWSTR lpszFileName,
LPWSTR lpszVolumePathName,
DWORD cchBufferLength
);
# 903 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
LocalFileTimeToFileTime(
const FILETIME * lpLocalFileTime,
LPFILETIME lpFileTime
);
# 919 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
LockFile(
HANDLE hFile,
DWORD dwFileOffsetLow,
DWORD dwFileOffsetHigh,
DWORD nNumberOfBytesToLockLow,
DWORD nNumberOfBytesToLockHigh
);
# 938 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
LockFileEx(
HANDLE hFile,
DWORD dwFlags,
DWORD dwReserved,
DWORD nNumberOfBytesToLockLow,
DWORD nNumberOfBytesToLockHigh,
LPOVERLAPPED lpOverlapped
);
# 958 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
QueryDosDeviceW(
LPCWSTR lpDeviceName,
LPWSTR lpTargetPath,
DWORD ucchMax
);
# 979 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
ReadFile(
HANDLE hFile,
LPVOID lpBuffer,
DWORD nNumberOfBytesToRead,
LPDWORD lpNumberOfBytesRead,
LPOVERLAPPED lpOverlapped
);
__declspec(dllimport)
BOOL
__stdcall
ReadFileEx(
HANDLE hFile,
LPVOID lpBuffer,
DWORD nNumberOfBytesToRead,
LPOVERLAPPED lpOverlapped,
LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
);
# 1012 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
ReadFileScatter(
HANDLE hFile,
FILE_SEGMENT_ELEMENT aSegmentArray[],
DWORD nNumberOfBytesToRead,
LPDWORD lpReserved,
LPOVERLAPPED lpOverlapped
);
# 1032 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
RemoveDirectoryA(
LPCSTR lpPathName
);
__declspec(dllimport)
BOOL
__stdcall
RemoveDirectoryW(
LPCWSTR lpPathName
);
__declspec(dllimport)
BOOL
__stdcall
SetEndOfFile(
HANDLE hFile
);
__declspec(dllimport)
BOOL
__stdcall
SetFileAttributesA(
LPCSTR lpFileName,
DWORD dwFileAttributes
);
__declspec(dllimport)
BOOL
__stdcall
SetFileAttributesW(
LPCWSTR lpFileName,
DWORD dwFileAttributes
);
# 1085 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetFileInformationByHandle(
HANDLE hFile,
FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
LPVOID lpFileInformation,
DWORD dwBufferSize
);
__declspec(dllimport)
DWORD
__stdcall
SetFilePointer(
HANDLE hFile,
LONG lDistanceToMove,
PLONG lpDistanceToMoveHigh,
DWORD dwMoveMethod
);
__declspec(dllimport)
BOOL
__stdcall
SetFilePointerEx(
HANDLE hFile,
LARGE_INTEGER liDistanceToMove,
PLARGE_INTEGER lpNewFilePointer,
DWORD dwMoveMethod
);
__declspec(dllimport)
BOOL
__stdcall
SetFileTime(
HANDLE hFile,
const FILETIME * lpCreationTime,
const FILETIME * lpLastAccessTime,
const FILETIME * lpLastWriteTime
);
# 1141 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetFileValidData(
HANDLE hFile,
LONGLONG ValidDataLength
);
__declspec(dllimport)
BOOL
__stdcall
UnlockFile(
HANDLE hFile,
DWORD dwFileOffsetLow,
DWORD dwFileOffsetHigh,
DWORD nNumberOfBytesToUnlockLow,
DWORD nNumberOfBytesToUnlockHigh
);
# 1171 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
UnlockFileEx(
HANDLE hFile,
DWORD dwReserved,
DWORD nNumberOfBytesToUnlockLow,
DWORD nNumberOfBytesToUnlockHigh,
LPOVERLAPPED lpOverlapped
);
__declspec(dllimport)
BOOL
__stdcall
WriteFile(
HANDLE hFile,
LPCVOID lpBuffer,
DWORD nNumberOfBytesToWrite,
LPDWORD lpNumberOfBytesWritten,
LPOVERLAPPED lpOverlapped
);
__declspec(dllimport)
BOOL
__stdcall
WriteFileEx(
HANDLE hFile,
LPCVOID lpBuffer,
DWORD nNumberOfBytesToWrite,
LPOVERLAPPED lpOverlapped,
LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
);
# 1214 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
WriteFileGather(
HANDLE hFile,
FILE_SEGMENT_ELEMENT aSegmentArray[],
DWORD nNumberOfBytesToWrite,
LPDWORD lpReserved,
LPOVERLAPPED lpOverlapped
);
// end_1_0
// begin_2_0
# 1240 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetTempPathW(
DWORD nBufferLength,
LPWSTR lpBuffer
);
# 1260 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetVolumeNameForVolumeMountPointW(
LPCWSTR lpszVolumeMountPoint,
LPWSTR lpszVolumeName,
DWORD cchBufferLength
);
# 1277 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetVolumePathNamesForVolumeNameW(
LPCWSTR lpszVolumeName,
LPWCH lpszVolumePathNames,
DWORD cchBufferLength,
PDWORD lpcchReturnLength
);
# 1304 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
typedef struct _CREATEFILE2_EXTENDED_PARAMETERS {
DWORD dwSize;
DWORD dwFileAttributes;
DWORD dwFileFlags;
DWORD dwSecurityQosFlags;
LPSECURITY_ATTRIBUTES lpSecurityAttributes;
HANDLE hTemplateFile;
} CREATEFILE2_EXTENDED_PARAMETERS, *PCREATEFILE2_EXTENDED_PARAMETERS, *LPCREATEFILE2_EXTENDED_PARAMETERS;
__declspec(dllimport)
HANDLE
__stdcall
CreateFile2(
LPCWSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
DWORD dwCreationDisposition,
LPCREATEFILE2_EXTENDED_PARAMETERS pCreateExParams
);
# 1332 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
// end_2_0
// begin_2_1
# 1345 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetFileIoOverlappedRange(
HANDLE FileHandle,
PUCHAR OverlappedRangeStart,
ULONG Length
);
# 1367 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetCompressedFileSizeA(
LPCSTR lpFileName,
LPDWORD lpFileSizeHigh
);
__declspec(dllimport)
DWORD
__stdcall
GetCompressedFileSizeW(
LPCWSTR lpFileName,
LPDWORD lpFileSizeHigh
);
# 1396 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
// end_2_1
# 1405 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
typedef enum _STREAM_INFO_LEVELS {
FindStreamInfoStandard,
FindStreamInfoMaxInfoLevel
} STREAM_INFO_LEVELS;
typedef struct _WIN32_FIND_STREAM_DATA {
LARGE_INTEGER StreamSize;
WCHAR cStreamName[ 260 + 36 ];
} WIN32_FIND_STREAM_DATA, *PWIN32_FIND_STREAM_DATA;
__declspec(dllimport)
HANDLE
__stdcall
FindFirstStreamW(
LPCWSTR lpFileName,
STREAM_INFO_LEVELS InfoLevel,
LPVOID lpFindStreamData,
DWORD dwFlags
);
__declspec(dllimport)
BOOL
__stdcall
FindNextStreamW(
HANDLE hFindStream,
LPVOID lpFindStreamData
);
# 1449 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
AreFileApisANSI(
void
);
__declspec(dllimport)
DWORD
__stdcall
GetTempPathA(
DWORD nBufferLength,
LPSTR lpBuffer
);
# 1473 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fileapi.h" 3
__declspec(dllimport)
HANDLE
__stdcall
FindFirstFileNameW(
LPCWSTR lpFileName,
DWORD dwFlags,
LPDWORD StringLength,
PWSTR LinkName
);
__declspec(dllimport)
BOOL
__stdcall
FindNextFileNameW(
HANDLE hFindStream,
LPDWORD StringLength,
PWSTR LinkName
);
__declspec(dllimport)
BOOL
__stdcall
GetVolumeInformationA(
LPCSTR lpRootPathName,
LPSTR lpVolumeNameBuffer,
DWORD nVolumeNameSize,
LPDWORD lpVolumeSerialNumber,
LPDWORD lpMaximumComponentLength,
LPDWORD lpFileSystemFlags,
LPSTR lpFileSystemNameBuffer,
DWORD nFileSystemNameSize
);
__declspec(dllimport)
UINT
__stdcall
GetTempFileNameA(
LPCSTR lpPathName,
LPCSTR lpPrefixString,
UINT uUnique,
LPSTR lpTempFileName
);
__declspec(dllimport)
void
__stdcall
SetFileApisToOEM(
void
);
__declspec(dllimport)
void
__stdcall
SetFileApisToANSI(
void
);
// begin_1_0
// begin_2_0
// begin_2_1
}
# 40 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\debugapi.h" 1 3
// begin_1_0
// begin_1_1
/********************************************************************************
* *
* DebugApi.h -- ApiSet Contract for api-ms-win-core-debug-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 24 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\debugapi.h" 3
/* APISET_NAME: api-ms-win-core-debug-l1 */
/* APISET_TAG: public */
# 45 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\debugapi.h" 3
extern "C" {
// end_1_0
// end_1_1
// begin_1_0
__declspec(dllimport)
BOOL
__stdcall
IsDebuggerPresent(
void
);
# 75 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\debugapi.h" 3
__declspec(dllimport)
void
__stdcall
DebugBreak(
void
);
# 90 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\debugapi.h" 3
__declspec(dllimport)
void
__stdcall
OutputDebugStringA(
LPCSTR lpOutputString
);
__declspec(dllimport)
void
__stdcall
OutputDebugStringW(
LPCWSTR lpOutputString
);
# 112 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\debugapi.h" 3
// end_1_0
// begin_1_1
__declspec(dllimport)
BOOL
__stdcall
ContinueDebugEvent(
DWORD dwProcessId,
DWORD dwThreadId,
DWORD dwContinueStatus
);
__declspec(dllimport)
BOOL
__stdcall
WaitForDebugEvent(
LPDEBUG_EVENT lpDebugEvent,
DWORD dwMilliseconds
);
__declspec(dllimport)
BOOL
__stdcall
DebugActiveProcess(
DWORD dwProcessId
);
__declspec(dllimport)
BOOL
__stdcall
DebugActiveProcessStop(
DWORD dwProcessId
);
__declspec(dllimport)
BOOL
__stdcall
CheckRemoteDebuggerPresent(
HANDLE hProcess,
PBOOL pbDebuggerPresent
);
# 175 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\debugapi.h" 3
// end_1_1
# 184 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\debugapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
WaitForDebugEventEx(
LPDEBUG_EVENT lpDebugEvent,
DWORD dwMilliseconds
);
// begin_1_0
// begin_1_1
}
// end_1_0
// end_1_1
# 41 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\utilapiset.h" 1 3
/********************************************************************************
* *
* UtilApiSet.h -- ApiSet Contract for api-ms-win-core-util-l1-1-0 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 21 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\utilapiset.h" 3
/* APISET_NAME: api-ms-win-core-util-l1 */
/* APISET_TAG: public */
# 40 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\utilapiset.h" 3
extern "C" {
__declspec(dllimport)
PVOID
__stdcall
EncodePointer(
PVOID Ptr
);
__declspec(dllimport)
PVOID
__stdcall
DecodePointer(
PVOID Ptr
);
# 72 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\utilapiset.h" 3
__declspec(dllimport)
PVOID
__stdcall
EncodeSystemPointer(
PVOID Ptr
);
__declspec(dllimport)
PVOID
__stdcall
DecodeSystemPointer(
PVOID Ptr
);
__declspec(dllimport)
HRESULT
__stdcall
EncodeRemotePointer(
HANDLE ProcessHandle,
PVOID Ptr,
PVOID * EncodedPtr
);
__declspec(dllimport)
HRESULT
__stdcall
DecodeRemotePointer(
HANDLE ProcessHandle,
PVOID Ptr,
PVOID * DecodedPtr
);
__declspec(dllimport)
BOOL
__stdcall
Beep(
DWORD dwFreq,
DWORD dwDuration
);
}
# 42 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\handleapi.h" 1 3
/********************************************************************************
* *
* handleapi.h -- ApiSet Contract for api-ms-win-core-handle-l1-1-0 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 21 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\handleapi.h" 3
/* APISET_NAME: api-ms-win-core-handle-l1 */
/* APISET_TAG: public */
# 38 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\handleapi.h" 3
extern "C" {
//
// Constants
//
//
// Prototypes
//
__declspec(dllimport)
BOOL
__stdcall
CloseHandle(
HANDLE hObject
);
__declspec(dllimport)
BOOL
__stdcall
DuplicateHandle(
HANDLE hSourceProcessHandle,
HANDLE hSourceHandle,
HANDLE hTargetProcessHandle,
LPHANDLE lpTargetHandle,
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwOptions
);
__declspec(dllimport)
BOOL
__stdcall
CompareObjectHandles(
HANDLE hFirstObjectHandle,
HANDLE hSecondObjectHandle
);
# 91 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\handleapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetHandleInformation(
HANDLE hObject,
LPDWORD lpdwFlags
);
__declspec(dllimport)
BOOL
__stdcall
SetHandleInformation(
HANDLE hObject,
DWORD dwMask,
DWORD dwFlags
);
}
# 43 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\errhandlingapi.h" 1 3
// begin_1_0
// begin_1_1
// begin_1_2
// begin_1_3
/********************************************************************************
* *
* errhandlingapi.h - ApiSet Contract for api-ms-win-core-errorhandling-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 25 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\errhandlingapi.h" 3
/* APISET_NAME: api-ms-win-core-errorhandling-l1 */
/* APISET_TAG: public */
# 48 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\errhandlingapi.h" 3
extern "C" {
// end_1_0
// end_1_1
// end_1_2
// end_1_3
// begin_1_0
//
// Typedefs
//
typedef LONG (__stdcall *PTOP_LEVEL_EXCEPTION_FILTER)(
struct _EXCEPTION_POINTERS *ExceptionInfo
);
typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
//
// Prototypes
//
__declspec(dllimport)
void
__stdcall
RaiseException(
DWORD dwExceptionCode,
DWORD dwExceptionFlags,
DWORD nNumberOfArguments,
const ULONG_PTR * lpArguments
);
# 96 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\errhandlingapi.h" 3
__declspec(dllimport)
LONG
__stdcall
UnhandledExceptionFilter(
struct _EXCEPTION_POINTERS * ExceptionInfo
);
# 111 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\errhandlingapi.h" 3
__declspec(dllimport)
LPTOP_LEVEL_EXCEPTION_FILTER
__stdcall
SetUnhandledExceptionFilter(
LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter
);
__declspec(dllimport)
DWORD
__stdcall
GetLastError(
void
);
__declspec(dllimport)
void
__stdcall
SetLastError(
DWORD dwErrCode
);
# 150 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\errhandlingapi.h" 3
__declspec(dllimport)
UINT
__stdcall
GetErrorMode(
void
);
__declspec(dllimport)
UINT
__stdcall
SetErrorMode(
UINT uMode
);
// end_1_0
// begin_1_1
# 182 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\errhandlingapi.h" 3
__declspec(dllimport)
PVOID
__stdcall
AddVectoredExceptionHandler(
ULONG First,
PVECTORED_EXCEPTION_HANDLER Handler
);
__declspec(dllimport)
ULONG
__stdcall
RemoveVectoredExceptionHandler(
PVOID Handle
);
__declspec(dllimport)
PVOID
__stdcall
AddVectoredContinueHandler(
ULONG First,
PVECTORED_EXCEPTION_HANDLER Handler
);
__declspec(dllimport)
ULONG
__stdcall
RemoveVectoredContinueHandler(
PVOID Handle
);
// RC warns because "WINBASE_DECLARE_RESTORE_LAST_ERROR" is a bit long.
//#if _WIN32_WINNT >= 0x0501 || defined(WINBASE_DECLARE_RESTORE_LAST_ERROR)
# 250 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\errhandlingapi.h" 3
// end_1_1
// begin_1_2
# 261 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\errhandlingapi.h" 3
__declspec(dllimport)
void
__stdcall
RaiseFailFastException(
PEXCEPTION_RECORD pExceptionRecord,
PCONTEXT pContextRecord,
DWORD dwFlags
);
// end_1_2
// begin_1_3
# 287 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\errhandlingapi.h" 3
__declspec(dllimport)
void
__stdcall
FatalAppExitA(
UINT uAction,
LPCSTR lpMessageText
);
__declspec(dllimport)
void
__stdcall
FatalAppExitW(
UINT uAction,
LPCWSTR lpMessageText
);
__declspec(dllimport)
DWORD
__stdcall
GetThreadErrorMode(
void
);
__declspec(dllimport)
BOOL
__stdcall
SetThreadErrorMode(
DWORD dwNewMode,
LPDWORD lpOldMode
);
__declspec(dllimport)
void
__stdcall
TerminateProcessOnMemoryExhaustion(
SIZE_T FailedAllocationSize
);
// end_1_3
// begin_1_0
// begin_1_1
// begin_1_2
// begin_1_3
}
// end_1_0
// end_1_1
// end_1_2
// end_1_3
# 44 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fibersapi.h" 1 3
// begin_1_0
// begin_1_1
/********************************************************************************
* *
* fibersapi.h - ApiSet Contract for api-ms-win-core-fibers-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 23 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fibersapi.h" 3
/* APISET_NAME: api-ms-win-core-fibers-l1 */
/* APISET_TAG: public */
# 42 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fibersapi.h" 3
extern "C" {
// end_1_0
// end_1_1
// begin_1_0
# 61 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fibersapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
FlsAlloc(
PFLS_CALLBACK_FUNCTION lpCallback
);
__declspec(dllimport)
PVOID
__stdcall
FlsGetValue(
DWORD dwFlsIndex
);
__declspec(dllimport)
BOOL
__stdcall
FlsSetValue(
DWORD dwFlsIndex,
PVOID lpFlsData
);
__declspec(dllimport)
BOOL
__stdcall
FlsFree(
DWORD dwFlsIndex
);
// end_1_0
// begin_1_1
# 110 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\fibersapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
IsThreadAFiber(
void
);
// end_1_1
// begin_1_0
// begin_1_1
}
// end_1_0
// end_1_1
# 45 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namedpipeapi.h" 1 3
// begin_1_0
// begin_2_1
// begin_2_2
/********************************************************************************
* *
* namedpipeapi.h - ApiSet Contract for api-ms-win-core-namedpipe-l1-1-0 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 26 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namedpipeapi.h" 3
/* APISET_NAME: api-ms-win-core-namedpipe-l1 */
/* APISET_TAG: public */
# 49 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namedpipeapi.h" 3
extern "C" {
// end_1_0
// end_2_1
// end_2_2
// begin_1_0
__declspec(dllimport)
BOOL
__stdcall
CreatePipe(
PHANDLE hReadPipe,
PHANDLE hWritePipe,
LPSECURITY_ATTRIBUTES lpPipeAttributes,
DWORD nSize
);
__declspec(dllimport)
BOOL
__stdcall
ConnectNamedPipe(
HANDLE hNamedPipe,
LPOVERLAPPED lpOverlapped
);
__declspec(dllimport)
BOOL
__stdcall
DisconnectNamedPipe(
HANDLE hNamedPipe
);
__declspec(dllimport)
BOOL
__stdcall
SetNamedPipeHandleState(
HANDLE hNamedPipe,
LPDWORD lpMode,
LPDWORD lpMaxCollectionCount,
LPDWORD lpCollectDataTimeout
);
__declspec(dllimport)
BOOL
__stdcall
PeekNamedPipe(
HANDLE hNamedPipe,
LPVOID lpBuffer,
DWORD nBufferSize,
LPDWORD lpBytesRead,
LPDWORD lpTotalBytesAvail,
LPDWORD lpBytesLeftThisMessage
);
__declspec(dllimport)
BOOL
__stdcall
TransactNamedPipe(
HANDLE hNamedPipe,
LPVOID lpInBuffer,
DWORD nInBufferSize,
LPVOID lpOutBuffer,
DWORD nOutBufferSize,
LPDWORD lpBytesRead,
LPOVERLAPPED lpOverlapped
);
__declspec(dllimport)
HANDLE
__stdcall
CreateNamedPipeW(
LPCWSTR lpName,
DWORD dwOpenMode,
DWORD dwPipeMode,
DWORD nMaxInstances,
DWORD nOutBufferSize,
DWORD nInBufferSize,
DWORD nDefaultTimeOut,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
__declspec(dllimport)
BOOL
__stdcall
WaitNamedPipeW(
LPCWSTR lpNamedPipeName,
DWORD nTimeOut
);
# 162 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namedpipeapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetNamedPipeClientComputerNameW(
HANDLE Pipe,
LPWSTR ClientComputerName,
ULONG ClientComputerNameLength
);
# 178 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namedpipeapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
ImpersonateNamedPipeClient(
HANDLE hNamedPipe
);
// end_1_0
// begin_2_1
# 200 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namedpipeapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetNamedPipeInfo(
HANDLE hNamedPipe,
LPDWORD lpFlags,
LPDWORD lpOutBufferSize,
LPDWORD lpInBufferSize,
LPDWORD lpMaxInstances
);
__declspec(dllimport)
BOOL
__stdcall
GetNamedPipeHandleStateW(
HANDLE hNamedPipe,
LPDWORD lpState,
LPDWORD lpCurInstances,
LPDWORD lpMaxCollectionCount,
LPDWORD lpCollectDataTimeout,
LPWSTR lpUserName,
DWORD nMaxUserNameSize
);
# 234 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namedpipeapi.h" 3
// end_2_1
// begin_2_2
# 245 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namedpipeapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
CallNamedPipeW(
LPCWSTR lpNamedPipeName,
LPVOID lpInBuffer,
DWORD nInBufferSize,
LPVOID lpOutBuffer,
DWORD nOutBufferSize,
LPDWORD lpBytesRead,
DWORD nTimeOut
);
# 268 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namedpipeapi.h" 3
// end_2_2
// begin_1_0
// begin_2_1
// begin_2_2
}
// end_1_0
// end_2_1
// end_2_2
# 46 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\profileapi.h" 1 3
/********************************************************************************
* *
* profileapi.h -- ApiSet Contract for api-ms-win-core-profile-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 21 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\profileapi.h" 3
/* APISET_NAME: api-ms-win-core-profile-l1 */
/* APISET_TAG: public */
# 38 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\profileapi.h" 3
extern "C" {
//
// Performance counter API's
//
__declspec(dllimport)
BOOL
__stdcall
QueryPerformanceCounter(
LARGE_INTEGER * lpPerformanceCount
);
__declspec(dllimport)
BOOL
__stdcall
QueryPerformanceFrequency(
LARGE_INTEGER * lpFrequency
);
}
# 47 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\heapapi.h" 1 3
/********************************************************************************
* *
* HeapApi.h -- ApiSet Contract for api-ms-win-core-heap-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 22 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\heapapi.h" 3
/* APISET_NAME: api-ms-win-core-heap-l1 */
/* APISET_TAG: public */
# 49 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\heapapi.h" 3
extern "C" {
#pragma warning(push)
#pragma warning(disable: 4820)
//
// typdefs
//
typedef struct _HEAP_SUMMARY {
DWORD cb;
SIZE_T cbAllocated;
SIZE_T cbCommitted;
SIZE_T cbReserved;
SIZE_T cbMaxReserve;
} HEAP_SUMMARY, *PHEAP_SUMMARY;
typedef PHEAP_SUMMARY LPHEAP_SUMMARY;
# 82 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\heapapi.h" 3
//
// Prototypes
//
__declspec(dllimport)
HANDLE
__stdcall
HeapCreate(
DWORD flOptions,
SIZE_T dwInitialSize,
SIZE_T dwMaximumSize
);
__declspec(dllimport)
BOOL
__stdcall
HeapDestroy(
HANDLE hHeap
);
__declspec(dllimport)
__declspec(allocator)
LPVOID
__stdcall
HeapAlloc(
HANDLE hHeap,
DWORD dwFlags,
SIZE_T dwBytes
);
__declspec(dllimport)
__declspec(allocator)
LPVOID
__stdcall
HeapReAlloc(
HANDLE hHeap,
DWORD dwFlags,
LPVOID lpMem,
SIZE_T dwBytes
);
__declspec(dllimport)
BOOL
__stdcall
HeapFree(
HANDLE hHeap,
DWORD dwFlags,
LPVOID lpMem
);
__declspec(dllimport)
SIZE_T
__stdcall
HeapSize(
HANDLE hHeap,
DWORD dwFlags,
LPCVOID lpMem
);
__declspec(dllimport)
HANDLE
__stdcall
GetProcessHeap(
void
);
__declspec(dllimport)
SIZE_T
__stdcall
HeapCompact(
HANDLE hHeap,
DWORD dwFlags
);
__declspec(dllimport)
BOOL
__stdcall
HeapSetInformation(
HANDLE HeapHandle,
HEAP_INFORMATION_CLASS HeapInformationClass,
PVOID HeapInformation,
SIZE_T HeapInformationLength
);
# 189 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\heapapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
HeapValidate(
HANDLE hHeap,
DWORD dwFlags,
LPCVOID lpMem
);
# 209 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\heapapi.h" 3
BOOL
__stdcall
HeapSummary(
HANDLE hHeap,
DWORD dwFlags,
LPHEAP_SUMMARY lpSummary
);
# 227 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\heapapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetProcessHeaps(
DWORD NumberOfHeaps,
PHANDLE ProcessHeaps
);
__declspec(dllimport)
BOOL
__stdcall
HeapLock(
HANDLE hHeap
);
__declspec(dllimport)
BOOL
__stdcall
HeapUnlock(
HANDLE hHeap
);
__declspec(dllimport)
BOOL
__stdcall
HeapWalk(
HANDLE hHeap,
LPPROCESS_HEAP_ENTRY lpEntry
);
__declspec(dllimport)
BOOL
__stdcall
HeapQueryInformation(
HANDLE HeapHandle,
HEAP_INFORMATION_CLASS HeapInformationClass,
PVOID HeapInformation,
SIZE_T HeapInformationLength,
PSIZE_T ReturnLength
);
//
// HeapSummary() is in minwinbase.w within ;beg_internal tags. Has to stay there for downlevel reasons.
//
#pragma warning(pop)
}
# 48 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\ioapiset.h" 1 3
// begin_1_0
// begin_1_1
/********************************************************************************
* *
* ioapiset.h -- ApiSet Contract for api-ms-win-core-io-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 24 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\ioapiset.h" 3
/* APISET_NAME: api-ms-win-core-io-l1 */
/* APISET_TAG: public */
# 43 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\ioapiset.h" 3
extern "C" {
// end_1_0
// end_1_1
// begin_1_0
__declspec(dllimport)
HANDLE
__stdcall
CreateIoCompletionPort(
HANDLE FileHandle,
HANDLE ExistingCompletionPort,
ULONG_PTR CompletionKey,
DWORD NumberOfConcurrentThreads
);
__declspec(dllimport)
BOOL
__stdcall
GetQueuedCompletionStatus(
HANDLE CompletionPort,
LPDWORD lpNumberOfBytesTransferred,
PULONG_PTR lpCompletionKey,
LPOVERLAPPED * lpOverlapped,
DWORD dwMilliseconds
);
__declspec(dllimport)
BOOL
__stdcall
GetQueuedCompletionStatusEx(
HANDLE CompletionPort,
LPOVERLAPPED_ENTRY lpCompletionPortEntries,
ULONG ulCount,
PULONG ulNumEntriesRemoved,
DWORD dwMilliseconds,
BOOL fAlertable
);
__declspec(dllimport)
BOOL
__stdcall
PostQueuedCompletionStatus(
HANDLE CompletionPort,
DWORD dwNumberOfBytesTransferred,
ULONG_PTR dwCompletionKey,
LPOVERLAPPED lpOverlapped
);
# 115 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\ioapiset.h" 3
__declspec(dllimport)
BOOL
__stdcall
DeviceIoControl(
HANDLE hDevice,
DWORD dwIoControlCode,
LPVOID lpInBuffer,
DWORD nInBufferSize,
LPVOID lpOutBuffer,
DWORD nOutBufferSize,
LPDWORD lpBytesReturned,
LPOVERLAPPED lpOverlapped
);
# 137 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\ioapiset.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetOverlappedResult(
HANDLE hFile,
LPOVERLAPPED lpOverlapped,
LPDWORD lpNumberOfBytesTransferred,
BOOL bWait
);
__declspec(dllimport)
BOOL
__stdcall
CancelIoEx(
HANDLE hFile,
LPOVERLAPPED lpOverlapped
);
// end_1_0
// begin_1_1
# 176 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\ioapiset.h" 3
__declspec(dllimport)
BOOL
__stdcall
CancelIo(
HANDLE hFile
);
__declspec(dllimport)
BOOL
__stdcall
GetOverlappedResultEx(
HANDLE hFile,
LPOVERLAPPED lpOverlapped,
LPDWORD lpNumberOfBytesTransferred,
DWORD dwMilliseconds,
BOOL bAlertable
);
# 206 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\ioapiset.h" 3
__declspec(dllimport)
BOOL
__stdcall
CancelSynchronousIo(
HANDLE hThread
);
# 221 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\ioapiset.h" 3
// end_1_1
// begin_1_0
// begin_1_1
}
// end_1_0
// end_1_1
# 49 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 1 3
// begin_1_0
// begin_2_0
/********************************************************************************
* *
* synchapi.h -- ApiSet Contract for api-ms-win-core-synch-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 25 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
/* APISET_NAME: api-ms-win-core-synch-l1 */
/* APISET_TAG: public */
# 46 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
extern "C" {
// end_1_0
// end_2_0
// begin_1_0
// begin_2_0
//
// Define the slim R/W lock.
//
typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
// end_1_0
// end_2_0
// begin_1_0
__declspec(dllimport)
void
__stdcall
InitializeSRWLock(
PSRWLOCK SRWLock
);
__declspec(dllimport)
void
__stdcall
ReleaseSRWLockExclusive(
PSRWLOCK SRWLock
);
__declspec(dllimport)
void
__stdcall
ReleaseSRWLockShared(
PSRWLOCK SRWLock
);
__declspec(dllimport)
void
__stdcall
AcquireSRWLockExclusive(
PSRWLOCK SRWLock
);
__declspec(dllimport)
void
__stdcall
AcquireSRWLockShared(
PSRWLOCK SRWLock
);
__declspec(dllimport)
BOOLEAN
__stdcall
TryAcquireSRWLockExclusive(
PSRWLOCK SRWLock
);
__declspec(dllimport)
BOOLEAN
__stdcall
TryAcquireSRWLockShared(
PSRWLOCK SRWLock
);
# 159 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
__declspec(dllimport)
void
__stdcall
InitializeCriticalSection(
LPCRITICAL_SECTION lpCriticalSection
);
__declspec(dllimport)
void
__stdcall
EnterCriticalSection(
LPCRITICAL_SECTION lpCriticalSection
);
__declspec(dllimport)
void
__stdcall
LeaveCriticalSection(
LPCRITICAL_SECTION lpCriticalSection
);
__declspec(dllimport)
BOOL
__stdcall
InitializeCriticalSectionAndSpinCount(
LPCRITICAL_SECTION lpCriticalSection,
DWORD dwSpinCount
);
__declspec(dllimport)
BOOL
__stdcall
InitializeCriticalSectionEx(
LPCRITICAL_SECTION lpCriticalSection,
DWORD dwSpinCount,
DWORD Flags
);
__declspec(dllimport)
DWORD
__stdcall
SetCriticalSectionSpinCount(
LPCRITICAL_SECTION lpCriticalSection,
DWORD dwSpinCount
);
__declspec(dllimport)
BOOL
__stdcall
TryEnterCriticalSection(
LPCRITICAL_SECTION lpCriticalSection
);
__declspec(dllimport)
void
__stdcall
DeleteCriticalSection(
LPCRITICAL_SECTION lpCriticalSection
);
// end_1_0
// begin_2_0
//
// Define one-time initialization primitive
//
typedef RTL_RUN_ONCE INIT_ONCE;
typedef PRTL_RUN_ONCE PINIT_ONCE;
typedef PRTL_RUN_ONCE LPINIT_ONCE;
//
// Run once flags
//
//
// The context stored in the run once structure must leave the following number
// of low order bits unused.
//
typedef
BOOL
(__stdcall *PINIT_ONCE_FN) (
PINIT_ONCE InitOnce,
PVOID Parameter,
PVOID *Context
);
__declspec(dllimport)
void
__stdcall
InitOnceInitialize(
PINIT_ONCE InitOnce
);
__declspec(dllimport)
BOOL
__stdcall
InitOnceExecuteOnce(
PINIT_ONCE InitOnce,
PINIT_ONCE_FN InitFn,
PVOID Parameter,
LPVOID * Context
);
__declspec(dllimport)
BOOL
__stdcall
InitOnceBeginInitialize(
LPINIT_ONCE lpInitOnce,
DWORD dwFlags,
PBOOL fPending,
LPVOID * lpContext
);
__declspec(dllimport)
BOOL
__stdcall
InitOnceComplete(
LPINIT_ONCE lpInitOnce,
DWORD dwFlags,
LPVOID lpContext
);
//
// Define condition variable
//
typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;
//
// Static initializer for the condition variable
//
//
// Flags for condition variables
//
# 351 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
__declspec(dllimport)
void
__stdcall
InitializeConditionVariable(
PCONDITION_VARIABLE ConditionVariable
);
__declspec(dllimport)
void
__stdcall
WakeConditionVariable(
PCONDITION_VARIABLE ConditionVariable
);
__declspec(dllimport)
void
__stdcall
WakeAllConditionVariable(
PCONDITION_VARIABLE ConditionVariable
);
__declspec(dllimport)
BOOL
__stdcall
SleepConditionVariableCS(
PCONDITION_VARIABLE ConditionVariable,
PCRITICAL_SECTION CriticalSection,
DWORD dwMilliseconds
);
__declspec(dllimport)
BOOL
__stdcall
SleepConditionVariableSRW(
PCONDITION_VARIABLE ConditionVariable,
PSRWLOCK SRWLock,
DWORD dwMilliseconds,
ULONG Flags
);
// end_2_0
// begin_1_0
__declspec(dllimport)
BOOL
__stdcall
SetEvent(
HANDLE hEvent
);
__declspec(dllimport)
BOOL
__stdcall
ResetEvent(
HANDLE hEvent
);
__declspec(dllimport)
BOOL
__stdcall
ReleaseSemaphore(
HANDLE hSemaphore,
LONG lReleaseCount,
LPLONG lpPreviousCount
);
__declspec(dllimport)
BOOL
__stdcall
ReleaseMutex(
HANDLE hMutex
);
__declspec(dllimport)
DWORD
__stdcall
WaitForSingleObject(
HANDLE hHandle,
DWORD dwMilliseconds
);
__declspec(dllimport)
DWORD
__stdcall
SleepEx(
DWORD dwMilliseconds,
BOOL bAlertable
);
__declspec(dllimport)
DWORD
__stdcall
WaitForSingleObjectEx(
HANDLE hHandle,
DWORD dwMilliseconds,
BOOL bAlertable
);
__declspec(dllimport)
DWORD
__stdcall
WaitForMultipleObjectsEx(
DWORD nCount,
const HANDLE * lpHandles,
BOOL bWaitAll,
DWORD dwMilliseconds,
BOOL bAlertable
);
//
// Synchronization APIs
//
__declspec(dllimport)
HANDLE
__stdcall
CreateMutexA(
LPSECURITY_ATTRIBUTES lpMutexAttributes,
BOOL bInitialOwner,
LPCSTR lpName
);
__declspec(dllimport)
HANDLE
__stdcall
CreateMutexW(
LPSECURITY_ATTRIBUTES lpMutexAttributes,
BOOL bInitialOwner,
LPCWSTR lpName
);
__declspec(dllimport)
HANDLE
__stdcall
OpenMutexW(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCWSTR lpName
);
__declspec(dllimport)
HANDLE
__stdcall
CreateEventA(
LPSECURITY_ATTRIBUTES lpEventAttributes,
BOOL bManualReset,
BOOL bInitialState,
LPCSTR lpName
);
__declspec(dllimport)
HANDLE
__stdcall
CreateEventW(
LPSECURITY_ATTRIBUTES lpEventAttributes,
BOOL bManualReset,
BOOL bInitialState,
LPCWSTR lpName
);
__declspec(dllimport)
HANDLE
__stdcall
OpenEventA(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCSTR lpName
);
__declspec(dllimport)
HANDLE
__stdcall
OpenEventW(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCWSTR lpName
);
__declspec(dllimport)
HANDLE
__stdcall
OpenSemaphoreW(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCWSTR lpName
);
# 598 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
typedef
void
(__stdcall *PTIMERAPCROUTINE)(
LPVOID lpArgToCompletionRoutine,
DWORD dwTimerLowValue,
DWORD dwTimerHighValue
);
__declspec(dllimport)
HANDLE
__stdcall
OpenWaitableTimerW(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCWSTR lpTimerName
);
# 624 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
BOOL
__stdcall
SetWaitableTimerEx(
HANDLE hTimer,
const LARGE_INTEGER * lpDueTime,
LONG lPeriod,
PTIMERAPCROUTINE pfnCompletionRoutine,
LPVOID lpArgToCompletionRoutine,
PREASON_CONTEXT WakeContext,
ULONG TolerableDelay
);
__declspec(dllimport)
BOOL
__stdcall
SetWaitableTimer(
HANDLE hTimer,
const LARGE_INTEGER * lpDueTime,
LONG lPeriod,
PTIMERAPCROUTINE pfnCompletionRoutine,
LPVOID lpArgToCompletionRoutine,
BOOL fResume
);
__declspec(dllimport)
BOOL
__stdcall
CancelWaitableTimer(
HANDLE hTimer
);
__declspec(dllimport)
HANDLE
__stdcall
CreateMutexExA(
LPSECURITY_ATTRIBUTES lpMutexAttributes,
LPCSTR lpName,
DWORD dwFlags,
DWORD dwDesiredAccess
);
__declspec(dllimport)
HANDLE
__stdcall
CreateMutexExW(
LPSECURITY_ATTRIBUTES lpMutexAttributes,
LPCWSTR lpName,
DWORD dwFlags,
DWORD dwDesiredAccess
);
# 696 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
__declspec(dllimport)
HANDLE
__stdcall
CreateEventExA(
LPSECURITY_ATTRIBUTES lpEventAttributes,
LPCSTR lpName,
DWORD dwFlags,
DWORD dwDesiredAccess
);
__declspec(dllimport)
HANDLE
__stdcall
CreateEventExW(
LPSECURITY_ATTRIBUTES lpEventAttributes,
LPCWSTR lpName,
DWORD dwFlags,
DWORD dwDesiredAccess
);
__declspec(dllimport)
HANDLE
__stdcall
CreateSemaphoreExW(
LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
LONG lInitialCount,
LONG lMaximumCount,
LPCWSTR lpName,
DWORD dwFlags,
DWORD dwDesiredAccess
);
# 744 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
__declspec(dllimport)
HANDLE
__stdcall
CreateWaitableTimerExW(
LPSECURITY_ATTRIBUTES lpTimerAttributes,
LPCWSTR lpTimerName,
DWORD dwFlags,
DWORD dwDesiredAccess
);
# 767 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
// end_1_0
// begin_2_0
# 778 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
typedef RTL_BARRIER SYNCHRONIZATION_BARRIER;
typedef PRTL_BARRIER PSYNCHRONIZATION_BARRIER;
typedef PRTL_BARRIER LPSYNCHRONIZATION_BARRIER;
BOOL
__stdcall
EnterSynchronizationBarrier(
LPSYNCHRONIZATION_BARRIER lpBarrier,
DWORD dwFlags
);
BOOL
__stdcall
InitializeSynchronizationBarrier(
LPSYNCHRONIZATION_BARRIER lpBarrier,
LONG lTotalThreads,
LONG lSpinCount
);
BOOL
__stdcall
DeleteSynchronizationBarrier(
LPSYNCHRONIZATION_BARRIER lpBarrier
);
# 817 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
__declspec(dllimport)
void
__stdcall
Sleep(
DWORD dwMilliseconds
);
BOOL
__stdcall
WaitOnAddress(
volatile void * Address,
PVOID CompareAddress,
SIZE_T AddressSize,
DWORD dwMilliseconds
);
void
__stdcall
WakeByAddressSingle(
PVOID Address
);
void
__stdcall
WakeByAddressAll(
PVOID Address
);
# 858 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
SignalObjectAndWait(
HANDLE hObjectToSignal,
HANDLE hObjectToWaitOn,
DWORD dwMilliseconds,
BOOL bAlertable
);
# 876 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
// end_2_0
# 885 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
WaitForMultipleObjects(
DWORD nCount,
const HANDLE * lpHandles,
BOOL bWaitAll,
DWORD dwMilliseconds
);
__declspec(dllimport)
HANDLE
__stdcall
CreateSemaphoreW(
LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
LONG lInitialCount,
LONG lMaximumCount,
LPCWSTR lpName
);
__declspec(dllimport)
HANDLE
__stdcall
CreateWaitableTimerW(
LPSECURITY_ATTRIBUTES lpTimerAttributes,
BOOL bManualReset,
LPCWSTR lpTimerName
);
# 932 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\synchapi.h" 3
// begin_1_0
// begin_2_0
}
// end_1_0
// end_2_0
# 50 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\interlockedapi.h" 1 3
// begin_1_0
/********************************************************************************
* *
* interlockedapi.h -- ApiSet Contract for api-ms-win-core-interlocked-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 23 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\interlockedapi.h" 3
/* APISET_NAME: api-ms-win-core-interlocked-l1 */
/* APISET_TAG: public */
# 42 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\interlockedapi.h" 3
extern "C" {
# 58 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\interlockedapi.h" 3
__declspec(dllimport)
void
__stdcall
InitializeSListHead(
PSLIST_HEADER ListHead
);
__declspec(dllimport)
PSLIST_ENTRY
__stdcall
InterlockedPopEntrySList(
PSLIST_HEADER ListHead
);
__declspec(dllimport)
PSLIST_ENTRY
__stdcall
InterlockedPushEntrySList(
PSLIST_HEADER ListHead,
PSLIST_ENTRY ListEntry
);
__declspec(dllimport)
PSLIST_ENTRY
__stdcall
InterlockedPushListSListEx(
PSLIST_HEADER ListHead,
PSLIST_ENTRY List,
PSLIST_ENTRY ListEnd,
ULONG Count
);
__declspec(dllimport)
PSLIST_ENTRY
__stdcall
InterlockedFlushSList(
PSLIST_HEADER ListHead
);
__declspec(dllimport)
USHORT
__stdcall
QueryDepthSList(
PSLIST_HEADER ListHead
);
# 123 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\interlockedapi.h" 3
// end_1_0
// begin_1_0
}
// end_1_0
# 51 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 1 3
// begin_1_0
// begin_1_1
// begin_1_2
// begin_1_3
/***********************************************************************************
* *
* processthreadsapi.h -- ApiSet Contract for api-ms-win-core-processthreads-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
***********************************************************************************/
# 26 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
/* APISET_NAME: api-ms-win-core-processthreads-l1 */
/* APISET_TAG: public */
# 49 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
extern "C" {
// end_1_0
// end_1_1
// end_1_2
// end_1_3
// begin_1_0
// begin_1_3
typedef struct _PROCESS_INFORMATION {
HANDLE hProcess;
HANDLE hThread;
DWORD dwProcessId;
DWORD dwThreadId;
} PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
typedef struct _STARTUPINFOA {
DWORD cb;
LPSTR lpReserved;
LPSTR lpDesktop;
LPSTR lpTitle;
DWORD dwX;
DWORD dwY;
DWORD dwXSize;
DWORD dwYSize;
DWORD dwXCountChars;
DWORD dwYCountChars;
DWORD dwFillAttribute;
DWORD dwFlags;
WORD wShowWindow;
WORD cbReserved2;
LPBYTE lpReserved2;
HANDLE hStdInput;
HANDLE hStdOutput;
HANDLE hStdError;
} STARTUPINFOA, *LPSTARTUPINFOA;
typedef struct _STARTUPINFOW {
DWORD cb;
LPWSTR lpReserved;
LPWSTR lpDesktop;
LPWSTR lpTitle;
DWORD dwX;
DWORD dwY;
DWORD dwXSize;
DWORD dwYSize;
DWORD dwXCountChars;
DWORD dwYCountChars;
DWORD dwFillAttribute;
DWORD dwFlags;
WORD wShowWindow;
WORD cbReserved2;
LPBYTE lpReserved2;
HANDLE hStdInput;
HANDLE hStdOutput;
HANDLE hStdError;
} STARTUPINFOW, *LPSTARTUPINFOW;
typedef STARTUPINFOA STARTUPINFO;
typedef LPSTARTUPINFOA LPSTARTUPINFO;
// end_1_0
// end_1_3
// begin_1_0
# 133 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
QueueUserAPC(
PAPCFUNC pfnAPC,
HANDLE hThread,
ULONG_PTR dwData
);
__declspec(dllimport)
BOOL
__stdcall
GetProcessTimes(
HANDLE hProcess,
LPFILETIME lpCreationTime,
LPFILETIME lpExitTime,
LPFILETIME lpKernelTime,
LPFILETIME lpUserTime
);
__declspec(dllimport)
HANDLE
__stdcall
GetCurrentProcess(
void
);
__declspec(dllimport)
DWORD
__stdcall
GetCurrentProcessId(
void
);
# 180 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
__declspec(noreturn)
void
__stdcall
ExitProcess(
UINT uExitCode
);
# 196 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
TerminateProcess(
HANDLE hProcess,
UINT uExitCode
);
__declspec(dllimport)
BOOL
__stdcall
GetExitCodeProcess(
HANDLE hProcess,
LPDWORD lpExitCode
);
__declspec(dllimport)
BOOL
__stdcall
SwitchToThread(
void
);
__declspec(dllimport)
HANDLE
__stdcall
CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
SIZE_T dwStackSize,
LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter,
DWORD dwCreationFlags,
LPDWORD lpThreadId
);
__declspec(dllimport)
HANDLE
__stdcall
CreateRemoteThread(
HANDLE hProcess,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
SIZE_T dwStackSize,
LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter,
DWORD dwCreationFlags,
LPDWORD lpThreadId
);
# 263 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
HANDLE
__stdcall
GetCurrentThread(
void
);
__declspec(dllimport)
DWORD
__stdcall
GetCurrentThreadId(
void
);
__declspec(dllimport)
HANDLE
__stdcall
OpenThread(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwThreadId
);
__declspec(dllimport)
BOOL
__stdcall
SetThreadPriority(
HANDLE hThread,
int nPriority
);
# 305 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetThreadPriorityBoost(
HANDLE hThread,
BOOL bDisablePriorityBoost
);
__declspec(dllimport)
BOOL
__stdcall
GetThreadPriorityBoost(
HANDLE hThread,
PBOOL pDisablePriorityBoost
);
__declspec(dllimport)
int
__stdcall
GetThreadPriority(
HANDLE hThread
);
__declspec(dllimport)
__declspec(noreturn)
void
__stdcall
ExitThread(
DWORD dwExitCode
);
__declspec(dllimport)
BOOL
__stdcall
TerminateThread(
HANDLE hThread,
DWORD dwExitCode
);
# 365 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetExitCodeThread(
HANDLE hThread,
LPDWORD lpExitCode
);
__declspec(dllimport)
DWORD
__stdcall
SuspendThread(
HANDLE hThread
);
__declspec(dllimport)
DWORD
__stdcall
ResumeThread(
HANDLE hThread
);
__declspec(dllimport)
DWORD
__stdcall
TlsAlloc(
void
);
__declspec(dllimport)
LPVOID
__stdcall
TlsGetValue(
DWORD dwTlsIndex
);
__declspec(dllimport)
BOOL
__stdcall
TlsSetValue(
DWORD dwTlsIndex,
LPVOID lpTlsValue
);
__declspec(dllimport)
BOOL
__stdcall
TlsFree(
DWORD dwTlsIndex
);
# 436 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
CreateProcessA(
LPCSTR lpApplicationName,
LPSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCSTR lpCurrentDirectory,
LPSTARTUPINFOA lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);
__declspec(dllimport)
BOOL
__stdcall
CreateProcessW(
LPCWSTR lpApplicationName,
LPWSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCWSTR lpCurrentDirectory,
LPSTARTUPINFOW lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);
__declspec(dllimport)
BOOL
__stdcall
SetProcessShutdownParameters(
DWORD dwLevel,
DWORD dwFlags
);
__declspec(dllimport)
DWORD
__stdcall
GetProcessVersion(
DWORD ProcessId
);
__declspec(dllimport)
void
__stdcall
GetStartupInfoW(
LPSTARTUPINFOW lpStartupInfo
);
__declspec(dllimport)
BOOL
__stdcall
CreateProcessAsUserW(
HANDLE hToken,
LPCWSTR lpApplicationName,
LPWSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCWSTR lpCurrentDirectory,
LPSTARTUPINFOW lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);
//
// TODO: neerajsi-2013/12/08 - this should be moved to official documentation.
//
// These are shorthand ways of referring to the thread token, the process token,
// or the "effective token" (the thread token if it exists, otherwise the
// process token), respectively. These handles only have TOKEN_QUERY and
// TOKEN_QUERY_SOURCE access in Windows 8 (use TOKEN_ACCESS_PSEUDO_HANDLE to
// determine the granted access on the target version of Windows). These handles
// do not need to be closed.
//
__forceinline
HANDLE
GetCurrentProcessToken (
void
)
{
return (HANDLE)(LONG_PTR) -4;
}
__forceinline
HANDLE
GetCurrentThreadToken (
void
)
{
return (HANDLE)(LONG_PTR) -5;
}
__forceinline
HANDLE
GetCurrentThreadEffectiveToken (
void
)
{
return (HANDLE)(LONG_PTR) -6;
}
__declspec(dllimport)
BOOL
__stdcall
SetThreadToken(
PHANDLE Thread,
HANDLE Token
);
# 587 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
OpenProcessToken(
HANDLE ProcessHandle,
DWORD DesiredAccess,
PHANDLE TokenHandle
);
# 604 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
OpenThreadToken(
HANDLE ThreadHandle,
DWORD DesiredAccess,
BOOL OpenAsSelf,
PHANDLE TokenHandle
);
__declspec(dllimport)
BOOL
__stdcall
SetPriorityClass(
HANDLE hProcess,
DWORD dwPriorityClass
);
__declspec(dllimport)
BOOL
__stdcall
SetThreadStackGuarantee(
PULONG StackSizeInBytes
);
__declspec(dllimport)
DWORD
__stdcall
GetPriorityClass(
HANDLE hProcess
);
__declspec(dllimport)
BOOL
__stdcall
ProcessIdToSessionId(
DWORD dwProcessId,
DWORD * pSessionId
);
typedef struct _PROC_THREAD_ATTRIBUTE_LIST *PPROC_THREAD_ATTRIBUTE_LIST, *LPPROC_THREAD_ATTRIBUTE_LIST;
# 661 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetProcessId(
HANDLE Process
);
__declspec(dllimport)
DWORD
__stdcall
GetThreadId(
HANDLE Thread
);
__declspec(dllimport)
void
__stdcall
FlushProcessWriteBuffers(
void
);
# 707 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetProcessIdOfThread(
HANDLE Thread
);
__declspec(dllimport)
BOOL
__stdcall
InitializeProcThreadAttributeList(
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
DWORD dwAttributeCount,
DWORD dwFlags,
PSIZE_T lpSize
);
__declspec(dllimport)
void
__stdcall
DeleteProcThreadAttributeList(
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList
);
__declspec(dllimport)
BOOL
__stdcall
SetProcessAffinityUpdateMode(
HANDLE hProcess,
DWORD dwFlags
);
__declspec(dllimport)
BOOL
__stdcall
QueryProcessAffinityUpdateMode(
HANDLE hProcess,
LPDWORD lpdwFlags
);
__declspec(dllimport)
BOOL
__stdcall
UpdateProcThreadAttribute(
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
DWORD dwFlags,
DWORD_PTR Attribute,
PVOID lpValue,
SIZE_T cbSize,
PVOID lpPreviousValue,
PSIZE_T lpReturnSize
);
# 780 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
HANDLE
__stdcall
CreateRemoteThreadEx(
HANDLE hProcess,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
SIZE_T dwStackSize,
LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter,
DWORD dwCreationFlags,
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
LPDWORD lpThreadId
);
// end_1_0
// begin_1_1
# 814 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
void
__stdcall
GetCurrentThreadStackLimits(
PULONG_PTR LowLimit,
PULONG_PTR HighLimit
);
# 832 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetThreadContext(
HANDLE hThread,
LPCONTEXT lpContext
);
__declspec(dllimport)
BOOL
__stdcall
GetProcessMitigationPolicy(
HANDLE hProcess,
PROCESS_MITIGATION_POLICY MitigationPolicy,
PVOID lpBuffer,
SIZE_T dwLength
);
# 864 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetThreadContext(
HANDLE hThread,
const CONTEXT * lpContext
);
__declspec(dllimport)
BOOL
__stdcall
SetProcessMitigationPolicy(
PROCESS_MITIGATION_POLICY MitigationPolicy,
PVOID lpBuffer,
SIZE_T dwLength
);
# 901 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
FlushInstructionCache(
HANDLE hProcess,
LPCVOID lpBaseAddress,
SIZE_T dwSize
);
# 918 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetThreadTimes(
HANDLE hThread,
LPFILETIME lpCreationTime,
LPFILETIME lpExitTime,
LPFILETIME lpKernelTime,
LPFILETIME lpUserTime
);
__declspec(dllimport)
HANDLE
__stdcall
OpenProcess(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwProcessId
);
__declspec(dllimport)
BOOL
__stdcall
IsProcessorFeaturePresent(
DWORD ProcessorFeature
);
# 960 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetProcessHandleCount(
HANDLE hProcess,
PDWORD pdwHandleCount
);
# 981 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetCurrentProcessorNumber(
void
);
# 1001 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetThreadIdealProcessorEx(
HANDLE hThread,
PPROCESSOR_NUMBER lpIdealProcessor,
PPROCESSOR_NUMBER lpPreviousIdealProcessor
);
__declspec(dllimport)
BOOL
__stdcall
GetThreadIdealProcessorEx(
HANDLE hThread,
PPROCESSOR_NUMBER lpIdealProcessor
);
__declspec(dllimport)
void
__stdcall
GetCurrentProcessorNumberEx(
PPROCESSOR_NUMBER ProcNumber
);
// end_1_1
// begin_1_2
# 1046 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetProcessPriorityBoost(
HANDLE hProcess,
PBOOL pDisablePriorityBoost
);
__declspec(dllimport)
BOOL
__stdcall
SetProcessPriorityBoost(
HANDLE hProcess,
BOOL bDisablePriorityBoost
);
__declspec(dllimport)
BOOL
__stdcall
GetThreadIOPendingFlag(
HANDLE hThread,
PBOOL lpIOIsPending
);
__declspec(dllimport)
BOOL
__stdcall
GetSystemTimes(
PFILETIME lpIdleTime,
PFILETIME lpKernelTime,
PFILETIME lpUserTime
);
//
// Thread information classes.
//
typedef enum _THREAD_INFORMATION_CLASS {
ThreadMemoryPriority,
ThreadAbsoluteCpuPriority,
ThreadDynamicCodePolicy,
ThreadInformationClassMax
} THREAD_INFORMATION_CLASS;
typedef struct _MEMORY_PRIORITY_INFORMATION {
ULONG MemoryPriority;
} MEMORY_PRIORITY_INFORMATION, *PMEMORY_PRIORITY_INFORMATION;
__declspec(dllimport)
BOOL
__stdcall
GetThreadInformation(
HANDLE hThread,
THREAD_INFORMATION_CLASS ThreadInformationClass,
LPVOID ThreadInformation,
DWORD ThreadInformationSize
);
__declspec(dllimport)
BOOL
__stdcall
SetThreadInformation(
HANDLE hThread,
THREAD_INFORMATION_CLASS ThreadInformationClass,
LPVOID ThreadInformation,
DWORD ThreadInformationSize
);
__declspec(dllimport)
BOOL
__stdcall
IsProcessCritical(
HANDLE hProcess,
PBOOL Critical
);
__declspec(dllimport)
BOOL
__stdcall
SetProtectedPolicy(
LPCGUID PolicyGuid,
ULONG_PTR PolicyValue,
PULONG_PTR OldPolicyValue
);
__declspec(dllimport)
BOOL
__stdcall
QueryProtectedPolicy(
LPCGUID PolicyGuid,
PULONG_PTR PolicyValue
);
# 1170 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
// end_1_2
// begin_1_3
__declspec(dllimport)
DWORD
__stdcall
SetThreadIdealProcessor(
HANDLE hThread,
DWORD dwIdealProcessor
);
# 1196 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
typedef enum _PROCESS_INFORMATION_CLASS {
ProcessMemoryPriority,
ProcessMemoryExhaustionInfo,
ProcessAppMemoryInfo,
ProcessInPrivateInfo,
ProcessActivityThrottleStateInfo,
ProcessActivityThrottlePolicyInfo,
ProcessInformationClassMax
} PROCESS_INFORMATION_CLASS;
typedef struct _APP_MEMORY_INFORMATION {
ULONG64 AvailableCommit;
ULONG64 PrivateCommitUsage;
ULONG64 PeakPrivateCommitUsage;
ULONG64 TotalCommitUsage;
} APP_MEMORY_INFORMATION, *PAPP_MEMORY_INFORMATION;
//
// Constants and structures needed to enable the fail fast on commit failure
// feature.
//
typedef enum _PROCESS_MEMORY_EXHAUSTION_TYPE {
PMETypeFailFastOnCommitFailure,
PMETypeMax
} PROCESS_MEMORY_EXHAUSTION_TYPE, *PPROCESS_MEMORY_EXHAUSTION_TYPE;
typedef struct _PROCESS_MEMORY_EXHAUSTION_INFO {
USHORT Version;
USHORT Reserved;
PROCESS_MEMORY_EXHAUSTION_TYPE Type;
ULONG_PTR Value;
} PROCESS_MEMORY_EXHAUSTION_INFO, *PPROCESS_MEMORY_EXHAUSTION_INFO;
typedef enum _PROCESS_ACTIVITY_THROTTLE_STATE {
ProcessActivityThrottleStateSystemManaged = 0,
ProcessActivityThrottleStateForceOn = 1,
ProcessActivityThrottleStateForceOff = 2,
MaxProcessActivityThrottleState
} PROCESS_ACTIVITY_THROTTLE_STATE;
//
// Process resource throttling policy
// NtQueryInformationProcess using ProcessActivityThrottlePolicy
//
typedef enum _PROCESS_ACTIVITY_THROTTLE_POLICY_OP {
ProcessActivityThrottlePolicyDisable = 0,
ProcessActivityThrottlePolicyEnable = 1,
ProcessActivityThrottlePolicyDefault = 2,
MaxProcessActivityThrottlePolicy
} PROCESS_ACTIVITY_THROTTLE_POLICY_OP;
//
// Flags for PROCESS_ACTIVITY_THROTTLE_POLICY PolicyFlags
//
typedef struct _PROCESS_ACTIVITY_THROTTLE_POLICY {
PROCESS_ACTIVITY_THROTTLE_POLICY_OP Operation;
ULONG PolicyFlags;
} PROCESS_ACTIVITY_THROTTLE_POLICY;
__declspec(dllimport)
BOOL
__stdcall
SetProcessInformation(
HANDLE hProcess,
PROCESS_INFORMATION_CLASS ProcessInformationClass,
LPVOID ProcessInformation,
DWORD ProcessInformationSize
);
__declspec(dllimport)
BOOL
__stdcall
GetProcessInformation(
HANDLE hProcess,
PROCESS_INFORMATION_CLASS ProcessInformationClass,
LPVOID ProcessInformation,
DWORD ProcessInformationSize
);
# 1299 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
BOOL
__stdcall
GetSystemCpuSetInformation(
PSYSTEM_CPU_SET_INFORMATION Information,
ULONG BufferLength,
PULONG ReturnedLength,
HANDLE Process,
ULONG Flags
);
BOOL
__stdcall
GetProcessDefaultCpuSets(
HANDLE Process,
PULONG CpuSetIds,
ULONG CpuSetIdCount,
PULONG RequiredIdCount
);
BOOL
__stdcall
SetProcessDefaultCpuSets(
HANDLE Process,
const ULONG * CpuSetIds,
ULONG CpuSetIdCount
);
BOOL
__stdcall
GetThreadSelectedCpuSets(
HANDLE Thread,
PULONG CpuSetIds,
ULONG CpuSetIdCount,
PULONG RequiredIdCount
);
BOOL
__stdcall
SetThreadSelectedCpuSets(
HANDLE Thread,
const ULONG * CpuSetIds,
ULONG CpuSetIdCount
);
# 1361 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processthreadsapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
CreateProcessAsUserA(
HANDLE hToken,
LPCSTR lpApplicationName,
LPSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCSTR lpCurrentDirectory,
LPSTARTUPINFOA lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);
__declspec(dllimport)
BOOL
__stdcall
GetProcessShutdownParameters(
LPDWORD lpdwLevel,
LPDWORD lpdwFlags
);
__declspec(dllimport)
HRESULT
__stdcall
SetThreadDescription(
HANDLE hThread,
PCWSTR lpThreadDescription
);
__declspec(dllimport)
HRESULT
__stdcall
GetThreadDescription(
HANDLE hThread,
PWSTR * ppszThreadDescription
);
// end_1_3
// begin_1_0
// begin_1_1
// begin_1_2
// begin_1_3
}
// end_1_0
// end_1_1
// end_1_2
// end_1_3
# 52 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 1 3
// begin_1_0
// begin_2_0
// begin_2_1
// begin_2_2
// begin_2_3
/********************************************************************************
* *
* sysinfoapi.h -- ApiSet Contract for api-ms-win-core-sysinfo-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 30 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
#pragma warning(disable: 4514)
#pragma warning(disable: 4103)
#pragma warning(push)
#pragma warning(disable: 4001)
#pragma warning(disable: 4201)
#pragma warning(disable: 4214)
/* APISET_NAME: api-ms-win-core-sysinfo-l1 */
/* APISET_TAG: public */
# 75 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
extern "C" {
// end_1_0
// end_2_0
// end_2_1
// end_2_2
// end_2_3
// begin_1_0
// begin_2_0
typedef struct _SYSTEM_INFO {
union {
DWORD dwOemId; // Obsolete field...do not use
struct {
WORD wProcessorArchitecture;
WORD wReserved;
} ;
} ;
DWORD dwPageSize;
LPVOID lpMinimumApplicationAddress;
LPVOID lpMaximumApplicationAddress;
DWORD_PTR dwActiveProcessorMask;
DWORD dwNumberOfProcessors;
DWORD dwProcessorType;
DWORD dwAllocationGranularity;
WORD wProcessorLevel;
WORD wProcessorRevision;
} SYSTEM_INFO, *LPSYSTEM_INFO;
// end_1_0
// end_2_0
// begin_1_0
typedef struct _MEMORYSTATUSEX {
DWORD dwLength;
DWORD dwMemoryLoad;
DWORDLONG ullTotalPhys;
DWORDLONG ullAvailPhys;
DWORDLONG ullTotalPageFile;
DWORDLONG ullAvailPageFile;
DWORDLONG ullTotalVirtual;
DWORDLONG ullAvailVirtual;
DWORDLONG ullAvailExtendedVirtual;
} MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
__declspec(dllimport)
BOOL
__stdcall
GlobalMemoryStatusEx(
LPMEMORYSTATUSEX lpBuffer
);
__declspec(dllimport)
void
__stdcall
GetSystemInfo(
LPSYSTEM_INFO lpSystemInfo
);
__declspec(dllimport)
void
__stdcall
GetSystemTime(
LPSYSTEMTIME lpSystemTime
);
__declspec(dllimport)
void
__stdcall
GetSystemTimeAsFileTime(
LPFILETIME lpSystemTimeAsFileTime
);
__declspec(dllimport)
void
__stdcall
GetLocalTime(
LPSYSTEMTIME lpSystemTime
);
# 179 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
__declspec(deprecated)
__declspec(dllimport)
DWORD
__stdcall
GetVersion(
void
);
__declspec(dllimport)
BOOL
__stdcall
SetLocalTime(
const SYSTEMTIME * lpSystemTime
);
// end_1_0
// begin_1_0
__declspec(dllimport)
DWORD
__stdcall
GetTickCount(
void
);
__declspec(dllimport)
ULONGLONG
__stdcall
GetTickCount64(
void
);
# 236 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetSystemTimeAdjustment(
PDWORD lpTimeAdjustment,
PDWORD lpTimeIncrement,
PBOOL lpTimeAdjustmentDisabled
);
__declspec(dllimport)
UINT
__stdcall
GetSystemDirectoryA(
LPSTR lpBuffer,
UINT uSize
);
__declspec(dllimport)
UINT
__stdcall
GetSystemDirectoryW(
LPWSTR lpBuffer,
UINT uSize
);
__declspec(dllimport)
UINT
__stdcall
GetWindowsDirectoryA(
LPSTR lpBuffer,
UINT uSize
);
__declspec(dllimport)
UINT
__stdcall
GetWindowsDirectoryW(
LPWSTR lpBuffer,
UINT uSize
);
__declspec(dllimport)
UINT
__stdcall
GetSystemWindowsDirectoryA(
LPSTR lpBuffer,
UINT uSize
);
__declspec(dllimport)
UINT
__stdcall
GetSystemWindowsDirectoryW(
LPWSTR lpBuffer,
UINT uSize
);
# 324 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
// end_1_0
// begin_1_0
// begin_2_0
// begin_2_1
// begin_2_3
typedef enum _COMPUTER_NAME_FORMAT {
ComputerNameNetBIOS,
ComputerNameDnsHostname,
ComputerNameDnsDomain,
ComputerNameDnsFullyQualified,
ComputerNamePhysicalNetBIOS,
ComputerNamePhysicalDnsHostname,
ComputerNamePhysicalDnsDomain,
ComputerNamePhysicalDnsFullyQualified,
ComputerNameMax
} COMPUTER_NAME_FORMAT ;
// end_1_0
// end_2_0
// end_2_1
// end_2_3
// begin_1_0
__declspec(dllimport)
BOOL
__stdcall
GetComputerNameExA(
COMPUTER_NAME_FORMAT NameType,
LPSTR lpBuffer,
LPDWORD nSize
);
__declspec(dllimport)
BOOL
__stdcall
GetComputerNameExW(
COMPUTER_NAME_FORMAT NameType,
LPWSTR lpBuffer,
LPDWORD nSize
);
# 388 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
// end_1_0
// begin_2_0
# 398 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetComputerNameExW(
COMPUTER_NAME_FORMAT NameType,
LPCWSTR lpBuffer
);
__declspec(dllimport)
BOOL
__stdcall
SetSystemTime(
const SYSTEMTIME * lpSystemTime
);
// end_2_0
// begin_1_0
__declspec(deprecated)
__declspec(dllimport)
BOOL
__stdcall
GetVersionExA(
LPOSVERSIONINFOA lpVersionInformation
);
__declspec(deprecated)
__declspec(dllimport)
BOOL
__stdcall
GetVersionExW(
LPOSVERSIONINFOW lpVersionInformation
);
# 462 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetLogicalProcessorInformation(
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer,
PDWORD ReturnedLength
);
__declspec(dllimport)
BOOL
__stdcall
GetLogicalProcessorInformationEx(
LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType,
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX Buffer,
PDWORD ReturnedLength
);
// end_1_0
// begin_2_0
# 502 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
__declspec(dllimport)
void
__stdcall
GetNativeSystemInfo(
LPSYSTEM_INFO lpSystemInfo
);
__declspec(dllimport)
void
__stdcall
GetSystemTimePreciseAsFileTime(
LPFILETIME lpSystemTimeAsFileTime
);
# 535 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetProductInfo(
DWORD dwOSMajorVersion,
DWORD dwOSMinorVersion,
DWORD dwSpMajorVersion,
DWORD dwSpMinorVersion,
PDWORD pdwReturnedProductType
);
__declspec(dllimport)
ULONGLONG
__stdcall
VerSetConditionMask(
ULONGLONG ConditionMask,
ULONG TypeMask,
UCHAR Condition
);
__declspec(dllimport)
BOOL
__stdcall
GetOsSafeBootMode(
PDWORD Flags
);
__declspec(dllimport)
UINT
__stdcall
EnumSystemFirmwareTables(
DWORD FirmwareTableProviderSignature,
PVOID pFirmwareTableEnumBuffer,
DWORD BufferSize
);
__declspec(dllimport)
UINT
__stdcall
GetSystemFirmwareTable(
DWORD FirmwareTableProviderSignature,
DWORD FirmwareTableID,
PVOID pFirmwareTableBuffer,
DWORD BufferSize
);
// end_2_0
// begin_2_1
# 613 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
DnsHostnameToComputerNameExW(
LPCWSTR Hostname,
LPWSTR ComputerName,
LPDWORD nSize
);
__declspec(dllimport)
BOOL
__stdcall
GetPhysicallyInstalledSystemMemory(
PULONGLONG TotalMemoryInKilobytes
);
__declspec(dllimport)
BOOL
__stdcall
SetComputerNameEx2W(
COMPUTER_NAME_FORMAT NameType,
DWORD Flags,
LPCWSTR lpBuffer
);
__declspec(dllimport)
BOOL
__stdcall
SetSystemTimeAdjustment(
DWORD dwTimeAdjustment,
BOOL bTimeAdjustmentDisabled
);
__declspec(dllimport)
BOOL
__stdcall
InstallELAMCertificateInfo(
HANDLE ELAMFile
);
// end_2_1
// begin_2_2
__declspec(dllimport)
BOOL
__stdcall
GetProcessorSystemCycleTime(
USHORT Group,
PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION Buffer,
PDWORD ReturnedLength
);
// end_2_2
// begin_2_3
# 708 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetOsManufacturingMode(
PBOOL pbEnabled
);
# 728 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
__declspec(dllimport)
HRESULT
__stdcall
GetIntegratedDisplaySize(
double * sizeInInches
);
# 745 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetComputerNameA(
LPCSTR lpComputerName
);
__declspec(dllimport)
BOOL
__stdcall
SetComputerNameW(
LPCWSTR lpComputerName
);
__declspec(dllimport)
BOOL
__stdcall
SetComputerNameExA(
COMPUTER_NAME_FORMAT NameType,
LPCSTR lpBuffer
);
# 783 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
// end_2_3
// begin_1_0
// begin_2_0
// begin_2_1
// begin_2_2
// begin_2_3
}
#pragma warning(pop)
# 809 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\sysinfoapi.h" 3
// end_1_0
// end_2_0
// end_2_1
// end_2_2
// end_2_3
# 53 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 1 3
// begin_1_0
// begin_1_1
// begin_1_2
// begin_1_3
// begin_1_4
// begin_1_5
/********************************************************************************
* *
* memoryapi.h -- ApiSet Contract for api-ms-win-core-memory-l1-1-0 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 28 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
/* APISET_NAME: api-ms-win-core-memory-l1 */
/* APISET_TAG: public */
# 56 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
extern "C" {
#pragma warning(push)
#pragma warning(disable: 4668)
# 84 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
// end_1_0
// end_1_1
// end_1_2
// end_1_3
// end_1_4
// end_1_5
// begin_1_0
__declspec(dllimport)
LPVOID
__stdcall
VirtualAlloc(
LPVOID lpAddress,
SIZE_T dwSize,
DWORD flAllocationType,
DWORD flProtect
);
__declspec(dllimport)
BOOL
__stdcall
VirtualProtect(
LPVOID lpAddress,
SIZE_T dwSize,
DWORD flNewProtect,
PDWORD lpflOldProtect
);
# 136 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
VirtualFree(
LPVOID lpAddress,
SIZE_T dwSize,
DWORD dwFreeType
);
__declspec(dllimport)
SIZE_T
__stdcall
VirtualQuery(
LPCVOID lpAddress,
PMEMORY_BASIC_INFORMATION lpBuffer,
SIZE_T dwLength
);
# 163 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
__declspec(dllimport)
LPVOID
__stdcall
VirtualAllocEx(
HANDLE hProcess,
LPVOID lpAddress,
SIZE_T dwSize,
DWORD flAllocationType,
DWORD flProtect
);
# 188 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
VirtualFreeEx(
HANDLE hProcess,
LPVOID lpAddress,
SIZE_T dwSize,
DWORD dwFreeType
);
__declspec(dllimport)
BOOL
__stdcall
VirtualProtectEx(
HANDLE hProcess,
LPVOID lpAddress,
SIZE_T dwSize,
DWORD flNewProtect,
PDWORD lpflOldProtect
);
__declspec(dllimport)
SIZE_T
__stdcall
VirtualQueryEx(
HANDLE hProcess,
LPCVOID lpAddress,
PMEMORY_BASIC_INFORMATION lpBuffer,
SIZE_T dwLength
);
__declspec(dllimport)
BOOL
__stdcall
ReadProcessMemory(
HANDLE hProcess,
LPCVOID lpBaseAddress,
LPVOID lpBuffer,
SIZE_T nSize,
SIZE_T * lpNumberOfBytesRead
);
__declspec(dllimport)
BOOL
__stdcall
WriteProcessMemory(
HANDLE hProcess,
LPVOID lpBaseAddress,
LPCVOID lpBuffer,
SIZE_T nSize,
SIZE_T * lpNumberOfBytesWritten
);
__declspec(dllimport)
HANDLE
__stdcall
CreateFileMappingW(
HANDLE hFile,
LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
DWORD flProtect,
DWORD dwMaximumSizeHigh,
DWORD dwMaximumSizeLow,
LPCWSTR lpName
);
__declspec(dllimport)
HANDLE
__stdcall
OpenFileMappingW(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCWSTR lpName
);
__declspec(dllimport)
LPVOID
__stdcall
MapViewOfFile(
HANDLE hFileMappingObject,
DWORD dwDesiredAccess,
DWORD dwFileOffsetHigh,
DWORD dwFileOffsetLow,
SIZE_T dwNumberOfBytesToMap
);
__declspec(dllimport)
LPVOID
__stdcall
MapViewOfFileEx(
HANDLE hFileMappingObject,
DWORD dwDesiredAccess,
DWORD dwFileOffsetHigh,
DWORD dwFileOffsetLow,
SIZE_T dwNumberOfBytesToMap,
LPVOID lpBaseAddress
);
# 316 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
FlushViewOfFile(
LPCVOID lpBaseAddress,
SIZE_T dwNumberOfBytesToFlush
);
__declspec(dllimport)
BOOL
__stdcall
UnmapViewOfFile(
LPCVOID lpBaseAddress
);
// end_1_0
// begin_1_1
# 346 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
__declspec(dllimport)
SIZE_T
__stdcall
GetLargePageMinimum(
void
);
__declspec(dllimport)
BOOL
__stdcall
GetProcessWorkingSetSizeEx(
HANDLE hProcess,
PSIZE_T lpMinimumWorkingSetSize,
PSIZE_T lpMaximumWorkingSetSize,
PDWORD Flags
);
__declspec(dllimport)
BOOL
__stdcall
SetProcessWorkingSetSizeEx(
HANDLE hProcess,
SIZE_T dwMinimumWorkingSetSize,
SIZE_T dwMaximumWorkingSetSize,
DWORD Flags
);
__declspec(dllimport)
BOOL
__stdcall
VirtualLock(
LPVOID lpAddress,
SIZE_T dwSize
);
__declspec(dllimport)
BOOL
__stdcall
VirtualUnlock(
LPVOID lpAddress,
SIZE_T dwSize
);
# 402 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
__declspec(dllimport)
UINT
__stdcall
GetWriteWatch(
DWORD dwFlags,
PVOID lpBaseAddress,
SIZE_T dwRegionSize,
PVOID * lpAddresses,
ULONG_PTR * lpdwCount,
LPDWORD lpdwGranularity
);
__declspec(dllimport)
UINT
__stdcall
ResetWriteWatch(
LPVOID lpBaseAddress,
SIZE_T dwRegionSize
);
# 435 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
typedef enum _MEMORY_RESOURCE_NOTIFICATION_TYPE {
LowMemoryResourceNotification,
HighMemoryResourceNotification
} MEMORY_RESOURCE_NOTIFICATION_TYPE;
__declspec(dllimport)
HANDLE
__stdcall
CreateMemoryResourceNotification(
MEMORY_RESOURCE_NOTIFICATION_TYPE NotificationType
);
__declspec(dllimport)
BOOL
__stdcall
QueryMemoryResourceNotification(
HANDLE ResourceNotificationHandle,
PBOOL ResourceState
);
# 470 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetSystemFileCacheSize(
PSIZE_T lpMinimumFileCacheSize,
PSIZE_T lpMaximumFileCacheSize,
PDWORD lpFlags
);
__declspec(dllimport)
BOOL
__stdcall
SetSystemFileCacheSize(
SIZE_T MinimumFileCacheSize,
SIZE_T MaximumFileCacheSize,
DWORD Flags
);
__declspec(dllimport)
HANDLE
__stdcall
CreateFileMappingNumaW(
HANDLE hFile,
LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
DWORD flProtect,
DWORD dwMaximumSizeHigh,
DWORD dwMaximumSizeLow,
LPCWSTR lpName,
DWORD nndPreferred
);
# 520 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
typedef struct _WIN32_MEMORY_RANGE_ENTRY {
PVOID VirtualAddress;
SIZE_T NumberOfBytes;
} WIN32_MEMORY_RANGE_ENTRY, *PWIN32_MEMORY_RANGE_ENTRY;
__declspec(dllimport)
BOOL
__stdcall
PrefetchVirtualMemory(
HANDLE hProcess,
ULONG_PTR NumberOfEntries,
PWIN32_MEMORY_RANGE_ENTRY VirtualAddresses,
ULONG Flags
);
# 548 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
__declspec(dllimport)
HANDLE
__stdcall
CreateFileMappingFromApp(
HANDLE hFile,
PSECURITY_ATTRIBUTES SecurityAttributes,
ULONG PageProtection,
ULONG64 MaximumSize,
PCWSTR Name
);
__declspec(dllimport)
PVOID
__stdcall
MapViewOfFileFromApp(
HANDLE hFileMappingObject,
ULONG DesiredAccess,
ULONG64 FileOffset,
SIZE_T NumberOfBytesToMap
);
__declspec(dllimport)
BOOL
__stdcall
UnmapViewOfFileEx(
PVOID BaseAddress,
ULONG UnmapFlags
);
# 589 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
// end_1_1
// begin_1_2
# 602 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
AllocateUserPhysicalPages(
HANDLE hProcess,
PULONG_PTR NumberOfPages,
PULONG_PTR PageArray
);
__declspec(dllimport)
BOOL
__stdcall
FreeUserPhysicalPages(
HANDLE hProcess,
PULONG_PTR NumberOfPages,
PULONG_PTR PageArray
);
__declspec(dllimport)
BOOL
__stdcall
MapUserPhysicalPages(
PVOID VirtualAddress,
ULONG_PTR NumberOfPages,
PULONG_PTR PageArray
);
__declspec(dllimport)
BOOL
__stdcall
AllocateUserPhysicalPagesNuma(
HANDLE hProcess,
PULONG_PTR NumberOfPages,
PULONG_PTR PageArray,
DWORD nndPreferred
);
__declspec(dllimport)
LPVOID
__stdcall
VirtualAllocExNuma(
HANDLE hProcess,
LPVOID lpAddress,
SIZE_T dwSize,
DWORD flAllocationType,
DWORD flProtect,
DWORD nndPreferred
);
# 673 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetMemoryErrorHandlingCapabilities(
PULONG Capabilities
);
typedef
void
__stdcall
BAD_MEMORY_CALLBACK_ROUTINE(
void
);
typedef BAD_MEMORY_CALLBACK_ROUTINE *PBAD_MEMORY_CALLBACK_ROUTINE;
__declspec(dllimport)
PVOID
__stdcall
RegisterBadMemoryNotification(
PBAD_MEMORY_CALLBACK_ROUTINE Callback
);
__declspec(dllimport)
BOOL
__stdcall
UnregisterBadMemoryNotification(
PVOID RegistrationHandle
);
# 716 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
// end_1_2
# 725 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
// This API is not actually available in all blue builds since it is part
// of the S14 GDR release, however because there is no new version for GDR
// this is the most accurate version available. To safely use this API on
// BLUE builds callers will need to use LoadLibrary and GetProcAddress to
// check for the existance of the API's before calling them.
typedef enum OFFER_PRIORITY {
VmOfferPriorityVeryLow = 1,
VmOfferPriorityLow,
VmOfferPriorityBelowNormal,
VmOfferPriorityNormal
} OFFER_PRIORITY;
DWORD
__stdcall
OfferVirtualMemory(
PVOID VirtualAddress,
SIZE_T Size,
OFFER_PRIORITY Priority
);
DWORD
__stdcall
ReclaimVirtualMemory(
void const * VirtualAddress,
SIZE_T Size
);
DWORD
__stdcall
DiscardVirtualMemory(
PVOID VirtualAddress,
SIZE_T Size
);
# 778 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
// begin_1_3
# 789 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetProcessValidCallTargets(
HANDLE hProcess,
PVOID VirtualAddress,
SIZE_T RegionSize,
ULONG NumberOfOffsets,
PCFG_CALL_TARGET_INFO OffsetInformation
);
__declspec(dllimport)
PVOID
__stdcall
VirtualAllocFromApp(
PVOID BaseAddress,
SIZE_T Size,
ULONG AllocationType,
ULONG Protection
);
__declspec(dllimport)
BOOL
__stdcall
VirtualProtectFromApp(
PVOID Address,
SIZE_T Size,
ULONG NewProtection,
PULONG OldProtection
);
__declspec(dllimport)
HANDLE
__stdcall
OpenFileMappingFromApp(
ULONG DesiredAccess,
BOOL InheritHandle,
PCWSTR Name
);
# 942 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
// end_1_3
// begin_1_4
# 955 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
typedef enum WIN32_MEMORY_INFORMATION_CLASS {
MemoryRegionInfo
} WIN32_MEMORY_INFORMATION_CLASS;
#pragma warning(push)
#pragma warning(disable: 4201)
#pragma warning(disable: 4214)
typedef struct WIN32_MEMORY_REGION_INFORMATION {
PVOID AllocationBase;
ULONG AllocationProtect;
union {
ULONG Flags;
struct {
ULONG Private : 1;
ULONG MappedDataFile : 1;
ULONG MappedImage : 1;
ULONG MappedPageFile : 1;
ULONG MappedPhysical : 1;
ULONG DirectMapped : 1;
ULONG Reserved : 26;
} ;
} ;
SIZE_T RegionSize;
SIZE_T CommitSize;
} WIN32_MEMORY_REGION_INFORMATION;
#pragma warning(pop)
__declspec(dllimport)
BOOL
__stdcall
QueryVirtualMemoryInformation(
HANDLE Process,
const void * VirtualAddress,
WIN32_MEMORY_INFORMATION_CLASS MemoryInformationClass,
PVOID MemoryInformation,
SIZE_T MemoryInformationSize,
PSIZE_T ReturnSize
);
# 1013 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
// end_1_4
// begin_1_5
# 1026 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
__declspec(dllimport)
PVOID
__stdcall
MapViewOfFileNuma2(
HANDLE FileMappingHandle,
HANDLE ProcessHandle,
ULONG64 Offset,
PVOID BaseAddress,
SIZE_T ViewSize,
ULONG AllocationType,
ULONG PageProtection,
ULONG PreferredNode
);
__forceinline
PVOID
MapViewOfFile2(
HANDLE FileMappingHandle,
HANDLE ProcessHandle,
ULONG64 Offset,
PVOID BaseAddress,
SIZE_T ViewSize,
ULONG AllocationType,
ULONG PageProtection
)
{
return MapViewOfFileNuma2(FileMappingHandle,
ProcessHandle,
Offset,
BaseAddress,
ViewSize,
AllocationType,
PageProtection,
((DWORD) -1));
}
__declspec(dllimport)
BOOL
__stdcall
UnmapViewOfFile2(
HANDLE ProcessHandle,
PVOID BaseAddress,
ULONG UnmapFlags
);
# 1086 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\memoryapi.h" 3
// end_1_5
// begin_1_0
// begin_1_1
// begin_1_2
// begin_1_3
// begin_1_4
// begin_1_5
#pragma warning(pop)
}
// end_1_0
// end_1_1
// end_1_2
// end_1_3
// end_1_4
// end_1_5
# 54 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\enclaveapi.h" 1 3
// begin_1_0
/********************************************************************************
* *
* enclaveapi.h -- ApiSet Contract for api-ms-win-core-enclave-l1-1-0 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 23 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\enclaveapi.h" 3
/* APISET_NAME: api-ms-win-core-enclave-l1 */
/* APISET_TAG: public */
# 40 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\enclaveapi.h" 3
extern "C" {
__declspec(dllimport)
BOOL
__stdcall
IsEnclaveTypeSupported(
DWORD flEnclaveType
);
__declspec(dllimport)
LPVOID
__stdcall
CreateEnclave(
HANDLE hProcess,
LPVOID lpAddress,
SIZE_T dwSize,
SIZE_T dwInitialCommitment,
DWORD flEnclaveType,
LPCVOID lpEnclaveInformation,
DWORD dwInfoLength,
LPDWORD lpEnclaveError
);
__declspec(dllimport)
BOOL
__stdcall
LoadEnclaveData(
HANDLE hProcess,
LPVOID lpAddress,
LPCVOID lpBuffer,
SIZE_T nSize,
DWORD flProtect,
LPCVOID lpPageInformation,
DWORD dwInfoLength,
PSIZE_T lpNumberOfBytesWritten,
LPDWORD lpEnclaveError
);
__declspec(dllimport)
BOOL
__stdcall
InitializeEnclave(
HANDLE hProcess,
LPVOID lpAddress,
LPCVOID lpEnclaveInformation,
DWORD dwInfoLength,
LPDWORD lpEnclaveError
);
}
// end_1_0
# 55 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\threadpoollegacyapiset.h" 1 3
/********************************************************************************
* *
* threadpoolapi.h -- ApiSet Contract for api-ms-win-core-threadpool-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 22 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\threadpoollegacyapiset.h" 3
/* APISET_NAME: api-ms-win-core-threadpool-legacy-l1 */
/* APISET_TAG: public */
# 39 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\threadpoollegacyapiset.h" 3
extern "C" {
//
// Thread pool API's
//
__declspec(dllimport)
BOOL
__stdcall
QueueUserWorkItem(
LPTHREAD_START_ROUTINE Function,
PVOID Context,
ULONG Flags
);
__declspec(dllimport)
BOOL
__stdcall
UnregisterWaitEx(
HANDLE WaitHandle,
HANDLE CompletionEvent
);
__declspec(dllimport)
HANDLE
__stdcall
CreateTimerQueue(
void
);
__declspec(dllimport)
BOOL
__stdcall
CreateTimerQueueTimer(
PHANDLE phNewTimer,
HANDLE TimerQueue,
WAITORTIMERCALLBACK Callback,
PVOID Parameter,
DWORD DueTime,
DWORD Period,
ULONG Flags
);
__declspec(dllimport)
BOOL
__stdcall
ChangeTimerQueueTimer(
HANDLE TimerQueue,
HANDLE Timer,
ULONG DueTime,
ULONG Period
);
__declspec(dllimport)
BOOL
__stdcall
DeleteTimerQueueTimer(
HANDLE TimerQueue,
HANDLE Timer,
HANDLE CompletionEvent
);
__declspec(dllimport)
BOOL
__stdcall
DeleteTimerQueueEx(
HANDLE TimerQueue,
HANDLE CompletionEvent
);
}
# 56 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\threadpoolapiset.h" 1 3
/********************************************************************************
* *
* threadpoolapi.h -- ApiSet Contract for api-ms-win-core-threadpool-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 23 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\threadpoolapiset.h" 3
/* APISET_NAME: api-ms-win-core-threadpool-l1 */
/* APISET_TAG: public */
# 42 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\threadpoolapiset.h" 3
extern "C" {
//
// Thread pool API's
//
typedef
void
(__stdcall *PTP_WIN32_IO_CALLBACK)(
PTP_CALLBACK_INSTANCE Instance,
PVOID Context,
PVOID Overlapped,
ULONG IoResult,
ULONG_PTR NumberOfBytesTransferred,
PTP_IO Io
);
__declspec(dllimport)
PTP_POOL
__stdcall
CreateThreadpool(
PVOID reserved
);
__declspec(dllimport)
void
__stdcall
SetThreadpoolThreadMaximum(
PTP_POOL ptpp,
DWORD cthrdMost
);
__declspec(dllimport)
BOOL
__stdcall
SetThreadpoolThreadMinimum(
PTP_POOL ptpp,
DWORD cthrdMic
);
__declspec(dllimport)
BOOL
__stdcall
SetThreadpoolStackInformation(
PTP_POOL ptpp,
PTP_POOL_STACK_INFORMATION ptpsi
);
__declspec(dllimport)
BOOL
__stdcall
QueryThreadpoolStackInformation(
PTP_POOL ptpp,
PTP_POOL_STACK_INFORMATION ptpsi
);
__declspec(dllimport)
void
__stdcall
CloseThreadpool(
PTP_POOL ptpp
);
__declspec(dllimport)
PTP_CLEANUP_GROUP
__stdcall
CreateThreadpoolCleanupGroup(
void
);
__declspec(dllimport)
void
__stdcall
CloseThreadpoolCleanupGroupMembers(
PTP_CLEANUP_GROUP ptpcg,
BOOL fCancelPendingCallbacks,
PVOID pvCleanupContext
);
__declspec(dllimport)
void
__stdcall
CloseThreadpoolCleanupGroup(
PTP_CLEANUP_GROUP ptpcg
);
__declspec(dllimport)
void
__stdcall
SetEventWhenCallbackReturns(
PTP_CALLBACK_INSTANCE pci,
HANDLE evt
);
__declspec(dllimport)
void
__stdcall
ReleaseSemaphoreWhenCallbackReturns(
PTP_CALLBACK_INSTANCE pci,
HANDLE sem,
DWORD crel
);
__declspec(dllimport)
void
__stdcall
ReleaseMutexWhenCallbackReturns(
PTP_CALLBACK_INSTANCE pci,
HANDLE mut
);
__declspec(dllimport)
void
__stdcall
LeaveCriticalSectionWhenCallbackReturns(
PTP_CALLBACK_INSTANCE pci,
PCRITICAL_SECTION pcs
);
__declspec(dllimport)
void
__stdcall
FreeLibraryWhenCallbackReturns(
PTP_CALLBACK_INSTANCE pci,
HMODULE mod
);
__declspec(dllimport)
BOOL
__stdcall
CallbackMayRunLong(
PTP_CALLBACK_INSTANCE pci
);
__declspec(dllimport)
void
__stdcall
DisassociateCurrentThreadFromCallback(
PTP_CALLBACK_INSTANCE pci
);
__declspec(dllimport)
BOOL
__stdcall
TrySubmitThreadpoolCallback(
PTP_SIMPLE_CALLBACK pfns,
PVOID pv,
PTP_CALLBACK_ENVIRON pcbe
);
__declspec(dllimport)
PTP_WORK
__stdcall
CreateThreadpoolWork(
PTP_WORK_CALLBACK pfnwk,
PVOID pv,
PTP_CALLBACK_ENVIRON pcbe
);
__declspec(dllimport)
void
__stdcall
SubmitThreadpoolWork(
PTP_WORK pwk
);
__declspec(dllimport)
void
__stdcall
WaitForThreadpoolWorkCallbacks(
PTP_WORK pwk,
BOOL fCancelPendingCallbacks
);
__declspec(dllimport)
void
__stdcall
CloseThreadpoolWork(
PTP_WORK pwk
);
__declspec(dllimport)
PTP_TIMER
__stdcall
CreateThreadpoolTimer(
PTP_TIMER_CALLBACK pfnti,
PVOID pv,
PTP_CALLBACK_ENVIRON pcbe
);
__declspec(dllimport)
void
__stdcall
SetThreadpoolTimer(
PTP_TIMER pti,
PFILETIME pftDueTime,
DWORD msPeriod,
DWORD msWindowLength
);
__declspec(dllimport)
BOOL
__stdcall
IsThreadpoolTimerSet(
PTP_TIMER pti
);
__declspec(dllimport)
void
__stdcall
WaitForThreadpoolTimerCallbacks(
PTP_TIMER pti,
BOOL fCancelPendingCallbacks
);
__declspec(dllimport)
void
__stdcall
CloseThreadpoolTimer(
PTP_TIMER pti
);
__declspec(dllimport)
PTP_WAIT
__stdcall
CreateThreadpoolWait(
PTP_WAIT_CALLBACK pfnwa,
PVOID pv,
PTP_CALLBACK_ENVIRON pcbe
);
__declspec(dllimport)
void
__stdcall
SetThreadpoolWait(
PTP_WAIT pwa,
HANDLE h,
PFILETIME pftTimeout
);
__declspec(dllimport)
void
__stdcall
WaitForThreadpoolWaitCallbacks(
PTP_WAIT pwa,
BOOL fCancelPendingCallbacks
);
__declspec(dllimport)
void
__stdcall
CloseThreadpoolWait(
PTP_WAIT pwa
);
__declspec(dllimport)
PTP_IO
__stdcall
CreateThreadpoolIo(
HANDLE fl,
PTP_WIN32_IO_CALLBACK pfnio,
PVOID pv,
PTP_CALLBACK_ENVIRON pcbe
);
__declspec(dllimport)
void
__stdcall
StartThreadpoolIo(
PTP_IO pio
);
__declspec(dllimport)
void
__stdcall
CancelThreadpoolIo(
PTP_IO pio
);
__declspec(dllimport)
void
__stdcall
WaitForThreadpoolIoCallbacks(
PTP_IO pio,
BOOL fCancelPendingCallbacks
);
__declspec(dllimport)
void
__stdcall
CloseThreadpoolIo(
PTP_IO pio
);
__declspec(dllimport)
BOOL
__stdcall
SetThreadpoolTimerEx(
PTP_TIMER pti,
PFILETIME pftDueTime,
DWORD msPeriod,
DWORD msWindowLength
);
__declspec(dllimport)
BOOL
__stdcall
SetThreadpoolWaitEx(
PTP_WAIT pwa,
HANDLE h,
PFILETIME pftTimeout,
PVOID Reserved
);
# 432 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\threadpoolapiset.h" 3
}
# 57 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\jobapi.h" 1 3
/********************************************************************************
* *
* jobapiset.h -- ApiSet Contract for api-ms-win-core-job-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 22 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\jobapi.h" 3
/* APISET_NAME: api-ms-win-core-job-l1 */
/* APISET_TAG: public */
# 39 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\jobapi.h" 3
extern "C" {
# 49 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\jobapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
IsProcessInJob(
HANDLE ProcessHandle,
HANDLE JobHandle,
PBOOL Result
);
# 65 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\jobapi.h" 3
}
# 58 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\jobapi2.h" 1 3
/********************************************************************************
* *
* jobapiset2.h -- ApiSet Contract for api-ms-win-core-job-l2 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 18 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\jobapi2.h" 3
/* APISET_NAME: api-ms-win-core-job-l2 */
/* APISET_TAG: public */
# 37 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\jobapi2.h" 3
extern "C" {
typedef struct JOBOBJECT_IO_RATE_CONTROL_INFORMATION {
LONG64 MaxIops;
LONG64 MaxBandwidth;
LONG64 ReservationIops;
PCWSTR VolumeName;
ULONG BaseIoSize;
ULONG ControlFlags;
} JOBOBJECT_IO_RATE_CONTROL_INFORMATION;
__declspec(dllimport)
HANDLE
__stdcall
CreateJobObjectW(
LPSECURITY_ATTRIBUTES lpJobAttributes,
LPCWSTR lpName
);
__declspec(dllimport)
void
__stdcall
FreeMemoryJobObject(
void * Buffer
);
__declspec(dllimport)
HANDLE
__stdcall
OpenJobObjectW(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCWSTR lpName
);
__declspec(dllimport)
BOOL
__stdcall
AssignProcessToJobObject(
HANDLE hJob,
HANDLE hProcess
);
__declspec(dllimport)
BOOL
__stdcall
TerminateJobObject(
HANDLE hJob,
UINT uExitCode
);
__declspec(dllimport)
BOOL
__stdcall
SetInformationJobObject(
HANDLE hJob,
JOBOBJECTINFOCLASS JobObjectInformationClass,
LPVOID lpJobObjectInformation,
DWORD cbJobObjectInformationLength
);
__declspec(dllimport)
DWORD
__stdcall
SetIoRateControlInformationJobObject(
HANDLE hJob,
JOBOBJECT_IO_RATE_CONTROL_INFORMATION * IoRateControlInfo
);
__declspec(dllimport)
BOOL
__stdcall
QueryInformationJobObject(
HANDLE hJob,
JOBOBJECTINFOCLASS JobObjectInformationClass,
LPVOID lpJobObjectInformation,
DWORD cbJobObjectInformationLength,
LPDWORD lpReturnLength
);
__declspec(dllimport)
DWORD
__stdcall
QueryIoRateControlInformationJobObject(
HANDLE hJob,
PCWSTR VolumeName,
JOBOBJECT_IO_RATE_CONTROL_INFORMATION ** InfoBlocks,
ULONG * InfoBlockCount
);
# 159 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\jobapi2.h" 3
}
# 59 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\wow64apiset.h" 1 3
/********************************************************************************
* *
* wow64app.h - ApiSet Contract for api-ms-win-core-wow64-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 22 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\wow64apiset.h" 3
/* APISET_NAME: api-ms-win-core-wow64-l1 */
/* APISET_TAG: public */
# 41 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\wow64apiset.h" 3
extern "C" {
// RC warns because "WINBASE_DECLARE_GET_SYSTEM_WOW64_DIRECTORY" is a bit long.
__declspec(dllimport)
BOOL
__stdcall
Wow64DisableWow64FsRedirection(
PVOID * OldValue
);
__declspec(dllimport)
BOOL
__stdcall
Wow64RevertWow64FsRedirection(
PVOID OlValue
);
# 75 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\wow64apiset.h" 3
__declspec(dllimport)
BOOL
__stdcall
IsWow64Process(
HANDLE hProcess,
PBOOL Wow64Process
);
// RC warns because "WINBASE_DECLARE_GET_SYSTEM_WOW64_DIRECTORY" is a bit long.
__declspec(dllimport)
UINT
__stdcall
GetSystemWow64DirectoryA(
LPSTR lpBuffer,
UINT uSize
);
__declspec(dllimport)
UINT
__stdcall
GetSystemWow64DirectoryW(
LPWSTR lpBuffer,
UINT uSize
);
__declspec(dllimport)
UINT
__stdcall
GetSystemWow64Directory2A(
LPSTR lpBuffer,
UINT uSize,
WORD ImageFileMachineType
);
__declspec(dllimport)
UINT
__stdcall
GetSystemWow64Directory2W(
LPWSTR lpBuffer,
UINT uSize,
WORD ImageFileMachineType
);
# 154 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\wow64apiset.h" 3
__declspec(dllimport)
USHORT
__stdcall
Wow64SetThreadDefaultGuestMachine(
USHORT Machine
);
__declspec(dllimport)
BOOL
__stdcall
IsWow64Process2(
HANDLE hProcess,
USHORT * pProcessMachine,
USHORT * pNativeMachine
);
# 180 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\wow64apiset.h" 3
}
# 60 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 1 3
// begin_1_0
// begin_1_1
/********************************************************************************
* *
* libloaderapi.h -- ApiSet Contract for api-ms-win-core-libraryloader-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 25 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
/* APISET_NAME: api-ms-win-core-libraryloader-l1 */
/* APISET_TAG: public */
# 50 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
extern "C" {
# 69 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
typedef struct tagENUMUILANG {
ULONG NumOfEnumUILang; // Acutall number of enumerated languages
ULONG SizeOfEnumUIBuffer; // Buffer size of pMUIEnumUILanguages
LANGID *pEnumUIBuffer;
} ENUMUILANG, *PENUMUILANG;
typedef BOOL (__stdcall* ENUMRESLANGPROCA)(
HMODULE hModule,
LPCSTR lpType,
LPCSTR lpName,
WORD wLanguage,
LONG_PTR lParam);
typedef BOOL (__stdcall* ENUMRESLANGPROCW)(
HMODULE hModule,
LPCWSTR lpType,
LPCWSTR lpName,
WORD wLanguage,
LONG_PTR lParam);
typedef BOOL (__stdcall* ENUMRESNAMEPROCA)(
HMODULE hModule,
LPCSTR lpType,
LPSTR lpName,
LONG_PTR lParam);
typedef BOOL (__stdcall* ENUMRESNAMEPROCW)(
HMODULE hModule,
LPCWSTR lpType,
LPWSTR lpName,
LONG_PTR lParam);
typedef BOOL (__stdcall* ENUMRESTYPEPROCA)(
HMODULE hModule,
LPSTR lpType,
LONG_PTR lParam
);
typedef BOOL (__stdcall* ENUMRESTYPEPROCW)(
HMODULE hModule,
LPWSTR lpType,
LONG_PTR lParam
);
# 156 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
// end_1_0
// end_1_1
// begin_1_0
__declspec(dllimport)
BOOL
__stdcall
DisableThreadLibraryCalls(
HMODULE hLibModule
);
# 179 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
__declspec(dllimport)
HRSRC
__stdcall
FindResourceExW(
HMODULE hModule,
LPCWSTR lpType,
LPCWSTR lpName,
WORD wLanguage
);
# 205 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
__declspec(dllimport)
int
__stdcall
FindStringOrdinal(
DWORD dwFindStringOrdinalFlags,
LPCWSTR lpStringSource,
int cchSource,
LPCWSTR lpStringValue,
int cchValue,
BOOL bIgnoreCase
);
__declspec(dllimport)
BOOL
__stdcall
FreeLibrary(
HMODULE hLibModule
);
__declspec(dllimport)
__declspec(noreturn)
void
__stdcall
FreeLibraryAndExitThread(
HMODULE hLibModule,
DWORD dwExitCode
);
# 245 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
FreeResource(
HGLOBAL hResData
);
# 260 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetModuleFileNameA(
HMODULE hModule,
LPSTR lpFilename,
DWORD nSize
);
__declspec(dllimport)
DWORD
__stdcall
GetModuleFileNameW(
HMODULE hModule,
LPWSTR lpFilename,
DWORD nSize
);
# 295 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
__declspec(dllimport)
HMODULE
__stdcall
GetModuleHandleA(
LPCSTR lpModuleName
);
__declspec(dllimport)
HMODULE
__stdcall
GetModuleHandleW(
LPCWSTR lpModuleName
);
# 326 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
typedef
BOOL
(__stdcall*
PGET_MODULE_HANDLE_EXA)(
DWORD dwFlags,
LPCSTR lpModuleName,
HMODULE* phModule
);
typedef
BOOL
(__stdcall*
PGET_MODULE_HANDLE_EXW)(
DWORD dwFlags,
LPCWSTR lpModuleName,
HMODULE* phModule
);
__declspec(dllimport)
BOOL
__stdcall
GetModuleHandleExA(
DWORD dwFlags,
LPCSTR lpModuleName,
HMODULE * phModule
);
__declspec(dllimport)
BOOL
__stdcall
GetModuleHandleExW(
DWORD dwFlags,
LPCWSTR lpModuleName,
HMODULE * phModule
);
# 381 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
__declspec(dllimport)
FARPROC
__stdcall
GetProcAddress(
HMODULE hModule,
LPCSTR lpProcName
);
# 397 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
__declspec(dllimport)
HMODULE
__stdcall
LoadLibraryExA(
LPCSTR lpLibFileName,
HANDLE hFile,
DWORD dwFlags
);
__declspec(dllimport)
HMODULE
__stdcall
LoadLibraryExW(
LPCWSTR lpLibFileName,
HANDLE hFile,
DWORD dwFlags
);
# 425 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
// reserved for internal LOAD_PACKAGED_LIBRARY: 0x00000004
# 462 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
__declspec(dllimport)
HGLOBAL
__stdcall
LoadResource(
HMODULE hModule,
HRSRC hResInfo
);
// end_1_0
__declspec(dllimport)
int
__stdcall
LoadStringA(
HINSTANCE hInstance,
UINT uID,
LPSTR lpBuffer,
int cchBufferMax
);
__declspec(dllimport)
int
__stdcall
LoadStringW(
HINSTANCE hInstance,
UINT uID,
LPWSTR lpBuffer,
int cchBufferMax
);
# 510 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
// begin_1_0
__declspec(dllimport)
LPVOID
__stdcall
LockResource(
HGLOBAL hResData
);
__declspec(dllimport)
DWORD
__stdcall
SizeofResource(
HMODULE hModule,
HRSRC hResInfo
);
// end_1_0
typedef PVOID DLL_DIRECTORY_COOKIE, *PDLL_DIRECTORY_COOKIE;
__declspec(dllimport)
DLL_DIRECTORY_COOKIE
__stdcall
AddDllDirectory(
PCWSTR NewDirectory
);
__declspec(dllimport)
BOOL
__stdcall
RemoveDllDirectory(
DLL_DIRECTORY_COOKIE Cookie
);
__declspec(dllimport)
BOOL
__stdcall
SetDefaultDllDirectories(
DWORD DirectoryFlags
);
// begin_1_1
# 583 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
EnumResourceLanguagesExA(
HMODULE hModule,
LPCSTR lpType,
LPCSTR lpName,
ENUMRESLANGPROCA lpEnumFunc,
LONG_PTR lParam,
DWORD dwFlags,
LANGID LangId
);
__declspec(dllimport)
BOOL
__stdcall
EnumResourceLanguagesExW(
HMODULE hModule,
LPCWSTR lpType,
LPCWSTR lpName,
ENUMRESLANGPROCW lpEnumFunc,
LONG_PTR lParam,
DWORD dwFlags,
LANGID LangId
);
__declspec(dllimport)
BOOL
__stdcall
EnumResourceNamesExA(
HMODULE hModule,
LPCSTR lpType,
ENUMRESNAMEPROCA lpEnumFunc,
LONG_PTR lParam,
DWORD dwFlags,
LANGID LangId
);
__declspec(dllimport)
BOOL
__stdcall
EnumResourceNamesExW(
HMODULE hModule,
LPCWSTR lpType,
ENUMRESNAMEPROCW lpEnumFunc,
LONG_PTR lParam,
DWORD dwFlags,
LANGID LangId
);
__declspec(dllimport)
BOOL
__stdcall
EnumResourceTypesExA(
HMODULE hModule,
ENUMRESTYPEPROCA lpEnumFunc,
LONG_PTR lParam,
DWORD dwFlags,
LANGID LangId
);
__declspec(dllimport)
BOOL
__stdcall
EnumResourceTypesExW(
HMODULE hModule,
ENUMRESTYPEPROCW lpEnumFunc,
LONG_PTR lParam,
DWORD dwFlags,
LANGID LangId
);
# 680 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
// end_1_1
# 689 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
__declspec(dllimport)
HRSRC
__stdcall
FindResourceW(
HMODULE hModule,
LPCWSTR lpName,
LPCWSTR lpType
);
__declspec(dllimport)
HMODULE
__stdcall
LoadLibraryA(
LPCSTR lpLibFileName
);
__declspec(dllimport)
HMODULE
__stdcall
LoadLibraryW(
LPCWSTR lpLibFileName
);
# 738 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
EnumResourceNamesW(
HMODULE hModule,
LPCWSTR lpType,
ENUMRESNAMEPROCW lpEnumFunc,
LONG_PTR lParam
);
# 758 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\libloaderapi.h" 3
// begin_1_0
// begin_1_1
}
# 61 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 1 3
// begin_1_0
/********************************************************************************
* *
* securitybaseapi.h -- ApiSet Contract for api-ms-win-security-base-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 24 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
/* APISET_NAME: api-ms-win-security-base-l1 */
/* APISET_TAG: public */
# 47 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
extern "C" {
// end_1_0
// begin_1_0
//
//
// Security APIs
//
__declspec(dllimport)
BOOL
__stdcall
AccessCheck(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
HANDLE ClientToken,
DWORD DesiredAccess,
PGENERIC_MAPPING GenericMapping,
PPRIVILEGE_SET PrivilegeSet,
LPDWORD PrivilegeSetLength,
LPDWORD GrantedAccess,
LPBOOL AccessStatus
);
__declspec(dllimport)
BOOL
__stdcall
AccessCheckAndAuditAlarmW(
LPCWSTR SubsystemName,
LPVOID HandleId,
LPWSTR ObjectTypeName,
LPWSTR ObjectName,
PSECURITY_DESCRIPTOR SecurityDescriptor,
DWORD DesiredAccess,
PGENERIC_MAPPING GenericMapping,
BOOL ObjectCreation,
LPDWORD GrantedAccess,
LPBOOL AccessStatus,
LPBOOL pfGenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
AccessCheckByType(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSID PrincipalSelfSid,
HANDLE ClientToken,
DWORD DesiredAccess,
POBJECT_TYPE_LIST ObjectTypeList,
DWORD ObjectTypeListLength,
PGENERIC_MAPPING GenericMapping,
PPRIVILEGE_SET PrivilegeSet,
LPDWORD PrivilegeSetLength,
LPDWORD GrantedAccess,
LPBOOL AccessStatus
);
__declspec(dllimport)
BOOL
__stdcall
AccessCheckByTypeResultList(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSID PrincipalSelfSid,
HANDLE ClientToken,
DWORD DesiredAccess,
POBJECT_TYPE_LIST ObjectTypeList,
DWORD ObjectTypeListLength,
PGENERIC_MAPPING GenericMapping,
PPRIVILEGE_SET PrivilegeSet,
LPDWORD PrivilegeSetLength,
LPDWORD GrantedAccessList,
LPDWORD AccessStatusList
);
__declspec(dllimport)
BOOL
__stdcall
AccessCheckByTypeAndAuditAlarmW(
LPCWSTR SubsystemName,
LPVOID HandleId,
LPCWSTR ObjectTypeName,
LPCWSTR ObjectName,
PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID PrincipalSelfSid,
DWORD DesiredAccess,
AUDIT_EVENT_TYPE AuditType,
DWORD Flags,
POBJECT_TYPE_LIST ObjectTypeList,
DWORD ObjectTypeListLength,
PGENERIC_MAPPING GenericMapping,
BOOL ObjectCreation,
LPDWORD GrantedAccess,
LPBOOL AccessStatus,
LPBOOL pfGenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
AccessCheckByTypeResultListAndAuditAlarmW(
LPCWSTR SubsystemName,
LPVOID HandleId,
LPCWSTR ObjectTypeName,
LPCWSTR ObjectName,
PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID PrincipalSelfSid,
DWORD DesiredAccess,
AUDIT_EVENT_TYPE AuditType,
DWORD Flags,
POBJECT_TYPE_LIST ObjectTypeList,
DWORD ObjectTypeListLength,
PGENERIC_MAPPING GenericMapping,
BOOL ObjectCreation,
LPDWORD GrantedAccessList,
LPDWORD AccessStatusList,
LPBOOL pfGenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
AccessCheckByTypeResultListAndAuditAlarmByHandleW(
LPCWSTR SubsystemName,
LPVOID HandleId,
HANDLE ClientToken,
LPCWSTR ObjectTypeName,
LPCWSTR ObjectName,
PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID PrincipalSelfSid,
DWORD DesiredAccess,
AUDIT_EVENT_TYPE AuditType,
DWORD Flags,
POBJECT_TYPE_LIST ObjectTypeList,
DWORD ObjectTypeListLength,
PGENERIC_MAPPING GenericMapping,
BOOL ObjectCreation,
LPDWORD GrantedAccessList,
LPDWORD AccessStatusList,
LPBOOL pfGenerateOnClose
);
# 225 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
AddAccessAllowedAce(
PACL pAcl,
DWORD dwAceRevision,
DWORD AccessMask,
PSID pSid
);
__declspec(dllimport)
BOOL
__stdcall
AddAccessAllowedAceEx(
PACL pAcl,
DWORD dwAceRevision,
DWORD AceFlags,
DWORD AccessMask,
PSID pSid
);
# 255 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
AddAccessAllowedObjectAce(
PACL pAcl,
DWORD dwAceRevision,
DWORD AceFlags,
DWORD AccessMask,
GUID * ObjectTypeGuid,
GUID * InheritedObjectTypeGuid,
PSID pSid
);
__declspec(dllimport)
BOOL
__stdcall
AddAccessDeniedAce(
PACL pAcl,
DWORD dwAceRevision,
DWORD AccessMask,
PSID pSid
);
__declspec(dllimport)
BOOL
__stdcall
AddAccessDeniedAceEx(
PACL pAcl,
DWORD dwAceRevision,
DWORD AceFlags,
DWORD AccessMask,
PSID pSid
);
__declspec(dllimport)
BOOL
__stdcall
AddAccessDeniedObjectAce(
PACL pAcl,
DWORD dwAceRevision,
DWORD AceFlags,
DWORD AccessMask,
GUID * ObjectTypeGuid,
GUID * InheritedObjectTypeGuid,
PSID pSid
);
# 313 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
AddAce(
PACL pAcl,
DWORD dwAceRevision,
DWORD dwStartingAceIndex,
LPVOID pAceList,
DWORD nAceListLength
);
# 332 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
AddAuditAccessAce(
PACL pAcl,
DWORD dwAceRevision,
DWORD dwAccessMask,
PSID pSid,
BOOL bAuditSuccess,
BOOL bAuditFailure
);
__declspec(dllimport)
BOOL
__stdcall
AddAuditAccessAceEx(
PACL pAcl,
DWORD dwAceRevision,
DWORD AceFlags,
DWORD dwAccessMask,
PSID pSid,
BOOL bAuditSuccess,
BOOL bAuditFailure
);
__declspec(dllimport)
BOOL
__stdcall
AddAuditAccessObjectAce(
PACL pAcl,
DWORD dwAceRevision,
DWORD AceFlags,
DWORD AccessMask,
GUID * ObjectTypeGuid,
GUID * InheritedObjectTypeGuid,
PSID pSid,
BOOL bAuditSuccess,
BOOL bAuditFailure
);
# 385 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
AddMandatoryAce(
PACL pAcl,
DWORD dwAceRevision,
DWORD AceFlags,
DWORD MandatoryPolicy,
PSID pLabelSid
);
// end_1_0
# 411 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
AddResourceAttributeAce(
PACL pAcl,
DWORD dwAceRevision,
DWORD AceFlags,
DWORD AccessMask,
PSID pSid,
PCLAIM_SECURITY_ATTRIBUTES_INFORMATION pAttributeInfo,
PDWORD pReturnLength
);
__declspec(dllimport)
BOOL
__stdcall
AddScopedPolicyIDAce(
PACL pAcl,
DWORD dwAceRevision,
DWORD AceFlags,
DWORD AccessMask,
PSID pSid
);
// begin_1_0
__declspec(dllimport)
BOOL
__stdcall
AdjustTokenGroups(
HANDLE TokenHandle,
BOOL ResetToDefault,
PTOKEN_GROUPS NewState,
DWORD BufferLength,
PTOKEN_GROUPS PreviousState,
PDWORD ReturnLength
);
__declspec(dllimport)
BOOL
__stdcall
AdjustTokenPrivileges(
HANDLE TokenHandle,
BOOL DisableAllPrivileges,
PTOKEN_PRIVILEGES NewState,
DWORD BufferLength,
PTOKEN_PRIVILEGES PreviousState,
PDWORD ReturnLength
);
__declspec(dllimport)
BOOL
__stdcall
AllocateAndInitializeSid(
PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
BYTE nSubAuthorityCount,
DWORD nSubAuthority0,
DWORD nSubAuthority1,
DWORD nSubAuthority2,
DWORD nSubAuthority3,
DWORD nSubAuthority4,
DWORD nSubAuthority5,
DWORD nSubAuthority6,
DWORD nSubAuthority7,
PSID * pSid
);
__declspec(dllimport)
BOOL
__stdcall
AllocateLocallyUniqueId(
PLUID Luid
);
# 507 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
AreAllAccessesGranted(
DWORD GrantedAccess,
DWORD DesiredAccess
);
__declspec(dllimport)
BOOL
__stdcall
AreAnyAccessesGranted(
DWORD GrantedAccess,
DWORD DesiredAccess
);
# 532 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
CheckTokenMembership(
HANDLE TokenHandle,
PSID SidToCheck,
PBOOL IsMember
);
// end_1_0
# 554 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
CheckTokenCapability(
HANDLE TokenHandle,
PSID CapabilitySidToCheck,
PBOOL HasCapability
);
__declspec(dllimport)
BOOL
__stdcall
GetAppContainerAce(
PACL Acl,
DWORD StartingAceIndex,
PVOID * AppContainerAce,
DWORD * AppContainerAceIndex
);
# 582 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
CheckTokenMembershipEx(
HANDLE TokenHandle,
PSID SidToCheck,
DWORD Flags,
PBOOL IsMember
);
// begin_1_0
__declspec(dllimport)
BOOL
__stdcall
ConvertToAutoInheritPrivateObjectSecurity(
PSECURITY_DESCRIPTOR ParentDescriptor,
PSECURITY_DESCRIPTOR CurrentSecurityDescriptor,
PSECURITY_DESCRIPTOR * NewSecurityDescriptor,
GUID * ObjectType,
BOOLEAN IsDirectoryObject,
PGENERIC_MAPPING GenericMapping
);
# 624 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
CopySid(
DWORD nDestinationSidLength,
PSID pDestinationSid,
PSID pSourceSid
);
# 641 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
CreatePrivateObjectSecurity(
PSECURITY_DESCRIPTOR ParentDescriptor,
PSECURITY_DESCRIPTOR CreatorDescriptor,
PSECURITY_DESCRIPTOR * NewDescriptor,
BOOL IsDirectoryObject,
HANDLE Token,
PGENERIC_MAPPING GenericMapping
);
__declspec(dllimport)
BOOL
__stdcall
CreatePrivateObjectSecurityEx(
PSECURITY_DESCRIPTOR ParentDescriptor,
PSECURITY_DESCRIPTOR CreatorDescriptor,
PSECURITY_DESCRIPTOR * NewDescriptor,
GUID * ObjectType,
BOOL IsContainerObject,
ULONG AutoInheritFlags,
HANDLE Token,
PGENERIC_MAPPING GenericMapping
);
__declspec(dllimport)
BOOL
__stdcall
CreatePrivateObjectSecurityWithMultipleInheritance(
PSECURITY_DESCRIPTOR ParentDescriptor,
PSECURITY_DESCRIPTOR CreatorDescriptor,
PSECURITY_DESCRIPTOR * NewDescriptor,
GUID ** ObjectTypes,
ULONG GuidCount,
BOOL IsContainerObject,
ULONG AutoInheritFlags,
HANDLE Token,
PGENERIC_MAPPING GenericMapping
);
__declspec(dllimport)
BOOL
__stdcall
CreateRestrictedToken(
HANDLE ExistingTokenHandle,
DWORD Flags,
DWORD DisableSidCount,
PSID_AND_ATTRIBUTES SidsToDisable,
DWORD DeletePrivilegeCount,
PLUID_AND_ATTRIBUTES PrivilegesToDelete,
DWORD RestrictedSidCount,
PSID_AND_ATTRIBUTES SidsToRestrict,
PHANDLE NewTokenHandle
);
# 711 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
CreateWellKnownSid(
WELL_KNOWN_SID_TYPE WellKnownSidType,
PSID DomainSid,
PSID pSid,
DWORD * cbSid
);
__declspec(dllimport)
BOOL
__stdcall
EqualDomainSid(
PSID pSid1,
PSID pSid2,
BOOL * pfEqual
);
__declspec(dllimport)
BOOL
__stdcall
DeleteAce(
PACL pAcl,
DWORD dwAceIndex
);
# 752 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
DestroyPrivateObjectSecurity(
PSECURITY_DESCRIPTOR * ObjectDescriptor
);
# 767 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
DuplicateToken(
HANDLE ExistingTokenHandle,
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
PHANDLE DuplicateTokenHandle
);
__declspec(dllimport)
BOOL
__stdcall
DuplicateTokenEx(
HANDLE hExistingToken,
DWORD dwDesiredAccess,
LPSECURITY_ATTRIBUTES lpTokenAttributes,
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
TOKEN_TYPE TokenType,
PHANDLE phNewToken
);
# 797 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
EqualPrefixSid(
PSID pSid1,
PSID pSid2
);
__declspec(dllimport)
BOOL
__stdcall
EqualSid(
PSID pSid1,
PSID pSid2
);
__declspec(dllimport)
BOOL
__stdcall
FindFirstFreeAce(
PACL pAcl,
LPVOID * pAce
);
# 831 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
PVOID
__stdcall
FreeSid(
PSID pSid
);
__declspec(dllimport)
BOOL
__stdcall
GetAce(
PACL pAcl,
DWORD dwAceIndex,
LPVOID * pAce
);
__declspec(dllimport)
BOOL
__stdcall
GetAclInformation(
PACL pAcl,
LPVOID pAclInformation,
DWORD nAclInformationLength,
ACL_INFORMATION_CLASS dwAclInformationClass
);
# 867 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetFileSecurityW(
LPCWSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength,
LPDWORD lpnLengthNeeded
);
# 890 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetKernelObjectSecurity(
HANDLE Handle,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength,
LPDWORD lpnLengthNeeded
);
__declspec(dllimport)
DWORD
__stdcall
GetLengthSid(
PSID pSid
);
# 919 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetPrivateObjectSecurity(
PSECURITY_DESCRIPTOR ObjectDescriptor,
SECURITY_INFORMATION SecurityInformation,
PSECURITY_DESCRIPTOR ResultantDescriptor,
DWORD DescriptorLength,
PDWORD ReturnLength
);
# 939 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetSecurityDescriptorControl(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSECURITY_DESCRIPTOR_CONTROL pControl,
LPDWORD lpdwRevision
);
__declspec(dllimport)
BOOL
__stdcall
GetSecurityDescriptorDacl(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
LPBOOL lpbDaclPresent,
PACL * pDacl,
LPBOOL lpbDaclDefaulted
);
__declspec(dllimport)
BOOL
__stdcall
GetSecurityDescriptorGroup(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSID * pGroup,
LPBOOL lpbGroupDefaulted
);
__declspec(dllimport)
DWORD
__stdcall
GetSecurityDescriptorLength(
PSECURITY_DESCRIPTOR pSecurityDescriptor
);
__declspec(dllimport)
BOOL
__stdcall
GetSecurityDescriptorOwner(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSID * pOwner,
LPBOOL lpbOwnerDefaulted
);
__declspec(dllimport)
DWORD
__stdcall
GetSecurityDescriptorRMControl(
PSECURITY_DESCRIPTOR SecurityDescriptor,
PUCHAR RMControl
);
__declspec(dllimport)
BOOL
__stdcall
GetSecurityDescriptorSacl(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
LPBOOL lpbSaclPresent,
PACL * pSacl,
LPBOOL lpbSaclDefaulted
);
__declspec(dllimport)
PSID_IDENTIFIER_AUTHORITY
__stdcall
GetSidIdentifierAuthority(
PSID pSid
);
__declspec(dllimport)
DWORD
__stdcall
GetSidLengthRequired(
UCHAR nSubAuthorityCount
);
__declspec(dllimport)
PDWORD
__stdcall
GetSidSubAuthority(
PSID pSid,
DWORD nSubAuthority
);
__declspec(dllimport)
PUCHAR
__stdcall
GetSidSubAuthorityCount(
PSID pSid
);
__declspec(dllimport)
BOOL
__stdcall
GetTokenInformation(
HANDLE TokenHandle,
TOKEN_INFORMATION_CLASS TokenInformationClass,
LPVOID TokenInformation,
DWORD TokenInformationLength,
PDWORD ReturnLength
);
__declspec(dllimport)
BOOL
__stdcall
GetWindowsAccountDomainSid(
PSID pSid,
PSID pDomainSid,
DWORD * cbDomainSid
);
# 1076 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
ImpersonateAnonymousToken(
HANDLE ThreadHandle
);
__declspec(dllimport)
BOOL
__stdcall
ImpersonateLoggedOnUser(
HANDLE hToken
);
__declspec(dllimport)
BOOL
__stdcall
ImpersonateSelf(
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
);
# 1109 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
InitializeAcl(
PACL pAcl,
DWORD nAclLength,
DWORD dwAclRevision
);
__declspec(dllimport)
BOOL
__stdcall
InitializeSecurityDescriptor(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD dwRevision
);
__declspec(dllimport)
BOOL
__stdcall
InitializeSid(
PSID Sid,
PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
BYTE nSubAuthorityCount
);
# 1145 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
IsTokenRestricted(
HANDLE TokenHandle
);
# 1160 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
IsValidAcl(
PACL pAcl
);
__declspec(dllimport)
BOOL
__stdcall
IsValidSecurityDescriptor(
PSECURITY_DESCRIPTOR pSecurityDescriptor
);
__declspec(dllimport)
BOOL
__stdcall
IsValidSid(
PSID pSid
);
__declspec(dllimport)
BOOL
__stdcall
IsWellKnownSid(
PSID pSid,
WELL_KNOWN_SID_TYPE WellKnownSidType
);
__declspec(dllimport)
BOOL
__stdcall
MakeAbsoluteSD(
PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
LPDWORD lpdwAbsoluteSecurityDescriptorSize,
PACL pDacl,
LPDWORD lpdwDaclSize,
PACL pSacl,
LPDWORD lpdwSaclSize,
PSID pOwner,
LPDWORD lpdwOwnerSize,
PSID pPrimaryGroup,
LPDWORD lpdwPrimaryGroupSize
);
__declspec(dllimport)
BOOL
__stdcall
MakeSelfRelativeSD(
PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
LPDWORD lpdwBufferLength
);
# 1235 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
void
__stdcall
MapGenericMask(
PDWORD AccessMask,
PGENERIC_MAPPING GenericMapping
);
__declspec(dllimport)
BOOL
__stdcall
ObjectCloseAuditAlarmW(
LPCWSTR SubsystemName,
LPVOID HandleId,
BOOL GenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
ObjectDeleteAuditAlarmW(
LPCWSTR SubsystemName,
LPVOID HandleId,
BOOL GenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
ObjectOpenAuditAlarmW(
LPCWSTR SubsystemName,
LPVOID HandleId,
LPWSTR ObjectTypeName,
LPWSTR ObjectName,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
HANDLE ClientToken,
DWORD DesiredAccess,
DWORD GrantedAccess,
PPRIVILEGE_SET Privileges,
BOOL ObjectCreation,
BOOL AccessGranted,
LPBOOL GenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
ObjectPrivilegeAuditAlarmW(
LPCWSTR SubsystemName,
LPVOID HandleId,
HANDLE ClientToken,
DWORD DesiredAccess,
PPRIVILEGE_SET Privileges,
BOOL AccessGranted
);
__declspec(dllimport)
BOOL
__stdcall
PrivilegeCheck(
HANDLE ClientToken,
PPRIVILEGE_SET RequiredPrivileges,
LPBOOL pfResult
);
__declspec(dllimport)
BOOL
__stdcall
PrivilegedServiceAuditAlarmW(
LPCWSTR SubsystemName,
LPCWSTR ServiceName,
HANDLE ClientToken,
PPRIVILEGE_SET Privileges,
BOOL AccessGranted
);
# 1341 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
void
__stdcall
QuerySecurityAccessMask(
SECURITY_INFORMATION SecurityInformation,
LPDWORD DesiredAccess
);
__declspec(dllimport)
BOOL
__stdcall
RevertToSelf(
void
);
__declspec(dllimport)
BOOL
__stdcall
SetAclInformation(
PACL pAcl,
LPVOID pAclInformation,
DWORD nAclInformationLength,
ACL_INFORMATION_CLASS dwAclInformationClass
);
__declspec(dllimport)
BOOL
__stdcall
SetFileSecurityW(
LPCWSTR lpFileName,
SECURITY_INFORMATION SecurityInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor
);
# 1391 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetKernelObjectSecurity(
HANDLE Handle,
SECURITY_INFORMATION SecurityInformation,
PSECURITY_DESCRIPTOR SecurityDescriptor
);
# 1408 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetPrivateObjectSecurity(
SECURITY_INFORMATION SecurityInformation,
PSECURITY_DESCRIPTOR ModificationDescriptor,
PSECURITY_DESCRIPTOR * ObjectsSecurityDescriptor,
PGENERIC_MAPPING GenericMapping,
HANDLE Token
);
__declspec(dllimport)
BOOL
__stdcall
SetPrivateObjectSecurityEx(
SECURITY_INFORMATION SecurityInformation,
PSECURITY_DESCRIPTOR ModificationDescriptor,
PSECURITY_DESCRIPTOR * ObjectsSecurityDescriptor,
ULONG AutoInheritFlags,
PGENERIC_MAPPING GenericMapping,
HANDLE Token
);
__declspec(dllimport)
void
__stdcall
SetSecurityAccessMask(
SECURITY_INFORMATION SecurityInformation,
LPDWORD DesiredAccess
);
# 1454 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetSecurityDescriptorControl(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,
SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet
);
__declspec(dllimport)
BOOL
__stdcall
SetSecurityDescriptorDacl(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
BOOL bDaclPresent,
PACL pDacl,
BOOL bDaclDefaulted
);
__declspec(dllimport)
BOOL
__stdcall
SetSecurityDescriptorGroup(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSID pGroup,
BOOL bGroupDefaulted
);
__declspec(dllimport)
BOOL
__stdcall
SetSecurityDescriptorOwner(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSID pOwner,
BOOL bOwnerDefaulted
);
__declspec(dllimport)
DWORD
__stdcall
SetSecurityDescriptorRMControl(
PSECURITY_DESCRIPTOR SecurityDescriptor,
PUCHAR RMControl
);
__declspec(dllimport)
BOOL
__stdcall
SetSecurityDescriptorSacl(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
BOOL bSaclPresent,
PACL pSacl,
BOOL bSaclDefaulted
);
__declspec(dllimport)
BOOL
__stdcall
SetTokenInformation(
HANDLE TokenHandle,
TOKEN_INFORMATION_CLASS TokenInformationClass,
LPVOID TokenInformation,
DWORD TokenInformationLength
);
// end_1_0
# 1538 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetCachedSigningLevel(
PHANDLE SourceFiles,
ULONG SourceFileCount,
ULONG Flags,
HANDLE TargetFile
);
__declspec(dllimport)
BOOL
__stdcall
GetCachedSigningLevel(
HANDLE File,
PULONG Flags,
PULONG SigningLevel,
PUCHAR Thumbprint,
PULONG ThumbprintSize,
PULONG ThumbprintAlgorithm
);
# 1574 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
LONG
__stdcall
CveEventWrite(
PCWSTR CveId,
PCWSTR AdditionalDetails
);
# 1595 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securitybaseapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
DeriveCapabilitySidsFromName(
LPCWSTR CapName,
PSID ** CapabilityGroupSids,
DWORD * CapabilityGroupSidCount,
PSID ** CapabilitySids,
DWORD * CapabilitySidCount
);
// begin_1_0
}
// end_1_0
# 62 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namespaceapi.h" 1 3
/********************************************************************************
* *
* consoleapi.h -- ApiSet Contract for api-ms-win-core-namespace-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 22 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namespaceapi.h" 3
/* APISET_NAME: api-ms-win-core-namespace-l1 */
/* APISET_TAG: public */
# 39 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namespaceapi.h" 3
extern "C" {
# 48 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\namespaceapi.h" 3
__declspec(dllimport)
HANDLE
__stdcall
CreatePrivateNamespaceW(
LPSECURITY_ATTRIBUTES lpPrivateNamespaceAttributes,
LPVOID lpBoundaryDescriptor,
LPCWSTR lpAliasPrefix
);
__declspec(dllimport)
HANDLE
__stdcall
OpenPrivateNamespaceW(
LPVOID lpBoundaryDescriptor,
LPCWSTR lpAliasPrefix
);
__declspec(dllimport)
BOOLEAN
__stdcall
ClosePrivateNamespace(
HANDLE Handle,
ULONG Flags
);
__declspec(dllimport)
HANDLE
__stdcall
CreateBoundaryDescriptorW(
LPCWSTR Name,
ULONG Flags
);
__declspec(dllimport)
BOOL
__stdcall
AddSIDToBoundaryDescriptor(
HANDLE * BoundaryDescriptor,
PSID RequiredSid
);
__declspec(dllimport)
void
__stdcall
DeleteBoundaryDescriptor(
HANDLE BoundaryDescriptor
);
}
# 63 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\systemtopologyapi.h" 1 3
/********************************************************************************
* *
* consoleapi.h -- ApiSet Contract for api-ms-win-core-systemtopology-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 22 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\systemtopologyapi.h" 3
/* APISET_NAME: api-ms-win-core-systemtopology-l1 */
/* APISET_TAG: public */
# 41 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\systemtopologyapi.h" 3
extern "C" {
__declspec(dllimport)
BOOL
__stdcall
GetNumaHighestNodeNumber(
PULONG HighestNodeNumber
);
__declspec(dllimport)
BOOL
__stdcall
GetNumaNodeProcessorMaskEx(
USHORT Node,
PGROUP_AFFINITY ProcessorMask
);
# 76 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\systemtopologyapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetNumaProximityNodeEx(
ULONG ProximityId,
PUSHORT NodeNumber
);
# 93 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\systemtopologyapi.h" 3
}
# 64 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processtopologyapi.h" 1 3
/********************************************************************************
* *
* processtopologyapi.h -- ApiSet Contract for api-ms-win-core-processtopology-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 22 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processtopologyapi.h" 3
/* APISET_NAME: api-ms-win-core-processtopology-l1 */
/* APISET_TAG: public */
# 41 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processtopologyapi.h" 3
extern "C" {
# 51 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processtopologyapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetProcessGroupAffinity(
HANDLE hProcess,
PUSHORT GroupCount,
PUSHORT GroupArray
);
# 74 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processtopologyapi.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetThreadGroupAffinity(
HANDLE hThread,
PGROUP_AFFINITY GroupAffinity
);
__declspec(dllimport)
BOOL
__stdcall
SetThreadGroupAffinity(
HANDLE hThread,
const GROUP_AFFINITY * GroupAffinity,
PGROUP_AFFINITY PreviousGroupAffinity
);
# 99 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\processtopologyapi.h" 3
}
# 65 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securityappcontainer.h" 1 3
/********************************************************************************
* *
* securityappcontainer.h -- ApiSet Contract for api-ms-win-security-appcontainer-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 24 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securityappcontainer.h" 3
/* APISET_NAME: api-ms-win-security-appcontainer-l1 */
/* APISET_TAG: public */
# 45 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\securityappcontainer.h" 3
extern "C" {
//
// Token Extension APIs
//
BOOL
__stdcall
GetAppContainerNamedObjectPath(
HANDLE Token,
PSID AppContainerSid,
ULONG ObjectPathLength,
LPWSTR ObjectPath,
PULONG ReturnLength
);
}
# 66 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\realtimeapiset.h" 1 3
/********************************************************************************
* *
* realtimeapi.h -- ApiSet Contract for api-ms-win-core-realtime-l1 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
********************************************************************************/
# 21 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\realtimeapiset.h" 3
/* APISET_NAME: api-ms-win-core-realtime-l1 */
/* APISET_TAG: public */
# 43 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\realtimeapiset.h" 3
extern "C" {
# 53 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\realtimeapiset.h" 3
__declspec(dllimport)
BOOL
__stdcall
QueryThreadCycleTime(
HANDLE ThreadHandle,
PULONG64 CycleTime
);
__declspec(dllimport)
BOOL
__stdcall
QueryProcessCycleTime(
HANDLE ProcessHandle,
PULONG64 CycleTime
);
__declspec(dllimport)
BOOL
__stdcall
QueryIdleProcessorCycleTime(
PULONG BufferLength,
PULONG64 ProcessorIdleCycleTime
);
__declspec(dllimport)
BOOL
__stdcall
QueryIdleProcessorCycleTimeEx(
USHORT Group,
PULONG BufferLength,
PULONG64 ProcessorIdleCycleTime
);
# 107 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\realtimeapiset.h" 3
__declspec(dllimport)
void
__stdcall
QueryInterruptTimePrecise(
PULONGLONG lpInterruptTimePrecise
);
__declspec(dllimport)
void
__stdcall
QueryUnbiasedInterruptTimePrecise(
PULONGLONG lpUnbiasedInterruptTimePrecise
);
__declspec(dllimport)
void
__stdcall
QueryInterruptTime(
PULONGLONG lpInterruptTime
);
__declspec(dllimport)
BOOL
__stdcall
QueryUnbiasedInterruptTime(
PULONGLONG UnbiasedTime
);
__declspec(dllimport)
HRESULT
__stdcall
QueryAuxiliaryCounterFrequency(
PULONGLONG lpAuxiliaryCounterFrequency
);
__declspec(dllimport)
HRESULT
__stdcall
ConvertAuxiliaryCounterToPerformanceCounter(
ULONGLONG ullAuxiliaryCounterValue,
PULONGLONG lpPerformanceCounterValue,
PULONGLONG lpConversionError
);
__declspec(dllimport)
HRESULT
__stdcall
ConvertPerformanceCounterToAuxiliaryCounter(
ULONGLONG ullPerformanceCounterValue,
PULONGLONG lpAuxiliaryCounterValue,
PULONGLONG lpConversionError
);
# 183 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\realtimeapiset.h" 3
}
# 67 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 2 3
extern "C" {
/*
* Compatibility macros
*/
# 117 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// File creation flags must start at the high end since they
// are combined with the attributes
//
//
// These are flags supported through CreateFile (W7) and CreateFile2 (W8 and beyond)
//
# 141 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// These are flags supported only through CreateFile2 (W8 and beyond)
//
// Due to the multiplexing of file creation flags, file attribute flags and
// security QoS flags into a single DWORD (dwFlagsAndAttributes) parameter for
// CreateFile, there is no way to add any more flags to CreateFile. Additional
// flags for the create operation must be added to CreateFile2 only
//
# 157 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Define possible return codes from the CopyFileEx callback routine
//
//
// Define CopyFileEx callback routine state change values
//
//
// Define CopyFileEx option flags
//
//
// Gap for private copyfile flags
//
# 194 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// CopyFile2 flags
//
# 216 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Define ReplaceFile option flags
//
# 229 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Define the NamedPipe definitions
//
//
// Define the dwOpenMode values for CreateNamedPipe
//
//
// Define the Named Pipe End flags for GetNamedPipeInfo
//
//
// Define the dwPipeMode values for CreateNamedPipe
//
# 262 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Define the well known values for CreateNamedPipe nMaxInstances
//
//
// Define the Security Quality of Service bits to be passed
// into CreateFile
//
# 285 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Fiber structures
//
typedef void (__stdcall *PFIBER_START_ROUTINE)(
LPVOID lpFiberParameter
);
typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
typedef LPVOID (__stdcall *PFIBER_CALLOUT_ROUTINE)(
LPVOID lpParameter
);
//
// FailFast Exception Flags
//
typedef LPVOID LPLDT_ENTRY;
//
// Serial provider type.
//
//
// Provider SubTypes
//
# 337 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Provider capabilities flags.
//
# 352 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Comm provider settable parameters.
//
# 364 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Settable baud rates in the provider.
//
# 389 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Settable Data Bits
//
# 400 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Settable Stop and Parity bits.
//
# 413 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
typedef struct _COMMPROP {
WORD wPacketLength;
WORD wPacketVersion;
DWORD dwServiceMask;
DWORD dwReserved1;
DWORD dwMaxTxQueue;
DWORD dwMaxRxQueue;
DWORD dwMaxBaud;
DWORD dwProvSubType;
DWORD dwProvCapabilities;
DWORD dwSettableParams;
DWORD dwSettableBaud;
WORD wSettableData;
WORD wSettableStopParity;
DWORD dwCurrentTxQueue;
DWORD dwCurrentRxQueue;
DWORD dwProvSpec1;
DWORD dwProvSpec2;
WCHAR wcProvChar[1];
} COMMPROP,*LPCOMMPROP;
//
// Set dwProvSpec1 to COMMPROP_INITIALIZED to indicate that wPacketLength
// is valid before a call to GetCommProperties().
//
typedef struct _COMSTAT {
DWORD fCtsHold : 1;
DWORD fDsrHold : 1;
DWORD fRlsdHold : 1;
DWORD fXoffHold : 1;
DWORD fXoffSent : 1;
DWORD fEof : 1;
DWORD fTxim : 1;
DWORD fReserved : 25;
DWORD cbInQue;
DWORD cbOutQue;
} COMSTAT, *LPCOMSTAT;
//
// DTR Control Flow Values.
//
//
// RTS Control Flow Values
//
typedef struct _DCB {
DWORD DCBlength; /* sizeof(DCB) */
DWORD BaudRate; /* Baudrate at which running */
DWORD fBinary: 1; /* Binary Mode (skip EOF check) */
DWORD fParity: 1; /* Enable parity checking */
DWORD fOutxCtsFlow:1; /* CTS handshaking on output */
DWORD fOutxDsrFlow:1; /* DSR handshaking on output */
DWORD fDtrControl:2; /* DTR Flow control */
DWORD fDsrSensitivity:1; /* DSR Sensitivity */
DWORD fTXContinueOnXoff: 1; /* Continue TX when Xoff sent */
DWORD fOutX: 1; /* Enable output X-ON/X-OFF */
DWORD fInX: 1; /* Enable input X-ON/X-OFF */
DWORD fErrorChar: 1; /* Enable Err Replacement */
DWORD fNull: 1; /* Enable Null stripping */
DWORD fRtsControl:2; /* Rts Flow control */
DWORD fAbortOnError:1; /* Abort all reads and writes on Error */
DWORD fDummy2:17; /* Reserved */
WORD wReserved; /* Not currently used */
WORD XonLim; /* Transmit X-ON threshold */
WORD XoffLim; /* Transmit X-OFF threshold */
BYTE ByteSize; /* Number of bits/byte, 4-8 */
BYTE Parity; /* 0-4=None,Odd,Even,Mark,Space */
BYTE StopBits; /* 0,1,2 = 1, 1.5, 2 */
char XonChar; /* Tx and Rx X-ON character */
char XoffChar; /* Tx and Rx X-OFF character */
char ErrorChar; /* Error replacement char */
char EofChar; /* End of Input character */
char EvtChar; /* Received Event character */
WORD wReserved1; /* Fill for now. */
} DCB, *LPDCB;
typedef struct _COMMTIMEOUTS {
DWORD ReadIntervalTimeout; /* Maximum time between read chars. */
DWORD ReadTotalTimeoutMultiplier; /* Multiplier of characters. */
DWORD ReadTotalTimeoutConstant; /* Constant in milliseconds. */
DWORD WriteTotalTimeoutMultiplier; /* Multiplier of characters. */
DWORD WriteTotalTimeoutConstant; /* Constant in milliseconds. */
} COMMTIMEOUTS,*LPCOMMTIMEOUTS;
typedef struct _COMMCONFIG {
DWORD dwSize; /* Size of the entire struct */
WORD wVersion; /* version of the structure */
WORD wReserved; /* alignment */
DCB dcb; /* device control block */
DWORD dwProviderSubType; /* ordinal value for identifying
provider-defined data structure format*/
DWORD dwProviderOffset; /* Specifies the offset of provider specific
data field in bytes from the start */
DWORD dwProviderSize; /* size of the provider-specific data field */
WCHAR wcProviderData[1]; /* provider-specific data */
} COMMCONFIG,*LPCOMMCONFIG;
//
//
/* Global Memory Flags */
# 551 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
/* Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE) */
typedef struct _MEMORYSTATUS {
DWORD dwLength;
DWORD dwMemoryLoad;
SIZE_T dwTotalPhys;
SIZE_T dwAvailPhys;
SIZE_T dwTotalPageFile;
SIZE_T dwAvailPageFile;
SIZE_T dwTotalVirtual;
SIZE_T dwAvailVirtual;
} MEMORYSTATUS, *LPMEMORYSTATUS;
//
// Process dwCreationFlag values
//
# 608 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Thread dwCreationFlag values
//
//#define CREATE_SUSPENDED 0x00000004
//
// Priority flags
//
# 633 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// GetFinalPathNameByHandle
//
# 645 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// JIT Debugging Info. This structure is defined to have constant size in
// both the emulated and native environment.
//
typedef struct _JIT_DEBUG_INFO {
DWORD dwSize;
DWORD dwProcessorArchitecture;
DWORD dwThreadID;
DWORD dwReserved0;
ULONG64 lpExceptionAddress;
ULONG64 lpExceptionRecord;
ULONG64 lpContextRecord;
} JIT_DEBUG_INFO, *LPJIT_DEBUG_INFO;
typedef JIT_DEBUG_INFO JIT_DEBUG_INFO32, *LPJIT_DEBUG_INFO32;
typedef JIT_DEBUG_INFO JIT_DEBUG_INFO64, *LPJIT_DEBUG_INFO64;
typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;
# 708 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Baud rates at which the communication device operates
//
# 728 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Error Flags
//
# 753 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Events
//
# 771 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Escape Functions
//
# 785 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// PURGE function flags.
//
//
// Modem Status Flags
//
//
// WaitSoundState() Constants
//
//
// Accent Modes
//
//
// SetSoundNoise() Sources
//
# 879 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
typedef struct _OFSTRUCT {
BYTE cBytes;
BYTE fFixedDisk;
WORD nErrCode;
WORD Reserved1;
WORD Reserved2;
CHAR szPathName[128];
} OFSTRUCT, *LPOFSTRUCT, *POFSTRUCT;
# 899 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
int
__stdcall
WinMain (
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nShowCmd
);
int
__stdcall
wWinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPWSTR lpCmdLine,
int nShowCmd
);
__declspec(dllimport)
__declspec(allocator)
HGLOBAL
__stdcall
GlobalAlloc(
UINT uFlags,
SIZE_T dwBytes
);
__declspec(dllimport)
__declspec(allocator)
HGLOBAL
__stdcall
GlobalReAlloc (
HGLOBAL hMem,
SIZE_T dwBytes,
UINT uFlags
);
__declspec(dllimport)
SIZE_T
__stdcall
GlobalSize (
HGLOBAL hMem
);
__declspec(dllimport)
BOOL
__stdcall
GlobalUnlock(
HGLOBAL hMem
);
__declspec(dllimport)
LPVOID
__stdcall
GlobalLock (
HGLOBAL hMem
);
__declspec(dllimport)
UINT
__stdcall
GlobalFlags (
HGLOBAL hMem
);
__declspec(dllimport)
HGLOBAL
__stdcall
GlobalHandle (
LPCVOID pMem
);
__declspec(dllimport)
HGLOBAL
__stdcall
GlobalFree(
HGLOBAL hMem
);
__declspec(dllimport)
SIZE_T
__stdcall
GlobalCompact(
DWORD dwMinFree
);
__declspec(dllimport)
void
__stdcall
GlobalFix(
HGLOBAL hMem
);
__declspec(dllimport)
void
__stdcall
GlobalUnfix(
HGLOBAL hMem
);
__declspec(dllimport)
LPVOID
__stdcall
GlobalWire(
HGLOBAL hMem
);
__declspec(dllimport)
BOOL
__stdcall
GlobalUnWire(
HGLOBAL hMem
);
__declspec(dllimport)
void
__stdcall
GlobalMemoryStatus(
LPMEMORYSTATUS lpBuffer
);
__declspec(dllimport)
__declspec(allocator)
HLOCAL
__stdcall
LocalAlloc(
UINT uFlags,
SIZE_T uBytes
);
__declspec(dllimport)
__declspec(allocator)
HLOCAL
__stdcall
LocalReAlloc(
HLOCAL hMem,
SIZE_T uBytes,
UINT uFlags
);
__declspec(dllimport)
LPVOID
__stdcall
LocalLock(
HLOCAL hMem
);
__declspec(dllimport)
HLOCAL
__stdcall
LocalHandle(
LPCVOID pMem
);
__declspec(dllimport)
BOOL
__stdcall
LocalUnlock(
HLOCAL hMem
);
__declspec(dllimport)
SIZE_T
__stdcall
LocalSize(
HLOCAL hMem
);
__declspec(dllimport)
UINT
__stdcall
LocalFlags(
HLOCAL hMem
);
__declspec(dllimport)
HLOCAL
__stdcall
LocalFree(
HLOCAL hMem
);
__declspec(dllimport)
SIZE_T
__stdcall
LocalShrink(
HLOCAL hMem,
UINT cbNewSize
);
__declspec(dllimport)
SIZE_T
__stdcall
LocalCompact(
UINT uMinFree
);
// GetBinaryType return values.
# 1217 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetBinaryTypeA(
LPCSTR lpApplicationName,
LPDWORD lpBinaryType
);
__declspec(dllimport)
BOOL
__stdcall
GetBinaryTypeW(
LPCWSTR lpApplicationName,
LPDWORD lpBinaryType
);
__declspec(dllimport)
DWORD
__stdcall
GetShortPathNameA(
LPCSTR lpszLongPath,
LPSTR lpszShortPath,
DWORD cchBuffer
);
__declspec(dllimport)
DWORD
__stdcall
GetLongPathNameTransactedA(
LPCSTR lpszShortPath,
LPSTR lpszLongPath,
DWORD cchBuffer,
HANDLE hTransaction
);
__declspec(dllimport)
DWORD
__stdcall
GetLongPathNameTransactedW(
LPCWSTR lpszShortPath,
LPWSTR lpszLongPath,
DWORD cchBuffer,
HANDLE hTransaction
);
# 1280 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetProcessAffinityMask(
HANDLE hProcess,
PDWORD_PTR lpProcessAffinityMask,
PDWORD_PTR lpSystemAffinityMask
);
__declspec(dllimport)
BOOL
__stdcall
SetProcessAffinityMask(
HANDLE hProcess,
DWORD_PTR dwProcessAffinityMask
);
__declspec(dllimport)
BOOL
__stdcall
GetProcessIoCounters(
HANDLE hProcess,
PIO_COUNTERS lpIoCounters
);
__declspec(dllimport)
BOOL
__stdcall
GetProcessWorkingSetSize(
HANDLE hProcess,
PSIZE_T lpMinimumWorkingSetSize,
PSIZE_T lpMaximumWorkingSetSize
);
__declspec(dllimport)
BOOL
__stdcall
SetProcessWorkingSetSize(
HANDLE hProcess,
SIZE_T dwMinimumWorkingSetSize,
SIZE_T dwMaximumWorkingSetSize
);
__declspec(dllimport)
void
__stdcall
FatalExit(
int ExitCode
);
__declspec(dllimport)
BOOL
__stdcall
SetEnvironmentStringsA(
LPCH NewEnvironment
);
# 1352 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Fiber begin
//
__declspec(dllimport)
void
__stdcall
SwitchToFiber(
LPVOID lpFiber
);
__declspec(dllimport)
void
__stdcall
DeleteFiber(
LPVOID lpFiber
);
__declspec(dllimport)
BOOL
__stdcall
ConvertFiberToThread(
void
);
__declspec(dllimport)
LPVOID
__stdcall
CreateFiberEx(
SIZE_T dwStackCommitSize,
SIZE_T dwStackReserveSize,
DWORD dwFlags,
LPFIBER_START_ROUTINE lpStartAddress,
LPVOID lpParameter
);
__declspec(dllimport)
LPVOID
__stdcall
ConvertThreadToFiberEx(
LPVOID lpParameter,
DWORD dwFlags
);
__declspec(dllimport)
LPVOID
__stdcall
CreateFiber(
SIZE_T dwStackSize,
LPFIBER_START_ROUTINE lpStartAddress,
LPVOID lpParameter
);
__declspec(dllimport)
LPVOID
__stdcall
ConvertThreadToFiber(
LPVOID lpParameter
);
//
// Fiber end
//
//
// UMS begin
//
# 1449 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
typedef void *PUMS_CONTEXT;
typedef void *PUMS_COMPLETION_LIST;
typedef enum _RTL_UMS_THREAD_INFO_CLASS UMS_THREAD_INFO_CLASS, *PUMS_THREAD_INFO_CLASS;
typedef enum _RTL_UMS_SCHEDULER_REASON UMS_SCHEDULER_REASON;
typedef PRTL_UMS_SCHEDULER_ENTRY_POINT PUMS_SCHEDULER_ENTRY_POINT;
typedef struct _UMS_SCHEDULER_STARTUP_INFO {
//
// UMS Version the application was built to. Should be set to UMS_VERSION
//
ULONG UmsVersion;
//
// Completion List to associate the new User Scheduler to.
//
PUMS_COMPLETION_LIST CompletionList;
//
// A pointer to the application-defined function that represents the starting
// address of the Sheduler.
//
PUMS_SCHEDULER_ENTRY_POINT SchedulerProc;
//
// pointer to a variable to be passed to the scheduler uppon first activation.
//
PVOID SchedulerParam;
} UMS_SCHEDULER_STARTUP_INFO, *PUMS_SCHEDULER_STARTUP_INFO;
typedef struct _UMS_SYSTEM_THREAD_INFORMATION {
ULONG UmsVersion;
union {
struct {
ULONG IsUmsSchedulerThread : 1;
ULONG IsUmsWorkerThread : 1;
} ;
ULONG ThreadUmsFlags;
} ;
} UMS_SYSTEM_THREAD_INFORMATION, *PUMS_SYSTEM_THREAD_INFORMATION;
__declspec(dllimport)
BOOL
__stdcall
CreateUmsCompletionList(
PUMS_COMPLETION_LIST* UmsCompletionList
);
__declspec(dllimport)
BOOL
__stdcall
DequeueUmsCompletionListItems(
PUMS_COMPLETION_LIST UmsCompletionList,
DWORD WaitTimeOut,
PUMS_CONTEXT* UmsThreadList
);
__declspec(dllimport)
BOOL
__stdcall
GetUmsCompletionListEvent(
PUMS_COMPLETION_LIST UmsCompletionList,
PHANDLE UmsCompletionEvent
);
__declspec(dllimport)
BOOL
__stdcall
ExecuteUmsThread(
PUMS_CONTEXT UmsThread
);
__declspec(dllimport)
BOOL
__stdcall
UmsThreadYield(
PVOID SchedulerParam
);
__declspec(dllimport)
BOOL
__stdcall
DeleteUmsCompletionList(
PUMS_COMPLETION_LIST UmsCompletionList
);
__declspec(dllimport)
PUMS_CONTEXT
__stdcall
GetCurrentUmsThread(
void
);
__declspec(dllimport)
PUMS_CONTEXT
__stdcall
GetNextUmsListItem(
PUMS_CONTEXT UmsContext
);
__declspec(dllimport)
BOOL
__stdcall
QueryUmsThreadInformation(
PUMS_CONTEXT UmsThread,
UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
PVOID UmsThreadInformation,
ULONG UmsThreadInformationLength,
PULONG ReturnLength
);
__declspec(dllimport)
BOOL
__stdcall
SetUmsThreadInformation(
PUMS_CONTEXT UmsThread,
UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
PVOID UmsThreadInformation,
ULONG UmsThreadInformationLength
);
__declspec(dllimport)
BOOL
__stdcall
DeleteUmsThreadContext(
PUMS_CONTEXT UmsThread
);
__declspec(dllimport)
BOOL
__stdcall
CreateUmsThreadContext(
PUMS_CONTEXT *lpUmsThread
);
__declspec(dllimport)
BOOL
__stdcall
EnterUmsSchedulingMode(
PUMS_SCHEDULER_STARTUP_INFO SchedulerStartupInfo
);
__declspec(dllimport)
BOOL
__stdcall
GetUmsSystemThreadInformation(
HANDLE ThreadHandle,
PUMS_SYSTEM_THREAD_INFORMATION SystemThreadInfo
);
//
// UMS end
//
__declspec(dllimport)
DWORD_PTR
__stdcall
SetThreadAffinityMask(
HANDLE hThread,
DWORD_PTR dwThreadAffinityMask
);
# 1637 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetProcessDEPPolicy(
DWORD dwFlags
);
__declspec(dllimport)
BOOL
__stdcall
GetProcessDEPPolicy(
HANDLE hProcess,
LPDWORD lpFlags,
PBOOL lpPermanent
);
__declspec(dllimport)
BOOL
__stdcall
RequestWakeupLatency(
LATENCY_TIME latency
);
__declspec(dllimport)
BOOL
__stdcall
IsSystemResumeAutomatic(
void
);
__declspec(dllimport)
BOOL
__stdcall
GetThreadSelectorEntry(
HANDLE hThread,
DWORD dwSelector,
LPLDT_ENTRY lpSelectorEntry
);
__declspec(dllimport)
EXECUTION_STATE
__stdcall
SetThreadExecutionState(
EXECUTION_STATE esFlags
);
//
// Power Request APIs
//
typedef REASON_CONTEXT POWER_REQUEST_CONTEXT, *PPOWER_REQUEST_CONTEXT, *LPPOWER_REQUEST_CONTEXT;
__declspec(dllimport)
HANDLE
__stdcall
PowerCreateRequest (
PREASON_CONTEXT Context
);
__declspec(dllimport)
BOOL
__stdcall
PowerSetRequest (
HANDLE PowerRequest,
POWER_REQUEST_TYPE RequestType
);
__declspec(dllimport)
BOOL
__stdcall
PowerClearRequest (
HANDLE PowerRequest,
POWER_REQUEST_TYPE RequestType
);
# 1735 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//#if _WIN32_WINNT >= 0x0501 || defined(WINBASE_DECLARE_RESTORE_LAST_ERROR)
# 1757 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// The following flags allows an application to change
// the semantics of IO completion notification.
//
//
// Don't queue an entry to an associated completion port if returning success
// synchronously.
//
//
// Don't set the file handle event on IO completion.
//
__declspec(dllimport)
BOOL
__stdcall
SetFileCompletionNotificationModes(
HANDLE FileHandle,
UCHAR Flags
);
# 1792 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
Wow64GetThreadContext(
HANDLE hThread,
PWOW64_CONTEXT lpContext
);
__declspec(dllimport)
BOOL
__stdcall
Wow64SetThreadContext(
HANDLE hThread,
const WOW64_CONTEXT *lpContext
);
__declspec(dllimport)
BOOL
__stdcall
Wow64GetThreadSelectorEntry(
HANDLE hThread,
DWORD dwSelector,
PWOW64_LDT_ENTRY lpSelectorEntry
);
__declspec(dllimport)
DWORD
__stdcall
Wow64SuspendThread(
HANDLE hThread
);
__declspec(dllimport)
BOOL
__stdcall
DebugSetProcessKillOnExit(
BOOL KillOnExit
);
__declspec(dllimport)
BOOL
__stdcall
DebugBreakProcess (
HANDLE Process
);
# 1866 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
PulseEvent(
HANDLE hEvent
);
__declspec(dllimport)
ATOM
__stdcall
GlobalDeleteAtom(
ATOM nAtom
);
__declspec(dllimport)
BOOL
__stdcall
InitAtomTable(
DWORD nSize
);
__declspec(dllimport)
ATOM
__stdcall
DeleteAtom(
ATOM nAtom
);
__declspec(dllimport)
UINT
__stdcall
SetHandleCount(
UINT uNumber
);
__declspec(dllimport)
BOOL
__stdcall
RequestDeviceWakeup(
HANDLE hDevice
);
__declspec(dllimport)
BOOL
__stdcall
CancelDeviceWakeupRequest(
HANDLE hDevice
);
__declspec(dllimport)
BOOL
__stdcall
GetDevicePowerState(
HANDLE hDevice,
BOOL *pfOn
);
__declspec(dllimport)
BOOL
__stdcall
SetMessageWaitingIndicator(
HANDLE hMsgIndicator,
ULONG ulMsgCount
);
__declspec(dllimport)
BOOL
__stdcall
SetFileShortNameA(
HANDLE hFile,
LPCSTR lpShortName
);
__declspec(dllimport)
BOOL
__stdcall
SetFileShortNameW(
HANDLE hFile,
LPCWSTR lpShortName
);
# 1957 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
DWORD
__stdcall
LoadModule(
LPCSTR lpModuleName,
LPVOID lpParameterBlock
);
__declspec(dllimport)
UINT
__stdcall
WinExec(
LPCSTR lpCmdLine,
UINT uCmdShow
);
# 1982 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
ClearCommBreak(
HANDLE hFile
);
__declspec(dllimport)
BOOL
__stdcall
ClearCommError(
HANDLE hFile,
LPDWORD lpErrors,
LPCOMSTAT lpStat
);
__declspec(dllimport)
BOOL
__stdcall
SetupComm(
HANDLE hFile,
DWORD dwInQueue,
DWORD dwOutQueue
);
__declspec(dllimport)
BOOL
__stdcall
EscapeCommFunction(
HANDLE hFile,
DWORD dwFunc
);
__declspec(dllimport)
BOOL
__stdcall
GetCommConfig(
HANDLE hCommDev,
LPCOMMCONFIG lpCC,
LPDWORD lpdwSize
);
__declspec(dllimport)
BOOL
__stdcall
GetCommMask(
HANDLE hFile,
LPDWORD lpEvtMask
);
__declspec(dllimport)
BOOL
__stdcall
GetCommProperties(
HANDLE hFile,
LPCOMMPROP lpCommProp
);
__declspec(dllimport)
BOOL
__stdcall
GetCommModemStatus(
HANDLE hFile,
LPDWORD lpModemStat
);
__declspec(dllimport)
BOOL
__stdcall
GetCommState(
HANDLE hFile,
LPDCB lpDCB
);
__declspec(dllimport)
BOOL
__stdcall
GetCommTimeouts(
HANDLE hFile,
LPCOMMTIMEOUTS lpCommTimeouts
);
__declspec(dllimport)
BOOL
__stdcall
PurgeComm(
HANDLE hFile,
DWORD dwFlags
);
__declspec(dllimport)
BOOL
__stdcall
SetCommBreak(
HANDLE hFile
);
__declspec(dllimport)
BOOL
__stdcall
SetCommConfig(
HANDLE hCommDev,
LPCOMMCONFIG lpCC,
DWORD dwSize
);
__declspec(dllimport)
BOOL
__stdcall
SetCommMask(
HANDLE hFile,
DWORD dwEvtMask
);
__declspec(dllimport)
BOOL
__stdcall
SetCommState(
HANDLE hFile,
LPDCB lpDCB
);
__declspec(dllimport)
BOOL
__stdcall
SetCommTimeouts(
HANDLE hFile,
LPCOMMTIMEOUTS lpCommTimeouts
);
__declspec(dllimport)
BOOL
__stdcall
TransmitCommChar(
HANDLE hFile,
char cChar
);
__declspec(dllimport)
BOOL
__stdcall
WaitCommEvent(
HANDLE hFile,
LPDWORD lpEvtMask,
LPOVERLAPPED lpOverlapped
);
__declspec(dllimport)
DWORD
__stdcall
SetTapePosition(
HANDLE hDevice,
DWORD dwPositionMethod,
DWORD dwPartition,
DWORD dwOffsetLow,
DWORD dwOffsetHigh,
BOOL bImmediate
);
__declspec(dllimport)
DWORD
__stdcall
GetTapePosition(
HANDLE hDevice,
DWORD dwPositionType,
LPDWORD lpdwPartition,
LPDWORD lpdwOffsetLow,
LPDWORD lpdwOffsetHigh
);
__declspec(dllimport)
DWORD
__stdcall
PrepareTape(
HANDLE hDevice,
DWORD dwOperation,
BOOL bImmediate
);
__declspec(dllimport)
DWORD
__stdcall
EraseTape(
HANDLE hDevice,
DWORD dwEraseType,
BOOL bImmediate
);
__declspec(dllimport)
DWORD
__stdcall
CreateTapePartition(
HANDLE hDevice,
DWORD dwPartitionMethod,
DWORD dwCount,
DWORD dwSize
);
__declspec(dllimport)
DWORD
__stdcall
WriteTapemark(
HANDLE hDevice,
DWORD dwTapemarkType,
DWORD dwTapemarkCount,
BOOL bImmediate
);
__declspec(dllimport)
DWORD
__stdcall
GetTapeStatus(
HANDLE hDevice
);
__declspec(dllimport)
DWORD
__stdcall
GetTapeParameters(
HANDLE hDevice,
DWORD dwOperation,
LPDWORD lpdwSize,
LPVOID lpTapeInformation
);
__declspec(dllimport)
DWORD
__stdcall
SetTapeParameters(
HANDLE hDevice,
DWORD dwOperation,
LPVOID lpTapeInformation
);
# 2235 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
int
__stdcall
MulDiv(
int nNumber,
int nNumerator,
int nDenominator
);
typedef enum _DEP_SYSTEM_POLICY_TYPE {
DEPPolicyAlwaysOff = 0,
DEPPolicyAlwaysOn,
DEPPolicyOptIn,
DEPPolicyOptOut,
DEPTotalPolicyCount
} DEP_SYSTEM_POLICY_TYPE;
__declspec(dllimport)
DEP_SYSTEM_POLICY_TYPE
__stdcall
GetSystemDEPPolicy(
void
);
__declspec(dllimport)
BOOL
__stdcall
GetSystemRegistryQuota(
PDWORD pdwQuotaAllowed,
PDWORD pdwQuotaUsed
);
//
// Routines to convert back and forth between system time and file time
//
__declspec(dllimport)
BOOL
__stdcall
FileTimeToDosDateTime(
const FILETIME *lpFileTime,
LPWORD lpFatDate,
LPWORD lpFatTime
);
__declspec(dllimport)
BOOL
__stdcall
DosDateTimeToFileTime(
WORD wFatDate,
WORD wFatTime,
LPFILETIME lpFileTime
);
//
// FORMAT_MESSAGE_ALLOCATE_BUFFER requires use of HeapFree
//
__declspec(dllimport)
DWORD
__stdcall
FormatMessageA(
DWORD dwFlags,
LPCVOID lpSource,
DWORD dwMessageId,
DWORD dwLanguageId,
LPSTR lpBuffer,
DWORD nSize,
va_list *Arguments
);
__declspec(dllimport)
DWORD
__stdcall
FormatMessageW(
DWORD dwFlags,
LPCVOID lpSource,
DWORD dwMessageId,
DWORD dwLanguageId,
LPWSTR lpBuffer,
DWORD nSize,
va_list *Arguments
);
# 2397 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
HANDLE
__stdcall
CreateMailslotA(
LPCSTR lpName,
DWORD nMaxMessageSize,
DWORD lReadTimeout,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
__declspec(dllimport)
HANDLE
__stdcall
CreateMailslotW(
LPCWSTR lpName,
DWORD nMaxMessageSize,
DWORD lReadTimeout,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
__declspec(dllimport)
BOOL
__stdcall
GetMailslotInfo(
HANDLE hMailslot,
LPDWORD lpMaxMessageSize,
LPDWORD lpNextSize,
LPDWORD lpMessageCount,
LPDWORD lpReadTimeout
);
__declspec(dllimport)
BOOL
__stdcall
SetMailslotInfo(
HANDLE hMailslot,
DWORD lReadTimeout
);
//
// File Encryption API
//
__declspec(dllimport)
BOOL
__stdcall
EncryptFileA(
LPCSTR lpFileName
);
__declspec(dllimport)
BOOL
__stdcall
EncryptFileW(
LPCWSTR lpFileName
);
__declspec(dllimport)
BOOL
__stdcall
DecryptFileA(
LPCSTR lpFileName,
DWORD dwReserved
);
__declspec(dllimport)
BOOL
__stdcall
DecryptFileW(
LPCWSTR lpFileName,
DWORD dwReserved
);
//
// Encryption Status Value
//
# 2497 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
FileEncryptionStatusA(
LPCSTR lpFileName,
LPDWORD lpStatus
);
__declspec(dllimport)
BOOL
__stdcall
FileEncryptionStatusW(
LPCWSTR lpFileName,
LPDWORD lpStatus
);
//
// Currently defined recovery flags
//
typedef
DWORD
(__stdcall *PFE_EXPORT_FUNC)(
PBYTE pbData,
PVOID pvCallbackContext,
ULONG ulLength
);
typedef
DWORD
(__stdcall *PFE_IMPORT_FUNC)(
PBYTE pbData,
PVOID pvCallbackContext,
PULONG ulLength
);
//
// OpenRaw flag values
//
# 2551 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
DWORD
__stdcall
OpenEncryptedFileRawA(
LPCSTR lpFileName,
ULONG ulFlags,
PVOID *pvContext
);
__declspec(dllimport)
DWORD
__stdcall
OpenEncryptedFileRawW(
LPCWSTR lpFileName,
ULONG ulFlags,
PVOID *pvContext
);
__declspec(dllimport)
DWORD
__stdcall
ReadEncryptedFileRaw(
PFE_EXPORT_FUNC pfExportCallback,
PVOID pvCallbackContext,
PVOID pvContext
);
__declspec(dllimport)
DWORD
__stdcall
WriteEncryptedFileRaw(
PFE_IMPORT_FUNC pfImportCallback,
PVOID pvCallbackContext,
PVOID pvContext
);
__declspec(dllimport)
void
__stdcall
CloseEncryptedFileRaw(
PVOID pvContext
);
//
// _l Compat Functions
//
__declspec(dllimport)
int
__stdcall
lstrcmpA(
LPCSTR lpString1,
LPCSTR lpString2
);
__declspec(dllimport)
int
__stdcall
lstrcmpW(
LPCWSTR lpString1,
LPCWSTR lpString2
);
__declspec(dllimport)
int
__stdcall
lstrcmpiA(
LPCSTR lpString1,
LPCSTR lpString2
);
__declspec(dllimport)
int
__stdcall
lstrcmpiW(
LPCWSTR lpString1,
LPCWSTR lpString2
);
#pragma warning(push)
#pragma warning(disable: 4995)
__declspec(dllimport)
LPSTR
__stdcall
lstrcpynA(
LPSTR lpString1,
LPCSTR lpString2,
int iMaxLength
);
__declspec(dllimport)
LPWSTR
__stdcall
lstrcpynW(
LPWSTR lpString1,
LPCWSTR lpString2,
int iMaxLength
);
__declspec(dllimport)
LPSTR
__stdcall
lstrcpyA(
LPSTR lpString1, // deprecated: annotation is as good as it gets
LPCSTR lpString2
);
__declspec(dllimport)
LPWSTR
__stdcall
lstrcpyW(
LPWSTR lpString1, // deprecated: annotation is as good as it gets
LPCWSTR lpString2
);
__declspec(dllimport)
LPSTR
__stdcall
lstrcatA(
LPSTR lpString1, // deprecated: annotation is as good as it gets
LPCSTR lpString2
);
__declspec(dllimport)
LPWSTR
__stdcall
lstrcatW(
LPWSTR lpString1, // deprecated: annotation is as good as it gets
LPCWSTR lpString2
);
#pragma warning(pop)
__declspec(dllimport)
int
__stdcall
lstrlenA(
LPCSTR lpString
);
__declspec(dllimport)
int
__stdcall
lstrlenW(
LPCWSTR lpString
);
# 2751 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
HFILE
__stdcall
OpenFile(
LPCSTR lpFileName,
LPOFSTRUCT lpReOpenBuff,
UINT uStyle
);
__declspec(dllimport)
HFILE
__stdcall
_lopen(
LPCSTR lpPathName,
int iReadWrite
);
__declspec(dllimport)
HFILE
__stdcall
_lcreat(
LPCSTR lpPathName,
int iAttribute
);
__declspec(dllimport)
UINT
__stdcall
_lread(
HFILE hFile,
LPVOID lpBuffer,
UINT uBytes
);
__declspec(dllimport)
UINT
__stdcall
_lwrite(
HFILE hFile,
LPCCH lpBuffer,
UINT uBytes
);
__declspec(dllimport)
long
__stdcall
_hread(
HFILE hFile,
LPVOID lpBuffer,
long lBytes
);
__declspec(dllimport)
long
__stdcall
_hwrite(
HFILE hFile,
LPCCH lpBuffer,
long lBytes
);
__declspec(dllimport)
HFILE
__stdcall
_lclose(
HFILE hFile
);
__declspec(dllimport)
LONG
__stdcall
_llseek(
HFILE hFile,
LONG lOffset,
int iOrigin
);
__declspec(dllimport)
BOOL
__stdcall
IsTextUnicode(
const void* lpv,
int iSize,
LPINT lpiResult
);
# 2844 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
DWORD
__stdcall
SignalObjectAndWait(
HANDLE hObjectToSignal,
HANDLE hObjectToWaitOn,
DWORD dwMilliseconds,
BOOL bAlertable
);
# 2861 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
BackupRead(
HANDLE hFile,
LPBYTE lpBuffer,
DWORD nNumberOfBytesToRead,
LPDWORD lpNumberOfBytesRead,
BOOL bAbort,
BOOL bProcessSecurity,
LPVOID *lpContext
);
__declspec(dllimport)
BOOL
__stdcall
BackupSeek(
HANDLE hFile,
DWORD dwLowBytesToSeek,
DWORD dwHighBytesToSeek,
LPDWORD lpdwLowByteSeeked,
LPDWORD lpdwHighByteSeeked,
LPVOID *lpContext
);
__declspec(dllimport)
BOOL
__stdcall
BackupWrite(
HANDLE hFile,
LPBYTE lpBuffer,
DWORD nNumberOfBytesToWrite,
LPDWORD lpNumberOfBytesWritten,
BOOL bAbort,
BOOL bProcessSecurity,
LPVOID *lpContext
);
//
// Stream id structure
//
typedef struct _WIN32_STREAM_ID {
DWORD dwStreamId ;
DWORD dwStreamAttributes ;
LARGE_INTEGER Size ;
DWORD dwStreamNameSize ;
WCHAR cStreamName[ 1 ] ;
} WIN32_STREAM_ID, *LPWIN32_STREAM_ID ;
//
// Stream Ids
//
# 2927 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Stream Attributes
//
# 2938 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Dual Mode API below this line. Dual Mode Structures also included.
//
# 2966 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
typedef struct _STARTUPINFOEXA {
STARTUPINFOA StartupInfo;
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList;
} STARTUPINFOEXA, *LPSTARTUPINFOEXA;
typedef struct _STARTUPINFOEXW {
STARTUPINFOW StartupInfo;
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList;
} STARTUPINFOEXW, *LPSTARTUPINFOEXW;
typedef STARTUPINFOEXA STARTUPINFOEX;
typedef LPSTARTUPINFOEXA LPSTARTUPINFOEX;
# 2992 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
HANDLE
__stdcall
OpenMutexA(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCSTR lpName
);
__declspec(dllimport)
HANDLE
__stdcall
CreateSemaphoreA(
LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
LONG lInitialCount,
LONG lMaximumCount,
LPCSTR lpName
);
# 3025 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
HANDLE
__stdcall
OpenSemaphoreA(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCSTR lpName
);
# 3046 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
HANDLE
__stdcall
CreateWaitableTimerA(
LPSECURITY_ATTRIBUTES lpTimerAttributes,
BOOL bManualReset,
LPCSTR lpTimerName
);
__declspec(dllimport)
HANDLE
__stdcall
OpenWaitableTimerA(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCSTR lpTimerName
);
__declspec(dllimport)
HANDLE
__stdcall
CreateSemaphoreExA(
LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
LONG lInitialCount,
LONG lMaximumCount,
LPCSTR lpName,
DWORD dwFlags,
DWORD dwDesiredAccess
);
__declspec(dllimport)
HANDLE
__stdcall
CreateWaitableTimerExA(
LPSECURITY_ATTRIBUTES lpTimerAttributes,
LPCSTR lpTimerName,
DWORD dwFlags,
DWORD dwDesiredAccess
);
# 3115 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
HANDLE
__stdcall
CreateFileMappingA(
HANDLE hFile,
LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
DWORD flProtect,
DWORD dwMaximumSizeHigh,
DWORD dwMaximumSizeLow,
LPCSTR lpName
);
__declspec(dllimport)
HANDLE
__stdcall
CreateFileMappingNumaA(
HANDLE hFile,
LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
DWORD flProtect,
DWORD dwMaximumSizeHigh,
DWORD dwMaximumSizeLow,
LPCSTR lpName,
DWORD nndPreferred
);
__declspec(dllimport)
HANDLE
__stdcall
OpenFileMappingA(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCSTR lpName
);
# 3171 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetLogicalDriveStringsA(
DWORD nBufferLength,
LPSTR lpBuffer
);
# 3198 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
HMODULE
__stdcall
LoadPackagedLibrary (
LPCWSTR lpwLibFileName,
DWORD Reserved
);
# 3219 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
QueryFullProcessImageNameA(
HANDLE hProcess,
DWORD dwFlags,
LPSTR lpExeName,
PDWORD lpdwSize
);
__declspec(dllimport)
BOOL
__stdcall
QueryFullProcessImageNameW(
HANDLE hProcess,
DWORD dwFlags,
LPWSTR lpExeName,
PDWORD lpdwSize
);
# 3247 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Extended process and thread attribute support
//
# 3260 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
typedef enum _PROC_THREAD_ATTRIBUTE_NUM {
ProcThreadAttributeParentProcess = 0,
ProcThreadAttributeHandleList = 2,
ProcThreadAttributeGroupAffinity = 3,
ProcThreadAttributePreferredNode = 4,
ProcThreadAttributeIdealProcessor = 5,
ProcThreadAttributeUmsThread = 6,
ProcThreadAttributeMitigationPolicy = 7,
ProcThreadAttributeSecurityCapabilities = 9,
ProcThreadAttributeProtectionLevel = 11,
ProcThreadAttributeJobList = 13,
ProcThreadAttributeChildProcessPolicy = 14,
ProcThreadAttributeAllApplicationPackagesPolicy = 15,
ProcThreadAttributeWin32kFilter = 16,
ProcThreadAttributeSafeOpenPromptOriginClaim = 17,
ProcThreadAttributeDesktopAppPolicy = 18,
} PROC_THREAD_ATTRIBUTE_NUM;
# 3329 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Define legacy creation mitigation policy options, which are straight
// bitmasks. Bits 0-5 are legacy bits.
//
# 3341 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Define mandatory ASLR options. Mandatory ASLR forcibly rebases images that
// are not dynamic base compatible by acting as though there were an image base
// collision at load time.
//
// Note that 'require relocations' mode refuses load of images that do not have
// a base relocation section.
//
//
// Define heap terminate on corruption options. Note that 'always off' does
// not override the default opt-in for binaries with current subsystem versions
// set in the image header.
//
// Heap terminate on corruption is user mode enforced.
//
//
// Define bottom up randomization (includes stack randomization) options,
// i.e. randomization of the lowest user address.
//
//
// Define high entropy bottom up randomization. Note that high entropy bottom
// up randomization is effective if and only if bottom up ASLR is also enabled.
//
// N.B. High entropy mode is only meaningful for native 64-bit processes. in
// high entropy mode, up to 1TB of bottom up variance is enabled.
//
//
// Define handle checking enforcement options. Handle checking enforcement
// causes an exception to be raised immediately on a bad handle reference,
// versus simply returning a failure status from the handle reference.
//
//
// Define win32k system call disable options. Win32k system call disable
// prevents a process from making Win32k calls.
//
//
// Define the extension point disable options. Extension point disable allows
// a process to opt-out of loading various arbitrary extension point DLLs.
//
# 3430 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Define dynamic code options.
//
//
// Define Control Flow Guard (CFG) mitigation policy options. Control Flow
// Guard allows indirect control transfers to be checked at runtime.
//
//
// Define module signature options. When enabled, this option will
// block mapping of non-microsoft binaries.
//
# 3464 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Define Font Disable Policy. When enabled, this option will
// block loading Non System Fonts.
//
//
// Define remote image load options. When enabled, this option will
// block mapping of images from remote devices.
//
//
// Define low IL image load options. When enabled, this option will
// block mapping of images that have the low mandatory label.
//
//
// Define image load options to prefer System32 images compared to
// the same images in application directory. When enabled, this option
// will prefer loading images from system32 folder.
//
//
// Define Loader Integrity Continuity mitigation policy options. This mitigation
// enforces OS signing levels for depenedent module loads.
//
//
// Define the strict Control Flow Guard (CFG) mitigation policy options. This mitigation
// requires all images that load in the process to be instrumented by CFG.
//
# 3540 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Define Attribute to disable creation of child process
//
//
// Define Attribute for Desktop Appx Overide.
//
//
// Define Attribute to opt out of matching All Application Packages
//
# 3577 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Define Attribute for Desktop App Override
//
# 3598 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
void
__stdcall
GetStartupInfoA(
LPSTARTUPINFOA lpStartupInfo
);
# 3668 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetFirmwareEnvironmentVariableA(
LPCSTR lpName,
LPCSTR lpGuid,
PVOID pBuffer,
DWORD nSize
);
__declspec(dllimport)
DWORD
__stdcall
GetFirmwareEnvironmentVariableW(
LPCWSTR lpName,
LPCWSTR lpGuid,
PVOID pBuffer,
DWORD nSize
);
# 3694 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetFirmwareEnvironmentVariableExA(
LPCSTR lpName,
LPCSTR lpGuid,
PVOID pBuffer,
DWORD nSize,
PDWORD pdwAttribubutes
);
__declspec(dllimport)
DWORD
__stdcall
GetFirmwareEnvironmentVariableExW(
LPCWSTR lpName,
LPCWSTR lpGuid,
PVOID pBuffer,
DWORD nSize,
PDWORD pdwAttribubutes
);
# 3722 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetFirmwareEnvironmentVariableA(
LPCSTR lpName,
LPCSTR lpGuid,
PVOID pValue,
DWORD nSize
);
__declspec(dllimport)
BOOL
__stdcall
SetFirmwareEnvironmentVariableW(
LPCWSTR lpName,
LPCWSTR lpGuid,
PVOID pValue,
DWORD nSize
);
# 3748 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetFirmwareEnvironmentVariableExA(
LPCSTR lpName,
LPCSTR lpGuid,
PVOID pValue,
DWORD nSize,
DWORD dwAttributes
);
__declspec(dllimport)
BOOL
__stdcall
SetFirmwareEnvironmentVariableExW(
LPCWSTR lpName,
LPCWSTR lpGuid,
PVOID pValue,
DWORD nSize,
DWORD dwAttributes
);
# 3784 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetFirmwareType (
PFIRMWARE_TYPE FirmwareType
);
__declspec(dllimport)
BOOL
__stdcall
IsNativeVhdBoot (
PBOOL NativeVhdBoot
);
__declspec(dllimport)
HRSRC
__stdcall
FindResourceA(
HMODULE hModule,
LPCSTR lpName,
LPCSTR lpType
);
__declspec(dllimport)
HRSRC
__stdcall
FindResourceExA(
HMODULE hModule,
LPCSTR lpType,
LPCSTR lpName,
WORD wLanguage
);
__declspec(dllimport)
BOOL
__stdcall
EnumResourceTypesA(
HMODULE hModule,
ENUMRESTYPEPROCA lpEnumFunc,
LONG_PTR lParam
);
__declspec(dllimport)
BOOL
__stdcall
EnumResourceTypesW(
HMODULE hModule,
ENUMRESTYPEPROCW lpEnumFunc,
LONG_PTR lParam
);
__declspec(dllimport)
BOOL
__stdcall
EnumResourceNamesA(
HMODULE hModule,
LPCSTR lpType,
ENUMRESNAMEPROCA lpEnumFunc,
LONG_PTR lParam
);
__declspec(dllimport)
BOOL
__stdcall
EnumResourceLanguagesA(
HMODULE hModule,
LPCSTR lpType,
LPCSTR lpName,
ENUMRESLANGPROCA lpEnumFunc,
LONG_PTR lParam
);
__declspec(dllimport)
BOOL
__stdcall
EnumResourceLanguagesW(
HMODULE hModule,
LPCWSTR lpType,
LPCWSTR lpName,
ENUMRESLANGPROCW lpEnumFunc,
LONG_PTR lParam
);
__declspec(dllimport)
HANDLE
__stdcall
BeginUpdateResourceA(
LPCSTR pFileName,
BOOL bDeleteExistingResources
);
__declspec(dllimport)
HANDLE
__stdcall
BeginUpdateResourceW(
LPCWSTR pFileName,
BOOL bDeleteExistingResources
);
__declspec(dllimport)
BOOL
__stdcall
UpdateResourceA(
HANDLE hUpdate,
LPCSTR lpType,
LPCSTR lpName,
WORD wLanguage,
LPVOID lpData,
DWORD cb
);
__declspec(dllimport)
BOOL
__stdcall
UpdateResourceW(
HANDLE hUpdate,
LPCWSTR lpType,
LPCWSTR lpName,
WORD wLanguage,
LPVOID lpData,
DWORD cb
);
__declspec(dllimport)
BOOL
__stdcall
EndUpdateResourceA(
HANDLE hUpdate,
BOOL fDiscard
);
__declspec(dllimport)
BOOL
__stdcall
EndUpdateResourceW(
HANDLE hUpdate,
BOOL fDiscard
);
# 3960 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
ATOM
__stdcall
GlobalAddAtomA(
LPCSTR lpString
);
__declspec(dllimport)
ATOM
__stdcall
GlobalAddAtomW(
LPCWSTR lpString
);
__declspec(dllimport)
ATOM
__stdcall
GlobalAddAtomExA(
LPCSTR lpString,
DWORD Flags
);
__declspec(dllimport)
ATOM
__stdcall
GlobalAddAtomExW(
LPCWSTR lpString,
DWORD Flags
);
__declspec(dllimport)
ATOM
__stdcall
GlobalFindAtomA(
LPCSTR lpString
);
__declspec(dllimport)
ATOM
__stdcall
GlobalFindAtomW(
LPCWSTR lpString
);
__declspec(dllimport)
UINT
__stdcall
GlobalGetAtomNameA(
ATOM nAtom,
LPSTR lpBuffer,
int nSize
);
__declspec(dllimport)
UINT
__stdcall
GlobalGetAtomNameW(
ATOM nAtom,
LPWSTR lpBuffer,
int nSize
);
__declspec(dllimport)
ATOM
__stdcall
AddAtomA(
LPCSTR lpString
);
__declspec(dllimport)
ATOM
__stdcall
AddAtomW(
LPCWSTR lpString
);
__declspec(dllimport)
ATOM
__stdcall
FindAtomA(
LPCSTR lpString
);
__declspec(dllimport)
ATOM
__stdcall
FindAtomW(
LPCWSTR lpString
);
__declspec(dllimport)
UINT
__stdcall
GetAtomNameA(
ATOM nAtom,
LPSTR lpBuffer,
int nSize
);
__declspec(dllimport)
UINT
__stdcall
GetAtomNameW(
ATOM nAtom,
LPWSTR lpBuffer,
int nSize
);
# 4102 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
UINT
__stdcall
GetProfileIntA(
LPCSTR lpAppName,
LPCSTR lpKeyName,
INT nDefault
);
__declspec(dllimport)
UINT
__stdcall
GetProfileIntW(
LPCWSTR lpAppName,
LPCWSTR lpKeyName,
INT nDefault
);
__declspec(dllimport)
DWORD
__stdcall
GetProfileStringA(
LPCSTR lpAppName,
LPCSTR lpKeyName,
LPCSTR lpDefault,
LPSTR lpReturnedString,
DWORD nSize
);
__declspec(dllimport)
DWORD
__stdcall
GetProfileStringW(
LPCWSTR lpAppName,
LPCWSTR lpKeyName,
LPCWSTR lpDefault,
LPWSTR lpReturnedString,
DWORD nSize
);
# 4156 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
WriteProfileStringA(
LPCSTR lpAppName,
LPCSTR lpKeyName,
LPCSTR lpString
);
__declspec(dllimport)
BOOL
__stdcall
WriteProfileStringW(
LPCWSTR lpAppName,
LPCWSTR lpKeyName,
LPCWSTR lpString
);
# 4184 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetProfileSectionA(
LPCSTR lpAppName,
LPSTR lpReturnedString,
DWORD nSize
);
__declspec(dllimport)
DWORD
__stdcall
GetProfileSectionW(
LPCWSTR lpAppName,
LPWSTR lpReturnedString,
DWORD nSize
);
# 4212 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
WriteProfileSectionA(
LPCSTR lpAppName,
LPCSTR lpString
);
__declspec(dllimport)
BOOL
__stdcall
WriteProfileSectionW(
LPCWSTR lpAppName,
LPCWSTR lpString
);
# 4238 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
UINT
__stdcall
GetPrivateProfileIntA(
LPCSTR lpAppName,
LPCSTR lpKeyName,
INT nDefault,
LPCSTR lpFileName
);
__declspec(dllimport)
UINT
__stdcall
GetPrivateProfileIntW(
LPCWSTR lpAppName,
LPCWSTR lpKeyName,
INT nDefault,
LPCWSTR lpFileName
);
# 4286 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetPrivateProfileStringA(
LPCSTR lpAppName,
LPCSTR lpKeyName,
LPCSTR lpDefault,
LPSTR lpReturnedString,
DWORD nSize,
LPCSTR lpFileName
);
__declspec(dllimport)
DWORD
__stdcall
GetPrivateProfileStringW(
LPCWSTR lpAppName,
LPCWSTR lpKeyName,
LPCWSTR lpDefault,
LPWSTR lpReturnedString,
DWORD nSize,
LPCWSTR lpFileName
);
# 4342 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
WritePrivateProfileStringA(
LPCSTR lpAppName,
LPCSTR lpKeyName,
LPCSTR lpString,
LPCSTR lpFileName
);
__declspec(dllimport)
BOOL
__stdcall
WritePrivateProfileStringW(
LPCWSTR lpAppName,
LPCWSTR lpKeyName,
LPCWSTR lpString,
LPCWSTR lpFileName
);
__declspec(dllimport)
DWORD
__stdcall
GetPrivateProfileSectionA(
LPCSTR lpAppName,
LPSTR lpReturnedString,
DWORD nSize,
LPCSTR lpFileName
);
__declspec(dllimport)
DWORD
__stdcall
GetPrivateProfileSectionW(
LPCWSTR lpAppName,
LPWSTR lpReturnedString,
DWORD nSize,
LPCWSTR lpFileName
);
# 4414 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
WritePrivateProfileSectionA(
LPCSTR lpAppName,
LPCSTR lpString,
LPCSTR lpFileName
);
__declspec(dllimport)
BOOL
__stdcall
WritePrivateProfileSectionW(
LPCWSTR lpAppName,
LPCWSTR lpString,
LPCWSTR lpFileName
);
# 4442 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
DWORD
__stdcall
GetPrivateProfileSectionNamesA(
LPSTR lpszReturnBuffer,
DWORD nSize,
LPCSTR lpFileName
);
__declspec(dllimport)
DWORD
__stdcall
GetPrivateProfileSectionNamesW(
LPWSTR lpszReturnBuffer,
DWORD nSize,
LPCWSTR lpFileName
);
# 4486 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetPrivateProfileStructA(
LPCSTR lpszSection,
LPCSTR lpszKey,
LPVOID lpStruct,
UINT uSizeStruct,
LPCSTR szFile
);
__declspec(dllimport)
BOOL
__stdcall
GetPrivateProfileStructW(
LPCWSTR lpszSection,
LPCWSTR lpszKey,
LPVOID lpStruct,
UINT uSizeStruct,
LPCWSTR szFile
);
# 4538 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
WritePrivateProfileStructA(
LPCSTR lpszSection,
LPCSTR lpszKey,
LPVOID lpStruct,
UINT uSizeStruct,
LPCSTR szFile
);
__declspec(dllimport)
BOOL
__stdcall
WritePrivateProfileStructW(
LPCWSTR lpszSection,
LPCWSTR lpszKey,
LPVOID lpStruct,
UINT uSizeStruct,
LPCWSTR szFile
);
# 4591 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOLEAN
__stdcall
Wow64EnableWow64FsRedirection (
BOOLEAN Wow64FsEnableRedirection
);
//
// for GetProcAddress
//
typedef UINT (__stdcall* PGET_SYSTEM_WOW64_DIRECTORY_A)( LPSTR lpBuffer, UINT uSize);
typedef UINT (__stdcall* PGET_SYSTEM_WOW64_DIRECTORY_W)( LPWSTR lpBuffer, UINT uSize);
//
// GetProcAddress only accepts GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A,
// GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A, GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A.
// The others are if you want to use the strings in some other way.
//
# 4669 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetDllDirectoryA(
LPCSTR lpPathName
);
__declspec(dllimport)
BOOL
__stdcall
SetDllDirectoryW(
LPCWSTR lpPathName
);
__declspec(dllimport)
DWORD
__stdcall
GetDllDirectoryA(
DWORD nBufferLength,
LPSTR lpBuffer
);
__declspec(dllimport)
DWORD
__stdcall
GetDllDirectoryW(
DWORD nBufferLength,
LPWSTR lpBuffer
);
# 4716 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetSearchPathMode (
DWORD Flags
);
# 4755 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
CreateDirectoryExA(
LPCSTR lpTemplateDirectory,
LPCSTR lpNewDirectory,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
__declspec(dllimport)
BOOL
__stdcall
CreateDirectoryExW(
LPCWSTR lpTemplateDirectory,
LPCWSTR lpNewDirectory,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
# 4785 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
CreateDirectoryTransactedA(
LPCSTR lpTemplateDirectory,
LPCSTR lpNewDirectory,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
HANDLE hTransaction
);
__declspec(dllimport)
BOOL
__stdcall
CreateDirectoryTransactedW(
LPCWSTR lpTemplateDirectory,
LPCWSTR lpNewDirectory,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
HANDLE hTransaction
);
__declspec(dllimport)
BOOL
__stdcall
RemoveDirectoryTransactedA(
LPCSTR lpPathName,
HANDLE hTransaction
);
__declspec(dllimport)
BOOL
__stdcall
RemoveDirectoryTransactedW(
LPCWSTR lpPathName,
HANDLE hTransaction
);
__declspec(dllimport)
DWORD
__stdcall
GetFullPathNameTransactedA(
LPCSTR lpFileName,
DWORD nBufferLength,
LPSTR lpBuffer,
LPSTR *lpFilePart,
HANDLE hTransaction
);
__declspec(dllimport)
DWORD
__stdcall
GetFullPathNameTransactedW(
LPCWSTR lpFileName,
DWORD nBufferLength,
LPWSTR lpBuffer,
LPWSTR *lpFilePart,
HANDLE hTransaction
);
# 4871 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
DefineDosDeviceA(
DWORD dwFlags,
LPCSTR lpDeviceName,
LPCSTR lpTargetPath
);
__declspec(dllimport)
DWORD
__stdcall
QueryDosDeviceA(
LPCSTR lpDeviceName,
LPSTR lpTargetPath,
DWORD ucchMax
);
# 4905 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
HANDLE
__stdcall
CreateFileTransactedA(
LPCSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile,
HANDLE hTransaction,
PUSHORT pusMiniVersion,
PVOID lpExtendedParameter
);
__declspec(dllimport)
HANDLE
__stdcall
CreateFileTransactedW(
LPCWSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile,
HANDLE hTransaction,
PUSHORT pusMiniVersion,
PVOID lpExtendedParameter
);
# 4951 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
HANDLE
__stdcall
ReOpenFile(
HANDLE hOriginalFile,
DWORD dwDesiredAccess,
DWORD dwShareMode,
DWORD dwFlagsAndAttributes
);
# 4972 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetFileAttributesTransactedA(
LPCSTR lpFileName,
DWORD dwFileAttributes,
HANDLE hTransaction
);
__declspec(dllimport)
BOOL
__stdcall
SetFileAttributesTransactedW(
LPCWSTR lpFileName,
DWORD dwFileAttributes,
HANDLE hTransaction
);
__declspec(dllimport)
BOOL
__stdcall
GetFileAttributesTransactedA(
LPCSTR lpFileName,
GET_FILEEX_INFO_LEVELS fInfoLevelId,
LPVOID lpFileInformation,
HANDLE hTransaction
);
__declspec(dllimport)
BOOL
__stdcall
GetFileAttributesTransactedW(
LPCWSTR lpFileName,
GET_FILEEX_INFO_LEVELS fInfoLevelId,
LPVOID lpFileInformation,
HANDLE hTransaction
);
__declspec(dllimport)
DWORD
__stdcall
GetCompressedFileSizeTransactedA(
LPCSTR lpFileName,
LPDWORD lpFileSizeHigh,
HANDLE hTransaction
);
__declspec(dllimport)
DWORD
__stdcall
GetCompressedFileSizeTransactedW(
LPCWSTR lpFileName,
LPDWORD lpFileSizeHigh,
HANDLE hTransaction
);
__declspec(dllimport)
BOOL
__stdcall
DeleteFileTransactedA(
LPCSTR lpFileName,
HANDLE hTransaction
);
__declspec(dllimport)
BOOL
__stdcall
DeleteFileTransactedW(
LPCWSTR lpFileName,
HANDLE hTransaction
);
# 5094 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
CheckNameLegalDOS8Dot3A(
LPCSTR lpName,
LPSTR lpOemName,
DWORD OemNameSize,
PBOOL pbNameContainsSpaces ,
PBOOL pbNameLegal
);
__declspec(dllimport)
BOOL
__stdcall
CheckNameLegalDOS8Dot3W(
LPCWSTR lpName,
LPSTR lpOemName,
DWORD OemNameSize,
PBOOL pbNameContainsSpaces ,
PBOOL pbNameLegal
);
# 5132 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
HANDLE
__stdcall
FindFirstFileTransactedA(
LPCSTR lpFileName,
FINDEX_INFO_LEVELS fInfoLevelId,
LPVOID lpFindFileData,
FINDEX_SEARCH_OPS fSearchOp,
LPVOID lpSearchFilter,
DWORD dwAdditionalFlags,
HANDLE hTransaction
);
__declspec(dllimport)
HANDLE
__stdcall
FindFirstFileTransactedW(
LPCWSTR lpFileName,
FINDEX_INFO_LEVELS fInfoLevelId,
LPVOID lpFindFileData,
FINDEX_SEARCH_OPS fSearchOp,
LPVOID lpSearchFilter,
DWORD dwAdditionalFlags,
HANDLE hTransaction
);
# 5173 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
CopyFileA(
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName,
BOOL bFailIfExists
);
__declspec(dllimport)
BOOL
__stdcall
CopyFileW(
LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName,
BOOL bFailIfExists
);
# 5225 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
typedef
DWORD
(__stdcall *LPPROGRESS_ROUTINE)(
LARGE_INTEGER TotalFileSize,
LARGE_INTEGER TotalBytesTransferred,
LARGE_INTEGER StreamSize,
LARGE_INTEGER StreamBytesTransferred,
DWORD dwStreamNumber,
DWORD dwCallbackReason,
HANDLE hSourceFile,
HANDLE hDestinationFile,
LPVOID lpData
);
__declspec(dllimport)
BOOL
__stdcall
CopyFileExA(
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName,
LPPROGRESS_ROUTINE lpProgressRoutine,
LPVOID lpData,
LPBOOL pbCancel,
DWORD dwCopyFlags
);
__declspec(dllimport)
BOOL
__stdcall
CopyFileExW(
LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName,
LPPROGRESS_ROUTINE lpProgressRoutine,
LPVOID lpData,
LPBOOL pbCancel,
DWORD dwCopyFlags
);
# 5277 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
CopyFileTransactedA(
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName,
LPPROGRESS_ROUTINE lpProgressRoutine,
LPVOID lpData,
LPBOOL pbCancel,
DWORD dwCopyFlags,
HANDLE hTransaction
);
__declspec(dllimport)
BOOL
__stdcall
CopyFileTransactedW(
LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName,
LPPROGRESS_ROUTINE lpProgressRoutine,
LPVOID lpData,
LPBOOL pbCancel,
DWORD dwCopyFlags,
HANDLE hTransaction
);
# 5315 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// TODO: Win7 for now, when we roll over the version number this needs to be updated.
//
typedef enum _COPYFILE2_MESSAGE_TYPE {
COPYFILE2_CALLBACK_NONE = 0,
COPYFILE2_CALLBACK_CHUNK_STARTED,
COPYFILE2_CALLBACK_CHUNK_FINISHED,
COPYFILE2_CALLBACK_STREAM_STARTED,
COPYFILE2_CALLBACK_STREAM_FINISHED,
COPYFILE2_CALLBACK_POLL_CONTINUE,
COPYFILE2_CALLBACK_ERROR,
COPYFILE2_CALLBACK_MAX,
} COPYFILE2_MESSAGE_TYPE;
typedef enum _COPYFILE2_MESSAGE_ACTION {
COPYFILE2_PROGRESS_CONTINUE = 0,
COPYFILE2_PROGRESS_CANCEL,
COPYFILE2_PROGRESS_STOP,
COPYFILE2_PROGRESS_QUIET,
COPYFILE2_PROGRESS_PAUSE,
} COPYFILE2_MESSAGE_ACTION;
typedef enum _COPYFILE2_COPY_PHASE {
COPYFILE2_PHASE_NONE = 0,
COPYFILE2_PHASE_PREPARE_SOURCE,
COPYFILE2_PHASE_PREPARE_DEST,
COPYFILE2_PHASE_READ_SOURCE,
COPYFILE2_PHASE_WRITE_DESTINATION,
COPYFILE2_PHASE_SERVER_COPY,
COPYFILE2_PHASE_NAMEGRAFT_COPY,
// ... etc phases.
COPYFILE2_PHASE_MAX,
} COPYFILE2_COPY_PHASE;
typedef struct COPYFILE2_MESSAGE {
COPYFILE2_MESSAGE_TYPE Type;
DWORD dwPadding;
union {
struct {
DWORD dwStreamNumber; // monotonically increasing stream number
DWORD dwReserved;
HANDLE hSourceFile; // handle to the source stream
HANDLE hDestinationFile; // handle to the destination stream
ULARGE_INTEGER uliChunkNumber; // monotonically increasing chunk number
ULARGE_INTEGER uliChunkSize; // size of the copied chunk
ULARGE_INTEGER uliStreamSize; // size of the current stream
ULARGE_INTEGER uliTotalFileSize; // size of all streams for this file
} ChunkStarted;
struct {
DWORD dwStreamNumber; // monotonically increasing stream number
DWORD dwFlags;
HANDLE hSourceFile; // handle to the source stream
HANDLE hDestinationFile; // handle to the destination stream
ULARGE_INTEGER uliChunkNumber; // monotonically increasing chunk number
ULARGE_INTEGER uliChunkSize; // size of the copied chunk
ULARGE_INTEGER uliStreamSize; // size of the current stream
ULARGE_INTEGER uliStreamBytesTransferred; // bytes copied for this stream so far
ULARGE_INTEGER uliTotalFileSize; // size of all streams for this file
ULARGE_INTEGER uliTotalBytesTransferred; // total bytes copied so far
} ChunkFinished;
struct {
DWORD dwStreamNumber;
DWORD dwReserved;
HANDLE hSourceFile; // handle to the source stream
HANDLE hDestinationFile; // handle to the destination stream
ULARGE_INTEGER uliStreamSize; // size of this stream
ULARGE_INTEGER uliTotalFileSize; // total size of all streams for this file
} StreamStarted;
struct {
DWORD dwStreamNumber;
DWORD dwReserved;
HANDLE hSourceFile; // handle to the source stream
HANDLE hDestinationFile; // handle to the destination stream
ULARGE_INTEGER uliStreamSize;
ULARGE_INTEGER uliStreamBytesTransferred;
ULARGE_INTEGER uliTotalFileSize;
ULARGE_INTEGER uliTotalBytesTransferred;
} StreamFinished;
struct {
DWORD dwReserved;
} PollContinue;
struct {
COPYFILE2_COPY_PHASE CopyPhase;
DWORD dwStreamNumber;
HRESULT hrFailure;
DWORD dwReserved;
ULARGE_INTEGER uliChunkNumber;
ULARGE_INTEGER uliStreamSize;
ULARGE_INTEGER uliStreamBytesTransferred;
ULARGE_INTEGER uliTotalFileSize;
ULARGE_INTEGER uliTotalBytesTransferred;
} Error;
} Info;
} COPYFILE2_MESSAGE;
typedef
COPYFILE2_MESSAGE_ACTION (__stdcall *PCOPYFILE2_PROGRESS_ROUTINE)(
const COPYFILE2_MESSAGE *pMessage,
PVOID pvCallbackContext
);
typedef struct COPYFILE2_EXTENDED_PARAMETERS {
DWORD dwSize;
DWORD dwCopyFlags;
BOOL *pfCancel;
PCOPYFILE2_PROGRESS_ROUTINE pProgressRoutine;
PVOID pvCallbackContext;
} COPYFILE2_EXTENDED_PARAMETERS;
__declspec(dllimport)
HRESULT
__stdcall
CopyFile2(
PCWSTR pwszExistingFileName,
PCWSTR pwszNewFileName,
COPYFILE2_EXTENDED_PARAMETERS *pExtendedParameters
);
# 5458 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
MoveFileA(
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName
);
__declspec(dllimport)
BOOL
__stdcall
MoveFileW(
LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName
);
# 5504 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
MoveFileExA(
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName,
DWORD dwFlags
);
__declspec(dllimport)
BOOL
__stdcall
MoveFileExW(
LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName,
DWORD dwFlags
);
# 5533 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
MoveFileWithProgressA(
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName,
LPPROGRESS_ROUTINE lpProgressRoutine,
LPVOID lpData,
DWORD dwFlags
);
__declspec(dllimport)
BOOL
__stdcall
MoveFileWithProgressW(
LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName,
LPPROGRESS_ROUTINE lpProgressRoutine,
LPVOID lpData,
DWORD dwFlags
);
# 5567 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
MoveFileTransactedA(
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName,
LPPROGRESS_ROUTINE lpProgressRoutine,
LPVOID lpData,
DWORD dwFlags,
HANDLE hTransaction
);
__declspec(dllimport)
BOOL
__stdcall
MoveFileTransactedW(
LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName,
LPPROGRESS_ROUTINE lpProgressRoutine,
LPVOID lpData,
DWORD dwFlags,
HANDLE hTransaction
);
# 5626 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
ReplaceFileA(
LPCSTR lpReplacedFileName,
LPCSTR lpReplacementFileName,
LPCSTR lpBackupFileName,
DWORD dwReplaceFlags,
LPVOID lpExclude,
LPVOID lpReserved
);
__declspec(dllimport)
BOOL
__stdcall
ReplaceFileW(
LPCWSTR lpReplacedFileName,
LPCWSTR lpReplacementFileName,
LPCWSTR lpBackupFileName,
DWORD dwReplaceFlags,
LPVOID lpExclude,
LPVOID lpReserved
);
# 5662 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// API call to create hard links.
//
__declspec(dllimport)
BOOL
__stdcall
CreateHardLinkA(
LPCSTR lpFileName,
LPCSTR lpExistingFileName,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
__declspec(dllimport)
BOOL
__stdcall
CreateHardLinkW(
LPCWSTR lpFileName,
LPCWSTR lpExistingFileName,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
# 5697 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// API call to create hard links.
//
__declspec(dllimport)
BOOL
__stdcall
CreateHardLinkTransactedA(
LPCSTR lpFileName,
LPCSTR lpExistingFileName,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
HANDLE hTransaction
);
__declspec(dllimport)
BOOL
__stdcall
CreateHardLinkTransactedW(
LPCWSTR lpFileName,
LPCWSTR lpExistingFileName,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
HANDLE hTransaction
);
# 5729 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
HANDLE
__stdcall
FindFirstStreamTransactedW (
LPCWSTR lpFileName,
STREAM_INFO_LEVELS InfoLevel,
LPVOID lpFindStreamData,
DWORD dwFlags,
HANDLE hTransaction
);
__declspec(dllimport)
HANDLE
__stdcall
FindFirstFileNameTransactedW (
LPCWSTR lpFileName,
DWORD dwFlags,
LPDWORD StringLength,
PWSTR LinkName,
HANDLE hTransaction
);
__declspec(dllimport)
HANDLE
__stdcall
CreateNamedPipeA(
LPCSTR lpName,
DWORD dwOpenMode,
DWORD dwPipeMode,
DWORD nMaxInstances,
DWORD nOutBufferSize,
DWORD nInBufferSize,
DWORD nDefaultTimeOut,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
# 5776 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetNamedPipeHandleStateA(
HANDLE hNamedPipe,
LPDWORD lpState,
LPDWORD lpCurInstances,
LPDWORD lpMaxCollectionCount,
LPDWORD lpCollectDataTimeout,
LPSTR lpUserName,
DWORD nMaxUserNameSize
);
__declspec(dllimport)
BOOL
__stdcall
CallNamedPipeA(
LPCSTR lpNamedPipeName,
LPVOID lpInBuffer,
DWORD nInBufferSize,
LPVOID lpOutBuffer,
DWORD nOutBufferSize,
LPDWORD lpBytesRead,
DWORD nTimeOut
);
__declspec(dllimport)
BOOL
__stdcall
WaitNamedPipeA(
LPCSTR lpNamedPipeName,
DWORD nTimeOut
);
# 5835 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetNamedPipeClientComputerNameA(
HANDLE Pipe,
LPSTR ClientComputerName,
ULONG ClientComputerNameLength
);
# 5854 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetNamedPipeClientProcessId(
HANDLE Pipe,
PULONG ClientProcessId
);
__declspec(dllimport)
BOOL
__stdcall
GetNamedPipeClientSessionId(
HANDLE Pipe,
PULONG ClientSessionId
);
__declspec(dllimport)
BOOL
__stdcall
GetNamedPipeServerProcessId(
HANDLE Pipe,
PULONG ServerProcessId
);
__declspec(dllimport)
BOOL
__stdcall
GetNamedPipeServerSessionId(
HANDLE Pipe,
PULONG ServerSessionId
);
# 5894 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetVolumeLabelA(
LPCSTR lpRootPathName,
LPCSTR lpVolumeName
);
__declspec(dllimport)
BOOL
__stdcall
SetVolumeLabelW(
LPCWSTR lpRootPathName,
LPCWSTR lpVolumeName
);
# 5916 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetFileBandwidthReservation(
HANDLE hFile,
DWORD nPeriodMilliseconds,
DWORD nBytesPerPeriod,
BOOL bDiscardable,
LPDWORD lpTransferSize,
LPDWORD lpNumOutstandingRequests
);
__declspec(dllimport)
BOOL
__stdcall
GetFileBandwidthReservation(
HANDLE hFile,
LPDWORD lpPeriodMilliseconds,
LPDWORD lpBytesPerPeriod,
LPBOOL pDiscardable,
LPDWORD lpTransferSize,
LPDWORD lpNumOutstandingRequests
);
//
// Event logging APIs
//
__declspec(dllimport)
BOOL
__stdcall
ClearEventLogA (
HANDLE hEventLog,
LPCSTR lpBackupFileName
);
__declspec(dllimport)
BOOL
__stdcall
ClearEventLogW (
HANDLE hEventLog,
LPCWSTR lpBackupFileName
);
__declspec(dllimport)
BOOL
__stdcall
BackupEventLogA (
HANDLE hEventLog,
LPCSTR lpBackupFileName
);
__declspec(dllimport)
BOOL
__stdcall
BackupEventLogW (
HANDLE hEventLog,
LPCWSTR lpBackupFileName
);
__declspec(dllimport)
BOOL
__stdcall
CloseEventLog (
HANDLE hEventLog
);
__declspec(dllimport)
BOOL
__stdcall
DeregisterEventSource (
HANDLE hEventLog
);
__declspec(dllimport)
BOOL
__stdcall
NotifyChangeEventLog(
HANDLE hEventLog,
HANDLE hEvent
);
__declspec(dllimport)
BOOL
__stdcall
GetNumberOfEventLogRecords (
HANDLE hEventLog,
PDWORD NumberOfRecords
);
__declspec(dllimport)
BOOL
__stdcall
GetOldestEventLogRecord (
HANDLE hEventLog,
PDWORD OldestRecord
);
__declspec(dllimport)
HANDLE
__stdcall
OpenEventLogA (
LPCSTR lpUNCServerName,
LPCSTR lpSourceName
);
__declspec(dllimport)
HANDLE
__stdcall
OpenEventLogW (
LPCWSTR lpUNCServerName,
LPCWSTR lpSourceName
);
__declspec(dllimport)
HANDLE
__stdcall
RegisterEventSourceA (
LPCSTR lpUNCServerName,
LPCSTR lpSourceName
);
__declspec(dllimport)
HANDLE
__stdcall
RegisterEventSourceW (
LPCWSTR lpUNCServerName,
LPCWSTR lpSourceName
);
__declspec(dllimport)
HANDLE
__stdcall
OpenBackupEventLogA (
LPCSTR lpUNCServerName,
LPCSTR lpFileName
);
__declspec(dllimport)
HANDLE
__stdcall
OpenBackupEventLogW (
LPCWSTR lpUNCServerName,
LPCWSTR lpFileName
);
__declspec(dllimport)
BOOL
__stdcall
ReadEventLogA (
HANDLE hEventLog,
DWORD dwReadFlags,
DWORD dwRecordOffset,
LPVOID lpBuffer,
DWORD nNumberOfBytesToRead,
DWORD *pnBytesRead,
DWORD *pnMinNumberOfBytesNeeded
);
__declspec(dllimport)
BOOL
__stdcall
ReadEventLogW (
HANDLE hEventLog,
DWORD dwReadFlags,
DWORD dwRecordOffset,
LPVOID lpBuffer,
DWORD nNumberOfBytesToRead,
DWORD *pnBytesRead,
DWORD *pnMinNumberOfBytesNeeded
);
__declspec(dllimport)
BOOL
__stdcall
ReportEventA (
HANDLE hEventLog,
WORD wType,
WORD wCategory,
DWORD dwEventID,
PSID lpUserSid,
WORD wNumStrings,
DWORD dwDataSize,
LPCSTR *lpStrings,
LPVOID lpRawData
);
__declspec(dllimport)
BOOL
__stdcall
ReportEventW (
HANDLE hEventLog,
WORD wType,
WORD wCategory,
DWORD dwEventID,
PSID lpUserSid,
WORD wNumStrings,
DWORD dwDataSize,
LPCWSTR *lpStrings,
LPVOID lpRawData
);
# 6151 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
typedef struct _EVENTLOG_FULL_INFORMATION
{
DWORD dwFull;
}
EVENTLOG_FULL_INFORMATION, *LPEVENTLOG_FULL_INFORMATION;
__declspec(dllimport)
BOOL
__stdcall
GetEventLogInformation (
HANDLE hEventLog,
DWORD dwInfoLevel,
LPVOID lpBuffer,
DWORD cbBufSize,
LPDWORD pcbBytesNeeded
);
//
// Operation prefetch API.
//
typedef ULONG OPERATION_ID;
//
// OperationStart() parameters.
//
typedef struct _OPERATION_START_PARAMETERS {
ULONG Version;
OPERATION_ID OperationId;
ULONG Flags;
} OPERATION_START_PARAMETERS, *POPERATION_START_PARAMETERS;
//
// OperationEnd() parameters.
//
typedef struct _OPERATION_END_PARAMETERS {
ULONG Version;
OPERATION_ID OperationId;
ULONG Flags;
} OPERATION_END_PARAMETERS, *POPERATION_END_PARAMETERS;
__declspec(dllimport)
BOOL
__stdcall
OperationStart (
OPERATION_START_PARAMETERS* OperationStartParams
);
__declspec(dllimport)
BOOL
__stdcall
OperationEnd (
OPERATION_END_PARAMETERS* OperationEndParams
);
//
//
// Security APIs
//
__declspec(dllimport)
BOOL
__stdcall
AccessCheckAndAuditAlarmA (
LPCSTR SubsystemName,
LPVOID HandleId,
LPSTR ObjectTypeName,
LPSTR ObjectName,
PSECURITY_DESCRIPTOR SecurityDescriptor,
DWORD DesiredAccess,
PGENERIC_MAPPING GenericMapping,
BOOL ObjectCreation,
LPDWORD GrantedAccess,
LPBOOL AccessStatus,
LPBOOL pfGenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
AccessCheckByTypeAndAuditAlarmA (
LPCSTR SubsystemName,
LPVOID HandleId,
LPCSTR ObjectTypeName,
LPCSTR ObjectName,
PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID PrincipalSelfSid,
DWORD DesiredAccess,
AUDIT_EVENT_TYPE AuditType,
DWORD Flags,
POBJECT_TYPE_LIST ObjectTypeList,
DWORD ObjectTypeListLength,
PGENERIC_MAPPING GenericMapping,
BOOL ObjectCreation,
LPDWORD GrantedAccess,
LPBOOL AccessStatus,
LPBOOL pfGenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
AccessCheckByTypeResultListAndAuditAlarmA (
LPCSTR SubsystemName,
LPVOID HandleId,
LPCSTR ObjectTypeName,
LPCSTR ObjectName,
PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID PrincipalSelfSid,
DWORD DesiredAccess,
AUDIT_EVENT_TYPE AuditType,
DWORD Flags,
POBJECT_TYPE_LIST ObjectTypeList,
DWORD ObjectTypeListLength,
PGENERIC_MAPPING GenericMapping,
BOOL ObjectCreation,
LPDWORD GrantedAccess,
LPDWORD AccessStatusList,
LPBOOL pfGenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
AccessCheckByTypeResultListAndAuditAlarmByHandleA (
LPCSTR SubsystemName,
LPVOID HandleId,
HANDLE ClientToken,
LPCSTR ObjectTypeName,
LPCSTR ObjectName,
PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID PrincipalSelfSid,
DWORD DesiredAccess,
AUDIT_EVENT_TYPE AuditType,
DWORD Flags,
POBJECT_TYPE_LIST ObjectTypeList,
DWORD ObjectTypeListLength,
PGENERIC_MAPPING GenericMapping,
BOOL ObjectCreation,
LPDWORD GrantedAccess,
LPDWORD AccessStatusList,
LPBOOL pfGenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
ObjectOpenAuditAlarmA (
LPCSTR SubsystemName,
LPVOID HandleId,
LPSTR ObjectTypeName,
LPSTR ObjectName,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
HANDLE ClientToken,
DWORD DesiredAccess,
DWORD GrantedAccess,
PPRIVILEGE_SET Privileges,
BOOL ObjectCreation,
BOOL AccessGranted,
LPBOOL GenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
ObjectPrivilegeAuditAlarmA (
LPCSTR SubsystemName,
LPVOID HandleId,
HANDLE ClientToken,
DWORD DesiredAccess,
PPRIVILEGE_SET Privileges,
BOOL AccessGranted
);
__declspec(dllimport)
BOOL
__stdcall
ObjectCloseAuditAlarmA (
LPCSTR SubsystemName,
LPVOID HandleId,
BOOL GenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
ObjectDeleteAuditAlarmA (
LPCSTR SubsystemName,
LPVOID HandleId,
BOOL GenerateOnClose
);
__declspec(dllimport)
BOOL
__stdcall
PrivilegedServiceAuditAlarmA (
LPCSTR SubsystemName,
LPCSTR ServiceName,
HANDLE ClientToken,
PPRIVILEGE_SET Privileges,
BOOL AccessGranted
);
__declspec(dllimport)
BOOL
__stdcall
AddConditionalAce (
PACL pAcl,
DWORD dwAceRevision,
DWORD AceFlags,
UCHAR AceType,
DWORD AccessMask,
PSID pSid,
PWCHAR ConditionStr,
DWORD *ReturnLength
);
# 6418 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
SetFileSecurityA (
LPCSTR lpFileName,
SECURITY_INFORMATION SecurityInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor
);
__declspec(dllimport)
BOOL
__stdcall
GetFileSecurityA (
LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength,
LPDWORD lpnLengthNeeded
);
__declspec(dllimport)
BOOL
__stdcall
ReadDirectoryChangesW(
HANDLE hDirectory,
LPVOID lpBuffer,
DWORD nBufferLength,
BOOL bWatchSubtree,
DWORD dwNotifyFilter,
LPDWORD lpBytesReturned,
LPOVERLAPPED lpOverlapped,
LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
);
# 6468 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
LPVOID
__stdcall
MapViewOfFileExNuma(
HANDLE hFileMappingObject,
DWORD dwDesiredAccess,
DWORD dwFileOffsetHigh,
DWORD dwFileOffsetLow,
SIZE_T dwNumberOfBytesToMap,
LPVOID lpBaseAddress,
DWORD nndPreferred
);
__declspec(dllimport)
BOOL
__stdcall
IsBadReadPtr(
const void *lp,
UINT_PTR ucb
);
__declspec(dllimport)
BOOL
__stdcall
IsBadWritePtr(
LPVOID lp,
UINT_PTR ucb
);
__declspec(dllimport)
BOOL
__stdcall
IsBadHugeReadPtr(
const void *lp,
UINT_PTR ucb
);
__declspec(dllimport)
BOOL
__stdcall
IsBadHugeWritePtr(
LPVOID lp,
UINT_PTR ucb
);
__declspec(dllimport)
BOOL
__stdcall
IsBadCodePtr(
FARPROC lpfn
);
__declspec(dllimport)
BOOL
__stdcall
IsBadStringPtrA(
LPCSTR lpsz,
UINT_PTR ucchMax
);
__declspec(dllimport)
BOOL
__stdcall
IsBadStringPtrW(
LPCWSTR lpsz,
UINT_PTR ucchMax
);
# 6549 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
LookupAccountSidA(
LPCSTR lpSystemName,
PSID Sid,
LPSTR Name,
LPDWORD cchName,
LPSTR ReferencedDomainName,
LPDWORD cchReferencedDomainName,
PSID_NAME_USE peUse
);
__declspec(dllimport)
BOOL
__stdcall
LookupAccountSidW(
LPCWSTR lpSystemName,
PSID Sid,
LPWSTR Name,
LPDWORD cchName,
LPWSTR ReferencedDomainName,
LPDWORD cchReferencedDomainName,
PSID_NAME_USE peUse
);
__declspec(dllimport)
BOOL
__stdcall
LookupAccountNameA(
LPCSTR lpSystemName,
LPCSTR lpAccountName,
PSID Sid,
LPDWORD cbSid,
LPSTR ReferencedDomainName,
LPDWORD cchReferencedDomainName,
PSID_NAME_USE peUse
);
__declspec(dllimport)
BOOL
__stdcall
LookupAccountNameW(
LPCWSTR lpSystemName,
LPCWSTR lpAccountName,
PSID Sid,
LPDWORD cbSid,
LPWSTR ReferencedDomainName,
LPDWORD cchReferencedDomainName,
PSID_NAME_USE peUse
);
# 6617 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
LookupAccountNameLocalA(
LPCSTR lpAccountName,
PSID Sid,
LPDWORD cbSid,
LPSTR ReferencedDomainName,
LPDWORD cchReferencedDomainName,
PSID_NAME_USE peUse
);
__declspec(dllimport)
BOOL
__stdcall
LookupAccountNameLocalW(
LPCWSTR lpAccountName,
PSID Sid,
LPDWORD cbSid,
LPWSTR ReferencedDomainName,
LPDWORD cchReferencedDomainName,
PSID_NAME_USE peUse
);
__declspec(dllimport)
BOOL
__stdcall
LookupAccountSidLocalA(
PSID Sid,
LPSTR Name,
LPDWORD cchName,
LPSTR ReferencedDomainName,
LPDWORD cchReferencedDomainName,
PSID_NAME_USE peUse
);
__declspec(dllimport)
BOOL
__stdcall
LookupAccountSidLocalW(
PSID Sid,
LPWSTR Name,
LPDWORD cchName,
LPWSTR ReferencedDomainName,
LPDWORD cchReferencedDomainName,
PSID_NAME_USE peUse
);
# 6703 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
LookupPrivilegeValueA(
LPCSTR lpSystemName,
LPCSTR lpName,
PLUID lpLuid
);
__declspec(dllimport)
BOOL
__stdcall
LookupPrivilegeValueW(
LPCWSTR lpSystemName,
LPCWSTR lpName,
PLUID lpLuid
);
__declspec(dllimport)
BOOL
__stdcall
LookupPrivilegeNameA(
LPCSTR lpSystemName,
PLUID lpLuid,
LPSTR lpName,
LPDWORD cchName
);
__declspec(dllimport)
BOOL
__stdcall
LookupPrivilegeNameW(
LPCWSTR lpSystemName,
PLUID lpLuid,
LPWSTR lpName,
LPDWORD cchName
);
__declspec(dllimport)
BOOL
__stdcall
LookupPrivilegeDisplayNameA(
LPCSTR lpSystemName,
LPCSTR lpName,
LPSTR lpDisplayName,
LPDWORD cchDisplayName,
LPDWORD lpLanguageId
);
__declspec(dllimport)
BOOL
__stdcall
LookupPrivilegeDisplayNameW(
LPCWSTR lpSystemName,
LPCWSTR lpName,
LPWSTR lpDisplayName,
LPDWORD cchDisplayName,
LPDWORD lpLanguageId
);
# 6781 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
BuildCommDCBA(
LPCSTR lpDef,
LPDCB lpDCB
);
__declspec(dllimport)
BOOL
__stdcall
BuildCommDCBW(
LPCWSTR lpDef,
LPDCB lpDCB
);
__declspec(dllimport)
BOOL
__stdcall
BuildCommDCBAndTimeoutsA(
LPCSTR lpDef,
LPDCB lpDCB,
LPCOMMTIMEOUTS lpCommTimeouts
);
__declspec(dllimport)
BOOL
__stdcall
BuildCommDCBAndTimeoutsW(
LPCWSTR lpDef,
LPDCB lpDCB,
LPCOMMTIMEOUTS lpCommTimeouts
);
__declspec(dllimport)
BOOL
__stdcall
CommConfigDialogA(
LPCSTR lpszName,
HWND hWnd,
LPCOMMCONFIG lpCC
);
__declspec(dllimport)
BOOL
__stdcall
CommConfigDialogW(
LPCWSTR lpszName,
HWND hWnd,
LPCOMMCONFIG lpCC
);
__declspec(dllimport)
BOOL
__stdcall
GetDefaultCommConfigA(
LPCSTR lpszName,
LPCOMMCONFIG lpCC,
LPDWORD lpdwSize
);
__declspec(dllimport)
BOOL
__stdcall
GetDefaultCommConfigW(
LPCWSTR lpszName,
LPCOMMCONFIG lpCC,
LPDWORD lpdwSize
);
__declspec(dllimport)
BOOL
__stdcall
SetDefaultCommConfigA(
LPCSTR lpszName,
LPCOMMCONFIG lpCC,
DWORD dwSize
);
__declspec(dllimport)
BOOL
__stdcall
SetDefaultCommConfigW(
LPCWSTR lpszName,
LPCOMMCONFIG lpCC,
DWORD dwSize
);
# 6895 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetComputerNameA (
LPSTR lpBuffer,
LPDWORD nSize
);
__declspec(dllimport)
BOOL
__stdcall
GetComputerNameW (
LPWSTR lpBuffer,
LPDWORD nSize
);
# 6920 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
DnsHostnameToComputerNameA (
LPCSTR Hostname,
LPSTR ComputerName,
LPDWORD nSize
);
__declspec(dllimport)
BOOL
__stdcall
DnsHostnameToComputerNameW (
LPCWSTR Hostname,
LPWSTR ComputerName,
LPDWORD nSize
);
# 6946 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
GetUserNameA (
LPSTR lpBuffer,
LPDWORD pcbBuffer
);
__declspec(dllimport)
BOOL
__stdcall
GetUserNameW (
LPWSTR lpBuffer,
LPDWORD pcbBuffer
);
//
// Logon Support APIs
//
# 6994 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
LogonUserA (
LPCSTR lpszUsername,
LPCSTR lpszDomain,
LPCSTR lpszPassword,
DWORD dwLogonType,
DWORD dwLogonProvider,
PHANDLE phToken
);
__declspec(dllimport)
BOOL
__stdcall
LogonUserW (
LPCWSTR lpszUsername,
LPCWSTR lpszDomain,
LPCWSTR lpszPassword,
DWORD dwLogonType,
DWORD dwLogonProvider,
PHANDLE phToken
);
__declspec(dllimport)
BOOL
__stdcall
LogonUserExA (
LPCSTR lpszUsername,
LPCSTR lpszDomain,
LPCSTR lpszPassword,
DWORD dwLogonType,
DWORD dwLogonProvider,
PHANDLE phToken,
PSID *ppLogonSid,
PVOID *ppProfileBuffer,
LPDWORD pdwProfileLength,
PQUOTA_LIMITS pQuotaLimits
);
__declspec(dllimport)
BOOL
__stdcall
LogonUserExW (
LPCWSTR lpszUsername,
LPCWSTR lpszDomain,
LPCWSTR lpszPassword,
DWORD dwLogonType,
DWORD dwLogonProvider,
PHANDLE phToken,
PSID *ppLogonSid,
PVOID *ppProfileBuffer,
LPDWORD pdwProfileLength,
PQUOTA_LIMITS pQuotaLimits
);
# 7071 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// LogonFlags
//
__declspec(dllimport)
BOOL
__stdcall
CreateProcessWithLogonW(
LPCWSTR lpUsername,
LPCWSTR lpDomain,
LPCWSTR lpPassword,
DWORD dwLogonFlags,
LPCWSTR lpApplicationName,
LPWSTR lpCommandLine,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCWSTR lpCurrentDirectory,
LPSTARTUPINFOW lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);
__declspec(dllimport)
BOOL
__stdcall
CreateProcessWithTokenW(
HANDLE hToken,
DWORD dwLogonFlags,
LPCWSTR lpApplicationName,
LPWSTR lpCommandLine,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCWSTR lpCurrentDirectory,
LPSTARTUPINFOW lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);
__declspec(dllimport)
BOOL
__stdcall
IsTokenUntrusted(
HANDLE TokenHandle
);
//
// Thread pool API's
//
__declspec(dllimport)
BOOL
__stdcall
RegisterWaitForSingleObject(
PHANDLE phNewWaitObject,
HANDLE hObject,
WAITORTIMERCALLBACK Callback,
PVOID Context,
ULONG dwMilliseconds,
ULONG dwFlags
);
__declspec(dllimport)
BOOL
__stdcall
UnregisterWait(
HANDLE WaitHandle
);
__declspec(dllimport)
BOOL
__stdcall
BindIoCompletionCallback (
HANDLE FileHandle,
LPOVERLAPPED_COMPLETION_ROUTINE Function,
ULONG Flags
);
__declspec(dllimport)
HANDLE
__stdcall
SetTimerQueueTimer(
HANDLE TimerQueue,
WAITORTIMERCALLBACK Callback,
PVOID Parameter,
DWORD DueTime,
DWORD Period,
BOOL PreferIo
);
__declspec(dllimport)
BOOL
__stdcall
CancelTimerQueueTimer(
HANDLE TimerQueue,
HANDLE Timer
);
__declspec(dllimport)
BOOL
__stdcall
DeleteTimerQueue(
HANDLE TimerQueue
);
# 7195 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__forceinline
void
InitializeThreadpoolEnvironment(
PTP_CALLBACK_ENVIRON pcbe
)
{
TpInitializeCallbackEnviron(pcbe);
}
__forceinline
void
SetThreadpoolCallbackPool(
PTP_CALLBACK_ENVIRON pcbe,
PTP_POOL ptpp
)
{
TpSetCallbackThreadpool(pcbe, ptpp);
}
__forceinline
void
SetThreadpoolCallbackCleanupGroup(
PTP_CALLBACK_ENVIRON pcbe,
PTP_CLEANUP_GROUP ptpcg,
PTP_CLEANUP_GROUP_CANCEL_CALLBACK pfng
)
{
TpSetCallbackCleanupGroup(pcbe, ptpcg, pfng);
}
__forceinline
void
SetThreadpoolCallbackRunsLong(
PTP_CALLBACK_ENVIRON pcbe
)
{
TpSetCallbackLongFunction(pcbe);
}
__forceinline
void
SetThreadpoolCallbackLibrary(
PTP_CALLBACK_ENVIRON pcbe,
PVOID mod
)
{
TpSetCallbackRaceWithDll(pcbe, mod);
}
__forceinline
void
SetThreadpoolCallbackPriority(
PTP_CALLBACK_ENVIRON pcbe,
TP_CALLBACK_PRIORITY Priority
)
{
TpSetCallbackPriority(pcbe, Priority);
}
__forceinline
void
DestroyThreadpoolEnvironment(
PTP_CALLBACK_ENVIRON pcbe
)
{
TpDestroyCallbackEnviron(pcbe);
}
# 7282 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__forceinline
void
SetThreadpoolCallbackPersistent(
PTP_CALLBACK_ENVIRON pcbe
)
{
TpSetCallbackPersistent(pcbe);
}
# 7299 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Private Namespaces support
//
__declspec(dllimport)
HANDLE
__stdcall
CreatePrivateNamespaceA(
LPSECURITY_ATTRIBUTES lpPrivateNamespaceAttributes,
LPVOID lpBoundaryDescriptor,
LPCSTR lpAliasPrefix
);
__declspec(dllimport)
HANDLE
__stdcall
OpenPrivateNamespaceA(
LPVOID lpBoundaryDescriptor,
LPCSTR lpAliasPrefix
);
# 7335 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Boundary descriptors support
//
__declspec(dllimport)
HANDLE
__stdcall
CreateBoundaryDescriptorA(
LPCSTR Name,
ULONG Flags
);
# 7360 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
__declspec(dllimport)
BOOL
__stdcall
AddIntegrityLabelToBoundaryDescriptor(
HANDLE * BoundaryDescriptor,
PSID IntegrityLabel
);
# 7377 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
//
// Plug-and-Play API's
//
# 7390 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
typedef struct tagHW_PROFILE_INFOA {
DWORD dwDockInfo;
CHAR szHwProfileGuid[39];
CHAR szHwProfileName[80];
} HW_PROFILE_INFOA, *LPHW_PROFILE_INFOA;
typedef struct tagHW_PROFILE_INFOW {
DWORD dwDockInfo;
WCHAR szHwProfileGuid[39];
WCHAR szHwProfileName[80];
} HW_PROFILE_INFOW, *LPHW_PROFILE_INFOW;
typedef HW_PROFILE_INFOA HW_PROFILE_INFO;
typedef LPHW_PROFILE_INFOA LPHW_PROFILE_INFO;
__declspec(dllimport)
BOOL
__stdcall
GetCurrentHwProfileA (
LPHW_PROFILE_INFOA lpHwProfileInfo
);
__declspec(dllimport)
BOOL
__stdcall
GetCurrentHwProfileW (
LPHW_PROFILE_INFOW lpHwProfileInfo
);
__declspec(dllimport)
BOOL
__stdcall
VerifyVersionInfoA(
LPOSVERSIONINFOEXA lpVersionInformation,
DWORD dwTypeMask,
DWORDLONG dwlConditionMask
);
__declspec(dllimport)
BOOL
__stdcall
VerifyVersionInfoW(
LPOSVERSIONINFOEXW lpVersionInformation,
DWORD dwTypeMask,
DWORDLONG dwlConditionMask
);
# 7454 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\um\\winbase.h" 3
// DOS and OS/2 Compatible Error Code definitions returned by the Win32 Base
// API functions.
//
# 1 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\winerror.h" 1 3
/************************************************************************
* *
* winerror.h -- error code definitions for the Win32 API functions *
* *
* Copyright (c) Microsoft Corp. All rights reserved. *
* *
************************************************************************/
# 26 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\winerror.h" 3
//
// Note: There is a slightly modified layout for HRESULT values below,
// after the heading "COM Error Codes".
//
// Search for "**** Available SYSTEM error codes ****" to find where to
// insert new error codes
//
// Values are 32 bit values laid out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---+-+-+-----------------------+-------------------------------+
// |Sev|C|R| Facility | Code |
// +---+-+-+-----------------------+-------------------------------+
//
// where
//
// Sev - is the severity code
//
// 00 - Success
// 01 - Informational
// 10 - Warning
// 11 - Error
//
// C - is the Customer code flag
//
// R - is a reserved bit
//
// Facility - is the facility code
//
// Code - is the facility's status code
//
//
// Define the facility codes
//
# 202 "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.15063.0\\shared\\winerror.h" 3
//
// Define the severity codes
//
//
// MessageId: ERROR_SUCCESS
//
// MessageText:
//
// The operation completed successfully.
//
//
// MessageId: ERROR_INVALID_FUNCTION
//
// MessageText:
//
// Incorrect function.
//
//
// MessageId: ERROR_FILE_NOT_FOUND
//
// MessageText:
//
// The system cannot find the file specified.
//
//
// MessageId: ERROR_PATH_NOT_FOUND
//
// MessageText:
//
// The system cannot find the path specified.
//
//
// MessageId: ERROR_TOO_MANY_OPEN_FILES
//
// MessageText:
//
// The system cannot open the file.
//
//
// MessageId: ERROR_ACCESS_DENIED
//
// MessageText:
//
// Access is denied.
//
//
// MessageId: ERROR_INVALID_HANDLE
//
// MessageText:
//
// The handle is invalid.
//
//
// MessageId: ERROR_ARENA_TRASHED
//
// MessageText:
//
// The storage control blocks were destroyed.
//
//
// MessageId: ERROR_NOT_ENOUGH_MEMORY
//
// MessageText:
//
// Not enough storage is available to process this command.
//
//
// MessageId: ERROR_INVALID_BLOCK
//
// MessageText:
//
// The storage control block address is invalid.
//
//
// MessageId: ERROR_BAD_ENVIRONMENT
//
// MessageText:
//
// The environment is incorrect.
//
//
// MessageId: ERROR_BAD_FORMAT
//
// MessageText:
//
// An attempt was made to load a program with an incorrect format.
//
//
// MessageId: ERROR_INVALID_ACCESS
//
// MessageText:
//
// The access code is invalid.
//
//
// MessageId: ERROR_INVALID_DATA
//
// MessageText:
//
// The data is invalid.
//
//
// MessageId: ERROR_OUTOFMEMORY
//
// MessageText:
//
// Not enough storage is available to complete this operation.
//
//
// MessageId: ERROR_INVALID_DRIVE
//
// MessageText:
//
// The system cannot find the drive specified.
//
//
// MessageId: ERROR_CURRENT_DIRECTORY
//
// MessageText:
//
// The directory cannot be removed.
//
//
// MessageId: ERROR_NOT_SAME_DEVICE
//
// MessageText:
//
// The system cannot move the file to a different disk drive.
//
//
// MessageId: ERROR_NO_MORE_FILES
//
// MessageText:
//
// There are no more files.
//
//
// MessageId: ERROR_WRITE_PROTECT
//
// MessageText:
//
// The media is write protected.
//
//
// MessageId: ERROR_BAD_UNIT
//
// MessageText:
//
// The system cannot find the device specified.
//
//
// MessageId: ERROR_NOT_READY
//
// MessageText:
//
// The device is not ready.
//
//
// MessageId: ERROR_BAD_COMMAND
//
// MessageText:
//
// The device does not recognize the command.
//
//
// MessageId: ERROR_CRC
//
// MessageText:
//
// Data error (cyclic redundancy check).
//
//
// MessageId: ERROR_BAD_LENGTH
//
// MessageText:
//
// The program issued a command but the command length is incorrect.
//
//
// MessageId: ERROR_SEEK
//
// MessageText:
//
// The drive cannot locate a specific area or track on the disk.
//
//
// MessageId: ERROR_NOT_DOS_DISK
//
// MessageText:
//
// The specified disk or diskette cannot be accessed.
//
//
// MessageId: ERROR_SECTOR_NOT_FOUND
//
// MessageText:
//
// The drive cannot find the sector requested.
//
//
// MessageId: ERROR_OUT_OF_PAPER
//
// MessageText:
//
// The printer is out of paper.
//
//
// MessageId: ERROR_WRITE_FAULT
//
// MessageText:
//
// The system cannot write to the specified device.
//
//
// MessageId: ERROR_READ_FAULT
//
// MessageText:
//
// The system cannot read from the specified device.
//
//
// MessageId: ERROR_GEN_FAILURE
//
// MessageText:
//
// A device attached to the system is not functioning.
//
//
// MessageId: ERROR_SHARING_VIOLATION
//
// MessageText:
//
// The process cannot access the file because it is being used by another process.
//
//
// MessageId: ERROR_LOCK_VIOLATION
//
// MessageText:
//
// The process cannot access the file because another process has locked a portion of the file.
//
//
// MessageId: ERROR_WRONG_DISK
//
// MessageText:
//
// The wrong diskette is in the drive.
// Insert %2 (Volume Serial Number: %3) into drive %1.
//
//
// MessageId: ERROR_SHARING_BUFFER_EXCEEDED
//
// MessageText:
//
// Too many files opened for sharing.
//
//
// MessageId: ERROR_HANDLE_EOF
//
// MessageText:
//
// Reached the end of the file.
//
//
// MessageId: ERROR_HANDLE_DISK_FULL
//
// MessageText:
//
// The disk is full.
//
//
// MessageId: ERROR_NOT_SUPPORTED
//
// MessageText:
//
// The request is not supported.
//
//
// MessageId: ERROR_REM_NOT_LIST
//
// MessageText:
//
// Windows cannot find the network path. Verify that the network path is correct and the destination computer is not busy or turned off. If Windows still cannot find the network path, contact your network administrator.
//
//
// MessageId: ERROR_DUP_NAME
//
// MessageText:
//
// You were not connected because a duplicate name exists on the network. If joining a domain, go to System in Control Panel to change the computer name and try again. If joining a workgroup, choose another workgroup name.
//
//
// MessageId: ERROR_BAD_NETPATH
//
// MessageText:
//
// The network path was not found.
//
//
// MessageId: ERROR_NETWORK_BUSY
//
// MessageText:
//
// The network is busy.
//
//
// MessageId: ERROR_DEV_NOT_EXIST
//
// MessageText:
//
// The specified network resource or device is no longer available.
//
//
// MessageId: ERROR_TOO_MANY_CMDS
//
// MessageText:
//
// The network BIOS command limit has been reached.
//
//
// MessageId: ERROR_ADAP_HDW_ERR
//
// MessageText:
//
// A network adapter hardware error occurred.
//
//
// MessageId: ERROR_BAD_NET_RESP
//
// MessageText:
//
// The specified server cannot perform the requested operation.
//
//
// MessageId: ERROR_UNEXP_NET_ERR
//
// MessageText:
//
// An unexpected network error occurred.
//
//
// MessageId: ERROR_BAD_REM_ADAP
//
// MessageText:
//
// The remote adapter is not compatible.
//
//
// MessageId: ERROR_PRINTQ_FULL
//
// MessageText:
//
// The printer queue is full.
//
//
// MessageId: ERROR_NO_SPOOL_SPACE
//
// MessageText:
//
// Space to store the file waiting to be printed is not available on the server.
//
//
// MessageId: ERROR_PRINT_CANCELLED
//
// MessageText:
//
// Your file waiting to be printed was deleted.
//
//
// MessageId: ERROR_NETNAME_DELETED
//
// MessageText:
//
// The specified network name is no longer available.
//
//
// MessageId: ERROR_NETWORK_ACCESS_DENIED
//
// MessageText:
//
// Network access is denied.
//
//
// MessageId: ERROR_BAD_DEV_TYPE
//
// MessageText:
//
// The network resource type is not correct.
//
//
// MessageId: ERROR_BAD_NET_NAME
//
// MessageText:
//
// The network name cannot be found.
//
//
// MessageId: ERROR_TOO_MANY_NAMES
//
// MessageText:
//
// The name limit for the local computer network adapter card was exceeded.
//
//
// MessageId: ERROR_TOO_MANY_SESS
//
// MessageText:
//
// The network BIOS session limit was exceeded.
//
//
// MessageId: ERROR_SHARING_PAUSED
//
// MessageText:
//
// The remote server has been paused or is in the process of being started.
//
//
// MessageId: ERROR_REQ_NOT_ACCEP
//
// MessageText:
//
// No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.
//
//
// MessageId: ERROR_REDIR_PAUSED
//
// MessageText:
//
// The specified printer or disk device has been paused.
//
//
// MessageId: ERROR_FILE_EXISTS
//
// MessageText:
//
// The file exists.
//
//
// MessageId: ERROR_CANNOT_MAKE
//
// MessageText:
//
// The directory or file cannot be created.
//
//
// MessageId: ERROR_FAIL_I24
//
// MessageText:
//
// Fail on INT 24.
//
//
// MessageId: ERROR_OUT_OF_STRUCTURES
//
// MessageText:
//
// Storage to process this request is not available.
//
//
// MessageId: ERROR_ALREADY_ASSIGNED
//
// MessageText:
//
// The local device name is already in use.
//
//
// MessageId: ERROR_INVALID_PASSWORD
//
// MessageText:
//
// The specified network password is not correct.
//
//
// MessageId: ERROR_INVALID_PARAMETER
//
// MessageText:
//
// The parameter is incorrect.
//
//
// MessageId: ERROR_NET_WRITE_FAULT
//
// MessageText:
//
// A write fault occurred on the network.
//
//
// MessageId: ERROR_NO_PROC_SLOTS
//
// MessageText:
//
// The system cannot start another process at this time.
//
//
// MessageId: ERROR_TOO_MANY_SEMAPHORES
//
// MessageText:
//
// Cannot create another system semaphore.
//
//
// MessageId: ERROR_EXCL_SEM_ALREADY_OWNED
//
// MessageText:
//
// The exclusive semaphore is owned by another process.
//
//
// MessageId: ERROR_SEM_IS_SET
//
// MessageText:
//
// The semaphore is set and cannot be closed.
//
//
// MessageId: ERROR_TOO_MANY_SEM_REQUESTS
//
// MessageText:
//
// The semaphore cannot be set again.
//
//
// MessageId: ERROR_INVALID_AT_INTERRUPT_TIME
//
// MessageText:
//
// Cannot request exclusive semaphores at interrupt time.
//
//
// MessageId: ERROR_SEM_OWNER_DIED
//
// MessageText:
//
// The previous ownership of this semaphore has ended.
//
//
// MessageId: ERROR_SEM_USER_LIMIT
//
// MessageText:
//
// Insert the diskette for drive %1.
//
//
// MessageId: ERROR_DISK_CHANGE
//
// MessageText:
//
// The program stopped because an alternate diskette was not inserted.
//
//
// MessageId: ERROR_DRIVE_LOCKED
//
// MessageText:
//
// The disk is in use or locked by another process.
//
//
// MessageId: ERROR_BROKEN_PIPE
//
// MessageText:
//
// The pipe has been ended.
//
//
// MessageId: ERROR_OPEN_FAILED
//
// MessageText:
//
// The system cannot open the device or file specified.
//
//
// MessageId: ERROR_BUFFER_OVERFLOW
//
// MessageText:
//
// The file name is too long.
//
//
// MessageId: ERROR_DISK_FULL
//
// MessageText:
//
// There is not enough space on the disk.
//
//
// MessageId: ERROR_NO_MORE_SEARCH_HANDLES
//
// MessageText:
//
// No more internal file identifiers available.
//
//
// MessageId: ERROR_INVALID_TARGET_HANDLE
//
// MessageText:
//
// The target internal file identifier is incorrect.
//
//
// MessageId: ERROR_INVALID_CATEGORY
//
// MessageText:
//
// The IOCTL call made by the application program is not correct.
//
//
// MessageId: ERROR_INVALID_VERIFY_SWITCH
//
// MessageText:
//
// The verify-on-write switch parameter value is not correct.
//
//
// MessageId: ERROR_BAD_DRIVER_LEVEL
//
// MessageText:
//
// The system does not support the command requested.
//
//
// MessageId: ERROR_CALL_NOT_IMPLEMENTED
//
// MessageText:
//
// This function is not supported on this system.
//
//
// MessageId: ERROR_SEM_TIMEOUT
//
// MessageText:
//
// The semaphore timeout period has expired.
//
//
// MessageId: ERROR_INSUFFICIENT_BUFFER
//
// MessageText:
//
// The data area passed to a system call is too small.
//
//
// MessageId: ERROR_INVALID_NAME
//
// MessageText:
//
// The filename, directory name, or volume label syntax is incorrect.
//
//
// MessageId: ERROR_INVALID_LEVEL
//
// MessageText:
//
// The system call level is not correct.
//
//
// MessageId: ERROR_NO_VOLUME_LABEL
//
// MessageText:
//
// The disk has no volume label.
//
//
// MessageId: ERROR_MOD_NOT_FOUND
//
// MessageText:
//
// The specified module could not be found.
//
//
// MessageId: ERROR_PROC_NOT_FOUND
//
// MessageText:
//
// The specified procedure could not be found.
//
//
// MessageId: ERROR_WAIT_NO_CHILDREN
//
// MessageText:
//
// There are no child processes to wait for.
//
//
// MessageId: ERROR_CHILD_NOT_COMPLETE
//
// MessageText:
//
// The %1 application cannot be run in Win32 mode.
//
//
// MessageId: ERROR_DIRECT_ACCESS_HANDLE
//
// MessageText:
//
// Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O.
//
//
// MessageId: ERROR_NEGATIVE_SEEK
//
// MessageText:
//
// An attempt was made to move the file pointer before the beginning of the file.
//
//
// MessageId: ERROR_SEEK_ON_DEVICE
//
// MessageText:
//
// The file pointer cannot be set on the specified device or file.
//
//
// MessageId: ERROR_IS_JOIN_TARGET
//
// MessageText:
//
// A JOIN or SUBST command cannot be used for a drive that contains previously joined drives.
//
//
// MessageId: ERROR_IS_JOINED
//
// MessageText:
//
// An attempt was made to use a JOIN or SUBST command on a drive that has already been joined.
//
//
// MessageId: ERROR_IS_SUBSTED
//
// MessageText:
//
// An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.
//
//
// MessageId: ERROR_NOT_JOINED
//
// MessageText:
//
// The system tried to delete the JOIN of a drive that is not joined.
//
//
// MessageId: ERROR_NOT_SUBSTED
//
// MessageText:
//
// The system tried to delete the substitution of a drive that is not substituted.
//
//
// MessageId: ERROR_JOIN_TO_JOIN
//
// MessageText:
//
// The system tried to join a drive to a directory on a joined drive.
//
//
// MessageId: ERROR_SUBST_TO_SUBST
//
// MessageText:
//
// The system tried to substitute a drive to a directory on a substituted drive.
//
//
// MessageId: ERROR_JOIN_TO_SUBST
//
// MessageText:
//
// The system tried to join a drive to a directory on a substituted drive.
//
//
// MessageId: ERROR_SUBST_TO_JOIN
//
// MessageText:
//
// The system tried to SUBST a drive to a directory on a joined drive.
//
//
// MessageId: ERROR_BUSY_DRIVE
//
// MessageText:
//
// The system cannot perform a JOIN or SUBST at this time.
//
//
// MessageId: ERROR_SAME_DRIVE
//
// MessageText:
//
// The system cannot join or substitute a drive to or for a directory on the same drive.
//
//
// MessageId: ERROR_DIR_NOT_ROOT
//
// MessageText:
//
// The directory is not a subdirectory of the root directory.
//
//
// MessageId: ERROR_DIR_NOT_EMPTY
//
// MessageText:
//
// The directory is not empty.
//
//
// MessageId: ERROR_IS_SUBST_PATH
//
// MessageText:
//
// The path specified is being used in a substitute.
//
//
// MessageId: ERROR_IS_JOIN_PATH
//
// MessageText:
//
// Not enough resources are available to process this command.
//
//
// MessageId: ERROR_PATH_BUSY
//
// MessageText:
//
// The path specified cannot be used at this time.
//
//
// MessageId: ERROR_IS_SUBST_TARGET
//
// MessageText:
//
// An attempt was made to join or substitute a drive for which a directory on the drive is the target of a previous substitute.
//
//
// MessageId: ERROR_SYSTEM_TRACE
//
// MessageText:
//
// System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
//
//
// MessageId: ERROR_INVALID_EVENT_COUNT
//
// MessageText:
//
// The number of specified semaphore events for DosMuxSemWait is not correct.
//
//
// MessageId: ERROR_TOO_MANY_MUXWAITERS
//
// MessageText:
//
// DosMuxSemWait did not execute; too many semaphores are already set.
//
//
// MessageId: ERROR_INVALID_LIST_FORMAT
//
// MessageText:
//
// The DosMuxSemWait list is not correct.
//
//
// MessageId: ERROR_LABEL_TOO_LONG
//
// MessageText:
//
// The volume label you entered exceeds the label character limit of the target file system.
//
//
// MessageId: ERROR_TOO_MANY_TCBS
//
// MessageText:
//
// Cannot create another thread.
//
//
// MessageId: ERROR_SIGNAL_REFUSED
//
// MessageText:
//
// The recipient process has refused the signal.
//
//
// MessageId: ERROR_DISCARDED
//
// MessageText:
//
// The segment is already discarded and cannot be locked.
//
//
// MessageId: ERROR_NOT_LOCKED
//
// MessageText:
//
// The segment is already unlocked.
//
//
// MessageId: ERROR_BAD_THREADID_ADDR
//
// MessageText:
//
// The address for the thread ID is not correct.
//
//
// MessageId: ERROR_BAD_ARGUMENTS
//
// MessageText:
//
// One or more arguments are not correct.
//
//
// MessageId: ERROR_BAD_PATHNAME
//
// MessageText:
//
// The specified path is invalid.
//
//
// MessageId: ERROR_SIGNAL_PENDING
//
// MessageText:
//
// A signal is already pending.
//
//
// MessageId: ERROR_MAX_THRDS_REACHED
//
// MessageText:
//
// No more threads can be created in the system.
//
//
// MessageId: ERROR_LOCK_FAILED
//
// MessageText:
//
// Unable to lock a region of a file.
//
//
// MessageId: ERROR_BUSY
//
// MessageText:
//
// The requested resource is in use.
//
//
// MessageId: ERROR_DEVICE_SUPPORT_IN_PROGRESS
//
// MessageText:
//
// Device's command support detection is in progress.
//
//
// MessageId: ERROR_CANCEL_VIOLATION
//
// MessageText:
//
// A lock request was not outstanding for the supplied cancel region.
//
//
// MessageId: ERROR_ATOMIC_LOCKS_NOT_SUPPORTED
//
// MessageText:
//
// The file system does not support atomic changes to the lock type.
//
//
// MessageId: ERROR_INVALID_SEGMENT_NUMBER
//
// MessageText:
//
// The system detected a segment number that was not correct.
//
//
// MessageId: ERROR_INVALID_ORDINAL
//
// MessageText:
//
// The operating system cannot run %1.
//
//
// MessageId: ERROR_ALREADY_EXISTS
//
// MessageText:
//
// Cannot create a file when that file already exists.
//
//
// MessageId: ERROR_INVALID_FLAG_NUMBER
//
// MessageText:
//
// The flag passed is not correct.
//
//
// MessageId: ERROR_SEM_NOT_FOUND
//
// MessageText:
//
// The specified system semaphore name was not found.
//
//
// MessageId: ERROR_INVALID_STARTING_CODESEG
//
// MessageText:
//
// The operating system cannot run %1.
//
//
// MessageId: ERROR_INVALID_STACKSEG
//
// MessageText:
//
// The operating system cannot run %1.
//
//
// MessageId: ERROR_INVALID_MODULETYPE
//
// MessageText:
//
// The operating system cannot run %1.
//
//
// MessageId: ERROR_INVALID_EXE_SIGNATURE
//
// MessageText:
//
// Cannot run %1 in Win32 mode.
//
//
// MessageId: ERROR_EXE_MARKED_INVALID
//
// MessageText:
//
// The operating system cannot run %1.
//
//
// MessageId: ERROR_BAD_EXE_FORMAT
//
// MessageText:
//
// %1 is not a valid Win32 application.
//
//
// MessageId: ERROR_ITERATED_DATA_EXCEEDS_64k
//
// MessageText:
//
// The operating system cannot run %1.
//
//
// MessageId: ERROR_INVALID_MINALLOCSIZE
//
// MessageText:
//
// The operating system cannot run %1.
//
//
// MessageId: ERROR_DYNLINK_FROM_INVALID_RING
//
// MessageText:
//
// The operating system cannot run this application program.
//
//
// MessageId: ERROR_IOPL_NOT_ENABLED
//
// MessageText:
//
// The operating system is not presently configured to run this application.
//
//
// MessageId: ERROR_INVALID_SEGDPL
//
// MessageText:
//
// The operating system cannot run %1.
//
//
// MessageId: ERROR_AUTODATASEG_EXCEEDS_64k
//
// MessageText:
//
// The operating system cannot run this application program.
//
//
// MessageId: ERROR_RING2SEG_MUST_BE_MOVABLE
//
// MessageText:
//
// The code segment cannot be greater than or equal to 64K.
//
//
// MessageId: ERROR_RELOC_CHAIN_XEEDS_SEGLIM
//
// MessageText:
//
// The operating system cannot run %1.
//
//
// MessageId: ERROR_INFLOOP_IN_RELOC_CHAIN
//
// MessageText:
//
// The operating system cannot run %1.
//
//
// MessageId: ERROR_ENVVAR_NOT_FOUND
//
// MessageText:
//
// The system could not find the environment option that was entered.
//
//
// MessageId: ERROR_NO_SIGNAL_SENT
//
// MessageText:
//
// No process in the command subtree has a signal handler.
//
//
// MessageId: ERROR_FILENAME_EXCED_RANGE
//
// MessageText:
//
// The filename or extension is too long.
//
//
// MessageId: ERROR_RING2_STACK_IN_USE
//
// MessageText:
//
// The ring 2 stack is in use.
//
//
// MessageId: ERROR_META_EXPANSION_TOO_LONG
//
// MessageText:
//
// The global filename characters, * or ?, are entered incorrectly or too many global filename characters are specified.
//
//
// MessageId: ERROR_INVALID_SIGNAL_NUMBER
//
// MessageText:
//
// The signal being posted is not correct.
//
//
// MessageId: ERROR_THREAD_1_INACTIVE
//
// MessageText:
//
// The signal handler cannot be set.
//
//
// MessageId: ERROR_LOCKED
//
// MessageText:
//
// The segment is locked and cannot be reallocated.
//
//
// MessageId: ERROR_TOO_MANY_MODULES
//
// MessageText:
//
// Too many dynamic-link modules are attached to this program or dynamic-link module.
//
//
// MessageId: ERROR_NESTING_NOT_ALLOWED
//
// MessageText:
//
// Cannot nest calls to LoadModule.
//
//
// MessageId: ERROR_EXE_MACHINE_TYPE_MISMATCH
//
// MessageText:
//
// This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
//
//
// MessageId: ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY
//
// MessageText:
//
// The image file %1 is signed, unable to modify.
//
//
// MessageId: ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY
//
// MessageText:
//
// The image file %1 is strong signed, unable to modify.
//
//
// MessageId: ERROR_FILE_CHECKED_OUT
//
// MessageText:
//
// This file is checked out or locked for editing by another user.
//
//
// MessageId: ERROR_CHECKOUT_REQUIRED
//
// MessageText:
//
// The file must be checked out before saving changes.
//
//
// MessageId: ERROR_BAD_FILE_TYPE
//
// MessageText:
//
// The file type being saved or retrieved has been blocked.
//
//
// MessageId: ERROR_FILE_TOO_LARGE
//
// MessageText:
//
// The file size exceeds the limit allowed and cannot be saved.
//
//
// MessageId: ERROR_FORMS_AUTH_REQUIRED
//
// MessageText:
//
// Access Denied. Before opening files in this location, you must first add the web site to your trusted sites list, browse to the web site, and select the option to login automatically.
//
//
// MessageId: ERROR_VIRUS_INFECTED
//
// MessageText:
//
// Operation did not complete successfully because the file contains a virus or potentially unwanted software.
//
//
// MessageId: ERROR_VIRUS_DELETED
//
// MessageText:
//
// This file contains a virus or potentially unwanted software and cannot be opened. Due to the nature of this virus or potentially unwanted software, the file has been removed from this location.
//
//
// MessageId: ERROR_PIPE_LOCAL
//
// MessageText:
//
// The pipe is local.
//
//
// MessageId: ERROR_BAD_PIPE
//
// MessageText:
//
// The pipe state is invalid.
//
//
// MessageId: ERROR_PIPE_BUSY
//
// MessageText:
//
// All pipe instances are busy.
//
//
// MessageId: ERROR_NO_DATA
//
// MessageText:
//
// The pipe is being closed.
//
//
// MessageId: ERROR_PIPE_NOT_CONNECTED
//
// MessageText:
//
// No process is on the other end of the pipe.
//
//
// MessageId: ERROR_MORE_DATA
//
// MessageText:
//
// More data is available.
//
//
// MessageId: ERROR_NO_WORK_DONE
//
// MessageText:
//
// The action requested resulted in no work being done. Error-style clean-up has been performed.
//
//
// MessageId: ERROR_VC_DISCONNECTED
//
// MessageText:
//
// The session was canceled.
//
//
// MessageId: ERROR_INVALID_EA_NAME
//
// MessageText:
//
// The specified extended attribute name was invalid.
//
//
// MessageId: ERROR_EA_LIST_INCONSISTENT
//
// MessageText:
//
// The extended attributes are inconsistent.
//
//
// MessageId: WAIT_TIMEOUT
//
// MessageText:
//
// The wait operation timed out.
//
//
// MessageId: ERROR_NO_MORE_ITEMS
//
// MessageText:
//
// No more data is available.
//
//
// MessageId: ERROR_CANNOT_COPY
//
// MessageText:
//
// The copy functions cannot be used.
//
//
// MessageId: ERROR_DIRECTORY
//
// MessageText:
//
// The directory name is invalid.
//
//
// MessageId: ERROR_EAS_DIDNT_FIT
//
// MessageText:
//
// The extended attributes did not fit in the buffer.
//
//
// MessageId: ERROR_EA_FILE_CORRUPT
//
// MessageText:
//
// The extended attribute file on the mounted file system is corrupt.
//
//
// MessageId: ERROR_EA_TABLE_FULL
//
// MessageText:
//
// The extended attribute table file is full.
//
//
// MessageId: ERROR_INVALID_EA_HANDLE
//
// MessageText:
//
// The specified extended attribute handle is invalid.
//
//
// MessageId: ERROR_EAS_NOT_SUPPORTED
//
// MessageText:
//
// The mounted file system does not support extended attributes.
//
//
// MessageId: ERROR_NOT_OWNER
//
// MessageText:
//
// Attempt to release mutex not owned by caller.
//
//
// MessageId: ERROR_TOO_MANY_POSTS
//
// MessageText:
//
// Too many posts were made to a semaphore.
//
//
// MessageId: ERROR_PARTIAL_COPY
//
// MessageText:
//
// Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
//
//
// MessageId: ERROR_OPLOCK_NOT_GRANTED
//
// MessageText:
//
// The oplock request is denied.
//
//
// MessageId: ERROR_INVALID_OPLOCK_PROTOCOL
//
// MessageText:
//
// An invalid oplock acknowledgment was received by the system.
//
//
// MessageId: ERROR_DISK_TOO_FRAGMENTED
//
// MessageText:
//
// The volume is too fragmented to complete this operation.
//
//
// MessageId: ERROR_DELETE_PENDING
//
// MessageText:
//
// The file cannot be opened because it is in the process of being deleted.
//
//
// MessageId: ERROR_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING
//
// MessageText:
//
// Short name settings may not be changed on this volume due to the global registry setting.
//
//
// MessageId: ERROR_SHORT_NAMES_NOT_ENABLED_ON_VOLUME
//
// MessageText:
//
// Short names are not enabled on this volume.
//
//
// MessageId: ERROR_SECURITY_STREAM_IS_INCONSISTENT
//
// MessageText:
//
// The security stream for the given volume is in an inconsistent state.
// Please run CHKDSK on the volume.
//
//
// MessageId: ERROR_INVALID_LOCK_RANGE
//
// MessageText:
//
// A requested file lock operation cannot be processed due to an invalid byte range.
//
//
// MessageId: ERROR_IMAGE_SUBSYSTEM_NOT_PRESENT
//
// MessageText:
//
// The subsystem needed to support the image type is not present.
//
//
// MessageId: ERROR_NOTIFICATION_GUID_ALREADY_DEFINED
//
// MessageText:
//
// The specified file already has a notification GUID associated with it.
//
//
// MessageId: ERROR_INVALID_EXCEPTION_HANDLER
//
// MessageText:
//
// An invalid exception handler routine has been detected.
//
//
// MessageId: ERROR_DUPLICATE_PRIVILEGES
//
// MessageText:
//
// Duplicate privileges were specified for the token.
//
//
// MessageId: ERROR_NO_RANGES_PROCESSED
//
// MessageText:
//
// No ranges for the specified operation were able to be processed.
//
//
// MessageId: ERROR_NOT_ALLOWED_ON_SYSTEM_FILE
//
// MessageText:
//
// Operation is not allowed on a file system internal file.
//
//
// MessageId: ERROR_DISK_RESOURCES_EXHAUSTED
//
// MessageText:
//
// The physical resources of this disk have been exhausted.
//
//
// MessageId: ERROR_INVALID_TOKEN
//
// MessageText:
//
// The token representing the data is invalid.
//
//
// MessageId: ERROR_DEVICE_FEATURE_NOT_SUPPORTED
//
// MessageText:
//
// The device does not support the command feature.
//
//
// MessageId: ERROR_MR_MID_NOT_FOUND
//
// MessageText:
//
// The system cannot find message text for message number 0x%1 in the message file for %2.
//
//
// MessageId: ERROR_SCOPE_NOT_FOUND
//
// MessageText:
//
// The scope specified was not found.
//
//
// MessageId: ERROR_UNDEFINED_SCOPE
//
// MessageText:
//
// The Central Access Policy specified is not defined on the target machine.
//
//
// MessageId: ERROR_INVALID_CAP
//
// MessageText:
//
// The Central Access Policy obtained from Active Directory is invalid.
//
//
// MessageId: ERROR_DEVICE_UNREACHABLE
//
// MessageText:
//
// The device is unreachable.
//
//
// MessageId: ERROR_DEVICE_NO_RESOURCES
//
// MessageText:
//
// The target device has insufficient resources to complete the operation.
//
//
// MessageId: ERROR_DATA_CHECKSUM_ERROR
//
// MessageText:
//
// A data integrity checksum error occurred. Data in the file stream is corrupt.
//
//
// MessageId: ERROR_INTERMIXED_KERNEL_EA_OPERATION
//
// MessageText:
//
// An attempt was made to modify both a KERNEL and normal Extended Attribute (EA) in the same operation.
//
//
// MessageId: ERROR_FILE_LEVEL_TRIM_NOT_SUPPORTED
//
// MessageText:
//
// Device does not support file-level TRIM.
//
//
// MessageId: ERROR_OFFSET_ALIGNMENT_VIOLATION
//
// MessageText:
//
// The command specified a data offset that does not align to the device's granularity/alignment.
//
//
// MessageId: ERROR_INVALID_FIELD_IN_PARAMETER_LIST
//
// MessageText:
//
// The command specified an invalid field in its parameter list.
//
//
// MessageId: ERROR_OPERATION_IN_PROGRESS
//
// MessageText:
//
// An operation is currently in progress with the device.
//
//
// MessageId: ERROR_BAD_DEVICE_PATH
//
// MessageText:
//
// An attempt was made to send down the command via an invalid path to the target device.
//
//
// MessageId: ERROR_TOO_MANY_DESCRIPTORS
//
// MessageText:
//
// The command specified a number of descriptors that exceeded the maximum supported by the device.
//
//
// MessageId: ERROR_SCRUB_DATA_DISABLED
//
// MessageText:
//
// Scrub is disabled on the specified file.
//
//
// MessageId: ERROR_NOT_REDUNDANT_STORAGE
//
// MessageText:
//
// The storage device does not provide redundancy.
//
//
// MessageId: ERROR_RESIDENT_FILE_NOT_SUPPORTED
//
// MessageText:
//
// An operation is not supported on a resident file.
//
//
// MessageId: ERROR_COMPRESSED_FILE_NOT_SUPPORTED
//
// MessageText:
//
// An operation is not supported on a compressed file.
//
//
// MessageId: ERROR_DIRECTORY_NOT_SUPPORTED
//
// MessageText:
//
// An operation is not supported on a directory.
//
//
// MessageId: ERROR_NOT_READ_FROM_COPY
//
// MessageText:
//
// The specified copy of the requested data could not be read.
//
//
// MessageId: ERROR_FT_WRITE_FAILURE
//
// MessageText:
//
// The specified data could not be written to any of the copies.
//
//
// MessageId: ERROR_FT_DI_SCAN_REQUIRED
//
// MessageText:
//
// One or more copies of data on this device may be out of sync. No writes may be performed until a data integrity scan is completed.
//
//
// MessageId: ERROR_INVALID_KERNEL_INFO_VERSION
//
// MessageText:
//
// The supplied kernel information version is invalid.
//
//
// MessageId: ERROR_INVALID_PEP_INFO_VERSION
//
// MessageText:
//
// The supplied PEP information version is invalid.
//
//
// MessageId: ERROR_OBJECT_NOT_EXTERNALLY_BACKED
//
// MessageText:
//
// This object is not externally backed by any provider.
//
//
// MessageId: ERROR_EXTERNAL_BACKING_PROVIDER_UNKNOWN
//
// MessageText:
//
// The external backing provider is not recognized.
//
//
// MessageId: ERROR_COMPRESSION_NOT_BENEFICIAL
//
// MessageText:
//
// Compressing this object would not save space.
//
//
// MessageId: ERROR_STORAGE_TOPOLOGY_ID_MISMATCH
//
// MessageText:
//
// The request failed due to a storage topology ID mismatch.
//
//
// MessageId: ERROR_BLOCKED_BY_PARENTAL_CONTROLS
//
// MessageText:
//
// The operation was blocked by parental controls.
//
//
// MessageId: ERROR_BLOCK_TOO_MANY_REFERENCES
//
// MessageText:
//
// A file system block being referenced has already reached the maximum reference count and can't be referenced any further.
//
//
// MessageId: ERROR_MARKED_TO_DISALLOW_WRITES
//
// MessageText:
//
// The requested operation failed because the file stream is marked to disallow writes.
//
//
// MessageId: ERROR_ENCLAVE_FAILURE
//
// MessageText:
//
// The requested operation failed with an architecture-specific failure code.
//
//
// MessageId: ERROR_FAIL_NOACTION_REBOOT
//
// MessageText:
//
// No action was taken as a system reboot is required.
//
//
// MessageId: ERROR_FAIL_SHUTDOWN
//
// MessageText:
//
// The shutdown operation failed.
//
//
// MessageId: ERROR_FAIL_RESTART
//
// MessageText:
//
// The restart operation failed.
//
//
// MessageId: ERROR_MAX_SESSIONS_REACHED
//
// MessageText:
//
// The maximum number of sessions has been reached.
//
//
// MessageId: ERROR_NETWORK_ACCESS_DENIED_EDP
//
// MessageText:
//
// Windows Information Protection policy does not allow access to this network resource.
//
//
// MessageId: ERROR_DEVICE_HINT_NAME_BUFFER_TOO_SMALL
//
// MessageText:
//
// The device hint name buffer is too small to receive the remaining name.
//
//
// MessageId: ERROR_EDP_POLICY_DENIES_OPERATION
//
// MessageText:
//
// The requested operation was blocked by Windows Information Protection policy. For more information, contact your system administrator.
//
//
// MessageId: ERROR_EDP_DPL_POLICY_CANT_BE_SATISFIED
//
// MessageText:
//
// The requested operation cannot be performed because hardware or software configuration of the device does not comply with Windows Information Protection under Lock policy. Please, verify that user PIN has been created. For more information, contact your system administrator.
//
//
// MessageId: ERROR_CLOUD_FILE_PROVIDER_UNKNOWN
//
// MessageText:
//
// The Cloud File provider is unknown.
//
//
// MessageId: ERROR_DEVICE_IN_MAINTENANCE
//
// MessageText:
//
// The device is in maintenance mode.
//
//
// MessageId: ERROR_NOT_SUPPORTED_ON_DAX
//
// MessageText:
//
// This operation is not supported on a DAX volume.
//
//
// MessageId: ERROR_DAX_MAPPING_EXISTS
//
// MessageText:
//
// The volume has active DAX mappings.
//
//
// MessageId: ERROR_CLOUD_FILE_PROVIDER_NOT_RUNNING
//
// MessageText:
//
// The Cloud File provider is not running.
//
//
// MessageId: ERROR_CLOUD_FILE_METADATA_CORRUPT
//
// MessageText:
//
// The Cloud File metadata is corrupt and unreadable.
//
//
// MessageId: ERROR_CLOUD_FILE_METADATA_TOO_LARGE
//
// MessageText:
//
// The operation could not be completed because the Cloud File metadata is too large.
//
//
// MessageId: ERROR_CLOUD_FILE_PROPERTY_BLOB_TOO_LARGE
//
// MessageText:
//
// The operation could not be completed because the Cloud File property blob is too large.
//
//
// MessageId: ERROR_CLOUD_FILE_PROPERTY_BLOB_CHECKSUM_MISMATCH
//
// MessageText:
//
// The Cloud File property blob is possibly corrupt. The on-disk checksum does not match the computed checksum.
//
//
// MessageId: ERROR_CHILD_PROCESS_BLOCKED
//
// MessageText:
//
// The process creation has been blocked.
//
//
// MessageId: ERROR_STORAGE_LOST_DATA_PERSISTENCE
//
// MessageText:
//
// The storage device has lost data or persistence.
//
//
// MessageId: ERROR_FILE_SYSTEM_VIRTUALIZATION_UNAVAILABLE
//
// MessageText:
//
// The provider that supports file system virtualization is temporarily unavailable.
//
//
// MessageId: ERROR_FILE_SYSTEM_VIRTUALIZATION_METADATA_CORRUPT
//
// MessageText:
//
// The metadata for file system virtualization is corrupt and unreadable.
//
//
// MessageId: ERROR_FILE_SYSTEM_VIRTUALIZATION_BUSY
//
// MessageText:
//
// The provider that supports file system virtualization is too busy to complete this operation.
//
//
// MessageId: ERROR_FILE_SYSTEM_VIRTUALIZATION_PROVIDER_UNKNOWN
//
// MessageText:
//
// The provider that supports file system virtualization is unknown.
//
//
// MessageId: ERROR_GDI_HANDLE_LEAK
//
// MessageText:
//
// GDI handles were potentially leaked by the application.
//
//
// MessageId: ERROR_CLOUD_FILE_TOO_MANY_PROPERTY_BLOBS
//
// MessageText:
//
// The operation could not be completed because the maximum number of Cloud File property blobs would be exceeded.
//
//
// MessageId: ERROR_CLOUD_FILE_METADATA_VERSION_NOT_SUPPORTED
//
// MessageText:
//
// The operation could not be completed because the Cloud File metadata version is not supported.
//
//
// MessageId: ERROR_NOT_A_CLOUD_FILE
//
// MessageText:
//
// The operation could not be completed because the file is not a Cloud File.
//
//
// MessageId: ERROR_CLOUD_FILE_NOT_IN_SYNC
//
// MessageText:
//
// The operation could not be completed because the Cloud File is not in sync.
//
//
// **** Available SYSTEM error codes ****
//
//
// MessageId: ERROR_THREAD_MODE_ALREADY_BACKGROUND
//
// MessageText:
//
// The thread is already in background processing mode.
//
//
// MessageId: ERROR_THREAD_MODE_NOT_BACKGROUND
//
// MessageText:
//
// The thread is not in background processing mode.
//
//
// MessageId: ERROR_PROCESS_MODE_ALREADY_BACKGROUND
//
// MessageText:
//
// The process is already in background processing mode.
//
//
// MessageId: ERROR_PROCESS_MODE_NOT_BACKGROUND
//
// MessageText:
//
// The process is not in background processing mode.
//
//
// **** Available SYSTEM error codes ****
//
///////////////////////////////////////////////////
// //
// Capability Authorization Error codes //
// //
// 0450 to 0460 //
///////////////////////////////////////////////////
//
// MessageId: ERROR_CAPAUTHZ_NOT_DEVUNLOCKED
//
// MessageText:
//
// Neither developer unlocked mode nor side loading mode is enabled on the device.
//
//
// MessageId: ERROR_CAPAUTHZ_CHANGE_TYPE
//
// MessageText:
//
// Can not change application type during upgrade or re-provision.
//
//
// MessageId: ERROR_CAPAUTHZ_NOT_PROVISIONED
//
// MessageText:
//
// The application has not been provisioned.
//
//
// MessageId: ERROR_CAPAUTHZ_NOT_AUTHORIZED
//
// MessageText:
//
// The requested capability can not be authorized for this application.
//
//
// MessageId: ERROR_CAPAUTHZ_NO_POLICY
//
// MessageText:
//
// There is no capability authorization policy on the device.
//
//
// MessageId: ERROR_CAPAUTHZ_DB_CORRUPTED
//
// MessageText:
//
// The capability authorization database has been corrupted.
//
//
// **** Available SYSTEM error codes ****
//
//
// MessageId: ERROR_PNP_QUERY_REMOVE_DEVICE_TIMEOUT
//
// MessageText:
//
// The operation timed out waiting for this device to complete a PnP query-remove request due to a potential hang in its device stack. The system may need to be rebooted to complete the request.
//
//
// MessageId: ERROR_PNP_QUERY_REMOVE_RELATED_DEVICE_TIMEOUT
//
// MessageText:
//
// The operation timed out waiting for this device to complete a PnP query-remove request due to a potential hang in the device stack of a related device. The system may need to be rebooted to complete the operation.
//
//
// MessageId: ERROR_PNP_QUERY_REMOVE_UNRELATED_DEVICE_TIMEOUT
//
// MessageText:
//
// The operation timed out waiting for this device to complete a PnP query-remove request due to a potential hang in the device stack of an unrelated device. The system may need to be rebooted to complete the operation.
//
//
// MessageId: ERROR_DEVICE_HARDWARE_ERROR
//
// MessageText:
//
// The request failed due to a fatal device hardware error.
//
//
// MessageId: ERROR_INVALID_ADDRESS
//
// MessageText:
//
// Attempt to access invalid address.
//
//
// MessageId: ERROR_VRF_CFG_ENABLED
//
// MessageText:
//
// Driver Verifier Volatile settings cannot be set when CFG is enabled.
//
//
// **** Available SYSTEM error codes ****
//
//
// MessageId: ERROR_USER_PROFILE_LOAD
//
// MessageText:
//
// User profile cannot be loaded.
//
//
// **** Available SYSTEM error codes ****
//
//
// MessageId: ERROR_ARITHMETIC_OVERFLOW
//
// MessageText:
//
// Arithmetic result exceeded 32 bits.
//
//
// MessageId: ERROR_PIPE_CONNECTED
//
// MessageText:
//
// There is a process on other end of the pipe.
//
//
// MessageId: ERROR_PIPE_LISTENING
//
// MessageText:
//
// Waiting for a process to open the other end of the pipe.
//
//
// MessageId: ERROR_VERIFIER_STOP
//
// MessageText:
//
// Application verifier has found an error in the current process.
//
//
// MessageId: ERROR_ABIOS_ERROR
//
// MessageText:
//
// An error occurred in the ABIOS subsystem.
//
//
// MessageId: ERROR_WX86_WARNING
//
// MessageText:
//
// A warning occurred in the WX86 subsystem.
//
//
// MessageId: ERROR_WX86_ERROR
//
// MessageText:
//
// An error occurred in the WX86 subsystem.
//
//
// MessageId: ERROR_TIMER_NOT_CANCELED
//
// MessageText:
//
// An attempt was made to cancel or set a timer that has an associated APC and the subject thread is not the thread that originally set the timer with an associated APC routine.
//
//
// MessageId: ERROR_UNWIND
//
// MessageText:
//
// Unwind exception code.
//
//
// MessageId: ERROR_BAD_STACK
//
// MessageText:
//
// An invalid or unaligned stack was encountered during an unwind operation.
//
//
// MessageId: ERROR_INVALID_UNWIND_TARGET
//
// MessageText:
//
// An invalid unwind target was encountered during an unwind operation.
//
//
// MessageId: ERROR_INVALID_PORT_ATTRIBUTES
//
// MessageText:
//
// Invalid Object Attributes specified to NtCreatePort or invalid Port Attributes spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment