#include <winapifamily.h>
#ifndef _WINBASE_
#define _WINBASE_
#if defined(_MSC_VER)
#if _MSC_VER > 1000
#pragma once
#endif
#if _MSC_VER >= 1200
#pragma warning(push)
#pragma warning(disable:4820) /* padding added after data member */
#pragma warning(disable:
4820
)
#pragma warning(disable:4668) /* #if not_defined treated as #if 0 */
#endif
#pragma warning(disable:
4668
)
#pragma warning(disable:4001) /* nonstandard extension : single line comment */
#pragma warning(disable:
4001
)
#pragma warning(disable:4201) /* nonstandard extension used : nameless struct/union */
#pragma warning(disable:
4201
)
#pragma warning(disable:4214) /* nonstandard extension used : bit field types other then int */
#endif // defined(_MSC_VER)
#pragma warning(disable:
4214
)
#ifdef _MAC
#include <macwin32.h>
#endif //_MAC
#include <apisetcconv.h>
#include <minwinbase.h>
#include <apiquery2.h>
#include <processenv.h>
#include <fileapi.h>
#include <debugapi.h>
#include <utilapiset.h>
#include <handleapi.h>
#include <errhandlingapi.h>
#include <fibersapi.h>
#include <namedpipeapi.h>
#include <profileapi.h>
#include <heapapi.h>
#include <ioapiset.h>
#include <synchapi.h>
#include <interlockedapi.h>
#include <processthreadsapi.h>
#include <sysinfoapi.h>
#include <memoryapi.h>
#include <enclaveapi.h>
#include <threadpoollegacyapiset.h>
#include <threadpoolapiset.h>
#include <jobapi.h>
#include <jobapi2.h>
#include <wow64apiset.h>
#include <libloaderapi.h>
#include <securitybaseapi.h>
#include <namespaceapi.h>
#include <systemtopologyapi.h>
#include <processtopologyapi.h>
#include <securityappcontainer.h>
#include <realtimeapiset.h>
#ifdef __cplusplus
extern
"C"
{
#endif
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define DefineHandleTable(w) ((w),TRUE)
#define LimitEmsPages(dw)
#define SetSwapAreaSize(w) (w)
#define LockSegment(w) GlobalFix((HANDLE)(w))
#define UnlockSegment(w) GlobalUnfix((HANDLE)(w))
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#define GetCurrentTime() GetTickCount()
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#define Yield()
#define FILE_BEGIN 0
#define FILE_CURRENT 1
#define FILE_END 2
#define WAIT_FAILED ((DWORD)0xFFFFFFFF)
#define WAIT_OBJECT_0 ((STATUS_WAIT_0 ) + 0 )
#define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0 ) + 0 )
#define WAIT_ABANDONED_0 ((STATUS_ABANDONED_WAIT_0 ) + 0 )
#define WAIT_IO_COMPLETION STATUS_USER_APC
#define SecureZeroMemory RtlSecureZeroMemory
#define CaptureStackBackTrace RtlCaptureStackBackTrace
#define FILE_FLAG_WRITE_THROUGH 0x80000000
#define FILE_FLAG_OVERLAPPED 0x40000000
#define FILE_FLAG_NO_BUFFERING 0x20000000
#define FILE_FLAG_RANDOM_ACCESS 0x10000000
#define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000
#define FILE_FLAG_DELETE_ON_CLOSE 0x04000000
#define FILE_FLAG_BACKUP_SEMANTICS 0x02000000
#define FILE_FLAG_POSIX_SEMANTICS 0x01000000
#define FILE_FLAG_SESSION_AWARE 0x00800000
#define FILE_FLAG_OPEN_REPARSE_POINT 0x00200000
#define FILE_FLAG_OPEN_NO_RECALL 0x00100000
#define FILE_FLAG_FIRST_PIPE_INSTANCE 0x00080000
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#define FILE_FLAG_OPEN_REQUIRING_OPLOCK 0x00040000
#endif
#if(_WIN32_WINNT >= 0x0400)
#define PROGRESS_CONTINUE 0
#define PROGRESS_CANCEL 1
#define PROGRESS_STOP 2
#define PROGRESS_QUIET 3
#define CALLBACK_CHUNK_FINISHED 0x00000000
#define CALLBACK_STREAM_SWITCH 0x00000001
#define COPY_FILE_FAIL_IF_EXISTS 0x00000001
#define COPY_FILE_RESTARTABLE 0x00000002
#define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x00000004
#define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x00000008
#if (_WIN32_WINNT >= 0x0600)
#define COPY_FILE_COPY_SYMLINK 0x00000800
#define COPY_FILE_NO_BUFFERING 0x00001000
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#define COPY_FILE_REQUEST_SECURITY_PRIVILEGES 0x00002000
#define COPY_FILE_RESUME_FROM_PAUSE 0x00004000
#define COPY_FILE_NO_OFFLOAD 0x00040000
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
#define COPY_FILE_IGNORE_EDP_BLOCK 0x00400000
#define COPY_FILE_IGNORE_SOURCE_ENCRYPTION 0x00800000
#endif
#endif /* _WIN32_WINNT >= 0x0400 */
#if (_WIN32_WINNT >= 0x0500)
#define REPLACEFILE_WRITE_THROUGH 0x00000001
#define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002
#if (_WIN32_WINNT >= 0x0600)
#define REPLACEFILE_IGNORE_ACL_ERRORS 0x00000004
#endif
#endif // #if (_WIN32_WINNT >= 0x0500)
#define PIPE_ACCESS_INBOUND 0x00000001
#define PIPE_ACCESS_OUTBOUND 0x00000002
#define PIPE_ACCESS_DUPLEX 0x00000003
#define PIPE_CLIENT_END 0x00000000
#define PIPE_SERVER_END 0x00000001
#define PIPE_WAIT 0x00000000
#define PIPE_NOWAIT 0x00000001
#define PIPE_READMODE_BYTE 0x00000000
#define PIPE_READMODE_MESSAGE 0x00000002
#define PIPE_TYPE_BYTE 0x00000000
#define PIPE_TYPE_MESSAGE 0x00000004
#define PIPE_ACCEPT_REMOTE_CLIENTS 0x00000000
#define PIPE_REJECT_REMOTE_CLIENTS 0x00000008
#define PIPE_UNLIMITED_INSTANCES 255
#define SECURITY_ANONYMOUS ( SecurityAnonymous << 16 )
#define SECURITY_IDENTIFICATION ( SecurityIdentification << 16 )
#define SECURITY_IMPERSONATION ( SecurityImpersonation << 16 )
#define SECURITY_DELEGATION ( SecurityDelegation << 16 )
#define SECURITY_CONTEXT_TRACKING 0x00040000
#define SECURITY_EFFECTIVE_ONLY 0x00080000
#define SECURITY_SQOS_PRESENT 0x00100000
#define SECURITY_VALID_SQOS_FLAGS 0x001F0000
#if(_WIN32_WINNT >= 0x0400)
typedef VOID (WINAPI *PFIBER_START_ROUTINE)(
typedef
void
(
__stdcall
*
)(
lpFiberParameter
);
typedef
;
typedef LPVOID (WINAPI *PFIBER_CALLOUT_ROUTINE)(
lpParameter
);
#endif /* _WIN32_WINNT >= 0x0400 */
#define FAIL_FAST_GENERATE_EXCEPTION_ADDRESS 0x1
#define FAIL_FAST_NO_HARD_ERROR_DLG 0x2
#if defined(_X86_)
typedef
;
#else
typedef LPVOID LPLDT_ENTRY;
#endif
#define SP_SERIALCOMM ((DWORD)0x00000001)
#define PST_UNSPECIFIED ((DWORD)0x00000000)
#define PST_RS232 ((DWORD)0x00000001)
#define PST_PARALLELPORT ((DWORD)0x00000002)
#define PST_RS422 ((DWORD)0x00000003)
#define PST_RS423 ((DWORD)0x00000004)
#define PST_RS449 ((DWORD)0x00000005)
#define PST_MODEM ((DWORD)0x00000006)
#define PST_FAX ((DWORD)0x00000021)
#define PST_SCANNER ((DWORD)0x00000022)
#define PST_NETWORK_BRIDGE ((DWORD)0x00000100)
#define PST_LAT ((DWORD)0x00000101)
#define PST_TCPIP_TELNET ((DWORD)0x00000102)
#define PST_X25 ((DWORD)0x00000103)
#define PCF_DTRDSR ((DWORD)0x0001)
#define PCF_RTSCTS ((DWORD)0x0002)
#define PCF_RLSD ((DWORD)0x0004)
#define PCF_PARITY_CHECK ((DWORD)0x0008)
#define PCF_XONXOFF ((DWORD)0x0010)
#define PCF_SETXCHAR ((DWORD)0x0020)
#define PCF_TOTALTIMEOUTS ((DWORD)0x0040)
#define PCF_INTTIMEOUTS ((DWORD)0x0080)
#define PCF_SPECIALCHARS ((DWORD)0x0100)
#define PCF_16BITMODE ((DWORD)0x0200)
#define SP_PARITY ((DWORD)0x0001)
#define SP_BAUD ((DWORD)0x0002)
#define SP_DATABITS ((DWORD)0x0004)
#define SP_STOPBITS ((DWORD)0x0008)
#define SP_HANDSHAKING ((DWORD)0x0010)
#define SP_PARITY_CHECK ((DWORD)0x0020)
#define SP_RLSD ((DWORD)0x0040)
#define BAUD_075 ((DWORD)0x00000001)
#define BAUD_110 ((DWORD)0x00000002)
#define BAUD_134_5 ((DWORD)0x00000004)
#define BAUD_150 ((DWORD)0x00000008)
#define BAUD_300 ((DWORD)0x00000010)
#define BAUD_600 ((DWORD)0x00000020)
#define BAUD_1200 ((DWORD)0x00000040)
#define BAUD_1800 ((DWORD)0x00000080)
#define BAUD_2400 ((DWORD)0x00000100)
#define BAUD_4800 ((DWORD)0x00000200)
#define BAUD_7200 ((DWORD)0x00000400)
#define BAUD_9600 ((DWORD)0x00000800)
#define BAUD_14400 ((DWORD)0x00001000)
#define BAUD_19200 ((DWORD)0x00002000)
#define BAUD_38400 ((DWORD)0x00004000)
#define BAUD_56K ((DWORD)0x00008000)
#define BAUD_128K ((DWORD)0x00010000)
#define BAUD_115200 ((DWORD)0x00020000)
#define BAUD_57600 ((DWORD)0x00040000)
#define BAUD_USER ((DWORD)0x10000000)
#define DATABITS_5 ((WORD)0x0001)
#define DATABITS_6 ((WORD)0x0002)
#define DATABITS_7 ((WORD)0x0004)
#define DATABITS_8 ((WORD)0x0008)
#define DATABITS_16 ((WORD)0x0010)
#define DATABITS_16X ((WORD)0x0020)
#define STOPBITS_10 ((WORD)0x0001)
#define STOPBITS_15 ((WORD)0x0002)
#define STOPBITS_20 ((WORD)0x0004)
#define PARITY_NONE ((WORD)0x0100)
#define PARITY_ODD ((WORD)0x0200)
#define PARITY_EVEN ((WORD)0x0400)
#define PARITY_MARK ((WORD)0x0800)
#define PARITY_SPACE ((WORD)0x1000)
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
[
1
];
}
,*
;
#define COMMPROP_INITIALIZED ((DWORD)0xE73CF52E)
typedef
struct
{
:
1
;
:
1
;
:
1
;
:
1
;
:
1
;
:
1
;
:
1
;
:
25
;
;
;
}
, *
;
#define DTR_CONTROL_DISABLE 0x00
#define DTR_CONTROL_ENABLE 0x01
#define DTR_CONTROL_HANDSHAKE 0x02
#define RTS_CONTROL_DISABLE 0x00
#define RTS_CONTROL_ENABLE 0x01
#define RTS_CONTROL_HANDSHAKE 0x02
#define RTS_CONTROL_TOGGLE 0x03
typedef
struct
{
;
;
:
1
;
:
1
;
:
1
;
:
1
;
:
2
;
:
1
;
:
1
;
:
1
;
:
1
;
:
1
;
:
1
;
:
2
;
:
1
;
:
17
;
;
;
;
;
;
;
char
;
char
;
char
;
char
;
char
;
;
}
, *
;
typedef
struct
{
;
ReadTotalTimeoutMultiplier
;
;
WriteTotalTimeoutMultiplier
;
WriteTotalTimeoutConstant
;
}
,*
;
typedef
struct
{
;
;
;
;
;
;
;
[
1
];
}
,*
;
#define FreeModule(hLibModule) FreeLibrary((hLibModule))
#define MakeProcInstance(lpProc,hInstance) (lpProc)
#define FreeProcInstance(lpProc) (lpProc)
#define GMEM_FIXED 0x0000
#define GMEM_MOVEABLE 0x0002
#define GMEM_NOCOMPACT 0x0010
#define GMEM_NODISCARD 0x0020
#define GMEM_ZEROINIT 0x0040
#define GMEM_MODIFY 0x0080
#define GMEM_DISCARDABLE 0x0100
#define GMEM_NOT_BANKED 0x1000
#define GMEM_SHARE 0x2000
#define GMEM_DDESHARE 0x2000
#define GMEM_NOTIFY 0x4000
#define GMEM_LOWER GMEM_NOT_BANKED
#define GMEM_VALID_FLAGS 0x7F72
#define GMEM_INVALID_HANDLE 0x8000
#define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT)
#define GPTR (GMEM_FIXED | GMEM_ZEROINIT)
#define GlobalLRUNewest( h ) ((HANDLE)(h))
#define GlobalLRUOldest( h ) ((HANDLE)(h))
#define GlobalDiscard( h ) GlobalReAlloc( (h), 0, GMEM_MOVEABLE )
#define GMEM_DISCARDED 0x4000
#define GMEM_LOCKCOUNT 0x00FF
typedef
struct
{
;
;
;
;
;
;
;
;
}
, *
;
#define DEBUG_PROCESS 0x00000001
#define DEBUG_ONLY_THIS_PROCESS 0x00000002
#define CREATE_SUSPENDED 0x00000004
#define DETACHED_PROCESS 0x00000008
#define CREATE_NEW_CONSOLE 0x00000010
#define NORMAL_PRIORITY_CLASS 0x00000020
#define IDLE_PRIORITY_CLASS 0x00000040
#define HIGH_PRIORITY_CLASS 0x00000080
#define REALTIME_PRIORITY_CLASS 0x00000100
#define CREATE_NEW_PROCESS_GROUP 0x00000200
#define CREATE_UNICODE_ENVIRONMENT 0x00000400
#define CREATE_SEPARATE_WOW_VDM 0x00000800
#define CREATE_SHARED_WOW_VDM 0x00001000
#define CREATE_FORCEDOS 0x00002000
#define BELOW_NORMAL_PRIORITY_CLASS 0x00004000
#define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
#define INHERIT_PARENT_AFFINITY 0x00010000
#define INHERIT_CALLER_PRIORITY 0x00020000 // Deprecated
#define CREATE_PROTECTED_PROCESS 0x00040000
#define EXTENDED_STARTUPINFO_PRESENT 0x00080000
#define PROCESS_MODE_BACKGROUND_BEGIN 0x00100000
#define PROCESS_MODE_BACKGROUND_END 0x00200000
#define CREATE_SECURE_PROCESS 0x00400000
#define CREATE_BREAKAWAY_FROM_JOB 0x01000000
#define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x02000000
#define CREATE_DEFAULT_ERROR_MODE 0x04000000
#define CREATE_NO_WINDOW 0x08000000
#define PROFILE_USER 0x10000000
#define PROFILE_KERNEL 0x20000000
#define PROFILE_SERVER 0x40000000
#define CREATE_IGNORE_SYSTEM_DEFAULT 0x80000000
#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000 // Threads only
#define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
#define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
#define THREAD_PRIORITY_NORMAL 0
#define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
#define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)
#define THREAD_PRIORITY_ERROR_RETURN (MAXLONG)
#define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT
#define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
#define THREAD_MODE_BACKGROUND_BEGIN 0x00010000
#define THREAD_MODE_BACKGROUND_END 0x00020000
#define VOLUME_NAME_DOS 0x0 //default
#define VOLUME_NAME_GUID 0x1
#define VOLUME_NAME_NT 0x2
#define VOLUME_NAME_NONE 0x4
#define FILE_NAME_NORMALIZED 0x0 //default
#define FILE_NAME_OPENED 0x8
typedef
struct
{
;
;
;
;
;
;
;
}
, *
;
typedef
, *
;
typedef
, *
;
#if !defined(MIDL_PASS)
typedef
;
typedef
;
#endif
#define DRIVE_UNKNOWN 0
#define DRIVE_NO_ROOT_DIR 1
#define DRIVE_REMOVABLE 2
#define DRIVE_FIXED 3
#define DRIVE_REMOTE 4
#define DRIVE_CDROM 5
#define DRIVE_RAMDISK 6
#ifndef _MAC
#define GetFreeSpace(w) (0x100000L)
#else
WINBASEAPI DWORD WINAPI GetFreeSpace(_In_ UINT);
#endif
#define FILE_TYPE_UNKNOWN 0x0000
#define FILE_TYPE_DISK 0x0001
#define FILE_TYPE_CHAR 0x0002
#define FILE_TYPE_PIPE 0x0003
#define FILE_TYPE_REMOTE 0x8000
#define STD_INPUT_HANDLE ((DWORD)-10)
#define STD_OUTPUT_HANDLE ((DWORD)-11)
#define STD_ERROR_HANDLE ((DWORD)-12)
#define NOPARITY 0
#define ODDPARITY 1
#define EVENPARITY 2
#define MARKPARITY 3
#define SPACEPARITY 4
#define ONESTOPBIT 0
#define ONE5STOPBITS 1
#define TWOSTOPBITS 2
#define IGNORE 0 // Ignore signal
#define INFINITE 0xFFFFFFFF // Infinite timeout
#define CBR_110 110
#define CBR_300 300
#define CBR_600 600
#define CBR_1200 1200
#define CBR_2400 2400
#define CBR_4800 4800
#define CBR_9600 9600
#define CBR_14400 14400
#define CBR_19200 19200
#define CBR_38400 38400
#define CBR_56000 56000
#define CBR_57600 57600
#define CBR_115200 115200
#define CBR_128000 128000
#define CBR_256000 256000
#define CE_RXOVER 0x0001 // Receive Queue overflow
#define CE_OVERRUN 0x0002 // Receive Overrun Error
#define CE_RXPARITY 0x0004 // Receive Parity Error
#define CE_FRAME 0x0008 // Receive Framing error
#define CE_BREAK 0x0010 // Break Detected
#define CE_TXFULL 0x0100 // TX Queue is full
#define CE_PTO 0x0200 // LPTx Timeout
#define CE_IOE 0x0400 // LPTx I/O Error
#define CE_DNS 0x0800 // LPTx Device not selected
#define CE_OOP 0x1000 // LPTx Out-Of-Paper
#define CE_MODE 0x8000 // Requested mode unsupported
#define IE_BADID (-1) // Invalid or unsupported id
#define IE_OPEN (-2) // Device Already Open
#define IE_NOPEN (-3) // Device Not Open
#define IE_MEMORY (-4) // Unable to allocate queues
#define IE_DEFAULT (-5) // Error in default parameters
#define IE_HARDWARE (-10) // Hardware Not Present
#define IE_BYTESIZE (-11) // Illegal Byte Size
#define IE_BAUDRATE (-12) // Unsupported BaudRate
#define EV_RXCHAR 0x0001 // Any Character received
#define EV_RXFLAG 0x0002 // Received certain character
#define EV_TXEMPTY 0x0004 // Transmitt Queue Empty
#define EV_CTS 0x0008 // CTS changed state
#define EV_DSR 0x0010 // DSR changed state
#define EV_RLSD 0x0020 // RLSD changed state
#define EV_BREAK 0x0040 // BREAK received
#define EV_ERR 0x0080 // Line status error occurred
#define EV_RING 0x0100 // Ring signal detected
#define EV_PERR 0x0200 // Printer error occured
#define EV_RX80FULL 0x0400 // Receive buffer is 80 percent full
#define EV_EVENT1 0x0800 // Provider specific event 1
#define EV_EVENT2 0x1000 // Provider specific event 2
#define SETXOFF 1 // Simulate XOFF received
#define SETXON 2 // Simulate XON received
#define SETRTS 3 // Set RTS high
#define CLRRTS 4 // Set RTS low
#define SETDTR 5 // Set DTR high
#define CLRDTR 6 // Set DTR low
#define RESETDEV 7 // Reset device if possible
#define SETBREAK 8 // Set the device break line.
#define CLRBREAK 9 // Clear the device break line.
#define PURGE_TXABORT 0x0001 // Kill the pending/current writes to the comm port.
#define PURGE_RXABORT 0x0002 // Kill the pending/current reads to the comm port.
#define PURGE_TXCLEAR 0x0004 // Kill the transmit queue if there.
#define PURGE_RXCLEAR 0x0008 // Kill the typeahead buffer if there.
#define LPTx 0x80 // Set if ID is for LPT device
#define MS_CTS_ON ((DWORD)0x0010)
#define MS_DSR_ON ((DWORD)0x0020)
#define MS_RING_ON ((DWORD)0x0040)
#define MS_RLSD_ON ((DWORD)0x0080)
#define S_QUEUEEMPTY 0
#define S_THRESHOLD 1
#define S_ALLTHRESHOLD 2
#define S_NORMAL 0
#define S_LEGATO 1
#define S_STACCATO 2
#define S_PERIOD512 0 // Freq = N/512 high pitch, less coarse hiss
#define S_PERIOD1024 1 // Freq = N/1024
#define S_PERIOD2048 2 // Freq = N/2048 low pitch, more coarse hiss
#define S_PERIODVOICE 3 // Source is frequency from voice channel (3)
#define S_WHITE512 4 // Freq = N/512 high pitch, less coarse hiss
#define S_WHITE1024 5 // Freq = N/1024
#define S_WHITE2048 6 // Freq = N/2048 low pitch, more coarse hiss
#define S_WHITEVOICE 7 // Source is frequency from voice channel (3)
#define S_SERDVNA (-1) // Device not available
#define S_SEROFM (-2) // Out of memory
#define S_SERMACT (-3) // Music active
#define S_SERQFUL (-4) // Queue full
#define S_SERBDNT (-5) // Invalid note
#define S_SERDLN (-6) // Invalid note length
#define S_SERDCC (-7) // Invalid note count
#define S_SERDTP (-8) // Invalid tempo
#define S_SERDVL (-9) // Invalid volume
#define S_SERDMD (-10) // Invalid mode
#define S_SERDSH (-11) // Invalid shape
#define S_SERDPT (-12) // Invalid pitch
#define S_SERDFQ (-13) // Invalid frequency
#define S_SERDDR (-14) // Invalid duration
#define S_SERDSR (-15) // Invalid source
#define S_SERDST (-16) // Invalid state
#define NMPWAIT_WAIT_FOREVER 0xffffffff
#define NMPWAIT_NOWAIT 0x00000001
#define NMPWAIT_USE_DEFAULT_WAIT 0x00000000
#define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
#define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
#define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
#define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS
#define FS_VOL_IS_COMPRESSED FILE_VOLUME_IS_COMPRESSED
#define FS_FILE_COMPRESSION FILE_FILE_COMPRESSION
#define FS_FILE_ENCRYPTION FILE_SUPPORTS_ENCRYPTION
#define OF_READ 0x00000000
#define OF_WRITE 0x00000001
#define OF_READWRITE 0x00000002
#define OF_SHARE_COMPAT 0x00000000
#define OF_SHARE_EXCLUSIVE 0x00000010
#define OF_SHARE_DENY_WRITE 0x00000020
#define OF_SHARE_DENY_READ 0x00000030
#define OF_SHARE_DENY_NONE 0x00000040
#define OF_PARSE 0x00000100
#define OF_DELETE 0x00000200
#define OF_VERIFY 0x00000400
#define OF_CANCEL 0x00000800
#define OF_CREATE 0x00001000
#define OF_PROMPT 0x00002000
#define OF_EXIST 0x00004000
#define OF_REOPEN 0x00008000
#define OFS_MAXPATHNAME 128
typedef
struct
{
;
;
;
;
;
CHAR szPathName[OFS_MAXPATHNAME];
}
, *
, *
;
#define UnlockResource(hResData) ((hResData), 0)
#define MAXINTATOM 0xC000
#define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i)))
#define INVALID_ATOM ((ATOM)0)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
int
#if !defined(_MAC)
#if defined(_M_CEE_PURE)
__clrcall
#else
#else
CALLBACK
#endif
(
_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
);
int
#if defined(_M_CEE_PURE)
__clrcall
#else
(
_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
_Success_(return != NULL)
_Post_writable_byte_size_(dwBytes)
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
_Ret_reallocated_bytes_(hMem, dwBytes)
(
_Frees_ptr_ HGLOBAL hMem,
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
(
);
(
);
_Ret_maybenull_
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
);
_Ret_maybenull_
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
_Ret_maybenull_
_Success_(return==0)
(
_Frees_ptr_opt_ HGLOBAL hMem
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
);
(
);
(
);
(
);
(
);
__drv_preferredFunction("GlobalMemoryStatusEx","Deprecated. See MSDN for details")
(
_Out_ LPMEMORYSTATUS lpBuffer
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
_Success_(return != NULL)
_Post_writable_byte_size_(uBytes)
(
);
_Ret_reallocated_bytes_(hMem, uBytes)
(
_Frees_ptr_opt_ HLOCAL hMem,
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)*/
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
_Ret_maybenull_
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
_Ret_maybenull_
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
);
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
_Success_(return==0)
_Ret_maybenull_
(
_Frees_ptr_opt_ HLOCAL hMem
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
);
(
);
#define SCS_32BIT_BINARY 0
#define SCS_DOS_BINARY 1
#define SCS_WOW_BINARY 2
#define SCS_PIF_BINARY 3
#define SCS_POSIX_BINARY 4
#define SCS_OS216_BINARY 5
#define SCS_64BIT_BINARY 6
#if defined(_WIN64)
# define SCS_THIS_PLATFORM_BINARY SCS_64BIT_BINARY
#else
# define SCS_THIS_PLATFORM_BINARY SCS_32BIT_BINARY
#endif
(
_In_ LPCSTR lpApplicationName,
_Out_ LPDWORD lpBinaryType
);
(
_In_ LPCWSTR lpApplicationName,
_Out_ LPDWORD lpBinaryType
);
#ifdef UNICODE
#define GetBinaryType GetBinaryTypeW
#else
#define GetBinaryType GetBinaryTypeA
#endif // !UNICODE
_Success_(return != 0 && return < cchBuffer)
(
_In_ LPCSTR lpszLongPath,
_Out_writes_to_opt_(cchBuffer, return + 1) LPSTR lpszShortPath,
);
#ifndef UNICODE
#define GetShortPathName GetShortPathNameA
#endif
#if _WIN32_WINNT >= 0x0600
_Success_(return != 0 && return < cchBuffer)
GetLongPathNameTransactedA
(
_In_ LPCSTR lpszShortPath,
_Out_writes_to_opt_(cchBuffer, return + 1) LPSTR lpszLongPath,
);
_Success_(return != 0 && return < cchBuffer)
GetLongPathNameTransactedW
(
_In_ LPCWSTR lpszShortPath,
_Out_writes_to_opt_(cchBuffer, return + 1) LPWSTR lpszLongPath,
);
#ifdef UNICODE
#define GetLongPathNameTransacted GetLongPathNameTransactedW
#else
#define GetLongPathNameTransacted GetLongPathNameTransactedA
#endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
(
_Out_ PDWORD_PTR lpProcessAffinityMask,
_Out_ PDWORD_PTR lpSystemAffinityMask
);
(
_In_ DWORD_PTR dwProcessAffinityMask
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
_Out_ PIO_COUNTERS lpIoCounters
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
(
_Out_ PSIZE_T lpMinimumWorkingSetSize,
_Out_ PSIZE_T lpMaximumWorkingSetSize
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
_In_ SIZE_T dwMinimumWorkingSetSize,
_In_ SIZE_T dwMaximumWorkingSetSize
);
__analysis_noreturn
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
_In_ _Pre_ _NullNull_terminated_ LPCH NewEnvironment
);
#ifndef UNICODE
#define SetEnvironmentStrings SetEnvironmentStringsA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#if(_WIN32_WINNT >= 0x0400)
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#define FIBER_FLAG_FLOAT_SWITCH 0x1 // context switch floating point
(
);
(
);
#if (_WIN32_WINNT >= 0x0501)
(
);
#endif
_Ret_maybenull_
(
_In_ SIZE_T dwStackCommitSize,
_In_ SIZE_T dwStackReserveSize,
_In_ LPFIBER_START_ROUTINE lpStartAddress,
_In_opt_ LPVOID lpParameter
);
_Ret_maybenull_
(
_In_opt_ LPVOID lpParameter,
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
_Ret_maybenull_
(
_In_ LPFIBER_START_ROUTINE lpStartAddress,
_In_opt_ LPVOID lpParameter
);
_Ret_maybenull_
(
_In_opt_ LPVOID lpParameter
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= 0x0601) && !defined(MIDL_PASS)
#define UMS_VERSION RTL_UMS_VERSION
typedef
void
*
;
typedef
void
*
;
typedef
enum
_RTL_UMS_THREAD_INFO_CLASS
, *
;
typedef
enum
_RTL_UMS_SCHEDULER_REASON
;
typedef
PRTL_UMS_SCHEDULER_ENTRY_POINT
PUMS_SCHEDULER_ENTRY_POINT
;
typedef
struct
_UMS_SCHEDULER_STARTUP_INFO
{
;
;
PUMS_SCHEDULER_ENTRY_POINT
;
;
}
UMS_SCHEDULER_STARTUP_INFO
, *
PUMS_SCHEDULER_STARTUP_INFO
;
typedef
struct
{
;
union
{
struct
{
:
1
;
:
1
;
;
}
, *
;
_Must_inspect_result_
(
_Outptr_ PUMS_COMPLETION_LIST* UmsCompletionList
);
DequeueUmsCompletionListItems
(
_In_ PUMS_COMPLETION_LIST UmsCompletionList,
_Out_ PUMS_CONTEXT* UmsThreadList
);
GetUmsCompletionListEvent
(
_In_ PUMS_COMPLETION_LIST UmsCompletionList,
_Inout_ PHANDLE UmsCompletionEvent
);
(
_Inout_ PUMS_CONTEXT UmsThread
);
(
_In_ PVOID SchedulerParam
);
(
_In_ PUMS_COMPLETION_LIST UmsCompletionList
);
(
);
(
_Inout_ PUMS_CONTEXT UmsContext
);
QueryUmsThreadInformation
(
_In_ PUMS_CONTEXT UmsThread,
_In_ UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
_Out_writes_bytes_to_(UmsThreadInformationLength, *ReturnLength) PVOID UmsThreadInformation,
_In_ ULONG UmsThreadInformationLength,
UmsThreadInformationLength
,
_Out_opt_ PULONG ReturnLength
);
(
_In_ PUMS_CONTEXT UmsThread,
_In_ UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
_In_ PVOID UmsThreadInformation,
_In_ ULONG UmsThreadInformationLength
UmsThreadInformationLength
);
(
_In_ PUMS_CONTEXT UmsThread
);
(
_Outptr_ PUMS_CONTEXT *lpUmsThread
);
(
_In_ PUMS_SCHEDULER_STARTUP_INFO SchedulerStartupInfo
PUMS_SCHEDULER_STARTUP_INFO
);
(
_In_ HANDLE ThreadHandle,
_Inout_ PUMS_SYSTEM_THREAD_INFORMATION SystemThreadInfo
PUMS_SYSTEM_THREAD_INFORMATION
);
#endif // (_WIN32_WINNT >= 0x0601) && !defined(MIDL_PASS)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif /* _WIN32_WINNT >= 0x0400 */
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
(
_In_ DWORD_PTR dwThreadAffinityMask
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= 0x0600)
#define PROCESS_DEP_ENABLE 0x00000001
#define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x00000002
(
);
(
);
#endif // _WIN32_WINNT >= 0x0600
(
_In_ LATENCY_TIME latency
);
(
);
(
_Out_ LPLDT_ENTRY lpSelectorEntry
);
(
_In_ EXECUTION_STATE esFlags
);
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
typedef
, *
, *
;
(
_In_ PREASON_CONTEXT Context
);
(
_In_ HANDLE PowerRequest,
_In_ POWER_REQUEST_TYPE RequestType
);
(
_In_ HANDLE PowerRequest,
_In_ POWER_REQUEST_TYPE RequestType
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#ifdef _M_CEE_PURE
#define GetLastError System::Runtime::InteropServices::Marshal::GetLastWin32Error
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if !defined(RC_INVOKED) // RC warns because "WINBASE_DECLARE_RESTORE_LAST_ERROR" is a bit long.
#if defined(WINBASE_DECLARE_RESTORE_LAST_ERROR)
WINBASEAPI
VOID
WINAPI
RestoreLastError(
_In_ DWORD dwErrCode
);
typedef VOID (WINAPI* PRESTORE_LAST_ERROR)(DWORD);
#define RESTORE_LAST_ERROR_NAME_A "RestoreLastError"
#define RESTORE_LAST_ERROR_NAME_W L"RestoreLastError"
#define RESTORE_LAST_ERROR_NAME TEXT("RestoreLastError")
#endif
#endif
#define HasOverlappedIoCompleted(lpOverlapped) (((DWORD)(lpOverlapped)->Internal) != STATUS_PENDING)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= 0x0600)
#define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1
#define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
SetFileCompletionNotificationModes
(
);
#endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#define SEM_FAILCRITICALERRORS 0x0001
#define SEM_NOGPFAULTERRORBOX 0x0002
#define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
#define SEM_NOOPENFILEERRORBOX 0x8000
#if !defined(MIDL_PASS)
#if (_WIN32_WINNT >= 0x0600)
(
_Inout_ PWOW64_CONTEXT lpContext
);
(
_In_ CONST WOW64_CONTEXT *lpContext
);
#endif // (_WIN32_WINNT >= 0x0600)
#if (_WIN32_WINNT >= 0x0601)
Wow64GetThreadSelectorEntry
(
_Out_ PWOW64_LDT_ENTRY lpSelectorEntry
);
#endif // (_WIN32_WINNT >= 0x0601)
#endif // !defined(MIDL_PASS)
#if (_WIN32_WINNT >= 0x0600)
(
);
#endif // (_WIN32_WINNT >= 0x0600)
DebugSetProcessKillOnExit
(
);
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if (_WIN32_WINNT >= 0x0403)
#define CRITICAL_SECTION_NO_DEBUG_INFO RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
);
(
);
(
);
(
);
(
);
(
);
CancelDeviceWakeupRequest
(
);
(
);
SetMessageWaitingIndicator
(
_In_ HANDLE hMsgIndicator,
);
(
);
(
);
#ifdef UNICODE
#define SetFileShortName SetFileShortNameW
#else
#define SetFileShortName SetFileShortNameA
#endif // !UNICODE
#define HANDLE_FLAG_INHERIT 0x00000001
#define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x00000002
#define HINSTANCE_ERROR 32
(
_In_ LPCSTR lpModuleName,
_In_ LPVOID lpParameterBlock
);
__drv_preferredFunction("CreateProcess","Deprecated. See MSDN for details")
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore or App Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_APP)
(
);
(
_Out_opt_ LPDWORD lpErrors,
_Out_opt_ LPCOMSTAT lpStat
);
(
);
(
);
_Success_(return != FALSE)
(
_Out_writes_bytes_opt_(*lpdwSize) LPCOMMCONFIG lpCC,
);
(
);
(
_Inout_ LPCOMMPROP lpCommProp
);
(
_Out_ LPDWORD lpModemStat
);
(
);
(
_Out_ LPCOMMTIMEOUTS lpCommTimeouts
);
(
);
(
);
(
_In_reads_bytes_(dwSize) LPCOMMCONFIG lpCC,
);
(
);
(
);
(
_In_ LPCOMMTIMEOUTS lpCommTimeouts
);
(
);
(
_Inout_ LPDWORD lpEvtMask,
_Inout_opt_ LPOVERLAPPED lpOverlapped
);
#if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
(
_In_ DWORD dwDesiredAccess,
_In_ DWORD dwFlagsAndAttributes
);
#endif // (NTDDI_VERSION >= NTDDI_WIN10_RS3)
#if (NTDDI_VERSION >= NTDDI_WIN10_RS3) // NTDDI_WIN10_RS4NTDDI_WIN10_RS4
(
_Out_writes_(uPortNumbersCount) PULONG lpPortNumbers,
_In_ ULONG uPortNumbersCount,
_Out_ PULONG puPortNumbersFound
);
#endif // (NTDDI_VERSION >= NTDDI_WIN10_RS3) // NTDDI_WIN10_RS4NTDDI_WIN10_RS4
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
_In_ DWORD dwPositionMethod,
);
(
_In_ DWORD dwPositionType,
_Out_ LPDWORD lpdwPartition,
_Out_ LPDWORD lpdwOffsetLow,
_Out_ LPDWORD lpdwOffsetHigh
);
(
);
(
);
(
_In_ DWORD dwPartitionMethod,
);
(
_In_ DWORD dwTapemarkType,
_In_ DWORD dwTapemarkCount,
);
(
);
(
_Inout_ LPDWORD lpdwSize,
_Out_writes_bytes_(*lpdwSize) LPVOID lpTapeInformation
);
#define GET_TAPE_MEDIA_INFORMATION 0
#define GET_TAPE_DRIVE_INFORMATION 1
(
_In_ LPVOID lpTapeInformation
);
#define SET_TAPE_MEDIA_INFORMATION 0
#define SET_TAPE_DRIVE_INFORMATION 1
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
int
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
typedef
enum
{
=
0
,
,
,
,
}
;
#if (NTDDI_VERSION >= NTDDI_WINXPSP3)
(
);
#endif // (NTDDI_VERSION >= NTDDI_WINXPSP3)
#if _WIN32_WINNT >= 0x0501
(
_Out_opt_ PDWORD pdwQuotaAllowed,
_Out_opt_ PDWORD pdwQuotaUsed
);
#endif // (_WIN32_WINNT >= 0x0501)
(
_In_ CONST FILETIME *lpFileTime,
);
(
_Out_ LPFILETIME lpFileTime
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
#if !defined(MIDL_PASS)
_Success_(return != 0)
(
_In_opt_ LPCVOID lpSource,
_When_((dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) != 0, _At_((LPSTR*)lpBuffer, _Outptr_result_z_))
_When_((dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) == 0, _Out_writes_z_(nSize))
,
_In_opt_ va_list *Arguments
);
_Success_(return != 0)
(
_In_opt_ LPCVOID lpSource,
_When_((dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) != 0, _At_((LPWSTR*)lpBuffer, _Outptr_result_z_))
_When_((dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) == 0, _Out_writes_z_(nSize))
,
_In_opt_ va_list *Arguments
);
#ifdef UNICODE
#define FormatMessage FormatMessageW
#else
#define FormatMessage FormatMessageA
#endif // !UNICODE
#if defined(_M_CEE)
#undef FormatMessage
__inline
DWORD
FormatMessage(
DWORD dwFlags,
LPCVOID lpSource,
DWORD dwMessageId,
DWORD dwLanguageId,
LPTSTR lpBuffer,
DWORD nSize,
va_list *Arguments
)
{
#ifdef UNICODE
return FormatMessageW(
#else
return FormatMessageA(
#endif
dwFlags,
lpSource,
dwMessageId,
dwLanguageId,
lpBuffer,
nSize,
Arguments
);
}
#endif /* _M_CEE */
#endif /* MIDL_PASS */
#define FORMAT_MESSAGE_IGNORE_INSERTS 0x00000200
#define FORMAT_MESSAGE_FROM_STRING 0x00000400
#define FORMAT_MESSAGE_FROM_HMODULE 0x00000800
#define FORMAT_MESSAGE_FROM_SYSTEM 0x00001000
#define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x00002000
#define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
_In_ DWORD nMaxMessageSize,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
(
_In_ DWORD nMaxMessageSize,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
#ifdef UNICODE
#define CreateMailslot CreateMailslotW
#else
#define CreateMailslot CreateMailslotA
#endif // !UNICODE
(
_Out_opt_ LPDWORD lpMaxMessageSize,
_Out_opt_ LPDWORD lpNextSize,
_Out_opt_ LPDWORD lpMessageCount,
_Out_opt_ LPDWORD lpReadTimeout
);
(
);
(
);
(
);
#ifdef UNICODE
#define EncryptFile EncryptFileW
#else
#define EncryptFile EncryptFileA
#endif // !UNICODE
(
_Reserved_ DWORD dwReserved
);
(
_Reserved_ DWORD dwReserved
);
#ifdef UNICODE
#define DecryptFile DecryptFileW
#else
#define DecryptFile DecryptFileA
#endif // !UNICODE
#define FILE_ENCRYPTABLE 0
#define FILE_IS_ENCRYPTED 1
#define FILE_SYSTEM_ATTR 2
#define FILE_ROOT_DIR 3
#define FILE_SYSTEM_DIR 4
#define FILE_UNKNOWN 5
#define FILE_SYSTEM_NOT_SUPPORT 6
#define FILE_USER_DISALLOWED 7
#define FILE_READ_ONLY 8
#define FILE_DIR_DISALLOWED 9
(
);
(
);
#ifdef UNICODE
#define FileEncryptionStatus FileEncryptionStatusW
#else
#define FileEncryptionStatus FileEncryptionStatusA
#endif // !UNICODE
#define EFS_USE_RECOVERY_KEYS (0x1)
typedef
(WINAPI *PFE_EXPORT_FUNC)(
_In_reads_bytes_(ulLength) PBYTE pbData,
_In_opt_ PVOID pvCallbackContext,
);
typedef
(WINAPI *PFE_IMPORT_FUNC)(
_Out_writes_bytes_to_(*ulLength, *ulLength) PBYTE pbData,
_In_opt_ PVOID pvCallbackContext,
);
#define CREATE_FOR_IMPORT (1)
#define CREATE_FOR_DIR (2)
#define OVERWRITE_HIDDEN (4)
#define EFSRPC_SECURE_ONLY (8)
#define EFS_DROP_ALTERNATE_STREAMS (0x10)
(
_Outptr_ PVOID *pvContext
);
(
_Outptr_ PVOID *pvContext
);
#ifdef UNICODE
#define OpenEncryptedFileRaw OpenEncryptedFileRawW
#else
#define OpenEncryptedFileRaw OpenEncryptedFileRawA
#endif // !UNICODE
(
_In_ PFE_EXPORT_FUNC pfExportCallback,
_In_opt_ PVOID pvCallbackContext,
);
(
_In_ PFE_IMPORT_FUNC pfImportCallback,
_In_opt_ PVOID pvCallbackContext,
);
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
int
(
);
int
(
);
#ifdef UNICODE
#define lstrcmp lstrcmpW
#else
#define lstrcmp lstrcmpA
#endif // !UNICODE
int
(
);
int
(
);
#ifdef UNICODE
#define lstrcmpi lstrcmpiW
#else
#define lstrcmpi lstrcmpiA
#endif // !UNICODE
#if defined(DEPRECATE_SUPPORTED)
#pragma warning(push)
#pragma warning(disable:
4995
)
#endif
_Check_return_
_Success_(return != NULL)
_Post_satisfies_(return == lpString1)
_Ret_maybenull_
(
_Out_writes_(iMaxLength) LPSTR lpString1,
);
_Check_return_
_Success_(return != NULL)
_Post_satisfies_(return == lpString1)
_Ret_maybenull_
(
_Out_writes_(iMaxLength) LPWSTR lpString1,
);
#ifdef UNICODE
#define lstrcpyn lstrcpynW
#else
#define lstrcpyn lstrcpynA
#endif // !UNICODE
(
_Out_writes_(_String_length_(lpString2) + 1) LPSTR lpString1, // deprecated: annotation is as good as it gets
);
(
_Out_writes_(_String_length_(lpString2) + 1) LPWSTR lpString1, // deprecated: annotation is as good as it gets
);
#ifdef UNICODE
#define lstrcpy lstrcpyW
#else
#define lstrcpy lstrcpyA
#endif // !UNICODE
(
_Inout_updates_z_(_String_length_(lpString1) + _String_length_(lpString2) + 1) LPSTR lpString1, // deprecated: annotation is as good as it gets
);
(
_Inout_updates_z_(_String_length_(lpString1) + _String_length_(lpString2) + 1) LPWSTR lpString1, // deprecated: annotation is as good as it gets
);
#ifdef UNICODE
#define lstrcat lstrcatW
#else
#define lstrcat lstrcatA
#endif // !UNICODE
#if defined(DEPRECATE_SUPPORTED)
#pragma warning(pop)
#endif
int
(
);
int
(
);
#ifdef UNICODE
#define lstrlen lstrlenW
#else
#define lstrlen lstrlenA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
_Inout_ LPOFSTRUCT lpReOpenBuff,
);
(
);
(
);
(
_Out_writes_bytes_to_(uBytes, return) LPVOID lpBuffer,
);
(
_In_reads_bytes_(uBytes) LPCCH lpBuffer,
);
long
(
_Out_writes_bytes_to_(lBytes, return) LPVOID lpBuffer,
);
long
(
_In_reads_bytes_(lBytes) LPCCH lpBuffer,
);
(
);
(
);
(
_In_reads_bytes_(iSize) CONST VOID* lpv,
_Inout_opt_ LPINT lpiResult
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#if(_WIN32_WINNT >= 0x0400)
(
_In_ HANDLE hObjectToSignal,
_In_ HANDLE hObjectToWaitOn,
_In_ DWORD dwMilliseconds,
);
#endif /* _WIN32_WINNT >= 0x0400 */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
_Out_writes_bytes_to_(nNumberOfBytesToRead, *lpNumberOfBytesRead) LPBYTE lpBuffer,
_In_ DWORD nNumberOfBytesToRead,
_Out_ LPDWORD lpNumberOfBytesRead,
_In_ BOOL bProcessSecurity,
_Inout_ LPVOID *lpContext
);
(
_In_ DWORD dwLowBytesToSeek,
_In_ DWORD dwHighBytesToSeek,
_Out_ LPDWORD lpdwLowByteSeeked,
_Out_ LPDWORD lpdwHighByteSeeked,
_Inout_ LPVOID *lpContext
);
(
_In_reads_bytes_(nNumberOfBytesToWrite) LPBYTE lpBuffer,
_In_ DWORD nNumberOfBytesToWrite,
_Out_ LPDWORD lpNumberOfBytesWritten,
_In_ BOOL bProcessSecurity,
_Inout_ LPVOID *lpContext
);
typedef
struct
{
;
;
;
;
WCHAR cStreamName[ ANYSIZE_ARRAY ] ;
}
, *
;
#define BACKUP_INVALID 0x00000000
#define BACKUP_DATA 0x00000001
#define BACKUP_EA_DATA 0x00000002
#define BACKUP_SECURITY_DATA 0x00000003
#define BACKUP_ALTERNATE_DATA 0x00000004
#define BACKUP_LINK 0x00000005
#define BACKUP_PROPERTY_DATA 0x00000006
#define BACKUP_OBJECT_ID 0x00000007
#define BACKUP_REPARSE_DATA 0x00000008
#define BACKUP_SPARSE_BLOCK 0x00000009
#define BACKUP_TXFS_DATA 0x0000000a
#define BACKUP_GHOSTED_FILE_EXTENTS 0x0000000b
#define STREAM_NORMAL_ATTRIBUTE 0x00000000
#define STREAM_MODIFIED_WHEN_READ 0x00000001
#define STREAM_CONTAINS_SECURITY 0x00000002
#define STREAM_CONTAINS_PROPERTIES 0x00000004
#define STREAM_SPARSE_ATTRIBUTE 0x00000008
#define STREAM_CONTAINS_GHOSTED_FILE_EXTENTS 0x00000010
#define STARTF_USESHOWWINDOW 0x00000001
#define STARTF_USESIZE 0x00000002
#define STARTF_USEPOSITION 0x00000004
#define STARTF_USECOUNTCHARS 0x00000008
#define STARTF_USEFILLATTRIBUTE 0x00000010
#define STARTF_RUNFULLSCREEN 0x00000020 // ignored for non-x86 platforms
#define STARTF_FORCEONFEEDBACK 0x00000040
#define STARTF_FORCEOFFFEEDBACK 0x00000080
#define STARTF_USESTDHANDLES 0x00000100
#if(WINVER >= 0x0400)
#define STARTF_USEHOTKEY 0x00000200
#define STARTF_TITLEISLINKNAME 0x00000800
#define STARTF_TITLEISAPPID 0x00001000
#define STARTF_PREVENTPINNING 0x00002000
#endif /* WINVER >= 0x0400 */
#if(WINVER >= 0x0600)
#define STARTF_UNTRUSTEDSOURCE 0x00008000
#endif /* WINVER >= 0x0600 */
#if (_WIN32_WINNT >= 0x0600)
typedef
struct
{
;
LPPROC_THREAD_ATTRIBUTE_LIST
;
}
, *
;
typedef
struct
{
;
LPPROC_THREAD_ATTRIBUTE_LIST
;
}
, *
;
#ifdef UNICODE
typedef
;
typedef
;
#else
typedef STARTUPINFOEXA STARTUPINFOEX;
typedef LPSTARTUPINFOEXA LPSTARTUPINFOEX;
#endif // UNICODE
#endif // (_WIN32_WINNT >= 0x0600)
#define SHUTDOWN_NORETRY 0x00000001
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
_Ret_maybenull_
(
_In_ DWORD dwDesiredAccess,
_In_ BOOL bInheritHandle,
);
#ifndef UNICODE
#define OpenMutex OpenMutexA
#endif
_Ret_maybenull_
(
_In_opt_ LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
);
#ifndef UNICODE
#define CreateSemaphore CreateSemaphoreA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
_Ret_maybenull_
(
_In_ DWORD dwDesiredAccess,
_In_ BOOL bInheritHandle,
);
#ifndef UNICODE
#define OpenSemaphore OpenSemaphoreA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
_Ret_maybenull_
(
_In_opt_ LPSECURITY_ATTRIBUTES lpTimerAttributes,
_In_opt_ LPCSTR lpTimerName
);
#ifndef UNICODE
#define CreateWaitableTimer CreateWaitableTimerA
#endif
_Ret_maybenull_
(
_In_ DWORD dwDesiredAccess,
_In_ BOOL bInheritHandle,
);
#ifndef UNICODE
#define OpenWaitableTimer OpenWaitableTimerA
#endif
#if (_WIN32_WINNT >= 0x0600)
_Ret_maybenull_
(
_In_opt_ LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
_Reserved_ DWORD dwFlags,
_In_ DWORD dwDesiredAccess
);
#ifndef UNICODE
#define CreateSemaphoreEx CreateSemaphoreExA
#endif
_Ret_maybenull_
(
_In_opt_ LPSECURITY_ATTRIBUTES lpTimerAttributes,
_In_opt_ LPCSTR lpTimerName,
_In_ DWORD dwDesiredAccess
);
#ifndef UNICODE
#define CreateWaitableTimerEx CreateWaitableTimerExA
#endif
#endif /* (_WIN32_WINNT >= 0x0600) */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#endif /* (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
_Ret_maybenull_
(
_In_opt_ LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
_In_ DWORD dwMaximumSizeHigh,
_In_ DWORD dwMaximumSizeLow,
);
#ifndef UNICODE
#define CreateFileMapping CreateFileMappingA
#endif
#if _WIN32_WINNT >= 0x0600
_Ret_maybenull_
(
_In_opt_ LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
_In_ DWORD dwMaximumSizeHigh,
_In_ DWORD dwMaximumSizeLow,
);
#ifndef UNICODE
#define CreateFileMappingNuma CreateFileMappingNumaA
#endif
#endif // _WIN32_WINNT >= 0x0600
(
_In_ DWORD dwDesiredAccess,
_In_ BOOL bInheritHandle,
);
#ifndef UNICODE
#define OpenFileMapping OpenFileMappingA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
_Success_(return != 0 && return <= nBufferLength)
(
_In_ DWORD nBufferLength,
_Out_writes_to_opt_(nBufferLength, return + 1) LPSTR lpBuffer
);
#ifndef UNICODE
#define GetLogicalDriveStrings GetLogicalDriveStringsA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= 0x0602)
_Ret_maybenull_
(
_In_ LPCWSTR lpwLibFileName,
_Reserved_ DWORD Reserved
);
#endif // _WIN32_WINNT >= 0x0602
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#if (_WIN32_WINNT >= 0x0600)
#define PROTECTION_LEVEL_WINTCB_LIGHT 0x00000000
#define PROTECTION_LEVEL_WINDOWS 0x00000001
#define PROTECTION_LEVEL_WINDOWS_LIGHT 0x00000002
#define PROTECTION_LEVEL_ANTIMALWARE_LIGHT 0x00000003
#define PROTECTION_LEVEL_LSA_LIGHT 0x00000004
#define PROTECTION_LEVEL_WINTCB 0x00000005
#define PROTECTION_LEVEL_CODEGEN_LIGHT 0x00000006
#define PROTECTION_LEVEL_AUTHENTICODE 0x00000007
#define PROTECTION_LEVEL_PPL_APP 0x00000008
#define PROTECTION_LEVEL_SAME 0xFFFFFFFF
#define PROTECTION_LEVEL_NONE 0xFFFFFFFE
#endif // _WIN32_WINNT >= 0x0600
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= 0x0600)
#define PROCESS_NAME_NATIVE 0x00000001
QueryFullProcessImageNameA
(
_Out_writes_to_(*lpdwSize, *lpdwSize) LPSTR lpExeName,
);
QueryFullProcessImageNameW
(
_Out_writes_to_(*lpdwSize, *lpdwSize) LPWSTR lpExeName,
);
#ifdef UNICODE
#define QueryFullProcessImageName QueryFullProcessImageNameW
#else
#define QueryFullProcessImageName QueryFullProcessImageNameA
#endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600
#if (_WIN32_WINNT >= 0x0600)
#define PROC_THREAD_ATTRIBUTE_NUMBER 0x0000FFFF
#define PROC_THREAD_ATTRIBUTE_THREAD 0x00010000 // Attribute may be used with thread creation
#define PROC_THREAD_ATTRIBUTE_INPUT 0x00020000 // Attribute is input only
#define PROC_THREAD_ATTRIBUTE_ADDITIVE 0x00040000 // Attribute may be "accumulated," e.g. bitmasks, counters, etc.
#ifndef _USE_FULL_PROC_THREAD_ATTRIBUTE
typedef
enum
_PROC_THREAD_ATTRIBUTE_NUM
{
ProcThreadAttributeParentProcess
=
0
,
ProcThreadAttributeHandleList
=
2
,
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
ProcThreadAttributeGroupAffinity
=
3
,
ProcThreadAttributePreferredNode
=
4
,
ProcThreadAttributeIdealProcessor
=
5
,
ProcThreadAttributeUmsThread
=
6
,
ProcThreadAttributeMitigationPolicy
=
7
,
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
ProcThreadAttributeSecurityCapabilities
=
9
,
#endif
ProcThreadAttributeProtectionLevel
=
11
,
#if (_WIN32_WINNT >= _WIN32_WINNT_WINBLUE)
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD)
ProcThreadAttributeJobList
=
13
,
ProcThreadAttributeChildProcessPolicy
=
14
,
ProcThreadAttributeAllApplicationPackagesPolicy
=
15
,
ProcThreadAttributeWin32kFilter
=
16
,
#endif
#if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
ProcThreadAttributeSafeOpenPromptOriginClaim
=
17
,
#endif
#if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
ProcThreadAttributeDesktopAppPolicy
=
18
,
#endif
#if (NTDDI_VERSION >= NTDDI_WIN10_RS5)
ProcThreadAttributePseudoConsole
=
22
,
#endif
}
PROC_THREAD_ATTRIBUTE_NUM
;
#endif
#define ProcThreadAttributeValue(Number, Thread, Input, Additive) \
(((Number) & PROC_THREAD_ATTRIBUTE_NUMBER) | \
((Thread != FALSE) ? PROC_THREAD_ATTRIBUTE_THREAD : 0) | \
((Input != FALSE) ? PROC_THREAD_ATTRIBUTE_INPUT : 0) | \
((Additive != FALSE) ? PROC_THREAD_ATTRIBUTE_ADDITIVE : 0))
#define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS \
ProcThreadAttributeValue (ProcThreadAttributeParentProcess, FALSE, TRUE, FALSE)
#define PROC_THREAD_ATTRIBUTE_HANDLE_LIST \
ProcThreadAttributeValue (ProcThreadAttributeHandleList, FALSE, TRUE, FALSE)
#endif // (_WIN32_WINNT >= 0x0600)
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
#define PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY \
ProcThreadAttributeValue (ProcThreadAttributeGroupAffinity, TRUE, TRUE, FALSE)
#define PROC_THREAD_ATTRIBUTE_PREFERRED_NODE \
ProcThreadAttributeValue (ProcThreadAttributePreferredNode, FALSE, TRUE, FALSE)
#define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR \
ProcThreadAttributeValue (ProcThreadAttributeIdealProcessor, TRUE, TRUE, FALSE)
#define PROC_THREAD_ATTRIBUTE_UMS_THREAD \
ProcThreadAttributeValue (ProcThreadAttributeUmsThread, TRUE, TRUE, FALSE)
#define PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY \
ProcThreadAttributeValue (ProcThreadAttributeMitigationPolicy, FALSE, TRUE, FALSE)
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#define PROC_THREAD_ATTRIBUTE_SECURITY_CAPABILITIES \
ProcThreadAttributeValue (ProcThreadAttributeSecurityCapabilities, FALSE, TRUE, FALSE)
#endif
#define PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL \
ProcThreadAttributeValue (ProcThreadAttributeProtectionLevel, FALSE, TRUE, FALSE)
#if (_WIN32_WINNT >= _WIN32_WINNT_WINBLUE)
#endif
#if (NTDDI_VERSION >= NTDDI_WIN10_RS5)
#define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE \
ProcThreadAttributeValue (ProcThreadAttributePseudoConsole, FALSE, TRUE, FALSE)
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
#define PROCESS_CREATION_MITIGATION_POLICY_DEP_ENABLE 0x01
#define PROCESS_CREATION_MITIGATION_POLICY_DEP_ATL_THUNK_ENABLE 0x02
#define PROCESS_CREATION_MITIGATION_POLICY_SEHOP_ENABLE 0x04
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#define PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_MASK (0x00000003 << 8)
#define PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_DEFER (0x00000000 << 8)
#define PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_ALWAYS_ON (0x00000001 << 8)
#define PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_ALWAYS_OFF (0x00000002 << 8)
#define PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_ALWAYS_ON_REQ_RELOCS (0x00000003 << 8)
#define PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_MASK (0x00000003 << 12)
#define PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_DEFER (0x00000000 << 12)
#define PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_ALWAYS_ON (0x00000001 << 12)
#define PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_ALWAYS_OFF (0x00000002 << 12)
#define PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_RESERVED (0x00000003 << 12)
#define PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_MASK (0x00000003 << 16)
#define PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_DEFER (0x00000000 << 16)
#define PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_ALWAYS_ON (0x00000001 << 16)
#define PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_ALWAYS_OFF (0x00000002 << 16)
#define PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_RESERVED (0x00000003 << 16)
#define PROCESS_CREATION_MITIGATION_POLICY_HIGH_ENTROPY_ASLR_MASK (0x00000003 << 20)
#define PROCESS_CREATION_MITIGATION_POLICY_HIGH_ENTROPY_ASLR_DEFER (0x00000000 << 20)
#define PROCESS_CREATION_MITIGATION_POLICY_HIGH_ENTROPY_ASLR_ALWAYS_ON (0x00000001 << 20)
#define PROCESS_CREATION_MITIGATION_POLICY_HIGH_ENTROPY_ASLR_ALWAYS_OFF (0x00000002 << 20)
#define PROCESS_CREATION_MITIGATION_POLICY_HIGH_ENTROPY_ASLR_RESERVED (0x00000003 << 20)
#define PROCESS_CREATION_MITIGATION_POLICY_STRICT_HANDLE_CHECKS_MASK (0x00000003 << 24)
#define PROCESS_CREATION_MITIGATION_POLICY_STRICT_HANDLE_CHECKS_DEFER (0x00000000 << 24)
#define PROCESS_CREATION_MITIGATION_POLICY_STRICT_HANDLE_CHECKS_ALWAYS_ON (0x00000001 << 24)
#define PROCESS_CREATION_MITIGATION_POLICY_STRICT_HANDLE_CHECKS_ALWAYS_OFF (0x00000002 << 24)
#define PROCESS_CREATION_MITIGATION_POLICY_STRICT_HANDLE_CHECKS_RESERVED (0x00000003 << 24)
#define PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_MASK (0x00000003 << 28)
#define PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_DEFER (0x00000000 << 28)
#define PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_ON (0x00000001 << 28)
#define PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_OFF (0x00000002 << 28)
#define PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_RESERVED (0x00000003 << 28)
#define PROCESS_CREATION_MITIGATION_POLICY_EXTENSION_POINT_DISABLE_MASK (0x00000003ui64 << 32)
#define PROCESS_CREATION_MITIGATION_POLICY_EXTENSION_POINT_DISABLE_DEFER (0x00000000ui64 << 32)
#define PROCESS_CREATION_MITIGATION_POLICY_EXTENSION_POINT_DISABLE_ALWAYS_ON (0x00000001ui64 << 32)
#define PROCESS_CREATION_MITIGATION_POLICY_EXTENSION_POINT_DISABLE_ALWAYS_OFF (0x00000002ui64 << 32)
#define PROCESS_CREATION_MITIGATION_POLICY_EXTENSION_POINT_DISABLE_RESERVED (0x00000003ui64 << 32)
#if (_WIN32_WINNT >= _WIN32_WINNT_WINBLUE)
#define PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_MASK (0x00000003ui64 << 36)
#define PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_DEFER (0x00000000ui64 << 36)
#define PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_ALWAYS_ON (0x00000001ui64 << 36)
#define PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_ALWAYS_OFF (0x00000002ui64 << 36)
#define PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_ALWAYS_ON_ALLOW_OPT_OUT (0x00000003ui64 << 36)
#define PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_MASK (0x00000003ui64 << 40)
#define PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_DEFER (0x00000000ui64 << 40)
#define PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_ALWAYS_ON (0x00000001ui64 << 40)
#define PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_ALWAYS_OFF (0x00000002ui64 << 40)
#define PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_EXPORT_SUPPRESSION (0x00000003ui64 << 40)
#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_MASK (0x00000003ui64 << 44)
#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_DEFER (0x00000000ui64 << 44)
#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON (0x00000001ui64 << 44)
#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_OFF (0x00000002ui64 << 44)
#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALLOW_STORE (0x00000003ui64 << 44)
#if (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD)
#define PROCESS_CREATION_MITIGATION_POLICY_FONT_DISABLE_MASK (0x00000003ui64 << 48)
#define PROCESS_CREATION_MITIGATION_POLICY_FONT_DISABLE_DEFER (0x00000000ui64 << 48)
#define PROCESS_CREATION_MITIGATION_POLICY_FONT_DISABLE_ALWAYS_ON (0x00000001ui64 << 48)
#define PROCESS_CREATION_MITIGATION_POLICY_FONT_DISABLE_ALWAYS_OFF (0x00000002ui64 << 48)
#define PROCESS_CREATION_MITIGATION_POLICY_AUDIT_NONSYSTEM_FONTS (0x00000003ui64 << 48)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_MASK (0x00000003ui64 << 52)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_DEFER (0x00000000ui64 << 52)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_ALWAYS_ON (0x00000001ui64 << 52)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_ALWAYS_OFF (0x00000002ui64 << 52)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_RESERVED (0x00000003ui64 << 52)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_MASK (0x00000003ui64 << 56)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_DEFER (0x00000000ui64 << 56)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_ALWAYS_ON (0x00000001ui64 << 56)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_ALWAYS_OFF (0x00000002ui64 << 56)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_RESERVED (0x00000003ui64 << 56)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_MASK (0x00000003ui64 << 60)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_DEFER (0x00000000ui64 << 60)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON (0x00000001ui64 << 60)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_OFF (0x00000002ui64 << 60)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_RESERVED (0x00000003ui64 << 60)
#define PROCESS_CREATION_MITIGATION_POLICY2_LOADER_INTEGRITY_CONTINUITY_MASK (0x00000003ui64 << 4)
#define PROCESS_CREATION_MITIGATION_POLICY2_LOADER_INTEGRITY_CONTINUITY_DEFER (0x00000000ui64 << 4)
#define PROCESS_CREATION_MITIGATION_POLICY2_LOADER_INTEGRITY_CONTINUITY_ALWAYS_ON (0x00000001ui64 << 4)
#define PROCESS_CREATION_MITIGATION_POLICY2_LOADER_INTEGRITY_CONTINUITY_ALWAYS_OFF (0x00000002ui64 << 4)
#define PROCESS_CREATION_MITIGATION_POLICY2_LOADER_INTEGRITY_CONTINUITY_AUDIT (0x00000003ui64 << 4)
#define PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_MASK (0x00000003ui64 << 8)
#define PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_DEFER (0x00000000ui64 << 8)
#define PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_ALWAYS_ON (0x00000001ui64 << 8)
#define PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_ALWAYS_OFF (0x00000002ui64 << 8)
#define PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_RESERVED (0x00000003ui64 << 8)
#define PROCESS_CREATION_MITIGATION_POLICY2_MODULE_TAMPERING_PROTECTION_MASK (0x00000003ui64 << 12)
#define PROCESS_CREATION_MITIGATION_POLICY2_MODULE_TAMPERING_PROTECTION_DEFER (0x00000000ui64 << 12)
#define PROCESS_CREATION_MITIGATION_POLICY2_MODULE_TAMPERING_PROTECTION_ALWAYS_ON (0x00000001ui64 << 12)
#define PROCESS_CREATION_MITIGATION_POLICY2_MODULE_TAMPERING_PROTECTION_ALWAYS_OFF (0x00000002ui64 << 12)
#define PROCESS_CREATION_MITIGATION_POLICY2_MODULE_TAMPERING_PROTECTION_NOINHERIT (0x00000003ui64 << 12)
#define PROCESS_CREATION_MITIGATION_POLICY2_RESTRICT_INDIRECT_BRANCH_PREDICTION_MASK (0x00000003ui64 << 16)
#define PROCESS_CREATION_MITIGATION_POLICY2_RESTRICT_INDIRECT_BRANCH_PREDICTION_DEFER (0x00000000ui64 << 16)
#define PROCESS_CREATION_MITIGATION_POLICY2_RESTRICT_INDIRECT_BRANCH_PREDICTION_ALWAYS_ON (0x00000001ui64 << 16)
#define PROCESS_CREATION_MITIGATION_POLICY2_RESTRICT_INDIRECT_BRANCH_PREDICTION_ALWAYS_OFF (0x00000002ui64 << 16)
#define PROCESS_CREATION_MITIGATION_POLICY2_RESTRICT_INDIRECT_BRANCH_PREDICTION_RESERVED (0x00000003ui64 << 16)
#define PROCESS_CREATION_MITIGATION_POLICY2_ALLOW_DOWNGRADE_DYNAMIC_CODE_POLICY_MASK (0x00000003ui64 << 20)
#define PROCESS_CREATION_MITIGATION_POLICY2_ALLOW_DOWNGRADE_DYNAMIC_CODE_POLICY_DEFER (0x00000000ui64 << 20)
#define PROCESS_CREATION_MITIGATION_POLICY2_ALLOW_DOWNGRADE_DYNAMIC_CODE_POLICY_ALWAYS_ON (0x00000001ui64 << 20)
#define PROCESS_CREATION_MITIGATION_POLICY2_ALLOW_DOWNGRADE_DYNAMIC_CODE_POLICY_ALWAYS_OFF (0x00000002ui64 << 20)
#define PROCESS_CREATION_MITIGATION_POLICY2_ALLOW_DOWNGRADE_DYNAMIC_CODE_POLICY_RESERVED (0x00000003ui64 << 20)
#define PROCESS_CREATION_MITIGATION_POLICY2_SPECULATIVE_STORE_BYPASS_DISABLE_MASK (0x00000003ui64 << 24)
#define PROCESS_CREATION_MITIGATION_POLICY2_SPECULATIVE_STORE_BYPASS_DISABLE_DEFER (0x00000000ui64 << 24)
#define PROCESS_CREATION_MITIGATION_POLICY2_SPECULATIVE_STORE_BYPASS_DISABLE_ALWAYS_ON (0x00000001ui64 << 24)
#define PROCESS_CREATION_MITIGATION_POLICY2_SPECULATIVE_STORE_BYPASS_DISABLE_ALWAYS_OFF (0x00000002ui64 << 24)
#define PROCESS_CREATION_MITIGATION_POLICY2_SPECULATIVE_STORE_BYPASS_DISABLE_RESERVED (0x00000003ui64 << 24)
#endif // _WIN32_WINNT_WINTHRESHOLD
#endif // _WIN32_WINNT_WINBLUE
#endif // _WIN32_WINNT_WIN8
#if (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD)
#define PROC_THREAD_ATTRIBUTE_JOB_LIST \
ProcThreadAttributeValue (ProcThreadAttributeJobList, FALSE, TRUE, FALSE)
#define PROCESS_CREATION_CHILD_PROCESS_RESTRICTED 0x01
#define PROCESS_CREATION_CHILD_PROCESS_OVERRIDE 0x02
#define PROCESS_CREATION_CHILD_PROCESS_RESTRICTED_UNLESS_SECURE 0x04
#define PROC_THREAD_ATTRIBUTE_CHILD_PROCESS_POLICY \
ProcThreadAttributeValue (ProcThreadAttributeChildProcessPolicy, FALSE, TRUE, FALSE)
#define PROCESS_CREATION_ALL_APPLICATION_PACKAGES_OPT_OUT 0x01
#define PROC_THREAD_ATTRIBUTE_ALL_APPLICATION_PACKAGES_POLICY \
ProcThreadAttributeValue (ProcThreadAttributeAllApplicationPackagesPolicy, FALSE, TRUE, FALSE)
#define PROC_THREAD_ATTRIBUTE_WIN32K_FILTER \
ProcThreadAttributeValue (ProcThreadAttributeWin32kFilter, FALSE, TRUE, FALSE)
#endif // _WIN32_WINNT_WINTHRESHOLD
#if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
#endif // NTDDI_WIN10_RS1
#if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
#define PROCESS_CREATION_DESKTOP_APP_BREAKAWAY_ENABLE_PROCESS_TREE 0x01
#define PROCESS_CREATION_DESKTOP_APP_BREAKAWAY_DISABLE_PROCESS_TREE 0x02
#define PROCESS_CREATION_DESKTOP_APP_BREAKAWAY_OVERRIDE 0x04
#define PROC_THREAD_ATTRIBUTE_DESKTOP_APP_POLICY \
ProcThreadAttributeValue (ProcThreadAttributeDesktopAppPolicy, FALSE, TRUE, FALSE)
#endif // NTDDI_WIN10_RS2
#if (NTDDI_VERSION >= NTDDI_WIN10_RS5)
#endif // NTDDI_WIN10_RS5
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
_Out_ LPSTARTUPINFOA lpStartupInfo
);
#ifndef UNICODE
#define GetStartupInfo GetStartupInfoA
#endif
#if defined(_M_CEE)
#undef GetEnvironmentVariable
#if _MSC_VER >= 1400
#pragma warning(push)
#pragma warning(disable: 6103)
#endif /* _MSC_VER >= 1400 */
_Success_(return != 0 && return < nSize)
__inline
DWORD
GetEnvironmentVariable(
_In_opt_ LPCTSTR lpName,
_Out_writes_to_opt_(nSize, return + 1) LPTSTR lpBuffer,
_In_ DWORD nSize
)
{
#ifdef UNICODE
return GetEnvironmentVariableW(
#else
return GetEnvironmentVariableA(
#endif
lpName,
lpBuffer,
nSize
);
}
#if _MSC_VER >= 1400
#pragma warning(pop)
#endif /* _MSC_VER >= 1400 */
#endif /* _M_CEE */
#if defined(_M_CEE)
#undef SetEnvironmentVariable
__inline
BOOL
SetEnvironmentVariable(
LPCTSTR lpName,
LPCTSTR lpValue
)
{
#ifdef UNICODE
return SetEnvironmentVariableW(
#else
return SetEnvironmentVariableA(
#endif
lpName,
lpValue
);
}
#endif /* _M_CEE */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region OneCore Family or App Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_APP)
GetFirmwareEnvironmentVariableA
(
_Out_writes_bytes_to_opt_(nSize, return) PVOID pBuffer,
);
GetFirmwareEnvironmentVariableW
(
_Out_writes_bytes_to_opt_(nSize, return) PVOID pBuffer,
);
#ifdef UNICODE
#define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableW
#else
#define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableA
#endif // !UNICODE
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
GetFirmwareEnvironmentVariableExA
(
_Out_writes_bytes_to_opt_(nSize, return) PVOID pBuffer,
_Out_opt_ PDWORD pdwAttribubutes
);
GetFirmwareEnvironmentVariableExW
(
_Out_writes_bytes_to_opt_(nSize, return) PVOID pBuffer,
_Out_opt_ PDWORD pdwAttribubutes
);
#ifdef UNICODE
#define GetFirmwareEnvironmentVariableEx GetFirmwareEnvironmentVariableExW
#else
#define GetFirmwareEnvironmentVariableEx GetFirmwareEnvironmentVariableExA
#endif // !UNICODE
#endif
SetFirmwareEnvironmentVariableA
(
_In_reads_bytes_opt_(nSize) PVOID pValue,
);
SetFirmwareEnvironmentVariableW
(
_In_reads_bytes_opt_(nSize) PVOID pValue,
);
#ifdef UNICODE
#define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableW
#else
#define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableA
#endif // !UNICODE
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
SetFirmwareEnvironmentVariableExA
(
_In_reads_bytes_opt_(nSize) PVOID pValue,
);
SetFirmwareEnvironmentVariableExW
(
_In_reads_bytes_opt_(nSize) PVOID pValue,
);
#ifdef UNICODE
#define SetFirmwareEnvironmentVariableEx SetFirmwareEnvironmentVariableExW
#else
#define SetFirmwareEnvironmentVariableEx SetFirmwareEnvironmentVariableExA
#endif // !UNICODE
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
(
_Inout_ PFIRMWARE_TYPE FirmwareType
);
(
_Out_ PBOOL NativeVhdBoot
);
#endif // _WIN32_WINNT >= _WIN32_WINNT_WIN8
_Ret_maybenull_
(
_In_opt_ HMODULE hModule,
);
#ifndef UNICODE
#define FindResource FindResourceA
#endif
_Ret_maybenull_
(
_In_opt_ HMODULE hModule,
);
#ifndef UNICODE
#define FindResourceEx FindResourceExA
#endif
(
_In_opt_ HMODULE hModule,
_In_ ENUMRESTYPEPROCA lpEnumFunc,
);
(
_In_opt_ HMODULE hModule,
_In_ ENUMRESTYPEPROCW lpEnumFunc,
);
#ifdef UNICODE
#define EnumResourceTypes EnumResourceTypesW
#else
#define EnumResourceTypes EnumResourceTypesA
#endif // !UNICODE
(
_In_opt_ HMODULE hModule,
_In_ ENUMRESNAMEPROCA lpEnumFunc,
);
#ifndef UNICODE
#define EnumResourceNames EnumResourceNamesA
#endif
(
_In_opt_ HMODULE hModule,
_In_ ENUMRESLANGPROCA lpEnumFunc,
);
(
_In_opt_ HMODULE hModule,
_In_ ENUMRESLANGPROCW lpEnumFunc,
);
#ifdef UNICODE
#define EnumResourceLanguages EnumResourceLanguagesW
#else
#define EnumResourceLanguages EnumResourceLanguagesA
#endif // !UNICODE
(
_In_ BOOL bDeleteExistingResources
);
(
_In_ BOOL bDeleteExistingResources
);
#ifdef UNICODE
#define BeginUpdateResource BeginUpdateResourceW
#else
#define BeginUpdateResource BeginUpdateResourceA
#endif // !UNICODE
(
_In_reads_bytes_opt_(cb) LPVOID lpData,
);
(
_In_reads_bytes_opt_(cb) LPVOID lpData,
);
#ifdef UNICODE
#define UpdateResource UpdateResourceW
#else
#define UpdateResource UpdateResourceA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define EndUpdateResource EndUpdateResourceW
#else
#define EndUpdateResource EndUpdateResourceA
#endif // !UNICODE
#define ATOM_FLAG_GLOBAL 0x2
(
);
(
_In_opt_ LPCWSTR lpString
);
#ifdef UNICODE
#define GlobalAddAtom GlobalAddAtomW
#else
#define GlobalAddAtom GlobalAddAtomA
#endif // !UNICODE
(
_In_opt_ LPCSTR lpString,
);
(
_In_opt_ LPCWSTR lpString,
);
#ifdef UNICODE
#define GlobalAddAtomEx GlobalAddAtomExW
#else
#define GlobalAddAtomEx GlobalAddAtomExA
#endif // !UNICODE
(
);
(
_In_opt_ LPCWSTR lpString
);
#ifdef UNICODE
#define GlobalFindAtom GlobalFindAtomW
#else
#define GlobalFindAtom GlobalFindAtomA
#endif // !UNICODE
(
_Out_writes_to_(nSize, return + 1) LPSTR lpBuffer,
);
(
_Out_writes_to_(nSize, return + 1) LPWSTR lpBuffer,
);
#ifdef UNICODE
#define GlobalGetAtomName GlobalGetAtomNameW
#else
#define GlobalGetAtomName GlobalGetAtomNameA
#endif // !UNICODE
(
);
(
_In_opt_ LPCWSTR lpString
);
#ifdef UNICODE
#define AddAtom AddAtomW
#else
#define AddAtom AddAtomA
#endif // !UNICODE
(
);
(
_In_opt_ LPCWSTR lpString
);
#ifdef UNICODE
#define FindAtom FindAtomW
#else
#define FindAtom FindAtomA
#endif // !UNICODE
(
_Out_writes_to_(nSize, return + 1) LPSTR lpBuffer,
);
(
_Out_writes_to_(nSize, return + 1) LPWSTR lpBuffer,
);
#ifdef UNICODE
#define GetAtomName GetAtomNameW
#else
#define GetAtomName GetAtomNameA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
);
(
);
#ifdef UNICODE
#define GetProfileInt GetProfileIntW
#else
#define GetProfileInt GetProfileIntA
#endif // !UNICODE
(
_In_opt_ LPCSTR lpAppName,
_In_opt_ LPCSTR lpKeyName,
_In_opt_ LPCSTR lpDefault,
_Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
);
(
_In_opt_ LPCWSTR lpAppName,
_In_opt_ LPCWSTR lpKeyName,
_In_opt_ LPCWSTR lpDefault,
_Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
);
#ifdef UNICODE
#define GetProfileString GetProfileStringW
#else
#define GetProfileString GetProfileStringA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
_In_opt_ LPCSTR lpAppName,
_In_opt_ LPCSTR lpKeyName,
);
(
_In_opt_ LPCWSTR lpAppName,
_In_opt_ LPCWSTR lpKeyName,
_In_opt_ LPCWSTR lpString
);
#ifdef UNICODE
#define WriteProfileString WriteProfileStringW
#else
#define WriteProfileString WriteProfileStringA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
_Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
);
(
_Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
);
#ifdef UNICODE
#define GetProfileSection GetProfileSectionW
#else
#define GetProfileSection GetProfileSectionA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
);
(
);
#ifdef UNICODE
#define WriteProfileSection WriteProfileSectionW
#else
#define WriteProfileSection WriteProfileSectionA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
_In_opt_ LPCSTR lpFileName
);
(
_In_opt_ LPCWSTR lpFileName
);
#ifdef UNICODE
#define GetPrivateProfileInt GetPrivateProfileIntW
#else
#define GetPrivateProfileInt GetPrivateProfileIntA
#endif // !UNICODE
#if defined(_M_CEE)
#undef GetPrivateProfileInt
__inline
UINT
GetPrivateProfileInt(
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
INT nDefault,
LPCTSTR lpFileName
)
{
#ifdef UNICODE
return GetPrivateProfileIntW(
#else
return GetPrivateProfileIntA(
#endif
lpAppName,
lpKeyName,
nDefault,
lpFileName
);
}
#endif /* _M_CEE */
(
_In_opt_ LPCSTR lpAppName,
_In_opt_ LPCSTR lpKeyName,
_In_opt_ LPCSTR lpDefault,
_Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
_In_opt_ LPCSTR lpFileName
);
(
_In_opt_ LPCWSTR lpAppName,
_In_opt_ LPCWSTR lpKeyName,
_In_opt_ LPCWSTR lpDefault,
_Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
_In_opt_ LPCWSTR lpFileName
);
#ifdef UNICODE
#define GetPrivateProfileString GetPrivateProfileStringW
#else
#define GetPrivateProfileString GetPrivateProfileStringA
#endif // !UNICODE
#if defined(_M_CEE)
#undef GetPrivateProfileString
__inline
DWORD
GetPrivateProfileString(
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
LPCTSTR lpDefault,
LPTSTR lpReturnedString,
DWORD nSize,
LPCTSTR lpFileName
)
{
#ifdef UNICODE
return GetPrivateProfileStringW(
#else
return GetPrivateProfileStringA(
#endif
lpAppName,
lpKeyName,
lpDefault,
lpReturnedString,
nSize,
lpFileName
);
}
#endif /* _M_CEE */
WritePrivateProfileStringA
(
_In_opt_ LPCSTR lpAppName,
_In_opt_ LPCSTR lpKeyName,
_In_opt_ LPCSTR lpString,
_In_opt_ LPCSTR lpFileName
);
WritePrivateProfileStringW
(
_In_opt_ LPCWSTR lpAppName,
_In_opt_ LPCWSTR lpKeyName,
_In_opt_ LPCWSTR lpString,
_In_opt_ LPCWSTR lpFileName
);
#ifdef UNICODE
#define WritePrivateProfileString WritePrivateProfileStringW
#else
#define WritePrivateProfileString WritePrivateProfileStringA
#endif // !UNICODE
GetPrivateProfileSectionA
(
_Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
_In_opt_ LPCSTR lpFileName
);
GetPrivateProfileSectionW
(
_Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
_In_opt_ LPCWSTR lpFileName
);
#ifdef UNICODE
#define GetPrivateProfileSection GetPrivateProfileSectionW
#else
#define GetPrivateProfileSection GetPrivateProfileSectionA
#endif // !UNICODE
#if defined(_M_CEE)
#undef GetPrivateProfileSection
__inline
DWORD
GetPrivateProfileSection(
LPCTSTR lpAppName,
LPTSTR lpReturnedString,
DWORD nSize,
LPCTSTR lpFileName
)
{
#ifdef UNICODE
return GetPrivateProfileSectionW(
#else
return GetPrivateProfileSectionA(
#endif
lpAppName,
lpReturnedString,
nSize,
lpFileName
);
}
#endif /* _M_CEE */
WritePrivateProfileSectionA
(
_In_opt_ LPCSTR lpAppName,
_In_opt_ LPCSTR lpString,
_In_opt_ LPCSTR lpFileName
);
WritePrivateProfileSectionW
(
_In_opt_ LPCWSTR lpAppName,
_In_opt_ LPCWSTR lpString,
_In_opt_ LPCWSTR lpFileName
);
#ifdef UNICODE
#define WritePrivateProfileSection WritePrivateProfileSectionW
#else
#define WritePrivateProfileSection WritePrivateProfileSectionA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
GetPrivateProfileSectionNamesA
(
_Out_writes_to_opt_(nSize, return + 1) LPSTR lpszReturnBuffer,
_In_opt_ LPCSTR lpFileName
);
GetPrivateProfileSectionNamesW
(
_Out_writes_to_opt_(nSize, return + 1) LPWSTR lpszReturnBuffer,
_In_opt_ LPCWSTR lpFileName
);
#ifdef UNICODE
#define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesW
#else
#define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesA
#endif // !UNICODE
#if defined(_M_CEE)
#undef GetPrivateProfileSectionNames
__inline
DWORD
GetPrivateProfileSectionNames(
LPTSTR lpszReturnBuffer,
DWORD nSize,
LPCTSTR lpFileName
)
{
#ifdef UNICODE
return GetPrivateProfileSectionNamesW(
#else
return GetPrivateProfileSectionNamesA(
#endif
lpszReturnBuffer,
nSize,
lpFileName
);
}
#endif /* _M_CEE */
(
_Out_writes_bytes_opt_(uSizeStruct) LPVOID lpStruct,
);
(
_In_ LPCWSTR lpszSection,
_Out_writes_bytes_opt_(uSizeStruct) LPVOID lpStruct,
);
#ifdef UNICODE
#define GetPrivateProfileStruct GetPrivateProfileStructW
#else
#define GetPrivateProfileStruct GetPrivateProfileStructA
#endif // !UNICODE
#if defined(_M_CEE)
#undef GetPrivateProfileStruct
__inline
BOOL
GetPrivateProfileStruct(
LPCTSTR lpszSection,
LPCTSTR lpszKey,
LPVOID lpStruct,
UINT uSizeStruct,
LPCTSTR szFile
)
{
#ifdef UNICODE
return GetPrivateProfileStructW(
#else
return GetPrivateProfileStructA(
#endif
lpszSection,
lpszKey,
lpStruct,
uSizeStruct,
szFile
);
}
#endif /* _M_CEE */
WritePrivateProfileStructA
(
_In_reads_bytes_opt_(uSizeStruct) LPVOID lpStruct,
);
WritePrivateProfileStructW
(
_In_ LPCWSTR lpszSection,
_In_reads_bytes_opt_(uSizeStruct) LPVOID lpStruct,
);
#ifdef UNICODE
#define WritePrivateProfileStruct WritePrivateProfileStructW
#else
#define WritePrivateProfileStruct WritePrivateProfileStructA
#endif // !UNICODE
#if defined(_M_CEE)
#undef GetTempFileName
__inline
UINT
GetTempFileName(
LPCTSTR lpPathName,
LPCTSTR lpPrefixString,
UINT uUnique,
LPTSTR lpTempFileName
)
{
#ifdef UNICODE
return GetTempFileNameW(
#else
return GetTempFileNameA(
#endif
lpPathName,
lpPrefixString,
uUnique,
lpTempFileName
);
}
#endif /* _M_CEE */
#if !defined(RC_INVOKED) // RC warns because "WINBASE_DECLARE_GET_SYSTEM_WOW64_DIRECTORY" is a bit long.
#if _WIN32_WINNT >= 0x0501 || defined(WINBASE_DECLARE_GET_SYSTEM_WOW64_DIRECTORY)
Wow64EnableWow64FsRedirection
(
_In_ BOOLEAN Wow64FsEnableRedirection
);
typedef UINT (WINAPI* PGET_SYSTEM_WOW64_DIRECTORY_A)(_Out_writes_to_opt_(uSize, return + 1) LPSTR lpBuffer, _In_ UINT uSize);
typedef
(
__stdcall
*
PGET_SYSTEM_WOW64_DIRECTORY_A
)(
lpBuffer,
uSize);
typedef UINT (WINAPI* PGET_SYSTEM_WOW64_DIRECTORY_W)(_Out_writes_to_opt_(uSize, return + 1) LPWSTR lpBuffer, _In_ UINT uSize);
typedef
(
__stdcall
*
PGET_SYSTEM_WOW64_DIRECTORY_W
)(
lpBuffer,
uSize);
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A "GetSystemWow64DirectoryA"
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W L"GetSystemWow64DirectoryA"
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T TEXT("GetSystemWow64DirectoryA")
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A "GetSystemWow64DirectoryW"
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W L"GetSystemWow64DirectoryW"
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T TEXT("GetSystemWow64DirectoryW")
#ifdef UNICODE
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T
#else
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T
#endif
#endif // _WIN32_WINNT >= 0x0501
#endif
#if defined(_M_CEE)
#undef SetCurrentDirectory
__inline
BOOL
SetCurrentDirectory(
LPCTSTR lpPathName
)
{
#ifdef UNICODE
return SetCurrentDirectoryW(
#else
return SetCurrentDirectoryA(
#endif
lpPathName
);
}
#endif /* _M_CEE */
#if defined(_M_CEE)
#undef GetCurrentDirectory
__inline
DWORD
GetCurrentDirectory(
DWORD nBufferLength,
LPTSTR lpBuffer
)
{
#ifdef UNICODE
return GetCurrentDirectoryW(
#else
return GetCurrentDirectoryA(
#endif
nBufferLength,
lpBuffer
);
}
#endif /* _M_CEE */
#if _WIN32_WINNT >= 0x0502
(
_In_opt_ LPCSTR lpPathName
);
(
_In_opt_ LPCWSTR lpPathName
);
#ifdef UNICODE
#define SetDllDirectory SetDllDirectoryW
#else
#define SetDllDirectory SetDllDirectoryA
#endif // !UNICODE
_Success_(return != 0 && return < nBufferLength)
(
_In_ DWORD nBufferLength,
_Out_writes_to_opt_(nBufferLength, return + 1) LPSTR lpBuffer
);
_Success_(return != 0 && return < nBufferLength)
(
_In_ DWORD nBufferLength,
_Out_writes_to_opt_(nBufferLength, return + 1) LPWSTR lpBuffer
);
#ifdef UNICODE
#define GetDllDirectory GetDllDirectoryW
#else
#define GetDllDirectory GetDllDirectoryA
#endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0502
#define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE 0x1
#define BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE 0x10000
#define BASE_SEARCH_PATH_PERMANENT 0x8000
#define BASE_SEARCH_PATH_INVALID_FLAGS ~0x18001
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if defined(_M_CEE)
#undef CreateDirectory
__inline
BOOL
CreateDirectory(
LPCTSTR lpPathName,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
)
{
#ifdef UNICODE
return CreateDirectoryW(
#else
return CreateDirectoryA(
#endif
lpPathName,
lpSecurityAttributes
);
}
#endif /* _M_CEE */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
_In_ LPCSTR lpTemplateDirectory,
_In_ LPCSTR lpNewDirectory,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
(
_In_ LPCWSTR lpTemplateDirectory,
_In_ LPCWSTR lpNewDirectory,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
#ifdef UNICODE
#define CreateDirectoryEx CreateDirectoryExW
#else
#define CreateDirectoryEx CreateDirectoryExA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if _WIN32_WINNT >= 0x0600
CreateDirectoryTransactedA
(
_In_opt_ LPCSTR lpTemplateDirectory,
_In_ LPCSTR lpNewDirectory,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
);
CreateDirectoryTransactedW
(
_In_opt_ LPCWSTR lpTemplateDirectory,
_In_ LPCWSTR lpNewDirectory,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
);
#ifdef UNICODE
#define CreateDirectoryTransacted CreateDirectoryTransactedW
#else
#define CreateDirectoryTransacted CreateDirectoryTransactedA
#endif // !UNICODE
RemoveDirectoryTransactedA
(
);
RemoveDirectoryTransactedW
(
);
#ifdef UNICODE
#define RemoveDirectoryTransacted RemoveDirectoryTransactedW
#else
#define RemoveDirectoryTransacted RemoveDirectoryTransactedA
#endif // !UNICODE
_Success_(return != 0 && return < nBufferLength)
GetFullPathNameTransactedA
(
_In_ DWORD nBufferLength,
_Out_writes_to_opt_(nBufferLength, return + 1) LPSTR lpBuffer,
_Outptr_opt_ LPSTR *lpFilePart,
);
_Success_(return != 0 && return < nBufferLength)
GetFullPathNameTransactedW
(
_In_ DWORD nBufferLength,
_Out_writes_to_opt_(nBufferLength, return + 1) LPWSTR lpBuffer,
_Outptr_opt_ LPWSTR *lpFilePart,
);
#ifdef UNICODE
#define GetFullPathNameTransacted GetFullPathNameTransactedW
#else
#define GetFullPathNameTransacted GetFullPathNameTransactedA
#endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#define DDD_RAW_TARGET_PATH 0x00000001
#define DDD_REMOVE_DEFINITION 0x00000002
#define DDD_EXACT_MATCH_ON_REMOVE 0x00000004
#define DDD_NO_BROADCAST_SYSTEM 0x00000008
#define DDD_LUID_BROADCAST_DRIVE 0x00000010
(
_In_ LPCSTR lpDeviceName,
_In_opt_ LPCSTR lpTargetPath
);
#ifndef UNICODE
#define DefineDosDevice DefineDosDeviceA
#endif
(
_In_opt_ LPCSTR lpDeviceName,
_Out_writes_to_opt_(ucchMax, return) LPSTR lpTargetPath,
);
#ifndef UNICODE
#define QueryDosDevice QueryDosDeviceA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#define EXPAND_LOCAL_DRIVES
#if _WIN32_WINNT >= 0x0600
(
_In_ DWORD dwDesiredAccess,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
_In_ DWORD dwCreationDisposition,
_In_ DWORD dwFlagsAndAttributes,
_In_opt_ HANDLE hTemplateFile,
_In_ HANDLE hTransaction,
_In_opt_ PUSHORT pusMiniVersion,
_Reserved_ PVOID lpExtendedParameter
);
(
_In_ DWORD dwDesiredAccess,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
_In_ DWORD dwCreationDisposition,
_In_ DWORD dwFlagsAndAttributes,
_In_opt_ HANDLE hTemplateFile,
_In_ HANDLE hTransaction,
_In_opt_ PUSHORT pusMiniVersion,
_Reserved_ PVOID lpExtendedParameter
);
#ifdef UNICODE
#define CreateFileTransacted CreateFileTransactedW
#else
#define CreateFileTransacted CreateFileTransactedA
#endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#if _WIN32_WINNT >= 0x0502
(
_In_ HANDLE hOriginalFile,
_In_ DWORD dwDesiredAccess,
_In_ DWORD dwFlagsAndAttributes
);
#endif // _WIN32_WINNT >= 0x0502
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if _WIN32_WINNT >= 0x0600
SetFileAttributesTransactedA
(
_In_ DWORD dwFileAttributes,
);
SetFileAttributesTransactedW
(
_In_ DWORD dwFileAttributes,
);
#ifdef UNICODE
#define SetFileAttributesTransacted SetFileAttributesTransactedW
#else
#define SetFileAttributesTransacted SetFileAttributesTransactedA
#endif // !UNICODE
GetFileAttributesTransactedA
(
_In_ GET_FILEEX_INFO_LEVELS fInfoLevelId,
_Out_writes_bytes_(sizeof(WIN32_FILE_ATTRIBUTE_DATA)) LPVOID lpFileInformation,
);
GetFileAttributesTransactedW
(
_In_ GET_FILEEX_INFO_LEVELS fInfoLevelId,
_Out_writes_bytes_(sizeof(WIN32_FILE_ATTRIBUTE_DATA)) LPVOID lpFileInformation,
);
#ifdef UNICODE
#define GetFileAttributesTransacted GetFileAttributesTransactedW
#else
#define GetFileAttributesTransacted GetFileAttributesTransactedA
#endif // !UNICODE
GetCompressedFileSizeTransactedA
(
_Out_opt_ LPDWORD lpFileSizeHigh,
);
GetCompressedFileSizeTransactedW
(
_Out_opt_ LPDWORD lpFileSizeHigh,
);
#ifdef UNICODE
#define GetCompressedFileSizeTransacted GetCompressedFileSizeTransactedW
#else
#define GetCompressedFileSizeTransacted GetCompressedFileSizeTransactedA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define DeleteFileTransacted DeleteFileTransactedW
#else
#define DeleteFileTransacted DeleteFileTransactedA
#endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if defined(_M_CEE)
#undef DeleteFile
__inline
BOOL
DeleteFile(
LPCTSTR lpFileName
)
{
#ifdef UNICODE
return DeleteFileW(
#else
return DeleteFileA(
#endif
lpFileName
);
}
#endif /* _M_CEE */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if _WIN32_WINNT >= 0x0501
(
_Out_writes_opt_(OemNameSize) LPSTR lpOemName,
_Out_opt_ PBOOL pbNameContainsSpaces OPTIONAL,
);
(
_Out_writes_opt_(OemNameSize) LPSTR lpOemName,
_Out_opt_ PBOOL pbNameContainsSpaces OPTIONAL,
);
#ifdef UNICODE
#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W
#else
#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A
#endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0501)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#if(_WIN32_WINNT >= 0x0400)
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if _WIN32_WINNT >= 0x0600
(
_In_ FINDEX_INFO_LEVELS fInfoLevelId,
_Out_writes_bytes_(sizeof(WIN32_FIND_DATAA)) LPVOID lpFindFileData,
_In_ FINDEX_SEARCH_OPS fSearchOp,
_Reserved_ LPVOID lpSearchFilter,
_In_ DWORD dwAdditionalFlags,
);
(
_In_ FINDEX_INFO_LEVELS fInfoLevelId,
_Out_writes_bytes_(sizeof(WIN32_FIND_DATAW)) LPVOID lpFindFileData,
_In_ FINDEX_SEARCH_OPS fSearchOp,
_Reserved_ LPVOID lpSearchFilter,
_In_ DWORD dwAdditionalFlags,
);
#ifdef UNICODE
#define FindFirstFileTransacted FindFirstFileTransactedW
#else
#define FindFirstFileTransacted FindFirstFileTransactedA
#endif // !UNICODE
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif /* _WIN32_WINNT >= 0x0400 */
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
(
_In_ LPCSTR lpExistingFileName,
_In_ LPCSTR lpNewFileName,
);
(
_In_ LPCWSTR lpExistingFileName,
_In_ LPCWSTR lpNewFileName,
);
#ifdef UNICODE
#define CopyFile CopyFileW
#else
#define CopyFile CopyFileA
#endif // !UNICODE
#if defined(_M_CEE)
#undef CopyFile
__inline
BOOL
CopyFile(
LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName,
BOOL bFailIfExists
)
{
#ifdef UNICODE
return CopyFileW(
#else
return CopyFileA(
#endif
lpExistingFileName,
lpNewFileName,
bFailIfExists
);
}
#endif /* _M_CEE */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#if(_WIN32_WINNT >= 0x0400)
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
typedef
(WINAPI *LPPROGRESS_ROUTINE)(
_In_ LARGE_INTEGER TotalFileSize,
_In_ LARGE_INTEGER TotalBytesTransferred,
_In_ LARGE_INTEGER StreamSize,
_In_ LARGE_INTEGER StreamBytesTransferred,
_In_ DWORD dwStreamNumber,
_In_ DWORD dwCallbackReason,
_In_ HANDLE hDestinationFile,
);
(
_In_ LPCSTR lpExistingFileName,
_In_ LPCSTR lpNewFileName,
_In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
_When_(pbCancel != NULL, _Pre_satisfies_(*pbCancel == FALSE))
_Inout_opt_ LPBOOL pbCancel,
);
(
_In_ LPCWSTR lpExistingFileName,
_In_ LPCWSTR lpNewFileName,
_In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
_When_(pbCancel != NULL, _Pre_satisfies_(*pbCancel == FALSE))
_Inout_opt_ LPBOOL pbCancel,
);
#ifdef UNICODE
#define CopyFileEx CopyFileExW
#else
#define CopyFileEx CopyFileExA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if _WIN32_WINNT >= 0x0600
(
_In_ LPCSTR lpExistingFileName,
_In_ LPCSTR lpNewFileName,
_In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
_In_opt_ LPBOOL pbCancel,
);
(
_In_ LPCWSTR lpExistingFileName,
_In_ LPCWSTR lpNewFileName,
_In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
_In_opt_ LPBOOL pbCancel,
);
#ifdef UNICODE
#define CopyFileTransacted CopyFileTransactedW
#else
#define CopyFileTransacted CopyFileTransactedA
#endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#if _WIN32_WINNT >= 0x0601
typedef
enum
{
=
0
,
COPYFILE2_CALLBACK_CHUNK_STARTED
,
COPYFILE2_CALLBACK_CHUNK_FINISHED
,
COPYFILE2_CALLBACK_STREAM_STARTED
,
COPYFILE2_CALLBACK_STREAM_FINISHED
,
COPYFILE2_CALLBACK_POLL_CONTINUE
,
,
,
}
;
typedef
enum
_COPYFILE2_MESSAGE_ACTION
{
COPYFILE2_PROGRESS_CONTINUE
=
0
,
COPYFILE2_PROGRESS_CANCEL
,
,
,
,
}
;
typedef
enum
{
=
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
,
,
}
;
#define COPYFILE2_MESSAGE_COPY_OFFLOAD (0x00000001L)
typedef
struct
{
;
;
union
{
struct
{
;
;
;
;
;
;
;
;
}
;
struct
{
;
;
;
;
;
;
;
uliStreamBytesTransferred
;
;
;
}
;
struct
{
;
;
;
;
;
;
}
;
struct
{
;
;
;
;
;
uliStreamBytesTransferred
;
;
;
}
;
struct
{
;
}
;
struct
{
;
;
;
;
;
;
uliStreamBytesTransferred
;
;
;
}
;
}
;
}
;
typedef
COPYFILE2_MESSAGE_ACTION (CALLBACK *PCOPYFILE2_PROGRESS_ROUTINE)(
(
__stdcall
*
PCOPYFILE2_PROGRESS_ROUTINE
)(
_In_ const COPYFILE2_MESSAGE *pMessage,
_In_opt_ PVOID pvCallbackContext
);
typedef
struct
COPYFILE2_EXTENDED_PARAMETERS
{
;
;
*
;
PCOPYFILE2_PROGRESS_ROUTINE
;
;
}
COPYFILE2_EXTENDED_PARAMETERS
;
(
_In_ PCWSTR pwszExistingFileName,
_In_ PCWSTR pwszNewFileName,
_In_opt_ COPYFILE2_EXTENDED_PARAMETERS *pExtendedParameters
COPYFILE2_EXTENDED_PARAMETERS
*
);
#endif // _WIN32_WINNT >= 0x0601
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#endif /* _WIN32_WINNT >= 0x0400 */
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
_In_ LPCSTR lpExistingFileName,
_In_ LPCSTR lpNewFileName
);
(
_In_ LPCWSTR lpExistingFileName,
_In_ LPCWSTR lpNewFileName
);
#ifdef UNICODE
#define MoveFile MoveFileW
#else
#define MoveFile MoveFileA
#endif // !UNICODE
#if defined(_M_CEE)
#undef MoveFile
__inline
BOOL
MoveFile(
LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName
)
{
#ifdef UNICODE
return MoveFileW(
#else
return MoveFileA(
#endif
lpExistingFileName,
lpNewFileName
);
}
#endif /* _M_CEE */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
(
_In_ LPCSTR lpExistingFileName,
_In_opt_ LPCSTR lpNewFileName,
);
(
_In_ LPCWSTR lpExistingFileName,
_In_opt_ LPCWSTR lpNewFileName,
);
#ifdef UNICODE
#define MoveFileEx MoveFileExW
#else
#define MoveFileEx MoveFileExA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= 0x0500)
(
_In_ LPCSTR lpExistingFileName,
_In_opt_ LPCSTR lpNewFileName,
_In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
);
(
_In_ LPCWSTR lpExistingFileName,
_In_opt_ LPCWSTR lpNewFileName,
_In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
);
#ifdef UNICODE
#define MoveFileWithProgress MoveFileWithProgressW
#else
#define MoveFileWithProgress MoveFileWithProgressA
#endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0500)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= 0x0600)
(
_In_ LPCSTR lpExistingFileName,
_In_opt_ LPCSTR lpNewFileName,
_In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
);
(
_In_ LPCWSTR lpExistingFileName,
_In_opt_ LPCWSTR lpNewFileName,
_In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
);
#ifdef UNICODE
#define MoveFileTransacted MoveFileTransactedW
#else
#define MoveFileTransacted MoveFileTransactedA
#endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0600)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define MOVEFILE_REPLACE_EXISTING 0x00000001
#define MOVEFILE_COPY_ALLOWED 0x00000002
#define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
#define MOVEFILE_WRITE_THROUGH 0x00000008
#if (_WIN32_WINNT >= 0x0500)
#define MOVEFILE_CREATE_HARDLINK 0x00000010
#define MOVEFILE_FAIL_IF_NOT_TRACKABLE 0x00000020
#endif // (_WIN32_WINNT >= 0x0500)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= 0x0500)
(
_In_ LPCSTR lpReplacedFileName,
_In_ LPCSTR lpReplacementFileName,
_In_opt_ LPCSTR lpBackupFileName,
_In_ DWORD dwReplaceFlags,
_Reserved_ LPVOID lpExclude,
_Reserved_ LPVOID lpReserved
);
(
_In_ LPCWSTR lpReplacedFileName,
_In_ LPCWSTR lpReplacementFileName,
_In_opt_ LPCWSTR lpBackupFileName,
_In_ DWORD dwReplaceFlags,
_Reserved_ LPVOID lpExclude,
_Reserved_ LPVOID lpReserved
);
#ifdef UNICODE
#define ReplaceFile ReplaceFileW
#else
#define ReplaceFile ReplaceFileA
#endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0500)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= 0x0500)
(
_In_ LPCSTR lpExistingFileName,
_Reserved_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
(
_In_ LPCWSTR lpExistingFileName,
_Reserved_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
#ifdef UNICODE
#define CreateHardLink CreateHardLinkW
#else
#define CreateHardLink CreateHardLinkA
#endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0500)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= 0x0600)
CreateHardLinkTransactedA
(
_In_ LPCSTR lpExistingFileName,
_Reserved_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
);
CreateHardLinkTransactedW
(
_In_ LPCWSTR lpExistingFileName,
_Reserved_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
);
#ifdef UNICODE
#define CreateHardLinkTransacted CreateHardLinkTransactedW
#else
#define CreateHardLinkTransacted CreateHardLinkTransactedA
#endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0600)
#if _WIN32_WINNT >= 0x0600
FindFirstStreamTransactedW
(
_In_ STREAM_INFO_LEVELS InfoLevel,
_Out_writes_bytes_(sizeof(WIN32_FIND_STREAM_DATA)) LPVOID lpFindStreamData,
_Reserved_ DWORD dwFlags,
);
FindFirstFileNameTransactedW
(
_Inout_ LPDWORD StringLength,
_Out_writes_(*StringLength) PWSTR LinkName,
_In_opt_ HANDLE hTransaction
);
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
(
_In_ DWORD nMaxInstances,
_In_ DWORD nOutBufferSize,
_In_ DWORD nInBufferSize,
_In_ DWORD nDefaultTimeOut,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
#ifndef UNICODE
#define CreateNamedPipe CreateNamedPipeA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
_Out_opt_ LPDWORD lpState,
_Out_opt_ LPDWORD lpCurInstances,
_Out_opt_ LPDWORD lpMaxCollectionCount,
_Out_opt_ LPDWORD lpCollectDataTimeout,
_Out_writes_opt_(nMaxUserNameSize) LPSTR lpUserName,
_In_ DWORD nMaxUserNameSize
);
#ifndef UNICODE
#define GetNamedPipeHandleState GetNamedPipeHandleStateA
#endif
(
_In_ LPCSTR lpNamedPipeName,
_In_reads_bytes_opt_(nInBufferSize) LPVOID lpInBuffer,
_In_ DWORD nInBufferSize,
_Out_writes_bytes_to_opt_(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
_In_ DWORD nOutBufferSize,
_Out_ LPDWORD lpBytesRead,
);
#ifndef UNICODE
#define CallNamedPipe CallNamedPipeA
#endif
(
_In_ LPCSTR lpNamedPipeName,
);
#ifndef UNICODE
#define WaitNamedPipe WaitNamedPipeA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#if (_WIN32_WINNT >= 0x0600)
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
GetNamedPipeClientComputerNameA
(
_Out_writes_bytes_(ClientComputerNameLength) LPSTR ClientComputerName,
_In_ ULONG ClientComputerNameLength
);
#ifndef UNICODE
#define GetNamedPipeClientComputerName GetNamedPipeClientComputerNameA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
GetNamedPipeClientProcessId
(
_Out_ PULONG ClientProcessId
);
GetNamedPipeClientSessionId
(
_Out_ PULONG ClientSessionId
);
GetNamedPipeServerProcessId
(
_Out_ PULONG ServerProcessId
);
GetNamedPipeServerSessionId
(
_Out_ PULONG ServerSessionId
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif // (_WIN32_WINNT >= 0x0600)
#pragma region Application Family or Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
(
_In_opt_ LPCSTR lpRootPathName,
_In_opt_ LPCSTR lpVolumeName
);
(
_In_opt_ LPCWSTR lpRootPathName,
_In_opt_ LPCWSTR lpVolumeName
);
#ifdef UNICODE
#define SetVolumeLabel SetVolumeLabelW
#else
#define SetVolumeLabel SetVolumeLabelA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= 0x0600)
SetFileBandwidthReservation
(
_In_ DWORD nPeriodMilliseconds,
_In_ DWORD nBytesPerPeriod,
_Out_ LPDWORD lpTransferSize,
_Out_ LPDWORD lpNumOutstandingRequests
);
GetFileBandwidthReservation
(
_Out_ LPDWORD lpPeriodMilliseconds,
_Out_ LPDWORD lpBytesPerPeriod,
_Out_ LPBOOL pDiscardable,
_Out_ LPDWORD lpTransferSize,
_Out_ LPDWORD lpNumOutstandingRequests
);
#endif // (_WIN32_WINNT >= 0x0600)
(
_In_opt_ LPCSTR lpBackupFileName
);
(
_In_opt_ LPCWSTR lpBackupFileName
);
#ifdef UNICODE
#define ClearEventLog ClearEventLogW
#else
#define ClearEventLog ClearEventLogA
#endif // !UNICODE
(
_In_ LPCSTR lpBackupFileName
);
(
_In_ LPCWSTR lpBackupFileName
);
#ifdef UNICODE
#define BackupEventLog BackupEventLogW
#else
#define BackupEventLog BackupEventLogA
#endif // !UNICODE
(
);
(
);
(
);
GetNumberOfEventLogRecords
(
_Out_ PDWORD NumberOfRecords
);
(
_Out_ PDWORD OldestRecord
);
(
_In_opt_ LPCSTR lpUNCServerName,
);
(
_In_opt_ LPCWSTR lpUNCServerName,
_In_ LPCWSTR lpSourceName
);
#ifdef UNICODE
#define OpenEventLog OpenEventLogW
#else
#define OpenEventLog OpenEventLogA
#endif // !UNICODE
(
_In_opt_ LPCSTR lpUNCServerName,
);
(
_In_opt_ LPCWSTR lpUNCServerName,
_In_ LPCWSTR lpSourceName
);
#ifdef UNICODE
#define RegisterEventSource RegisterEventSourceW
#else
#define RegisterEventSource RegisterEventSourceA
#endif // !UNICODE
(
_In_opt_ LPCSTR lpUNCServerName,
);
(
_In_opt_ LPCWSTR lpUNCServerName,
);
#ifdef UNICODE
#define OpenBackupEventLog OpenBackupEventLogW
#else
#define OpenBackupEventLog OpenBackupEventLogA
#endif // !UNICODE
(
_In_ DWORD dwRecordOffset,
_Out_writes_bytes_to_(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer,
_In_ DWORD nNumberOfBytesToRead,
_Out_ DWORD *pnBytesRead,
_Out_ DWORD *pnMinNumberOfBytesNeeded
);
(
_In_ DWORD dwRecordOffset,
_Out_writes_bytes_to_(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer,
_In_ DWORD nNumberOfBytesToRead,
_Out_ DWORD *pnBytesRead,
_Out_ DWORD *pnMinNumberOfBytesNeeded
);
#ifdef UNICODE
#define ReadEventLog ReadEventLogW
#else
#define ReadEventLog ReadEventLogA
#endif // !UNICODE
(
_In_reads_opt_(wNumStrings) LPCSTR *lpStrings,
_In_reads_bytes_opt_(dwDataSize) LPVOID lpRawData
);
(
_In_reads_opt_(wNumStrings) LPCWSTR *lpStrings,
_In_reads_bytes_opt_(dwDataSize) LPVOID lpRawData
);
#ifdef UNICODE
#define ReportEvent ReportEventW
#else
#define ReportEvent ReportEventA
#endif // !UNICODE
#define EVENTLOG_FULL_INFO 0
typedef
struct
{
;
}
, *
;
(
_Out_writes_bytes_to_(cbBufSize, *pcbBytesNeeded) LPVOID lpBuffer,
_Out_ LPDWORD pcbBytesNeeded
);
#if (_WIN32_WINNT >= 0x0602)
#define OPERATION_API_VERSION 1
typedef
;
typedef
struct
_OPERATION_START_PARAMETERS
{
;
;
;
}
OPERATION_START_PARAMETERS
, *
POPERATION_START_PARAMETERS
;
#define OPERATION_START_TRACE_CURRENT_THREAD 0x1
typedef
struct
_OPERATION_END_PARAMETERS
{
;
;
;
}
, *
POPERATION_END_PARAMETERS
;
#define OPERATION_END_DISCARD 0x1
(
_In_ OPERATION_START_PARAMETERS* OperationStartParams
OPERATION_START_PARAMETERS
*
);
(
_In_ OPERATION_END_PARAMETERS* OperationEndParams
);
#endif // _WIN32_WINNT >= 0x0602
AccessCheckAndAuditAlarmA
(
_In_ LPCSTR SubsystemName,
_In_opt_ LPVOID HandleId,
_In_ LPSTR ObjectTypeName,
_In_opt_ LPSTR ObjectName,
_In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
_In_ DWORD DesiredAccess,
_In_ PGENERIC_MAPPING GenericMapping,
_In_ BOOL ObjectCreation,
_Out_ LPDWORD GrantedAccess,
_Out_ LPBOOL AccessStatus,
_Out_ LPBOOL pfGenerateOnClose
);
#ifndef UNICODE
#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA
#endif
#if(_WIN32_WINNT >= 0x0500)
AccessCheckByTypeAndAuditAlarmA
(
_In_ LPCSTR SubsystemName,
_In_ LPCSTR ObjectTypeName,
_In_opt_ LPCSTR ObjectName,
_In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
_In_opt_ PSID PrincipalSelfSid,
_In_ DWORD DesiredAccess,
_In_ AUDIT_EVENT_TYPE AuditType,
_Inout_updates_opt_(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
_In_ DWORD ObjectTypeListLength,
_In_ PGENERIC_MAPPING GenericMapping,
_In_ BOOL ObjectCreation,
_Out_ LPDWORD GrantedAccess,
_Out_ LPBOOL AccessStatus,
_Out_ LPBOOL pfGenerateOnClose
);
#ifndef UNICODE
#define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmA
#endif
AccessCheckByTypeResultListAndAuditAlarmA
(
_In_ LPCSTR SubsystemName,
_In_ LPCSTR ObjectTypeName,
_In_opt_ LPCSTR ObjectName,
_In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
_In_opt_ PSID PrincipalSelfSid,
_In_ DWORD DesiredAccess,
_In_ AUDIT_EVENT_TYPE AuditType,
_Inout_updates_opt_(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
_In_ DWORD ObjectTypeListLength,
_In_ PGENERIC_MAPPING GenericMapping,
_In_ BOOL ObjectCreation,
_Out_writes_(ObjectTypeListLength) LPDWORD GrantedAccess,
_Out_writes_(ObjectTypeListLength) LPDWORD AccessStatusList,
_Out_ LPBOOL pfGenerateOnClose
);
#ifndef UNICODE
#define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAndAuditAlarmA
#endif
AccessCheckByTypeResultListAndAuditAlarmByHandleA
(
_In_ LPCSTR SubsystemName,
_In_ LPCSTR ObjectTypeName,
_In_opt_ LPCSTR ObjectName,
_In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
_In_opt_ PSID PrincipalSelfSid,
_In_ DWORD DesiredAccess,
_In_ AUDIT_EVENT_TYPE AuditType,
_Inout_updates_opt_(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
_In_ DWORD ObjectTypeListLength,
_In_ PGENERIC_MAPPING GenericMapping,
_In_ BOOL ObjectCreation,
_Out_writes_(ObjectTypeListLength) LPDWORD GrantedAccess,
_Out_writes_(ObjectTypeListLength) LPDWORD AccessStatusList,
_Out_ LPBOOL pfGenerateOnClose
);
#ifndef UNICODE
#define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResultListAndAuditAlarmByHandleA
#endif
#endif //(_WIN32_WINNT >= 0x0500)
(
_In_ LPCSTR SubsystemName,
_In_ LPSTR ObjectTypeName,
_In_opt_ LPSTR ObjectName,
_In_ PSECURITY_DESCRIPTOR pSecurityDescriptor,
_In_ DWORD DesiredAccess,
_In_ DWORD GrantedAccess,
_In_opt_ PPRIVILEGE_SET Privileges,
_In_ BOOL ObjectCreation,
_Out_ LPBOOL GenerateOnClose
);
#ifndef UNICODE
#define ObjectOpenAuditAlarm ObjectOpenAuditAlarmA
#endif
ObjectPrivilegeAuditAlarmA
(
_In_ LPCSTR SubsystemName,
_In_ DWORD DesiredAccess,
_In_ PPRIVILEGE_SET Privileges,
);
#ifndef UNICODE
#define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmA
#endif
(
_In_ LPCSTR SubsystemName,
_In_ BOOL GenerateOnClose
);
#ifndef UNICODE
#define ObjectCloseAuditAlarm ObjectCloseAuditAlarmA
#endif
(
_In_ LPCSTR SubsystemName,
_In_ BOOL GenerateOnClose
);
#ifndef UNICODE
#define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmA
#endif
PrivilegedServiceAuditAlarmA
(
_In_ LPCSTR SubsystemName,
_In_ PPRIVILEGE_SET Privileges,
);
#ifndef UNICODE
#define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmA
#endif
#if(_WIN32_WINNT >= 0x0601)
(
_In_ DWORD dwAceRevision,
_In_ _Null_terminated_ PWCHAR ConditionStr,
_Out_ DWORD *ReturnLength
);
#endif /* _WIN32_WINNT >= 0x0601 */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
_In_ SECURITY_INFORMATION SecurityInformation,
_In_ PSECURITY_DESCRIPTOR pSecurityDescriptor
);
#ifndef UNICODE
#define SetFileSecurity SetFileSecurityA
#endif
(
_In_ SECURITY_INFORMATION RequestedInformation,
_Out_writes_bytes_to_opt_(nLength, *lpnLengthNeeded) PSECURITY_DESCRIPTOR pSecurityDescriptor,
_Out_ LPDWORD lpnLengthNeeded
);
#ifndef UNICODE
#define GetFileSecurity GetFileSecurityA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#if(_WIN32_WINNT >= 0x0400)
(
_Out_writes_bytes_to_(nBufferLength, *lpBytesReturned) LPVOID lpBuffer,
_In_ DWORD nBufferLength,
_In_ DWORD dwNotifyFilter,
_Out_opt_ LPDWORD lpBytesReturned,
_Inout_opt_ LPOVERLAPPED lpOverlapped,
_In_opt_ LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
LPOVERLAPPED_COMPLETION_ROUTINE
);
#if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
(
_Out_writes_bytes_to_(nBufferLength, *lpBytesReturned) LPVOID lpBuffer,
_In_ DWORD nBufferLength,
_In_ DWORD dwNotifyFilter,
_Out_opt_ LPDWORD lpBytesReturned,
_Inout_opt_ LPOVERLAPPED lpOverlapped,
_In_opt_ LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine,
LPOVERLAPPED_COMPLETION_ROUTINE
,
_In_ READ_DIRECTORY_NOTIFY_INFORMATION_CLASS ReadDirectoryNotifyInformationClass
READ_DIRECTORY_NOTIFY_INFORMATION_CLASS
);
#endif
#endif /* _WIN32_WINNT >= 0x0400 */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if _WIN32_WINNT >= 0x0600
_Ret_maybenull_ __out_data_source(FILE)
(
_In_ HANDLE hFileMappingObject,
_In_ DWORD dwDesiredAccess,
_In_ DWORD dwFileOffsetHigh,
_In_ DWORD dwFileOffsetLow,
_In_ SIZE_T dwNumberOfBytesToMap,
_In_opt_ LPVOID lpBaseAddress,
);
#endif // _WIN32_WINNT >= 0x0600
(
);
(
);
(
);
(
);
(
);
(
);
(
);
#ifdef UNICODE
#define IsBadStringPtr IsBadStringPtrW
#else
#define IsBadStringPtr IsBadStringPtrA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
_Success_(return != FALSE) BOOL
(
_In_opt_ LPCSTR lpSystemName,
_Out_writes_to_opt_(*cchName, *cchName + 1) LPSTR Name,
_Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPSTR ReferencedDomainName,
_Inout_ LPDWORD cchReferencedDomainName,
_Out_ PSID_NAME_USE peUse
);
_Success_(return != FALSE) BOOL
(
_In_opt_ LPCWSTR lpSystemName,
_Out_writes_to_opt_(*cchName, *cchName + 1) LPWSTR Name,
_Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPWSTR ReferencedDomainName,
_Inout_ LPDWORD cchReferencedDomainName,
_Out_ PSID_NAME_USE peUse
);
#ifdef UNICODE
#define LookupAccountSid LookupAccountSidW
#else
#define LookupAccountSid LookupAccountSidA
#endif // !UNICODE
_Success_(return != FALSE) BOOL
(
_In_opt_ LPCSTR lpSystemName,
_In_ LPCSTR lpAccountName,
_Out_writes_bytes_to_opt_(*cbSid, *cbSid) PSID Sid,
_Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPSTR ReferencedDomainName,
_Inout_ LPDWORD cchReferencedDomainName,
_Out_ PSID_NAME_USE peUse
);
_Success_(return != FALSE) BOOL
(
_In_opt_ LPCWSTR lpSystemName,
_In_ LPCWSTR lpAccountName,
_Out_writes_bytes_to_opt_(*cbSid, *cbSid) PSID Sid,
_Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPWSTR ReferencedDomainName,
_Inout_ LPDWORD cchReferencedDomainName,
_Out_ PSID_NAME_USE peUse
);
#ifdef UNICODE
#define LookupAccountName LookupAccountNameW
#else
#define LookupAccountName LookupAccountNameA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if _WIN32_WINNT >= 0x0601
_Success_(return != FALSE) BOOL
(
_In_ LPCSTR lpAccountName,
_Out_writes_bytes_to_opt_(*cbSid, *cbSid) PSID Sid,
_Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPSTR ReferencedDomainName,
_Inout_ LPDWORD cchReferencedDomainName,
_Out_ PSID_NAME_USE peUse
);
_Success_(return != FALSE) BOOL
(
_In_ LPCWSTR lpAccountName,
_Out_writes_bytes_to_opt_(*cbSid, *cbSid) PSID Sid,
_Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPWSTR ReferencedDomainName,
_Inout_ LPDWORD cchReferencedDomainName,
_Out_ PSID_NAME_USE peUse
);
#ifdef UNICODE
#define LookupAccountNameLocal LookupAccountNameLocalW
#else
#define LookupAccountNameLocal LookupAccountNameLocalA
#endif // !UNICODE
_Success_(return != FALSE) BOOL
(
_Out_writes_to_opt_(*cchName, *cchName + 1) LPSTR Name,
_Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPSTR ReferencedDomainName,
_Inout_ LPDWORD cchReferencedDomainName,
_Out_ PSID_NAME_USE peUse
);
_Success_(return != FALSE) BOOL
(
_Out_writes_to_opt_(*cchName, *cchName + 1) LPWSTR Name,
_Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPWSTR ReferencedDomainName,
_Inout_ LPDWORD cchReferencedDomainName,
_Out_ PSID_NAME_USE peUse
);
#ifdef UNICODE
#define LookupAccountSidLocal LookupAccountSidLocalW
#else
#define LookupAccountSidLocal LookupAccountSidLocalA
#endif // !UNICODE
#else // _WIN32_WINNT >= 0x0601
#define LookupAccountNameLocalA(n, s, cs, d, cd, u) \
LookupAccountNameA(NULL, n, s, cs, d, cd, u)
#define LookupAccountNameLocalW(n, s, cs, d, cd, u) \
LookupAccountNameW(NULL, n, s, cs, d, cd, u)
#ifdef UNICODE
#define LookupAccountNameLocal LookupAccountNameLocalW
#else
#define LookupAccountNameLocal LookupAccountNameLocalA
#endif // !UNICODE
#define LookupAccountSidLocalA(s, n, cn, d, cd, u) \
LookupAccountSidA(NULL, s, n, cn, d, cd, u)
#define LookupAccountSidLocalW(s, n, cn, d, cd, u) \
LookupAccountSidW(NULL, s, n, cn, d, cd, u)
#ifdef UNICODE
#define LookupAccountSidLocal LookupAccountSidLocalW
#else
#define LookupAccountSidLocal LookupAccountSidLocalA
#endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0601
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
(
_In_opt_ LPCSTR lpSystemName,
);
(
_In_opt_ LPCWSTR lpSystemName,
);
#ifdef UNICODE
#define LookupPrivilegeValue LookupPrivilegeValueW
#else
#define LookupPrivilegeValue LookupPrivilegeValueA
#endif // !UNICODE
_Success_(return != FALSE) BOOL
(
_In_opt_ LPCSTR lpSystemName,
_Out_writes_to_opt_(*cchName, *cchName + 1) LPSTR lpName,
);
_Success_(return != FALSE) BOOL
(
_In_opt_ LPCWSTR lpSystemName,
_Out_writes_to_opt_(*cchName, *cchName + 1) LPWSTR lpName,
);
#ifdef UNICODE
#define LookupPrivilegeName LookupPrivilegeNameW
#else
#define LookupPrivilegeName LookupPrivilegeNameA
#endif // !UNICODE
_Success_(return != FALSE) BOOL
LookupPrivilegeDisplayNameA
(
_In_opt_ LPCSTR lpSystemName,
_Out_writes_to_opt_(*cchDisplayName, *cchDisplayName + 1) LPSTR lpDisplayName,
_Inout_ LPDWORD cchDisplayName,
_Out_ LPDWORD lpLanguageId
);
_Success_(return != FALSE) BOOL
LookupPrivilegeDisplayNameW
(
_In_opt_ LPCWSTR lpSystemName,
_Out_writes_to_opt_(*cchDisplayName, *cchDisplayName + 1) LPWSTR lpDisplayName,
_Inout_ LPDWORD cchDisplayName,
_Out_ LPDWORD lpLanguageId
);
#ifdef UNICODE
#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW
#else
#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
);
(
);
#ifdef UNICODE
#define BuildCommDCB BuildCommDCBW
#else
#define BuildCommDCB BuildCommDCBA
#endif // !UNICODE
(
_Out_ LPCOMMTIMEOUTS lpCommTimeouts
);
(
_Out_ LPCOMMTIMEOUTS lpCommTimeouts
);
#ifdef UNICODE
#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsW
#else
#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsA
#endif // !UNICODE
(
_Inout_ LPCOMMCONFIG lpCC
);
(
_Inout_ LPCOMMCONFIG lpCC
);
#ifdef UNICODE
#define CommConfigDialog CommConfigDialogW
#else
#define CommConfigDialog CommConfigDialogA
#endif // !UNICODE
(
_Out_writes_bytes_to_(*lpdwSize, *lpdwSize) LPCOMMCONFIG lpCC,
);
(
_Out_writes_bytes_to_(*lpdwSize, *lpdwSize) LPCOMMCONFIG lpCC,
);
#ifdef UNICODE
#define GetDefaultCommConfig GetDefaultCommConfigW
#else
#define GetDefaultCommConfig GetDefaultCommConfigA
#endif // !UNICODE
(
_In_reads_bytes_(dwSize) LPCOMMCONFIG lpCC,
);
(
_In_reads_bytes_(dwSize) LPCOMMCONFIG lpCC,
);
#ifdef UNICODE
#define SetDefaultCommConfig SetDefaultCommConfigW
#else
#define SetDefaultCommConfig SetDefaultCommConfigA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#ifndef _MAC
#define MAX_COMPUTERNAME_LENGTH 15
#else
#define MAX_COMPUTERNAME_LENGTH 31
#endif
_Success_(return != 0)
(
_Out_writes_to_opt_(*nSize, *nSize + 1) LPSTR lpBuffer,
);
_Success_(return != 0)
(
_Out_writes_to_opt_(*nSize, *nSize + 1) LPWSTR lpBuffer,
);
#ifdef UNICODE
#define GetComputerName GetComputerNameW
#else
#define GetComputerName GetComputerNameA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= 0x0500)
_Success_(return != FALSE)
DnsHostnameToComputerNameA
(
_Out_writes_to_opt_(*nSize, *nSize + 1) LPSTR ComputerName,
);
_Success_(return != FALSE)
DnsHostnameToComputerNameW
(
_Out_writes_to_opt_(*nSize, *nSize + 1) LPWSTR ComputerName,
);
#ifdef UNICODE
#define DnsHostnameToComputerName DnsHostnameToComputerNameW
#else
#define DnsHostnameToComputerName DnsHostnameToComputerNameA
#endif // !UNICODE
#endif // _WIN32_WINNT
(
_Out_writes_to_opt_(*pcbBuffer, *pcbBuffer) LPSTR lpBuffer,
_Inout_ LPDWORD pcbBuffer
);
(
_Out_writes_to_opt_(*pcbBuffer, *pcbBuffer) LPWSTR lpBuffer,
_Inout_ LPDWORD pcbBuffer
);
#ifdef UNICODE
#define GetUserName GetUserNameW
#else
#define GetUserName GetUserNameA
#endif // !UNICODE
#define LOGON32_LOGON_INTERACTIVE 2
#define LOGON32_LOGON_NETWORK 3
#define LOGON32_LOGON_BATCH 4
#define LOGON32_LOGON_SERVICE 5
#define LOGON32_LOGON_UNLOCK 7
#if(_WIN32_WINNT >= 0x0500)
#define LOGON32_LOGON_NETWORK_CLEARTEXT 8
#define LOGON32_LOGON_NEW_CREDENTIALS 9
#endif // (_WIN32_WINNT >= 0x0500)
#define LOGON32_PROVIDER_DEFAULT 0
#define LOGON32_PROVIDER_WINNT35 1
#if(_WIN32_WINNT >= 0x0400)
#define LOGON32_PROVIDER_WINNT40 2
#endif /* _WIN32_WINNT >= 0x0400 */
#if(_WIN32_WINNT >= 0x0500)
#define LOGON32_PROVIDER_WINNT50 3
#endif // (_WIN32_WINNT >= 0x0500)
#if(_WIN32_WINNT >= 0x0600)
#define LOGON32_PROVIDER_VIRTUAL 4
#endif // (_WIN32_WINNT >= 0x0600)
(
_In_ LPCSTR lpszUsername,
_In_opt_ LPCSTR lpszDomain,
_In_opt_ LPCSTR lpszPassword,
_In_ DWORD dwLogonProvider,
);
(
_In_ LPCWSTR lpszUsername,
_In_opt_ LPCWSTR lpszDomain,
_In_opt_ LPCWSTR lpszPassword,
_In_ DWORD dwLogonProvider,
);
#ifdef UNICODE
#define LogonUser LogonUserW
#else
#define LogonUser LogonUserA
#endif // !UNICODE
(
_In_ LPCSTR lpszUsername,
_In_opt_ LPCSTR lpszDomain,
_In_opt_ LPCSTR lpszPassword,
_In_ DWORD dwLogonProvider,
_Outptr_opt_ PHANDLE phToken,
_Outptr_opt_ PSID *ppLogonSid,
_Outptr_opt_result_bytebuffer_all_(*pdwProfileLength) PVOID *ppProfileBuffer,
_Out_opt_ LPDWORD pdwProfileLength,
_Out_opt_ PQUOTA_LIMITS pQuotaLimits
);
(
_In_ LPCWSTR lpszUsername,
_In_opt_ LPCWSTR lpszDomain,
_In_opt_ LPCWSTR lpszPassword,
_In_ DWORD dwLogonProvider,
_Outptr_opt_ PHANDLE phToken,
_Outptr_opt_ PSID *ppLogonSid,
_Outptr_opt_result_bytebuffer_all_(*pdwProfileLength) PVOID *ppProfileBuffer,
_Out_opt_ LPDWORD pdwProfileLength,
_Out_opt_ PQUOTA_LIMITS pQuotaLimits
);
#ifdef UNICODE
#define LogonUserEx LogonUserExW
#else
#define LogonUserEx LogonUserExA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#if(_WIN32_WINNT >= 0x0600)
#endif // (_WIN32_WINNT >= 0x0600)
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if(_WIN32_WINNT >= 0x0500)
#define LOGON_WITH_PROFILE 0x00000001
#define LOGON_NETCREDENTIALS_ONLY 0x00000002
#define LOGON_ZERO_PASSWORD_BUFFER 0x80000000
_Must_inspect_result_ BOOL
(
_In_opt_ LPCWSTR lpDomain,
_In_opt_ LPCWSTR lpApplicationName,
_Inout_opt_ LPWSTR lpCommandLine,
_In_ DWORD dwCreationFlags,
_In_opt_ LPVOID lpEnvironment,
_In_opt_ LPCWSTR lpCurrentDirectory,
_In_ LPSTARTUPINFOW lpStartupInfo,
_Out_ LPPROCESS_INFORMATION lpProcessInformation
);
_Must_inspect_result_ BOOL
(
_In_opt_ LPCWSTR lpApplicationName,
_Inout_opt_ LPWSTR lpCommandLine,
_In_ DWORD dwCreationFlags,
_In_opt_ LPVOID lpEnvironment,
_In_opt_ LPCWSTR lpCurrentDirectory,
_In_ LPSTARTUPINFOW lpStartupInfo,
_Out_ LPPROCESS_INFORMATION lpProcessInformation
);
#endif // (_WIN32_WINNT >= 0x0500)
(
);
#if (_WIN32_WINNT >= 0x0500)
RegisterWaitForSingleObject
(
_Outptr_ PHANDLE phNewWaitObject,
_In_ WAITORTIMERCALLBACK Callback,
_In_ ULONG dwMilliseconds,
);
_Must_inspect_result_
(
);
(
_In_ LPOVERLAPPED_COMPLETION_ROUTINE Function,
LPOVERLAPPED_COMPLETION_ROUTINE
,
);
(
_In_opt_ HANDLE TimerQueue,
_In_ WAITORTIMERCALLBACK Callback,
_In_opt_ PVOID Parameter,
);
_Must_inspect_result_
(
_In_opt_ HANDLE TimerQueue,
);
_Must_inspect_result_
(
);
#endif // _WIN32_WINNT >= 0x0500
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if (_WIN32_WINNT >= 0x0500)
#if (_WIN32_WINNT >= 0x0600)
#if !defined(MIDL_PASS)
InitializeThreadpoolEnvironment
(
_Out_ PTP_CALLBACK_ENVIRON pcbe
)
{
TpInitializeCallbackEnviron
(
);
}
SetThreadpoolCallbackPool
(
_Inout_ PTP_CALLBACK_ENVIRON pcbe,
)
{
(
,
);
}
SetThreadpoolCallbackCleanupGroup
(
_Inout_ PTP_CALLBACK_ENVIRON pcbe,
_In_ PTP_CLEANUP_GROUP ptpcg,
_In_opt_ PTP_CLEANUP_GROUP_CANCEL_CALLBACK pfng
PTP_CLEANUP_GROUP_CANCEL_CALLBACK
)
{
TpSetCallbackCleanupGroup
(
,
,
);
}
SetThreadpoolCallbackRunsLong
(
_Inout_ PTP_CALLBACK_ENVIRON pcbe
)
{
TpSetCallbackLongFunction
(
);
}
SetThreadpoolCallbackLibrary
(
_Inout_ PTP_CALLBACK_ENVIRON pcbe,
)
{
(
,
);
}
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
SetThreadpoolCallbackPriority
(
_Inout_ PTP_CALLBACK_ENVIRON pcbe,
_In_ TP_CALLBACK_PRIORITY Priority
)
{
(
,
);
}
#endif
DestroyThreadpoolEnvironment
(
_Inout_ PTP_CALLBACK_ENVIRON pcbe
)
{
(
);
}
#endif // !defined(MIDL_PASS)
#endif // _WIN32_WINNT >= 0x0600
#endif // _WIN32_WINNT >= 0x0500
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#if (_WIN32_WINNT >= 0x0600)
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if !defined(MIDL_PASS)
SetThreadpoolCallbackPersistent
(
_Inout_ PTP_CALLBACK_ENVIRON pcbe
)
{
(
);
}
#endif // !defined(MIDL_PASS)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
_Ret_maybenull_
(
_In_opt_ LPSECURITY_ATTRIBUTES lpPrivateNamespaceAttributes,
lpPrivateNamespaceAttributes
,
_In_ LPVOID lpBoundaryDescriptor,
_In_ LPCSTR lpAliasPrefix
);
#ifndef UNICODE
#define CreatePrivateNamespace CreatePrivateNamespaceA
#else
#define CreatePrivateNamespace CreatePrivateNamespaceW
#endif
_Ret_maybenull_
(
_In_ LPVOID lpBoundaryDescriptor,
_In_ LPCSTR lpAliasPrefix
);
#ifndef UNICODE
#define OpenPrivateNamespace OpenPrivateNamespaceA
#else
#define OpenPrivateNamespace OpenPrivateNamespaceW
#endif
_Ret_maybenull_
CreateBoundaryDescriptorA
(
);
#ifndef UNICODE
#define CreateBoundaryDescriptor CreateBoundaryDescriptorA
#else
#define CreateBoundaryDescriptor CreateBoundaryDescriptorW
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
AddIntegrityLabelToBoundaryDescriptor
(
_Inout_ HANDLE * BoundaryDescriptor,
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif // _WIN32_WINNT >= 0x0600
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if(_WIN32_WINNT >= 0x0400)
#define HW_PROFILE_GUIDLEN 39 // 36-characters plus NULL terminator
#define MAX_PROFILE_LEN 80
#define DOCKINFO_UNDOCKED (0x1)
#define DOCKINFO_DOCKED (0x2)
#define DOCKINFO_USER_SUPPLIED (0x4)
#define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_UNDOCKED)
#define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_DOCKED)
typedef
struct
{
;
CHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
CHAR szHwProfileName[MAX_PROFILE_LEN];
}
, *
;
typedef
struct
{
;
WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
WCHAR szHwProfileName[MAX_PROFILE_LEN];
}
, *
;
#ifdef UNICODE
typedef
;
typedef
;
#else
typedef HW_PROFILE_INFOA HW_PROFILE_INFO;
typedef LPHW_PROFILE_INFOA LPHW_PROFILE_INFO;
#endif // UNICODE
(
_Out_ LPHW_PROFILE_INFOA lpHwProfileInfo
);
(
_Out_ LPHW_PROFILE_INFOW lpHwProfileInfo
);
#ifdef UNICODE
#define GetCurrentHwProfile GetCurrentHwProfileW
#else
#define GetCurrentHwProfile GetCurrentHwProfileA
#endif // !UNICODE
#endif /* _WIN32_WINNT >= 0x0400 */
(
_Inout_ LPOSVERSIONINFOEXA lpVersionInformation,
_In_ DWORDLONG dwlConditionMask
);
(
_Inout_ LPOSVERSIONINFOEXW lpVersionInformation,
_In_ DWORDLONG dwlConditionMask
);
#ifdef UNICODE
#define VerifyVersionInfo VerifyVersionInfoW
#else
#define VerifyVersionInfo VerifyVersionInfoA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#include <winerror.h>
#include <timezoneapi.h>
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#define TC_NORMAL 0
#define TC_HARDERR 1
#define TC_GP_TRAP 2
#define TC_SIGNAL 3
#if(WINVER >= 0x0400)
(
);
#endif /* WINVER >= 0x0400 */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop or PC Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PC_APP)
#if(WINVER >= 0x0400)
#define AC_LINE_OFFLINE 0x00
#define AC_LINE_ONLINE 0x01
#define AC_LINE_BACKUP_POWER 0x02
#define AC_LINE_UNKNOWN 0xFF
#define BATTERY_FLAG_HIGH 0x01
#define BATTERY_FLAG_LOW 0x02
#define BATTERY_FLAG_CRITICAL 0x04
#define BATTERY_FLAG_CHARGING 0x08
#define BATTERY_FLAG_NO_BATTERY 0x80
#define BATTERY_FLAG_UNKNOWN 0xFF
#define BATTERY_PERCENTAGE_UNKNOWN 0xFF
#define SYSTEM_STATUS_FLAG_POWER_SAVING_ON 0x01
#define BATTERY_LIFE_UNKNOWN 0xFFFFFFFF
typedef
struct
{
;
;
;
;
;
;
}
, *
;
(
_Out_ LPSYSTEM_POWER_STATUS lpSystemPowerStatus
);
#endif /* WINVER >= 0x0400 */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PC_APP) */
#pragma endregion
#if (_WIN32_WINNT >= 0x0500)
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
MapUserPhysicalPagesScatter
(
_In_reads_(NumberOfPages) PVOID *VirtualAddresses,
_In_ ULONG_PTR NumberOfPages,
_In_reads_opt_(NumberOfPages) PULONG_PTR PageArray
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
_Ret_maybenull_
(
_In_opt_ LPSECURITY_ATTRIBUTES lpJobAttributes,
);
#ifdef UNICODE
#define CreateJobObject CreateJobObjectW
#else
#define CreateJobObject CreateJobObjectA
#endif // !UNICODE
_Ret_maybenull_
(
_In_ DWORD dwDesiredAccess,
_In_ BOOL bInheritHandle,
);
#ifdef UNICODE
#define OpenJobObject OpenJobObjectW
#else
#define OpenJobObject OpenJobObjectA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
_In_reads_(NumJob) PJOB_SET_ARRAY UserJobSet,
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
_Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
_In_ DWORD cchBufferLength
);
#ifndef UNICODE
#define FindFirstVolume FindFirstVolumeA
#endif
(
_Inout_ HANDLE hFindVolume,
_Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
_In_ DWORD cchBufferLength
);
#ifndef UNICODE
#define FindNextVolume FindNextVolumeA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
FindFirstVolumeMountPointA
(
_In_ LPCSTR lpszRootPathName,
_Out_writes_(cchBufferLength) LPSTR lpszVolumeMountPoint,
_In_ DWORD cchBufferLength
);
FindFirstVolumeMountPointW
(
_In_ LPCWSTR lpszRootPathName,
_Out_writes_(cchBufferLength) LPWSTR lpszVolumeMountPoint,
_In_ DWORD cchBufferLength
);
#ifdef UNICODE
#define FindFirstVolumeMountPoint FindFirstVolumeMountPointW
#else
#define FindFirstVolumeMountPoint FindFirstVolumeMountPointA
#endif // !UNICODE
FindNextVolumeMountPointA
(
_In_ HANDLE hFindVolumeMountPoint,
_Out_writes_(cchBufferLength) LPSTR lpszVolumeMountPoint,
_In_ DWORD cchBufferLength
);
FindNextVolumeMountPointW
(
_In_ HANDLE hFindVolumeMountPoint,
_Out_writes_(cchBufferLength) LPWSTR lpszVolumeMountPoint,
_In_ DWORD cchBufferLength
);
#ifdef UNICODE
#define FindNextVolumeMountPoint FindNextVolumeMountPointW
#else
#define FindNextVolumeMountPoint FindNextVolumeMountPointA
#endif // !UNICODE
FindVolumeMountPointClose
(
_In_ HANDLE hFindVolumeMountPoint
);
(
_In_ LPCSTR lpszVolumeMountPoint,
_In_ LPCSTR lpszVolumeName
);
(
_In_ LPCWSTR lpszVolumeMountPoint,
_In_ LPCWSTR lpszVolumeName
);
#ifdef UNICODE
#define SetVolumeMountPoint SetVolumeMountPointW
#else
#define SetVolumeMountPoint SetVolumeMountPointA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
(
_In_ LPCSTR lpszVolumeMountPoint
);
#ifndef UNICODE
#define DeleteVolumeMountPoint DeleteVolumeMountPointA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#ifndef UNICODE
#define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointA
#endif
GetVolumeNameForVolumeMountPointA
(
_In_ LPCSTR lpszVolumeMountPoint,
_Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
_In_ DWORD cchBufferLength
);
(
_In_ LPCSTR lpszFileName,
_Out_writes_(cchBufferLength) LPSTR lpszVolumePathName,
_In_ DWORD cchBufferLength
);
#ifndef UNICODE
#define GetVolumePathName GetVolumePathNameA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#endif
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#if(_WIN32_WINNT >= 0x0501)
GetVolumePathNamesForVolumeNameA
(
_In_ LPCSTR lpszVolumeName,
_Out_writes_to_opt_(cchBufferLength, *lpcchReturnLength) _Post_ _NullNull_terminated_ LPCH lpszVolumePathNames,
_In_ DWORD cchBufferLength,
_Out_ PDWORD lpcchReturnLength
);
#ifndef UNICODE
#define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameA
#endif
#endif // (_WIN32_WINNT >= 0x0501)
#if (_WIN32_WINNT >= 0x0500) || (_WIN32_FUSION >= 0x0100) || ISOLATION_AWARE_ENABLED
#define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID (0x00000001)
#define ACTCTX_FLAG_LANGID_VALID (0x00000002)
#define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID (0x00000004)
#define ACTCTX_FLAG_RESOURCE_NAME_VALID (0x00000008)
#define ACTCTX_FLAG_SET_PROCESS_DEFAULT (0x00000010)
#define ACTCTX_FLAG_APPLICATION_NAME_VALID (0x00000020)
#define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF (0x00000040)
#define ACTCTX_FLAG_HMODULE_VALID (0x00000080)
typedef
struct
{
;
;
;
;
;
;
;
;
;
}
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
}
, *
;
#ifdef UNICODE
typedef
;
typedef
;
#else
typedef ACTCTXA ACTCTX;
typedef PACTCTXA PACTCTX;
#endif // UNICODE
typedef
const
*
;
typedef
const
*
;
#ifdef UNICODE
typedef
;
#else
typedef PCACTCTXA PCACTCTX;
#endif // UNICODE
(
);
(
);
#ifdef UNICODE
#define CreateActCtx CreateActCtxW
#else
#define CreateActCtx CreateActCtxA
#endif // !UNICODE
(
);
(
);
(
);
_Success_(return)
(
_Inout_opt_ HANDLE hActCtx,
_Out_ ULONG_PTR *lpCookie
);
#define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION (0x00000001)
_Success_(return)
(
);
(
_Outptr_ HANDLE *lphActCtx);
typedef
struct
tagACTCTX_SECTION_KEYED_DATA_2600
{
;
;
;
;
;
ulSectionGlobalDataLength
;
;
;
;
;
}
ACTCTX_SECTION_KEYED_DATA_2600
, *
PACTCTX_SECTION_KEYED_DATA_2600
;
typedef
const
ACTCTX_SECTION_KEYED_DATA_2600
*
PCACTCTX_SECTION_KEYED_DATA_2600
;
typedef
struct
{
;
;
;
;
;
}
, *
;
typedef
const
ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA
*
;
typedef
struct
tagACTCTX_SECTION_KEYED_DATA
{
;
;
;
;
;
ulSectionGlobalDataLength
;
;
;
;
;
;
ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA
;
}
ACTCTX_SECTION_KEYED_DATA
, *
PACTCTX_SECTION_KEYED_DATA
;
typedef
const
ACTCTX_SECTION_KEYED_DATA
*
PCACTCTX_SECTION_KEYED_DATA
;
#define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX (0x00000001)
#define FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS (0x00000002)
#define FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA (0x00000004)
_Success_(return)
(
_Reserved_ const GUID *lpExtensionGuid,
_In_ LPCSTR lpStringToFind,
_Out_ PACTCTX_SECTION_KEYED_DATA ReturnedData
PACTCTX_SECTION_KEYED_DATA
);
_Success_(return)
(
_Reserved_ const GUID *lpExtensionGuid,
_In_ LPCWSTR lpStringToFind,
_Out_ PACTCTX_SECTION_KEYED_DATA ReturnedData
PACTCTX_SECTION_KEYED_DATA
);
#ifdef UNICODE
#define FindActCtxSectionString FindActCtxSectionStringW
#else
#define FindActCtxSectionString FindActCtxSectionStringA
#endif // !UNICODE
(
_Reserved_ const GUID *lpExtensionGuid,
_In_opt_ const GUID *lpGuidToFind,
_Out_ PACTCTX_SECTION_KEYED_DATA ReturnedData
PACTCTX_SECTION_KEYED_DATA
);
#if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
#if !defined(ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED)
typedef
struct
_ACTIVATION_CONTEXT_BASIC_INFORMATION
{
;
;
}
ACTIVATION_CONTEXT_BASIC_INFORMATION
, *
PACTIVATION_CONTEXT_BASIC_INFORMATION
;
typedef
const
struct
_ACTIVATION_CONTEXT_BASIC_INFORMATION
*
PCACTIVATION_CONTEXT_BASIC_INFORMATION
;
#define ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED 1
#endif // !defined(ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED)
#endif
#define QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX (0x00000004)
#define QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE (0x00000008)
#define QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS (0x00000010)
#define QUERY_ACTCTX_FLAG_NO_ADDREF (0x80000000)
_Success_(return)
(
_In_opt_ PVOID pvSubInstance,
_Out_writes_bytes_to_opt_(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
_Out_opt_ SIZE_T *pcbWrittenOrRequired
);
typedef _Success_(return) BOOL (WINAPI * PQUERYACTCTXW_FUNC)(
_In_opt_ PVOID pvSubInstance,
_Out_writes_bytes_to_opt_(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
_Out_opt_ SIZE_T *pcbWrittenOrRequired
);
#endif // (_WIN32_WINNT > 0x0500) || (_WIN32_FUSION >= 0x0100) || ISOLATION_AWARE_ENABLED
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if _WIN32_WINNT >= 0x0501
WTSGetActiveConsoleSessionId
(
);
#endif // (_WIN32_WINNT >= 0x0501)
#if (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD)
(
);
(
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD)
#if _WIN32_WINNT >= 0x0601
GetActiveProcessorGroupCount
(
);
GetMaximumProcessorGroupCount
(
);
(
);
(
);
#endif // (_WIN32_WINNT >=0x0601)
(
);
#if _WIN32_WINNT >= 0x0601
GetNumaNodeNumberFromHandle
(
);
#endif // (_WIN32_WINNT >=0x0601)
#if _WIN32_WINNT >= 0x0601
(
_In_ PPROCESSOR_NUMBER Processor,
);
#endif // (_WIN32_WINNT >=0x0601)
(
_Out_ PULONGLONG ProcessorMask
);
GetNumaAvailableMemoryNode
(
_Out_ PULONGLONG AvailableBytes
);
#if _WIN32_WINNT >= 0x0601
GetNumaAvailableMemoryNodeEx
(
_Out_ PULONGLONG AvailableBytes
);
#endif // (_WIN32_WINNT >=0x0601)
#if (_WIN32_WINNT >= 0x0600)
(
);
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID pvParameter);
typedef
(
__stdcall
*
APPLICATION_RECOVERY_CALLBACK
)(
pvParameter);
#define RESTART_MAX_CMD_LINE 1024
#define RESTART_NO_CRASH 1
#define RESTART_NO_HANG 2
#define RESTART_NO_PATCH 4
#define RESTART_NO_REBOOT 8
#define RECOVERY_DEFAULT_PING_INTERVAL 5000
#define RECOVERY_MAX_PING_INTERVAL (5 * 60 * 1000)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= 0x0600)
RegisterApplicationRecoveryCallback
(
_In_ APPLICATION_RECOVERY_CALLBACK pRecoveyCallback,
APPLICATION_RECOVERY_CALLBACK
,
_In_opt_ PVOID pvParameter,
_In_ DWORD dwPingInterval,
);
UnregisterApplicationRecoveryCallback
(
void
);
RegisterApplicationRestart
(
_In_opt_ PCWSTR pwzCommandline,
);
UnregisterApplicationRestart
(
void
);
#endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= 0x0600)
GetApplicationRecoveryCallback
(
_Out_ APPLICATION_RECOVERY_CALLBACK* pRecoveryCallback,
APPLICATION_RECOVERY_CALLBACK
*
,
_Outptr_opt_result_maybenull_ PVOID* ppvParameter,
_Out_opt_ PDWORD pdwPingInterval,
_Out_opt_ PDWORD pdwFlags
);
GetApplicationRestartSettings
(
_Out_writes_opt_(*pcchSize) PWSTR pwzCommandline,
_Out_opt_ PDWORD pdwFlags
);
#endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= 0x0600)
ApplicationRecoveryInProgress
(
);
ApplicationRecoveryFinished
(
);
#endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#if (_WIN32_WINNT >= 0x0600)
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
typedef
struct
{
;
;
;
;
;
}
, *
;
typedef
struct
{
;
;
;
;
;
}
, *
;
typedef
struct
{
;
[
1
];
}
, *
;
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10_RS1)
#define FILE_RENAME_FLAG_REPLACE_IF_EXISTS 0x00000001
#define FILE_RENAME_FLAG_POSIX_SEMANTICS 0x00000002
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10_RS3)
#define FILE_RENAME_FLAG_SUPPRESS_PIN_STATE_INHERITANCE 0x00000004
#endif
typedef
struct
{
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10_RS1)
union
{
;
;
#else
BOOLEAN ReplaceIfExists;
#endif
;
;
[
1
];
}
, *
;
typedef
struct
{
;
}
, *
;
typedef
struct
{
;
}
, *
;
typedef
struct
{
;
;
;
;
[
1
];
}
, *
;
typedef
struct
{
;
;
;
;
;
[
3
];
}
, *
;
typedef
struct
{
;
;
}
, *
;
typedef
struct
{
}
, *
;
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10_RS1)
#define FILE_DISPOSITION_FLAG_DO_NOT_DELETE 0x00000000
#define FILE_DISPOSITION_FLAG_DELETE 0x00000001
#define FILE_DISPOSITION_FLAG_POSIX_SEMANTICS 0x00000002
#define FILE_DISPOSITION_FLAG_FORCE_IMAGE_SECTION_CHECK 0x00000004
#define FILE_DISPOSITION_FLAG_ON_CLOSE 0x00000008
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10_RS5)
#define FILE_DISPOSITION_FLAG_IGNORE_READONLY_ATTRIBUTE 0x00000010
#endif
typedef
struct
_FILE_DISPOSITION_INFO_EX
{
;
}
, *
PFILE_DISPOSITION_INFO_EX
;
#endif
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
[
12
];
;
[
1
];
}
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
[
1
];
}
, *
;
typedef
enum
{
=
0
,
,
,
MaximumIoPriorityHintType
}
;
typedef
struct
_FILE_IO_PRIORITY_HINT_INFO
{
;
}
FILE_IO_PRIORITY_HINT_INFO
, *
PFILE_IO_PRIORITY_HINT_INFO
;
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
typedef
struct
{
;
}
, *
;
#define STORAGE_INFO_FLAGS_ALIGNED_DEVICE 0x00000001
#define STORAGE_INFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE 0x00000002
#define STORAGE_INFO_OFFSET_UNKNOWN (0xffffffff)
typedef
struct
{
;
PhysicalBytesPerSectorForAtomicity
;
;
FileSystemEffectivePhysicalBytesPerSectorForAtomicity
;
;
ByteOffsetForSectorAlignment
;
ByteOffsetForPartitionAlignment
;
}
, *
;
typedef
struct
{
;
;
}
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
[
1
];
}
, *
;
#endif
#define REMOTE_PROTOCOL_INFO_FLAG_LOOPBACK 0x00000001
#define REMOTE_PROTOCOL_INFO_FLAG_OFFLINE 0x00000002
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#define REMOTE_PROTOCOL_INFO_FLAG_PERSISTENT_HANDLE 0x00000004
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#define RPI_FLAG_SMB2_SHARECAP_TIMEWARP 0x00000002
#define RPI_FLAG_SMB2_SHARECAP_DFS 0x00000008
#define RPI_FLAG_SMB2_SHARECAP_CONTINUOUS_AVAILABILITY 0x00000010
#define RPI_FLAG_SMB2_SHARECAP_SCALEOUT 0x00000020
#define RPI_FLAG_SMB2_SHARECAP_CLUSTER 0x00000040
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#define RPI_SMB2_FLAG_SERVERCAP_DFS 0x00000001
#define RPI_SMB2_FLAG_SERVERCAP_LEASING 0x00000002
#define RPI_SMB2_FLAG_SERVERCAP_LARGEMTU 0x00000004
#define RPI_SMB2_FLAG_SERVERCAP_MULTICHANNEL 0x00000008
#define RPI_SMB2_FLAG_SERVERCAP_PERSISTENT_HANDLES 0x00000010
#define RPI_SMB2_FLAG_SERVERCAP_DIRECTORY_LEASING 0x00000020
#endif
typedef
struct
_FILE_REMOTE_PROTOCOL_INFO
{
;
;
;
;
;
;
;
;
struct
{
[
8
];
}
;
#if (_WIN32_WINNT < _WIN32_WINNT_WIN8)
struct {
ULONG Reserved[16];
} ProtocolSpecificReserved;
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
union
{
struct
{
struct
{
;
}
;
struct
{
;
;
}
;
}
;
[
16
];
}
;
#endif
}
FILE_REMOTE_PROTOCOL_INFO
, *
PFILE_REMOTE_PROTOCOL_INFO
;
(
_In_ FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
FILE_INFO_BY_HANDLE_CLASS
,
_Out_writes_bytes_(dwBufferSize) LPVOID lpFileInformation,
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
typedef
enum
{
,
,
,
}
, *
;
typedef
struct
{
;
;
union
{
;
;
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
;
#endif
}
, *
;
(
_In_ LPFILE_ID_DESCRIPTOR lpFileId,
_In_ DWORD dwDesiredAccess,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
_In_ DWORD dwFlagsAndAttributes
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#endif
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= 0x0600)
#define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1)
#define SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE (0x2)
(
_In_ LPCSTR lpSymlinkFileName,
_In_ LPCSTR lpTargetFileName,
);
(
_In_ LPCWSTR lpSymlinkFileName,
_In_ LPCWSTR lpTargetFileName,
);
#ifdef UNICODE
#define CreateSymbolicLink CreateSymbolicLinkW
#else
#define CreateSymbolicLink CreateSymbolicLinkA
#endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0600)
#if (_WIN32_WINNT >= 0x0600)
(
_In_opt_ PCWSTR settingsNameSpace,
_Out_writes_bytes_to_opt_(dwBuffer, *pdwWrittenOrRequired) PWSTR pvBuffer,
_Out_opt_ SIZE_T *pdwWrittenOrRequired
);
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= 0x0600)
CreateSymbolicLinkTransactedA
(
_In_ LPCSTR lpSymlinkFileName,
_In_ LPCSTR lpTargetFileName,
);
CreateSymbolicLinkTransactedW
(
_In_ LPCWSTR lpSymlinkFileName,
_In_ LPCWSTR lpTargetFileName,
);
#ifdef UNICODE
#define CreateSymbolicLinkTransacted CreateSymbolicLinkTransactedW
#else
#define CreateSymbolicLinkTransacted CreateSymbolicLinkTransactedA
#endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0600)
#if (_WIN32_WINNT >= 0x0600)
(
_In_ PWSTR TargetPartition,
_In_ PWSTR SparePartition,
);
#endif
#if (_WIN32_WINNT >= 0x0600)
AddSecureMemoryCacheCallback
(
_In_ __callback PSECURE_MEMORY_CACHE_CALLBACK pfnCallBack
PSECURE_MEMORY_CACHE_CALLBACK
);
RemoveSecureMemoryCacheCallback
(
_In_ __callback PSECURE_MEMORY_CACHE_CALLBACK pfnCallBack
PSECURE_MEMORY_CACHE_CALLBACK
);
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#if (NTDDI_VERSION >= NTDDI_WIN7SP1)
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
_Must_inspect_result_
(
_Inout_ PCONTEXT Destination,
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
_Success_(return != FALSE)
(
_Out_writes_bytes_opt_(*ContextLength) PVOID Buffer,
_Inout_ PDWORD ContextLength
);
#if (NTDDI_VERSION >= NTDDI_WIN10_RS5)
_Success_(return != FALSE)
(
_Out_writes_bytes_opt_(*ContextLength) PVOID Buffer,
_Inout_ PDWORD ContextLength,
_In_ ULONG64 XStateCompactionMask
);
#endif // (NTDDI_VERSION >= NTDDI_WIN10_RS5)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#if defined(_AMD64_) || defined(_X86_)
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
(
);
_Must_inspect_result_
(
_Out_ PDWORD64 FeatureMask
);
_Success_(return != NULL)
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
_Must_inspect_result_
(
_Inout_ PCONTEXT Context,
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#endif /* defined(_AMD64_) || defined(_X86_) */
#endif /* (NTDDI_VERSION >= NTDDI_WIN7SP1) */
#if (_WIN32_WINNT >= 0x0601)
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
(
_In_ HANDLE ThreadHandle,
_In_ DWORD64 HardwareCounters,
_Out_ HANDLE *PerformanceDataHandle
);
(
_In_ HANDLE PerformanceDataHandle
);
(
_In_ HANDLE ThreadHandle,
);
(
_In_ HANDLE PerformanceDataHandle,
_Out_ PPERFORMANCE_DATA PerformanceData
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif /* (_WIN32_WINNT >= 0x0601) */
#if (NTDDI_VERSION >= NTDDI_WIN10_RS4)
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
RaiseCustomSystemEventTrigger
(
_In_ PCUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG CustomSystemEventTriggerConfig
PCUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG
CustomSystemEventTriggerConfig
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#endif /* (NTDDI_VERSION >= NTDDI_WIN10_RS4) */
#if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
#if defined(ISOLATION_AWARE_ENABLED) && (ISOLATION_AWARE_ENABLED != 0)
#include "winbase.inl"
#endif /* ISOLATION_AWARE_ENABLED */
#endif /* RC */
#ifdef __cplusplus
}
#endif
#if defined (_MSC_VER)
#if _MSC_VER >= 1200
#pragma warning(pop)
#else
#pragma warning(default:4001) /* nonstandard extension : single line comment */
#pragma warning(default:4201) /* nonstandard extension used : nameless struct/union */
#pragma warning(default:4214) /* nonstandard extension used : bit field types other then int */
#endif
#endif
#endif // _WINBASE_
#if !defined(RC_INVOKED)
#if !defined(NOWINBASEINTERLOCK)
#if !defined(_NTOS_)
#if !defined(RC_INVOKED) /* { */
#if !defined(MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED) /* { */
#define MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED
#if _MSC_VER > 1000
#pragma once
#endif
#if !defined(MIDL_PASS) /* { */
#if !defined(MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS)
#define MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS (_WIN32_WINNT >= 0x0502 || !defined(_WINBASE_))
#endif
#if MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS /* { */
#if defined(__cplusplus) /* { */
extern
"C++"
{
unsigned
_Inout_ _Interlocked_operand_ unsigned volatile *Addend
)
{
return
(
unsigned
)
((
volatile
long
*)
);
}
unsigned
long
_Inout_ _Interlocked_operand_ unsigned long volatile *Addend
)
{
return
(
unsigned
long
)
((
volatile
long
*)
);
}
#if (defined(_WIN64) && !defined(_ARM64_)) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_) && !defined(_MANAGED))
unsigned
__int64
_Inout_ _Interlocked_operand_ unsigned __int64 volatile *Addend
unsigned
__int64
volatile
*
)
{
return (unsigned __int64) (InterlockedIncrement64)((volatile __int64*) Addend);
return
(
unsigned
__int64
) (
_InlineInterlockedIncrement64
)((
volatile
__int64
*)
);
}
#endif
unsigned
_Inout_ _Interlocked_operand_ unsigned volatile *Addend
)
{
return
(
unsigned
long
)
((
volatile
long
*)
);
}
unsigned
long
_Inout_ _Interlocked_operand_ unsigned long volatile *Addend
)
{
return
(
unsigned
long
)
((
volatile
long
*)
);
}
#if (defined(_WIN64) && !defined(_ARM64_)) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_) && !defined(_MANAGED))
unsigned
__int64
_Inout_ _Interlocked_operand_ unsigned __int64 volatile *Addend
unsigned
__int64
volatile
*
)
{
return (unsigned __int64) (InterlockedDecrement64)((volatile __int64*) Addend);
return
(
unsigned
__int64
) (
_InlineInterlockedDecrement64
)((
volatile
__int64
*)
);
}
#endif
#if !defined(_M_CEE_PURE)
unsigned
_Inout_ _Interlocked_operand_ unsigned volatile *Target,
)
{
return
(
unsigned
)
((
volatile
long
*)
, (
long
)
);
}
unsigned
long
_Inout_ _Interlocked_operand_ unsigned long volatile *Target,
unsigned
long
volatile
*
,
)
{
return
(
unsigned
long
)
((
volatile
long
*)
, (
long
)
);
}
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_) && !defined(_MANAGED))
unsigned
__int64
_Inout_ _Interlocked_operand_ unsigned __int64 volatile *Target,
unsigned
__int64
volatile
*
,
_In_ unsigned __int64 Value
)
{
return (unsigned __int64) InterlockedExchange64((volatile __int64*) Target, (__int64) Value);
return
(
unsigned
__int64
)
_InlineInterlockedExchange64
((
volatile
__int64
*)
, (
__int64
)
);
}
#endif
unsigned
_Inout_ _Interlocked_operand_ unsigned volatile *Addend,
)
{
return
(
unsigned
)
((
volatile
long
*)
, (
long
)
);
}
unsigned
InterlockedExchangeSubtract
(
_Inout_ _Interlocked_operand_ unsigned volatile *Addend,
)
{
return
(
unsigned
)
((
volatile
long
*)
, - (
long
)
);
}
unsigned
long
_Inout_ _Interlocked_operand_ unsigned long volatile *Addend,
unsigned
long
volatile
*
,
)
{
return
(
unsigned
long
)
((
volatile
long
*)
, (
long
)
);
}
unsigned
long
InterlockedExchangeSubtract
(
_Inout_ _Interlocked_operand_ unsigned long volatile *Addend,
unsigned
long
volatile
*
,
)
{
return
(
unsigned
long
)
((
volatile
long
*)
, - (
long
)
);
}
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_) && !defined(_MANAGED))
unsigned
__int64
_Inout_ _Interlocked_operand_ unsigned __int64 volatile *Addend,
unsigned
__int64
volatile
*
,
_In_ unsigned __int64 Value
)
{
return (unsigned __int64) InterlockedExchangeAdd64((volatile __int64*) Addend, (__int64) Value);
return
(
unsigned
__int64
)
_InlineInterlockedExchangeAdd64
((
volatile
__int64
*)
, (
__int64
)
);
}
unsigned
__int64
InterlockedExchangeSubtract
(
_Inout_ _Interlocked_operand_ unsigned __int64 volatile *Addend,
unsigned
__int64
volatile
*
,
_In_ unsigned __int64 Value
)
{
return (unsigned __int64) InterlockedExchangeAdd64((volatile __int64*) Addend, - (__int64) Value);
return
(
unsigned
__int64
)
_InlineInterlockedExchangeAdd64
((
volatile
__int64
*)
, - (
__int64
)
);
}
#endif
unsigned
InterlockedCompareExchange(
_InterlockedCompareExchange
(
_Inout_ _Interlocked_operand_ unsigned volatile *Destination,
)
{
return
(
unsigned
)
_InterlockedCompareExchange
((
volatile
long
*)
, (
long
)
, (
long
)
);
}
unsigned
long
InterlockedCompareExchange(
_InterlockedCompareExchange
(
_Inout_ _Interlocked_operand_ unsigned long volatile *Destination,
unsigned
long
volatile
*
,
_In_ unsigned long Exchange,
_In_ unsigned long Comperand
)
{
return
(
unsigned
long
)
_InterlockedCompareExchange
((
volatile
long
*)
, (
long
)
, (
long
)
);
}
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_) && !defined(_MANAGED))
unsigned
__int64
InterlockedCompareExchange(
_InterlockedCompareExchange
(
_Inout_ _Interlocked_operand_ unsigned __int64 volatile *Destination,
unsigned
__int64
volatile
*
,
_In_ unsigned __int64 Exchange,
_In_ unsigned __int64 Comperand
)
{
return
(
unsigned
__int64
)
_InterlockedCompareExchange64
((
volatile
__int64
*)
, (
__int64
)
, (
__int64
)
);
}
unsigned
__int64
_Inout_ _Interlocked_operand_ unsigned __int64 volatile *Destination,
unsigned
__int64
volatile
*
,
_In_ unsigned __int64 Value
)
{
return (unsigned __int64) InterlockedAnd64((volatile __int64*) Destination, (__int64) Value);
return
(
unsigned
__int64
)
((
volatile
__int64
*)
, (
__int64
)
);
}
unsigned
__int64
_Inout_ _Interlocked_operand_ unsigned __int64 volatile *Destination,
unsigned
__int64
volatile
*
,
_In_ unsigned __int64 Value
)
{
return (unsigned __int64) InterlockedOr64((volatile __int64*) Destination, (__int64) Value);
return
(
unsigned
__int64
)
((
volatile
__int64
*)
, (
__int64
)
);
}
unsigned
__int64
_Inout_ _Interlocked_operand_ unsigned __int64 volatile *Destination,
unsigned
__int64
volatile
*
,
_In_ unsigned __int64 Value
)
{
return (unsigned __int64) InterlockedXor64((volatile __int64*) Destination, (__int64) Value);
return
(
unsigned
__int64
)
((
volatile
__int64
*)
, (
__int64
)
);
}
#endif
#endif /* !defined(_M_CEE_PURE) */
}
#endif /* } __cplusplus */
#endif /* } MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS */
#undef MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS
#define MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS 0
#endif /* } MIDL_PASS */
#endif /* } MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED */
#endif /* } RC_INVOKED */
#endif /* _NTOS_ */
#endif /* NOWINBASEINTERLOCK */
#endif /* RC_INVOKED */