Headers diff for kernel32.dll between 6.1.7601.23418-Windows_7.0 and 6.3.9600.17415-Windows_8.1 versions



 tlhelp32.h (6.1.7601.23418-Windows_7.0)   tlhelp32.h (6.3.9600.17415-Windows_8.1) 
skipping to change at line 19 skipping to change at line 19
* Copyright (c) Microsoft Corp. All rights reserved. * * Copyright (c) Microsoft Corp. All rights reserved. *
* * * *
\*****************************************************************************/ \*****************************************************************************/
#ifndef _INC_TOOLHELP32 #ifndef _INC_TOOLHELP32
#define _INC_TOOLHELP32 #define _INC_TOOLHELP32
#if _MSC_VER > 1000 #if _MSC_VER > 1000
#pragma once #pragma once
#endif #endif
#include <winapifamily.h>
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */ extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */ #endif /* __cplusplus */
#define MAX_MODULE_NAME32 255 #define MAX_MODULE_NAME32 255
/****** Shapshot function **********************************************/ /****** Shapshot function **********************************************/
HANDLE HANDLE
skipping to change at line 314 skipping to change at line 318
#define Module32Next Module32NextW #define Module32Next Module32NextW
#define MODULEENTRY32 MODULEENTRY32W #define MODULEENTRY32 MODULEENTRY32W
#define PMODULEENTRY32 PMODULEENTRY32W #define PMODULEENTRY32 PMODULEENTRY32W
#define LPMODULEENTRY32 LPMODULEENTRY32W #define LPMODULEENTRY32 LPMODULEENTRY32W
#endif // !UNICODE #endif // !UNICODE
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif // _INC_TOOLHELP32 #endif // _INC_TOOLHELP32
 End of changes. 2 change blocks. 
0 lines changed or deleted 7 lines changed or added


 winbase.h (6.1.7601.23418-Windows_7.0)   winbase.h (6.3.9600.17415-Windows_8.1) 
#include <winapifamily.h>
/************************************************************************ /************************************************************************
* * * *
* winbase.h -- This module defines the 32-Bit Windows Base APIs * * winbase.h -- This module defines the 32-Bit Windows Base APIs *
* * * *
* Copyright (c) Microsoft Corp. All rights reserved. * * Copyright (c) Microsoft Corp. All rights reserved. *
* * * *
************************************************************************/ ************************************************************************/
#ifndef _WINBASE_ #ifndef _WINBASE_
#define _WINBASE_ #define _WINBASE_
#if defined(_MSC_VER)
#if _MSC_VER > 1000 #if _MSC_VER > 1000
#pragma once #pragma once
#endif #endif
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning(disable:4001) /* nonstandard extension : single line comment */
#pragma warning(disable:4201) /* nonstandard extension used : nameless struct/un
ion */
#pragma warning(disable:4214) /* nonstandard extension used : bit field types ot
her then int */
#endif // defined(_MSC_VER)
#ifdef _MAC #ifdef _MAC
#include <macwin32.h> #include <macwin32.h>
#endif //_MAC #endif //_MAC
#include <apisetcconv.h>
#include <minwinbase.h>
// //
// Define API decoration for direct importing of DLL references. // APISET contracts
// //
#if !defined(_ADVAPI32_) #include <processenv.h>
#define WINADVAPI DECLSPEC_IMPORT #include <fileapi.h>
#else #include <debugapi.h>
#define WINADVAPI #include <utilapiset.h>
#endif #include <handleapi.h>
#include <errhandlingapi.h>
#if !defined(_KERNEL32_) #include <fibersapi.h>
#define WINBASEAPI DECLSPEC_IMPORT #include <namedpipeapi.h>
#else #include <profileapi.h>
#define WINBASEAPI #include <heapapi.h>
#endif #include <ioapiset.h>
#include <synchapi.h>
#if !defined(_ZAWPROXY_) #include <interlockedapi.h>
#define ZAWPROXYAPI DECLSPEC_IMPORT #include <processthreadsapi.h>
#else #include <sysinfoapi.h>
#define ZAWPROXYAPI #include <memoryapi.h>
#endif #include <threadpoollegacyapiset.h>
#include <threadpoolapiset.h>
#include <bemapiset.h>
#include <jobapi.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 #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
/* /*
* Compatibility macros * Compatibility macros
*/ */
#define DefineHandleTable(w) ((w),TRUE) #define DefineHandleTable(w) ((w),TRUE)
#define LimitEmsPages(dw) #define LimitEmsPages(dw)
#define SetSwapAreaSize(w) (w) #define SetSwapAreaSize(w) (w)
#define LockSegment(w) GlobalFix((HANDLE)(w)) #define LockSegment(w) GlobalFix((HANDLE)(w))
#define UnlockSegment(w) GlobalUnfix((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() #define GetCurrentTime() GetTickCount()
#define Yield() #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1) #pragma region Application Family
#define INVALID_FILE_SIZE ((DWORD)0xFFFFFFFF) #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define INVALID_SET_FILE_POINTER ((DWORD)-1)
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) #define Yield()
#define FILE_BEGIN 0 #define FILE_BEGIN 0
#define FILE_CURRENT 1 #define FILE_CURRENT 1
#define FILE_END 2 #define FILE_END 2
#define TIME_ZONE_ID_INVALID ((DWORD)0xFFFFFFFF)
#define WAIT_FAILED ((DWORD)0xFFFFFFFF) #define WAIT_FAILED ((DWORD)0xFFFFFFFF)
#define WAIT_OBJECT_0 ((STATUS_WAIT_0 ) + 0 ) #define WAIT_OBJECT_0 ((STATUS_WAIT_0 ) + 0 )
#define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0 ) + 0 ) #define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0 ) + 0 )
#define WAIT_ABANDONED_0 ((STATUS_ABANDONED_WAIT_0 ) + 0 ) #define WAIT_ABANDONED_0 ((STATUS_ABANDONED_WAIT_0 ) + 0 )
#define WAIT_IO_COMPLETION STATUS_USER_APC #define WAIT_IO_COMPLETION STATUS_USER_APC
#define STILL_ACTIVE STATUS_PENDING
#define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
#define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
#define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
#define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
#define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
#define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
#define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
#define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
#define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
#define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
#define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
#define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
#define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
#define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
#define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
#define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR
#define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION
#define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION
#define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW
#define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION
#define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION
#define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE
#define EXCEPTION_POSSIBLE_DEADLOCK STATUS_POSSIBLE_DEADLOCK
#define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT
#define MoveMemory RtlMoveMemory
#define CopyMemory RtlCopyMemory
#define FillMemory RtlFillMemory
#define ZeroMemory RtlZeroMemory
#define SecureZeroMemory RtlSecureZeroMemory #define SecureZeroMemory RtlSecureZeroMemory
#define CaptureStackBackTrace RtlCaptureStackBackTrace #define CaptureStackBackTrace RtlCaptureStackBackTrace
// //
// File creation flags must start at the high end since they // File creation flags must start at the high end since they
// are combined with the attributes // are combined with the attributes
// //
//
// These are flags supported through CreateFile (W7) and CreateFile2 (W8 and be
yond)
//
#define FILE_FLAG_WRITE_THROUGH 0x80000000 #define FILE_FLAG_WRITE_THROUGH 0x80000000
#define FILE_FLAG_OVERLAPPED 0x40000000 #define FILE_FLAG_OVERLAPPED 0x40000000
#define FILE_FLAG_NO_BUFFERING 0x20000000 #define FILE_FLAG_NO_BUFFERING 0x20000000
#define FILE_FLAG_RANDOM_ACCESS 0x10000000 #define FILE_FLAG_RANDOM_ACCESS 0x10000000
#define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000 #define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000
#define FILE_FLAG_DELETE_ON_CLOSE 0x04000000 #define FILE_FLAG_DELETE_ON_CLOSE 0x04000000
#define FILE_FLAG_BACKUP_SEMANTICS 0x02000000 #define FILE_FLAG_BACKUP_SEMANTICS 0x02000000
#define FILE_FLAG_POSIX_SEMANTICS 0x01000000 #define FILE_FLAG_POSIX_SEMANTICS 0x01000000
#define FILE_FLAG_SESSION_AWARE 0x00800000
#define FILE_FLAG_OPEN_REPARSE_POINT 0x00200000 #define FILE_FLAG_OPEN_REPARSE_POINT 0x00200000
#define FILE_FLAG_OPEN_NO_RECALL 0x00100000 #define FILE_FLAG_OPEN_NO_RECALL 0x00100000
#define FILE_FLAG_FIRST_PIPE_INSTANCE 0x00080000 #define FILE_FLAG_FIRST_PIPE_INSTANCE 0x00080000
#define CREATE_NEW 1 #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#define CREATE_ALWAYS 2
#define OPEN_EXISTING 3 //
#define OPEN_ALWAYS 4 // These are flags supported only through CreateFile2 (W8 and beyond)
#define TRUNCATE_EXISTING 5 //
// Due to the multiplexing of file creation flags, file attribute flags and
// security QoS flags into a single DWORD (dwFlagsAndAttributes) parameter for
// CreateFile, there is no way to add any more flags to CreateFile. Additional
// flags for the create operation must be added to CreateFile2 only
//
#define FILE_FLAG_OPEN_REQUIRING_OPLOCK 0x00040000
#endif
#if(_WIN32_WINNT >= 0x0400) #if(_WIN32_WINNT >= 0x0400)
// //
// Define possible return codes from the CopyFileEx callback routine // Define possible return codes from the CopyFileEx callback routine
// //
#define PROGRESS_CONTINUE 0 #define PROGRESS_CONTINUE 0
#define PROGRESS_CANCEL 1 #define PROGRESS_CANCEL 1
#define PROGRESS_STOP 2 #define PROGRESS_STOP 2
#define PROGRESS_QUIET 3 #define PROGRESS_QUIET 3
skipping to change at line 166 skipping to change at line 184
#define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x00000008 #define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x00000008
// //
// Gap for private copyfile flags // Gap for private copyfile flags
// //
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
#define COPY_FILE_COPY_SYMLINK 0x00000800 #define COPY_FILE_COPY_SYMLINK 0x00000800
#define COPY_FILE_NO_BUFFERING 0x00001000 #define COPY_FILE_NO_BUFFERING 0x00001000
#endif #endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
//
// CopyFile2 flags
//
#define COPY_FILE_REQUEST_SECURITY_PRIVILEGES 0x00002000
#define COPY_FILE_RESUME_FROM_PAUSE 0x00004000
#define COPY_FILE_NO_OFFLOAD 0x00040000
#endif
#endif /* _WIN32_WINNT >= 0x0400 */ #endif /* _WIN32_WINNT >= 0x0400 */
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
// //
// Define ReplaceFile option flags // Define ReplaceFile option flags
// //
#define REPLACEFILE_WRITE_THROUGH 0x00000001 #define REPLACEFILE_WRITE_THROUGH 0x00000001
#define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002 #define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002
skipping to change at line 237 skipping to change at line 269
#define SECURITY_IMPERSONATION ( SecurityImpersonation << 16 ) #define SECURITY_IMPERSONATION ( SecurityImpersonation << 16 )
#define SECURITY_DELEGATION ( SecurityDelegation << 16 ) #define SECURITY_DELEGATION ( SecurityDelegation << 16 )
#define SECURITY_CONTEXT_TRACKING 0x00040000 #define SECURITY_CONTEXT_TRACKING 0x00040000
#define SECURITY_EFFECTIVE_ONLY 0x00080000 #define SECURITY_EFFECTIVE_ONLY 0x00080000
#define SECURITY_SQOS_PRESENT 0x00100000 #define SECURITY_SQOS_PRESENT 0x00100000
#define SECURITY_VALID_SQOS_FLAGS 0x001F0000 #define SECURITY_VALID_SQOS_FLAGS 0x001F0000
// //
// File structures // Fiber structures
//
typedef struct _OVERLAPPED {
ULONG_PTR Internal;
ULONG_PTR InternalHigh;
union {
struct {
DWORD Offset;
DWORD OffsetHigh;
} DUMMYSTRUCTNAME;
PVOID Pointer;
} DUMMYUNIONNAME;
HANDLE hEvent;
} OVERLAPPED, *LPOVERLAPPED;
typedef struct _OVERLAPPED_ENTRY {
ULONG_PTR lpCompletionKey;
LPOVERLAPPED lpOverlapped;
ULONG_PTR Internal;
DWORD dwNumberOfBytesTransferred;
} OVERLAPPED_ENTRY, *LPOVERLAPPED_ENTRY;
typedef struct _SECURITY_ATTRIBUTES {
DWORD nLength;
LPVOID lpSecurityDescriptor;
BOOL bInheritHandle;
} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
typedef struct _PROCESS_INFORMATION {
HANDLE hProcess;
HANDLE hThread;
DWORD dwProcessId;
DWORD dwThreadId;
} PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
//
// File System time stamps are represented with the following structure:
//
#ifndef _FILETIME_
#define _FILETIME_
typedef struct _FILETIME {
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME, *PFILETIME, *LPFILETIME;
#endif
//
// System time is represented with the following structure:
// //
typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(
LPVOID lpThreadParameter
);
typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
#if(_WIN32_WINNT >= 0x0400) #if(_WIN32_WINNT >= 0x0400)
typedef VOID (WINAPI *PFIBER_START_ROUTINE)( typedef VOID (WINAPI *PFIBER_START_ROUTINE)(
LPVOID lpFiberParameter LPVOID lpFiberParameter
); );
typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE; typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
#endif /* _WIN32_WINNT >= 0x0400 */
typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;
typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;
typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG;
typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG;
typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG;
#if (_WIN32_WINNT >= 0x0600)
//
// Define one-time initialization primitive
//
typedef RTL_RUN_ONCE INIT_ONCE;
typedef PRTL_RUN_ONCE PINIT_ONCE;
typedef PRTL_RUN_ONCE LPINIT_ONCE;
#define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT
// typedef LPVOID (WINAPI *PFIBER_CALLOUT_ROUTINE)(
// Run once flags LPVOID lpParameter
// );
#endif /* _WIN32_WINNT >= 0x0400 */
#define INIT_ONCE_CHECK_ONLY RTL_RUN_ONCE_CHECK_ONLY
#define INIT_ONCE_ASYNC RTL_RUN_ONCE_ASYNC
#define INIT_ONCE_INIT_FAILED RTL_RUN_ONCE_INIT_FAILED
//
// The context stored in the run once structure must leave the following number
// of low order bits unused.
//
#define INIT_ONCE_CTX_RESERVED_BITS RTL_RUN_ONCE_CTX_RESERVED_BITS
// //
// FailFast Exception Flags // FailFast Exception Flags
// //
#define FAIL_FAST_GENERATE_EXCEPTION_ADDRESS 0x1 #define FAIL_FAST_GENERATE_EXCEPTION_ADDRESS 0x1
#define FAIL_FAST_NO_HARD_ERROR_DLG 0x2 #define FAIL_FAST_NO_HARD_ERROR_DLG 0x2
typedef
BOOL
(WINAPI *PINIT_ONCE_FN) (
__inout PINIT_ONCE InitOnce,
__inout_opt PVOID Parameter,
__deref_opt_out_opt PVOID *Context
);
WINBASEAPI
VOID
WINAPI
InitOnceInitialize (
__out PINIT_ONCE InitOnce
);
WINBASEAPI
BOOL
WINAPI
InitOnceExecuteOnce (
__inout PINIT_ONCE InitOnce,
__in __callback PINIT_ONCE_FN InitFn,
__inout_opt PVOID Parameter,
__deref_opt_out_opt LPVOID *Context
);
WINBASEAPI
BOOL
WINAPI
InitOnceBeginInitialize (
__inout LPINIT_ONCE lpInitOnce,
__in DWORD dwFlags,
__out PBOOL fPending,
__deref_opt_out_opt LPVOID *lpContext
);
WINBASEAPI
BOOL
WINAPI
InitOnceComplete (
__inout LPINIT_ONCE lpInitOnce,
__in DWORD dwFlags,
__in_opt LPVOID lpContext
);
#endif
//
// Define the slim r/w lock
//
typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
#define SRWLOCK_INIT RTL_SRWLOCK_INIT
WINBASEAPI
VOID
WINAPI
InitializeSRWLock (
__out PSRWLOCK SRWLock
);
WINBASEAPI
VOID
WINAPI
ReleaseSRWLockExclusive (
__inout PSRWLOCK SRWLock
);
WINBASEAPI
VOID
WINAPI
ReleaseSRWLockShared (
__inout PSRWLOCK SRWLock
);
WINBASEAPI
VOID
WINAPI
AcquireSRWLockExclusive (
__inout PSRWLOCK SRWLock
);
WINBASEAPI
VOID
WINAPI
AcquireSRWLockShared (
__inout PSRWLOCK SRWLock
);
WINBASEAPI
BOOLEAN
WINAPI
TryAcquireSRWLockExclusive (
__inout PSRWLOCK SRWLock
);
WINBASEAPI
BOOLEAN
WINAPI
TryAcquireSRWLockShared (
__inout PSRWLOCK SRWLock
);
//
// Define condition variable
//
typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;
WINBASEAPI
VOID
WINAPI
InitializeConditionVariable (
__out PCONDITION_VARIABLE ConditionVariable
);
WINBASEAPI
VOID
WINAPI
WakeConditionVariable (
__inout PCONDITION_VARIABLE ConditionVariable
);
WINBASEAPI
VOID
WINAPI
WakeAllConditionVariable (
__inout PCONDITION_VARIABLE ConditionVariable
);
WINBASEAPI
BOOL
WINAPI
SleepConditionVariableCS (
__inout PCONDITION_VARIABLE ConditionVariable,
__inout PCRITICAL_SECTION CriticalSection,
__in DWORD dwMilliseconds
);
WINBASEAPI
BOOL
WINAPI
SleepConditionVariableSRW (
__inout PCONDITION_VARIABLE ConditionVariable,
__inout PSRWLOCK SRWLock,
__in DWORD dwMilliseconds,
__in ULONG Flags
);
//
// Static initializer for the condition variable
//
#define CONDITION_VARIABLE_INIT RTL_CONDITION_VARIABLE_INIT
//
// Flags for condition variables
//
#define CONDITION_VARIABLE_LOCKMODE_SHARED RTL_CONDITION_VARIABLE_LOCKMODE_SHARE
D
WINBASEAPI
__out_opt
PVOID
WINAPI
EncodePointer (
__in_opt PVOID Ptr
);
WINBASEAPI
__out_opt
PVOID
WINAPI
DecodePointer (
__in_opt PVOID Ptr
);
WINBASEAPI
__out_opt
PVOID
WINAPI
EncodeSystemPointer (
__in_opt PVOID Ptr
);
WINBASEAPI
__out_opt
PVOID
WINAPI
DecodeSystemPointer (
__in_opt PVOID Ptr
);
#if defined(_X86_) #if defined(_X86_)
typedef PLDT_ENTRY LPLDT_ENTRY; typedef PLDT_ENTRY LPLDT_ENTRY;
#else #else
typedef LPVOID LPLDT_ENTRY; typedef LPVOID LPLDT_ENTRY;
#endif #endif
#define MUTEX_MODIFY_STATE MUTANT_QUERY_STATE
#define MUTEX_ALL_ACCESS MUTANT_ALL_ACCESS
// //
// Serial provider type. // Serial provider type.
// //
#define SP_SERIALCOMM ((DWORD)0x00000001) #define SP_SERIALCOMM ((DWORD)0x00000001)
// //
// Provider SubTypes // Provider SubTypes
// //
skipping to change at line 763 skipping to change at line 503
WORD wReserved; /* alignment */ WORD wReserved; /* alignment */
DCB dcb; /* device control block */ DCB dcb; /* device control block */
DWORD dwProviderSubType; /* ordinal value for identifying DWORD dwProviderSubType; /* ordinal value for identifying
provider-defined data structure format*/ provider-defined data structure format*/
DWORD dwProviderOffset; /* Specifies the offset of provider specific DWORD dwProviderOffset; /* Specifies the offset of provider specific
data field in bytes from the start */ data field in bytes from the start */
DWORD dwProviderSize; /* size of the provider-specific data field */ DWORD dwProviderSize; /* size of the provider-specific data field */
WCHAR wcProviderData[1]; /* provider-specific data */ WCHAR wcProviderData[1]; /* provider-specific data */
} COMMCONFIG,*LPCOMMCONFIG; } COMMCONFIG,*LPCOMMCONFIG;
typedef struct _SYSTEM_INFO {
union {
DWORD dwOemId; // Obsolete field...do not use
struct {
WORD wProcessorArchitecture;
WORD wReserved;
} DUMMYSTRUCTNAME;
} DUMMYUNIONNAME;
DWORD dwPageSize;
LPVOID lpMinimumApplicationAddress;
LPVOID lpMaximumApplicationAddress;
DWORD_PTR dwActiveProcessorMask;
DWORD dwNumberOfProcessors;
DWORD dwProcessorType;
DWORD dwAllocationGranularity;
WORD wProcessorLevel;
WORD wProcessorRevision;
} SYSTEM_INFO, *LPSYSTEM_INFO;
// //
// //
#define FreeModule(hLibModule) FreeLibrary((hLibModule)) #define FreeModule(hLibModule) FreeLibrary((hLibModule))
#define MakeProcInstance(lpProc,hInstance) (lpProc) #define MakeProcInstance(lpProc,hInstance) (lpProc)
#define FreeProcInstance(lpProc) (lpProc) #define FreeProcInstance(lpProc) (lpProc)
/* Global Memory Flags */ /* Global Memory Flags */
#define GMEM_FIXED 0x0000 #define GMEM_FIXED 0x0000
#define GMEM_MOVEABLE 0x0002 #define GMEM_MOVEABLE 0x0002
skipping to change at line 827 skipping to change at line 548
DWORD dwLength; DWORD dwLength;
DWORD dwMemoryLoad; DWORD dwMemoryLoad;
SIZE_T dwTotalPhys; SIZE_T dwTotalPhys;
SIZE_T dwAvailPhys; SIZE_T dwAvailPhys;
SIZE_T dwTotalPageFile; SIZE_T dwTotalPageFile;
SIZE_T dwAvailPageFile; SIZE_T dwAvailPageFile;
SIZE_T dwTotalVirtual; SIZE_T dwTotalVirtual;
SIZE_T dwAvailVirtual; SIZE_T dwAvailVirtual;
} MEMORYSTATUS, *LPMEMORYSTATUS; } MEMORYSTATUS, *LPMEMORYSTATUS;
/* Local Memory Flags */
#define LMEM_FIXED 0x0000
#define LMEM_MOVEABLE 0x0002
#define LMEM_NOCOMPACT 0x0010
#define LMEM_NODISCARD 0x0020
#define LMEM_ZEROINIT 0x0040
#define LMEM_MODIFY 0x0080
#define LMEM_DISCARDABLE 0x0F00
#define LMEM_VALID_FLAGS 0x0F72
#define LMEM_INVALID_HANDLE 0x8000
#define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
#define LPTR (LMEM_FIXED | LMEM_ZEROINIT)
#define NONZEROLHND (LMEM_MOVEABLE)
#define NONZEROLPTR (LMEM_FIXED)
#define LocalDiscard( h ) LocalReAlloc( (h), 0, LMEM_MOVEABLE )
/* Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) */
#define LMEM_DISCARDED 0x4000
#define LMEM_LOCKCOUNT 0x00FF
// //
// NUMA values // NUMA values
// //
#define NUMA_NO_PREFERRED_NODE ((DWORD) -1) #define NUMA_NO_PREFERRED_NODE ((DWORD) -1)
// //
// Process dwCreationFlag values // Process dwCreationFlag values
// //
#define DEBUG_PROCESS 0x00000001 #define DEBUG_PROCESS 0x00000001
skipping to change at line 935 skipping to change at line 633
#define VOLUME_NAME_DOS 0x0 //default #define VOLUME_NAME_DOS 0x0 //default
#define VOLUME_NAME_GUID 0x1 #define VOLUME_NAME_GUID 0x1
#define VOLUME_NAME_NT 0x2 #define VOLUME_NAME_NT 0x2
#define VOLUME_NAME_NONE 0x4 #define VOLUME_NAME_NONE 0x4
#define FILE_NAME_NORMALIZED 0x0 //default #define FILE_NAME_NORMALIZED 0x0 //default
#define FILE_NAME_OPENED 0x8 #define FILE_NAME_OPENED 0x8
// //
// Debug APIs
//
#define EXCEPTION_DEBUG_EVENT 1
#define CREATE_THREAD_DEBUG_EVENT 2
#define CREATE_PROCESS_DEBUG_EVENT 3
#define EXIT_THREAD_DEBUG_EVENT 4
#define EXIT_PROCESS_DEBUG_EVENT 5
#define LOAD_DLL_DEBUG_EVENT 6
#define UNLOAD_DLL_DEBUG_EVENT 7
#define OUTPUT_DEBUG_STRING_EVENT 8
#define RIP_EVENT 9
typedef struct _EXCEPTION_DEBUG_INFO {
EXCEPTION_RECORD ExceptionRecord;
DWORD dwFirstChance;
} EXCEPTION_DEBUG_INFO, *LPEXCEPTION_DEBUG_INFO;
typedef struct _CREATE_THREAD_DEBUG_INFO {
HANDLE hThread;
LPVOID lpThreadLocalBase;
LPTHREAD_START_ROUTINE lpStartAddress;
} CREATE_THREAD_DEBUG_INFO, *LPCREATE_THREAD_DEBUG_INFO;
typedef struct _CREATE_PROCESS_DEBUG_INFO {
HANDLE hFile;
HANDLE hProcess;
HANDLE hThread;
LPVOID lpBaseOfImage;
DWORD dwDebugInfoFileOffset;
DWORD nDebugInfoSize;
LPVOID lpThreadLocalBase;
LPTHREAD_START_ROUTINE lpStartAddress;
LPVOID lpImageName;
WORD fUnicode;
} CREATE_PROCESS_DEBUG_INFO, *LPCREATE_PROCESS_DEBUG_INFO;
typedef struct _EXIT_THREAD_DEBUG_INFO {
DWORD dwExitCode;
} EXIT_THREAD_DEBUG_INFO, *LPEXIT_THREAD_DEBUG_INFO;
typedef struct _EXIT_PROCESS_DEBUG_INFO {
DWORD dwExitCode;
} EXIT_PROCESS_DEBUG_INFO, *LPEXIT_PROCESS_DEBUG_INFO;
typedef struct _LOAD_DLL_DEBUG_INFO {
HANDLE hFile;
LPVOID lpBaseOfDll;
DWORD dwDebugInfoFileOffset;
DWORD nDebugInfoSize;
LPVOID lpImageName;
WORD fUnicode;
} LOAD_DLL_DEBUG_INFO, *LPLOAD_DLL_DEBUG_INFO;
typedef struct _UNLOAD_DLL_DEBUG_INFO {
LPVOID lpBaseOfDll;
} UNLOAD_DLL_DEBUG_INFO, *LPUNLOAD_DLL_DEBUG_INFO;
typedef struct _OUTPUT_DEBUG_STRING_INFO {
LPSTR lpDebugStringData;
WORD fUnicode;
WORD nDebugStringLength;
} OUTPUT_DEBUG_STRING_INFO, *LPOUTPUT_DEBUG_STRING_INFO;
typedef struct _RIP_INFO {
DWORD dwError;
DWORD dwType;
} RIP_INFO, *LPRIP_INFO;
typedef struct _DEBUG_EVENT {
DWORD dwDebugEventCode;
DWORD dwProcessId;
DWORD dwThreadId;
union {
EXCEPTION_DEBUG_INFO Exception;
CREATE_THREAD_DEBUG_INFO CreateThread;
CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
EXIT_THREAD_DEBUG_INFO ExitThread;
EXIT_PROCESS_DEBUG_INFO ExitProcess;
LOAD_DLL_DEBUG_INFO LoadDll;
UNLOAD_DLL_DEBUG_INFO UnloadDll;
OUTPUT_DEBUG_STRING_INFO DebugString;
RIP_INFO RipInfo;
} u;
} DEBUG_EVENT, *LPDEBUG_EVENT;
//
// JIT Debugging Info. This structure is defined to have constant size in // JIT Debugging Info. This structure is defined to have constant size in
// both the emulated and native environment. // both the emulated and native environment.
// //
typedef struct _JIT_DEBUG_INFO { typedef struct _JIT_DEBUG_INFO {
DWORD dwSize; DWORD dwSize;
DWORD dwProcessorArchitecture; DWORD dwProcessorArchitecture;
DWORD dwThreadID; DWORD dwThreadID;
DWORD dwReserved0; DWORD dwReserved0;
ULONG64 lpExceptionAddress; ULONG64 lpExceptionAddress;
ULONG64 lpExceptionRecord; ULONG64 lpExceptionRecord;
ULONG64 lpContextRecord; ULONG64 lpContextRecord;
} JIT_DEBUG_INFO, *LPJIT_DEBUG_INFO; } JIT_DEBUG_INFO, *LPJIT_DEBUG_INFO;
typedef JIT_DEBUG_INFO JIT_DEBUG_INFO32, *LPJIT_DEBUG_INFO32; typedef JIT_DEBUG_INFO JIT_DEBUG_INFO32, *LPJIT_DEBUG_INFO32;
typedef JIT_DEBUG_INFO JIT_DEBUG_INFO64, *LPJIT_DEBUG_INFO64; typedef JIT_DEBUG_INFO JIT_DEBUG_INFO64, *LPJIT_DEBUG_INFO64;
#if !defined(MIDL_PASS) #if !defined(MIDL_PASS)
typedef PCONTEXT LPCONTEXT;
typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD; typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS; typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;
#endif #endif
#define DRIVE_UNKNOWN 0 #define DRIVE_UNKNOWN 0
#define DRIVE_NO_ROOT_DIR 1 #define DRIVE_NO_ROOT_DIR 1
#define DRIVE_REMOVABLE 2 #define DRIVE_REMOVABLE 2
#define DRIVE_FIXED 3 #define DRIVE_FIXED 3
#define DRIVE_REMOTE 4 #define DRIVE_REMOTE 4
#define DRIVE_CDROM 5 #define DRIVE_CDROM 5
#define DRIVE_RAMDISK 6 #define DRIVE_RAMDISK 6
#ifndef _MAC #ifndef _MAC
#define GetFreeSpace(w) (0x100000L) #define GetFreeSpace(w) (0x100000L)
#else #else
WINBASEAPI DWORD WINAPI GetFreeSpace(__in UINT); WINBASEAPI DWORD WINAPI GetFreeSpace(_In_ UINT);
#endif #endif
#define FILE_TYPE_UNKNOWN 0x0000 #define FILE_TYPE_UNKNOWN 0x0000
#define FILE_TYPE_DISK 0x0001 #define FILE_TYPE_DISK 0x0001
#define FILE_TYPE_CHAR 0x0002 #define FILE_TYPE_CHAR 0x0002
#define FILE_TYPE_PIPE 0x0003 #define FILE_TYPE_PIPE 0x0003
#define FILE_TYPE_REMOTE 0x8000 #define FILE_TYPE_REMOTE 0x8000
#define STD_INPUT_HANDLE ((DWORD)-10) #define STD_INPUT_HANDLE ((DWORD)-10)
#define STD_OUTPUT_HANDLE ((DWORD)-11) #define STD_OUTPUT_HANDLE ((DWORD)-11)
skipping to change at line 1234 skipping to change at line 845
#define NMPWAIT_USE_DEFAULT_WAIT 0x00000000 #define NMPWAIT_USE_DEFAULT_WAIT 0x00000000
#define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES #define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
#define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH #define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
#define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK #define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
#define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS #define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS
#define FS_VOL_IS_COMPRESSED FILE_VOLUME_IS_COMPRESSED #define FS_VOL_IS_COMPRESSED FILE_VOLUME_IS_COMPRESSED
#define FS_FILE_COMPRESSION FILE_FILE_COMPRESSION #define FS_FILE_COMPRESSION FILE_FILE_COMPRESSION
#define FS_FILE_ENCRYPTION FILE_SUPPORTS_ENCRYPTION #define FS_FILE_ENCRYPTION FILE_SUPPORTS_ENCRYPTION
#define FILE_MAP_COPY SECTION_QUERY
#define FILE_MAP_WRITE SECTION_MAP_WRITE
#define FILE_MAP_READ SECTION_MAP_READ
#define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS
#define FILE_MAP_EXECUTE SECTION_MAP_EXECUTE_EXPLICIT // not included in F
ILE_MAP_ALL_ACCESS
#define OF_READ 0x00000000 #define OF_READ 0x00000000
#define OF_WRITE 0x00000001 #define OF_WRITE 0x00000001
#define OF_READWRITE 0x00000002 #define OF_READWRITE 0x00000002
#define OF_SHARE_COMPAT 0x00000000 #define OF_SHARE_COMPAT 0x00000000
#define OF_SHARE_EXCLUSIVE 0x00000010 #define OF_SHARE_EXCLUSIVE 0x00000010
#define OF_SHARE_DENY_WRITE 0x00000020 #define OF_SHARE_DENY_WRITE 0x00000020
#define OF_SHARE_DENY_READ 0x00000030 #define OF_SHARE_DENY_READ 0x00000030
#define OF_SHARE_DENY_NONE 0x00000040 #define OF_SHARE_DENY_NONE 0x00000040
#define OF_PARSE 0x00000100 #define OF_PARSE 0x00000100
#define OF_DELETE 0x00000200 #define OF_DELETE 0x00000200
skipping to change at line 1267 skipping to change at line 872
#define OFS_MAXPATHNAME 128 #define OFS_MAXPATHNAME 128
typedef struct _OFSTRUCT { typedef struct _OFSTRUCT {
BYTE cBytes; BYTE cBytes;
BYTE fFixedDisk; BYTE fFixedDisk;
WORD nErrCode; WORD nErrCode;
WORD Reserved1; WORD Reserved1;
WORD Reserved2; WORD Reserved2;
CHAR szPathName[OFS_MAXPATHNAME]; CHAR szPathName[OFS_MAXPATHNAME];
} OFSTRUCT, *LPOFSTRUCT, *POFSTRUCT; } OFSTRUCT, *LPOFSTRUCT, *POFSTRUCT;
#ifndef NOWINBASEINTERLOCK
#ifndef _NTOS_
#if defined(_M_IA64) && !defined(RC_INVOKED)
#define InterlockedIncrement _InterlockedIncrement
#define InterlockedIncrementAcquire _InterlockedIncrement_acq
#define InterlockedIncrementRelease _InterlockedIncrement_rel
#define InterlockedDecrement _InterlockedDecrement
#define InterlockedDecrementAcquire _InterlockedDecrement_acq
#define InterlockedDecrementRelease _InterlockedDecrement_rel
#define InterlockedExchange _InterlockedExchange
#define InterlockedExchangeAdd _InterlockedExchangeAdd
#define InterlockedCompareExchange _InterlockedCompareExchange
#define InterlockedCompareExchangeAcquire _InterlockedCompareExchange_acq
#define InterlockedCompareExchangeRelease _InterlockedCompareExchange_rel
#define InterlockedExchangePointer _InterlockedExchangePointer
#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePoin
ter_rel
#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePoin
ter_acq
#define InterlockedIncrement64 _InterlockedIncrement64
#define InterlockedDecrement64 _InterlockedDecrement64
#define InterlockedExchange64 _InterlockedExchange64
#define InterlockedExchangeAcquire64 _InterlockedExchange64_acq
#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
#define InterlockedCompareExchange64 _InterlockedCompareExchange64
#define InterlockedCompareExchangeAcquire64 _InterlockedCompareExchange64_acq
#define InterlockedCompareExchangeRelease64 _InterlockedCompareExchange64_rel
#define InterlockedCompare64Exchange128 _InterlockedCompare64Exchange128
#define InterlockedCompare64ExchangeAcquire128 _InterlockedCompare64Exchange128
_acq
#define InterlockedCompare64ExchangeRelease128 _InterlockedCompare64Exchange128
_rel
#define InterlockedOr _InterlockedOr
#define InterlockedOrAcquire _InterlockedOr_acq
#define InterlockedOrRelease _InterlockedOr_rel
#define InterlockedOr8 _InterlockedOr8
#define InterlockedOr8Acquire _InterlockedOr8_acq
#define InterlockedOr8Release _InterlockedOr8_rel
#define InterlockedOr16 _InterlockedOr16
#define InterlockedOr16Acquire _InterlockedOr16_acq
#define InterlockedOr16Release _InterlockedOr16_rel
#define InterlockedOr64 _InterlockedOr64
#define InterlockedOr64Acquire _InterlockedOr64_acq
#define InterlockedOr64Release _InterlockedOr64_rel
#define InterlockedXor _InterlockedXor
#define InterlockedXorAcquire _InterlockedXor_acq
#define InterlockedXorRelease _InterlockedXor_rel
#define InterlockedXor8 _InterlockedXor8
#define InterlockedXor8Acquire _InterlockedXor8_acq
#define InterlockedXor8Release _InterlockedXor8_rel
#define InterlockedXor16 _InterlockedXor16
#define InterlockedXor16Acquire _InterlockedXor16_acq
#define InterlockedXor16Release _InterlockedXor16_rel
#define InterlockedXor64 _InterlockedXor64
#define InterlockedXor64Acquire _InterlockedXor64_acq
#define InterlockedXor64Release _InterlockedXor64_rel
#define InterlockedAnd _InterlockedAnd
#define InterlockedAndAcquire _InterlockedAnd_acq
#define InterlockedAndRelease _InterlockedAnd_rel
#define InterlockedAnd8 _InterlockedAnd8
#define InterlockedAnd8Acquire _InterlockedAnd8_acq
#define InterlockedAnd8Release _InterlockedAnd8_rel
#define InterlockedAnd16 _InterlockedAnd16
#define InterlockedAnd16Acquire _InterlockedAnd16_acq
#define InterlockedAnd16Release _InterlockedAnd16_rel
#define InterlockedAnd64 _InterlockedAnd64
#define InterlockedAnd64Acquire _InterlockedAnd64_acq
#define InterlockedAnd64Release _InterlockedAnd64_rel
LONG
__cdecl
InterlockedOr (
__inout LONG volatile *Destination,
__in LONG Value
);
LONG
__cdecl
InterlockedOrAcquire (
__inout LONG volatile *Destination,
__in LONG Value
);
LONG
__cdecl
InterlockedOrRelease (
__inout LONG volatile *Destination,
__in LONG Value
);
char
__cdecl
InterlockedOr8 (
__inout char volatile *Destination,
__in char Value
);
char
__cdecl
InterlockedOr8Acquire (
__inout char volatile *Destination,
__in char Value
);
char
__cdecl
InterlockedOr8Release (
__inout char volatile *Destination,
__in char Value
);
SHORT
__cdecl
InterlockedOr16(
__inout SHORT volatile *Destination,
__in SHORT Value
);
SHORT
__cdecl
InterlockedOr16Acquire (
__inout SHORT volatile *Destination,
__in SHORT Value
);
SHORT
__cdecl
InterlockedOr16Release (
__inout SHORT volatile *Destination,
__in SHORT Value
);
LONGLONG
__cdecl
InterlockedOr64 (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
);
LONGLONG
__cdecl
InterlockedOr64Acquire (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
);
LONGLONG
__cdecl
InterlockedOr64Release (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
);
LONG
__cdecl
InterlockedXor (
__inout LONG volatile *Destination,
__in LONG Value
);
LONG
__cdecl
InterlockedXorAcquire (
__inout LONG volatile *Destination,
__in LONG Value
);
LONG
__cdecl
InterlockedXorRelease (
__inout LONG volatile *Destination,
__in LONG Value
);
char
__cdecl
InterlockedXor8 (
__inout char volatile *Destination,
__in char Value
);
char
__cdecl
InterlockedXor8Acquire (
__inout char volatile *Destination,
__in char Value
);
char
__cdecl
InterlockedXor8Release (
__inout char volatile *Destination,
__in char Value
);
SHORT
__cdecl
InterlockedXor16(
__inout SHORT volatile *Destination,
__in SHORT Value
);
SHORT
__cdecl
InterlockedXor16Acquire (
__inout SHORT volatile *Destination,
__in SHORT Value
);
SHORT
__cdecl
InterlockedXor16Release (
__inout SHORT volatile *Destination,
__in SHORT Value
);
LONGLONG
__cdecl
InterlockedXor64 (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
);
LONGLONG
__cdecl
InterlockedXor64Acquire (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
);
LONGLONG
__cdecl
InterlockedXor64Release (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
);
LONG
__cdecl
InterlockedAnd (
__inout LONG volatile *Destination,
__in LONG Value
);
LONG
__cdecl
InterlockedAndAcquire (
__inout LONG volatile *Destination,
__in LONG Value
);
LONG
__cdecl
InterlockedAndRelease (
__inout LONG volatile *Destination,
__in LONG Value
);
char
__cdecl
InterlockedAnd8 (
__inout char volatile *Destination,
__in char Value
);
char
__cdecl
InterlockedAnd8Acquire (
__inout char volatile *Destination,
__in char Value
);
char
__cdecl
InterlockedAnd8Release (
__inout char volatile *Destination,
__in char Value
);
SHORT
__cdecl
InterlockedAnd16(
__inout SHORT volatile *Destination,
__in SHORT Value
);
SHORT
__cdecl
InterlockedAnd16Acquire (
__inout SHORT volatile *Destination,
__in SHORT Value
);
SHORT
__cdecl
InterlockedAnd16Release (
__inout SHORT volatile *Destination,
__in SHORT Value
);
LONGLONG
__cdecl
InterlockedAnd64 (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
);
LONGLONG
__cdecl
InterlockedAnd64Acquire (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
);
LONGLONG
__cdecl
InterlockedAnd64Release (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
);
LONGLONG
__cdecl
InterlockedIncrement64 (
__inout LONGLONG volatile *Addend
);
LONGLONG
__cdecl
InterlockedDecrement64 (
__inout LONGLONG volatile *Addend
);
LONG
__cdecl
InterlockedIncrementAcquire (
__inout LONG volatile *Addend
);
LONG
__cdecl
InterlockedDecrementAcquire (
__inout LONG volatile *Addend
);
LONG
__cdecl
InterlockedIncrementRelease (
__inout LONG volatile *Addend
);
LONG
__cdecl
InterlockedDecrementRelease (
__inout LONG volatile *Addend
);
LONGLONG
__cdecl
InterlockedExchange64 (
__inout LONGLONG volatile *Target,
__in LONGLONG Value
);
LONGLONG
__cdecl
InterlockedExchangeAcquire64 (
__inout LONGLONG volatile *Target,
__in LONGLONG Value
);
LONGLONG
__cdecl
InterlockedExchangeAdd64 (
__inout LONGLONG volatile *Addend,
__in LONGLONG Value
);
LONGLONG
__cdecl
InterlockedCompareExchange64 (
__inout LONGLONG volatile *Destination,
__in LONGLONG ExChange,
__in LONGLONG Comperand
);
LONGLONG
__cdecl
InterlockedCompareExchangeAcquire64 (
__inout LONGLONG volatile *Destination,
__in LONGLONG ExChange,
__in LONGLONG Comperand
);
LONGLONG
__cdecl
InterlockedCompareExchangeRelease64 (
__inout LONGLONG volatile *Destination,
__in LONGLONG ExChange,
__in LONGLONG Comperand
);
LONG64
__cdecl
InterlockedCompare64Exchange128(
__inout LONG64 volatile * Destination,
__in LONG64 ExchangeHigh,
__in LONG64 ExchangeLow,
__in LONG64 Comperand
);
LONG64
__cdecl
InterlockedCompare64ExchangeAcquire128(
__inout LONG64 volatile * Destination,
__in LONG64 ExchangeHigh,
__in LONG64 ExchangeLow,
__in LONG64 Comperand
);
LONG64
__cdecl
InterlockedCompare64ExchangeRelease128(
__inout LONG64 volatile * Destination,
__in LONG64 ExchangeHigh,
__in LONG64 ExchangeLow,
__in LONG64 Comperand
);
LONG
__cdecl
InterlockedIncrement (
__inout LONG volatile *lpAddend
);
LONG
__cdecl
InterlockedDecrement (
__inout LONG volatile *lpAddend
);
LONG
__cdecl
InterlockedExchange (
__inout LONG volatile *Target,
__in LONG Value
);
LONG
__cdecl
InterlockedExchangeAdd (
__inout LONG volatile *Addend,
__in LONG Value
);
LONG
__cdecl
InterlockedCompareExchange (
__inout LONG volatile *Destination,
__in LONG ExChange,
__in LONG Comperand
);
LONG
__cdecl
InterlockedCompareExchangeRelease (
__inout LONG volatile *Destination,
__in LONG ExChange,
__in LONG Comperand
);
LONG
__cdecl
InterlockedCompareExchangeAcquire (
__inout LONG volatile *Destination,
__in LONG ExChange,
__in LONG Comperand
);
PVOID
__cdecl
InterlockedExchangePointer (
__inout PVOID volatile *Target,
__in_opt PVOID Value
);
PVOID
__cdecl
InterlockedCompareExchangePointer (
__inout PVOID volatile *Destination,
__in_opt PVOID ExChange,
__in_opt PVOID Comperand
);
PVOID
__cdecl
InterlockedCompareExchangePointerAcquire (
__inout PVOID volatile *Destination,
__in_opt PVOID Exchange,
__in_opt PVOID Comperand
);
PVOID
__cdecl
InterlockedCompareExchangePointerRelease (
__inout PVOID volatile *Destination,
__in_opt PVOID Exchange,
__in_opt PVOID Comperand
);
#if !defined(MIDL_PASS)
#if !defined (InterlockedAnd)
#define InterlockedAnd InterlockedAnd_Inline
FORCEINLINE
LONG
InterlockedAnd_Inline (
__inout LONG volatile *Target,
__in LONG Set
)
{
LONG i;
LONG j;
j = *Target;
do {
i = j;
j = InterlockedCompareExchange(Target,
i & Set,
i);
} while (i != j);
return j;
}
#endif
#if !defined (InterlockedOr)
#define InterlockedOr InterlockedOr_Inline
FORCEINLINE
LONG
InterlockedOr_Inline (
__inout LONG volatile *Target,
__in LONG Set
)
{
LONG i;
LONG j;
j = *Target;
do {
i = j;
j = InterlockedCompareExchange(Target,
i | Set,
i);
} while (i != j);
return j;
}
#endif
#if !defined (InterlockedXor)
#define InterlockedXor InterlockedXor_Inline
FORCEINLINE
LONG
InterlockedXor_Inline (
__inout LONG volatile *Target,
__in LONG Set
)
{
LONG i;
LONG j;
j = *Target;
do {
i = j;
j = InterlockedCompareExchange(Target,
i ^ Set,
i);
} while (i != j);
return j;
}
#endif
#if !defined (InterlockedAnd64)
#define InterlockedAnd64 InterlockedAnd64_Inline
FORCEINLINE
LONGLONG
InterlockedAnd64_Inline (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
)
{
LONGLONG Old;
do {
Old = *Destination;
} while (InterlockedCompareExchange64(Destination,
Old & Value,
Old) != Old);
return Old;
}
#endif
#if !defined (InterlockedOr64)
#define InterlockedOr64 InterlockedOr64_Inline
FORCEINLINE
LONGLONG
InterlockedOr64_Inline (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
)
{
LONGLONG Old;
do {
Old = *Destination;
} while (InterlockedCompareExchange64(Destination,
Old | Value,
Old) != Old);
return Old;
}
#endif
#if !defined (InterlockedXor64)
#define InterlockedXor64 InterlockedXor64_Inline
FORCEINLINE
LONGLONG
InterlockedXor64_Inline (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
)
{
LONGLONG Old;
do {
Old = *Destination;
} while (InterlockedCompareExchange64(Destination,
Old ^ Value,
Old) != Old);
return Old;
}
#endif
#if !defined (InterlockedBitTestAndSet)
#define InterlockedBitTestAndSet InterlockedBitTestAndSet_Inline
FORCEINLINE
BOOLEAN
InterlockedBitTestAndSet_Inline (
__inout LONG volatile *Base,
__in LONG Bit
)
{
LONG tBit;
tBit = 1<<(Bit & (sizeof (*Base)*8-1));
return (BOOLEAN)((InterlockedOr(&Base[Bit/(sizeof(*Base)*8)], tBit)&tBit) !=
0);
}
#endif
#if !defined (InterlockedBitTestAndReset)
#define InterlockedBitTestAndReset InterlockedBitTestAndReset_Inline
FORCEINLINE
BOOLEAN
InterlockedBitTestAndReset_Inline (
__inout LONG volatile *Base,
__in LONG Bit
)
{
LONG tBit;
tBit = 1<<(Bit & (sizeof (*Base)*8-1));
return (BOOLEAN)((InterlockedAnd(&Base[Bit/(sizeof(*Base)*8)], ~tBit)&tBit)
!= 0);
}
#endif
#if !defined (InterlockedBitTestAndComplement)
#define InterlockedBitTestAndComplement InterlockedBitTestAndComplement_Inline
FORCEINLINE
BOOLEAN
InterlockedBitTestAndComplement_Inline (
__inout LONG volatile *Base,
__in LONG Bit
)
{
LONG tBit;
tBit = 1<<(Bit & (sizeof (*Base)*8-1));
return (BOOLEAN)((InterlockedXor(&Base[Bit/(sizeof(*Base)*8)], tBit)&tBit) !
= 0);
}
#endif
#endif
#pragma intrinsic(_InterlockedIncrement)
#pragma intrinsic(_InterlockedIncrement_acq)
#pragma intrinsic(_InterlockedIncrement_rel)
#pragma intrinsic(_InterlockedDecrement)
#pragma intrinsic(_InterlockedDecrement_acq)
#pragma intrinsic(_InterlockedDecrement_rel)
#pragma intrinsic(_InterlockedExchange)
#pragma intrinsic(_InterlockedExchangeAdd)
#pragma intrinsic(_InterlockedCompareExchange)
#pragma intrinsic(_InterlockedCompareExchange_acq)
#pragma intrinsic(_InterlockedCompareExchange_rel)
#pragma intrinsic(_InterlockedExchangePointer)
#pragma intrinsic(_InterlockedCompareExchangePointer)
#pragma intrinsic(_InterlockedCompareExchangePointer_acq)
#pragma intrinsic(_InterlockedCompareExchangePointer_rel)
#pragma intrinsic(_InterlockedIncrement64)
#pragma intrinsic(_InterlockedDecrement64)
#pragma intrinsic(_InterlockedExchange64)
#pragma intrinsic(_InterlockedExchange64_acq)
#pragma intrinsic(_InterlockedCompareExchange64)
#pragma intrinsic(_InterlockedCompareExchange64_acq)
#pragma intrinsic(_InterlockedCompareExchange64_rel)
#pragma intrinsic(_InterlockedExchangeAdd64)
#pragma intrinsic (_InterlockedOr)
#pragma intrinsic (_InterlockedOr_acq)
#pragma intrinsic (_InterlockedOr_rel)
#pragma intrinsic (_InterlockedOr8)
#pragma intrinsic (_InterlockedOr8_acq)
#pragma intrinsic (_InterlockedOr8_rel)
#pragma intrinsic (_InterlockedOr16)
#pragma intrinsic (_InterlockedOr16_acq)
#pragma intrinsic (_InterlockedOr16_rel)
#pragma intrinsic (_InterlockedOr64)
#pragma intrinsic (_InterlockedOr64_acq)
#pragma intrinsic (_InterlockedOr64_rel)
#pragma intrinsic (_InterlockedXor)
#pragma intrinsic (_InterlockedXor_acq)
#pragma intrinsic (_InterlockedXor_rel)
#pragma intrinsic (_InterlockedXor8)
#pragma intrinsic (_InterlockedXor8_acq)
#pragma intrinsic (_InterlockedXor8_rel)
#pragma intrinsic (_InterlockedXor16)
#pragma intrinsic (_InterlockedXor16_acq)
#pragma intrinsic (_InterlockedXor16_rel)
#pragma intrinsic (_InterlockedXor64)
#pragma intrinsic (_InterlockedXor64_acq)
#pragma intrinsic (_InterlockedXor64_rel)
#pragma intrinsic (_InterlockedAnd)
#pragma intrinsic (_InterlockedAnd_acq)
#pragma intrinsic (_InterlockedAnd_rel)
#pragma intrinsic (_InterlockedAnd8)
#pragma intrinsic (_InterlockedAnd8_acq)
#pragma intrinsic (_InterlockedAnd8_rel)
#pragma intrinsic (_InterlockedAnd16)
#pragma intrinsic (_InterlockedAnd16_acq)
#pragma intrinsic (_InterlockedAnd16_rel)
#pragma intrinsic (_InterlockedAnd64)
#pragma intrinsic (_InterlockedAnd64_acq)
#pragma intrinsic (_InterlockedAnd64_rel)
#elif defined(_M_AMD64) && !defined(RC_INVOKED)
#define InterlockedAnd _InterlockedAnd
#define InterlockedOr _InterlockedOr
#define InterlockedXor _InterlockedXor
#define InterlockedIncrement _InterlockedIncrement
#define InterlockedIncrementAcquire InterlockedIncrement
#define InterlockedIncrementRelease InterlockedIncrement
#define InterlockedDecrement _InterlockedDecrement
#define InterlockedDecrementAcquire InterlockedDecrement
#define InterlockedDecrementRelease InterlockedDecrement
#define InterlockedExchange _InterlockedExchange
#define InterlockedExchangeAdd _InterlockedExchangeAdd
#define InterlockedCompareExchange _InterlockedCompareExchange
#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
#define InterlockedCompareExchangeRelease InterlockedCompareExchange
#define InterlockedExchangePointer _InterlockedExchangePointer
#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePoin
ter
#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePoin
ter
#define InterlockedAnd64 _InterlockedAnd64
#define InterlockedOr64 _InterlockedOr64
#define InterlockedXor64 _InterlockedXor64
#define InterlockedIncrement64 _InterlockedIncrement64
#define InterlockedDecrement64 _InterlockedDecrement64
#define InterlockedExchange64 _InterlockedExchange64
#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
#define InterlockedCompareExchange64 _InterlockedCompareExchange64
#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
LONG
InterlockedAnd (
__inout LONG volatile *Destination,
__in LONG Value
);
LONG
InterlockedOr (
__inout LONG volatile *Destination,
__in LONG Value
);
LONG
InterlockedXor (
__inout LONG volatile *Destination,
__in LONG Value
);
LONG
InterlockedIncrement (
__inout LONG volatile *Addend
);
LONG
InterlockedDecrement (
__inout LONG volatile *Addend
);
LONG
InterlockedExchange (
__inout LONG volatile *Target,
__in LONG Value
);
LONG
InterlockedExchangeAdd (
__inout LONG volatile *Addend,
__in LONG Value
);
LONG
InterlockedCompareExchange (
__inout LONG volatile *Destination,
__in LONG ExChange,
__in LONG Comperand
);
PVOID
InterlockedCompareExchangePointer (
__inout PVOID volatile *Destination,
__in_opt PVOID Exchange,
__in_opt PVOID Comperand
);
PVOID
InterlockedExchangePointer (
__inout PVOID volatile *Target,
__in_opt PVOID Value
);
LONG64
InterlockedAnd64 (
__inout LONG64 volatile *Destination,
__in LONG64 Value
);
LONG64
InterlockedOr64 (
__inout LONG64 volatile *Destination,
__in LONG64 Value
);
LONG64
InterlockedXor64 (
__inout LONG64 volatile *Destination,
__in LONG64 Value
);
LONG64
InterlockedIncrement64 (
__inout LONG64 volatile *Addend
);
LONG64
InterlockedDecrement64 (
__inout LONG64 volatile *Addend
);
LONG64
InterlockedExchange64 (
__inout LONG64 volatile *Target,
__in LONG64 Value
);
LONG64
InterlockedExchangeAdd64 (
__inout LONG64 volatile *Addend,
__in LONG64 Value
);
LONG64
InterlockedCompareExchange64 (
__inout LONG64 volatile *Destination,
__in LONG64 ExChange,
__in LONG64 Comperand
);
#pragma intrinsic(_InterlockedAnd)
#pragma intrinsic(_InterlockedOr)
#pragma intrinsic(_InterlockedXor)
#pragma intrinsic(_InterlockedIncrement)
#pragma intrinsic(_InterlockedDecrement)
#pragma intrinsic(_InterlockedExchange)
#pragma intrinsic(_InterlockedExchangeAdd)
#pragma intrinsic(_InterlockedCompareExchange)
#pragma intrinsic(_InterlockedExchangePointer)
#pragma intrinsic(_InterlockedCompareExchangePointer)
#pragma intrinsic(_InterlockedAnd64)
#pragma intrinsic(_InterlockedOr64)
#pragma intrinsic(_InterlockedXor64)
#pragma intrinsic(_InterlockedIncrement64)
#pragma intrinsic(_InterlockedDecrement64)
#pragma intrinsic(_InterlockedExchange64)
#pragma intrinsic(_InterlockedExchangeAdd64)
#pragma intrinsic(_InterlockedCompareExchange64)
#if _MSC_FULL_VER >= 140041204
#define InterlockedAnd8 _InterlockedAnd8
#define InterlockedOr8 _InterlockedOr8
#define InterlockedXor8 _InterlockedXor8
#define InterlockedAnd16 _InterlockedAnd16
#define InterlockedOr16 _InterlockedOr16
#define InterlockedXor16 _InterlockedXor16
char
InterlockedAnd8 (
__inout char volatile *Destination,
__in char Value
);
char
InterlockedOr8 (
__inout char volatile *Destination,
__in char Value
);
char
InterlockedXor8 (
__inout char volatile *Destination,
__in char Value
);
SHORT
InterlockedAnd16(
__inout SHORT volatile *Destination,
__in SHORT Value
);
SHORT
InterlockedOr16(
__inout SHORT volatile *Destination,
__in SHORT Value
);
SHORT
InterlockedXor16(
__inout SHORT volatile *Destination,
__in SHORT Value
);
#pragma intrinsic (_InterlockedAnd8)
#pragma intrinsic (_InterlockedOr8)
#pragma intrinsic (_InterlockedXor8)
#pragma intrinsic (_InterlockedAnd16)
#pragma intrinsic (_InterlockedOr16)
#pragma intrinsic (_InterlockedXor16)
#endif
#else // X86 interlocked definitions
WINBASEAPI
LONG
WINAPI
InterlockedIncrement (
__inout LONG volatile *lpAddend
);
WINBASEAPI
LONG
WINAPI
InterlockedDecrement (
__inout LONG volatile *lpAddend
);
WINBASEAPI
LONG
WINAPI
InterlockedExchange (
__inout LONG volatile *Target,
__in LONG Value
);
#define InterlockedExchangePointer(Target, Value) \
(PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value))
WINBASEAPI
LONG
WINAPI
InterlockedExchangeAdd (
__inout LONG volatile *Addend,
__in LONG Value
);
WINBASEAPI
LONG
WINAPI
InterlockedCompareExchange (
__inout LONG volatile *Destination,
__in LONG Exchange,
__in LONG Comperand
);
#if (_WIN32_WINNT >= 0x0502)
WINBASEAPI
LONGLONG
WINAPI
InterlockedCompareExchange64 (
__inout LONGLONG volatile *Destination,
__in LONGLONG Exchange,
__in LONGLONG Comperand
);
#endif
#if !defined(MIDL_PASS)
#if (_WIN32_WINNT >= 0x0502)
FORCEINLINE
LONGLONG
InterlockedAnd64 (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
)
{
LONGLONG Old;
do {
Old = *Destination;
} while (InterlockedCompareExchange64(Destination,
Old & Value,
Old) != Old);
return Old;
}
FORCEINLINE
LONGLONG
InterlockedOr64 (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
)
{
LONGLONG Old;
do {
Old = *Destination;
} while (InterlockedCompareExchange64(Destination,
Old | Value,
Old) != Old);
return Old;
}
FORCEINLINE
LONGLONG
InterlockedXor64 (
__inout LONGLONG volatile *Destination,
__in LONGLONG Value
)
{
LONGLONG Old;
do {
Old = *Destination;
} while (InterlockedCompareExchange64(Destination,
Old ^ Value,
Old) != Old);
return Old;
}
FORCEINLINE
LONGLONG
InterlockedIncrement64 (
__inout LONGLONG volatile *Addend
)
{
LONGLONG Old;
do {
Old = *Addend;
} while (InterlockedCompareExchange64(Addend,
Old + 1,
Old) != Old);
return Old + 1;
}
FORCEINLINE
LONGLONG
InterlockedDecrement64 (
__inout LONGLONG volatile *Addend
)
{
LONGLONG Old;
do {
Old = *Addend;
} while (InterlockedCompareExchange64(Addend,
Old - 1,
Old) != Old);
return Old - 1;
}
FORCEINLINE
LONGLONG
InterlockedExchange64 (
__inout LONGLONG volatile *Target,
__in LONGLONG Value
)
{
LONGLONG Old;
do {
Old = *Target;
} while (InterlockedCompareExchange64(Target,
Value,
Old) != Old);
return Old;
}
FORCEINLINE
LONGLONG
InterlockedExchangeAdd64(
__inout LONGLONG volatile *Addend,
__in LONGLONG Value
)
{
LONGLONG Old;
do {
Old = *Addend;
} while (InterlockedCompareExchange64(Addend,
Old + Value,
Old) != Old);
return Old;
}
#endif
#endif
//
// Use a function for C++ so X86 will generate the same errors as RISC.
//
#ifdef __cplusplus
FORCEINLINE
PVOID
#if !defined(_M_CEE_PURE)
__cdecl
#endif
__InlineInterlockedCompareExchangePointer (
__inout PVOID volatile *Destination,
__in_opt PVOID ExChange,
__in_opt PVOID Comperand
)
{
return((PVOID)(LONG_PTR)InterlockedCompareExchange((LONG volatile *)Destinat
ion, (LONG)(LONG_PTR)ExChange, (LONG)(LONG_PTR)Comperand));
}
#define InterlockedCompareExchangePointer __InlineInterlockedCompareExchangePoin
ter
#else
#define InterlockedCompareExchangePointer(Destination, ExChange, Comperand) \
(PVOID)(LONG_PTR)InterlockedCompareExchange((LONG volatile *)(Destination),
(LONG)(LONG_PTR)(ExChange), (LONG)(LONG_PTR)(Comperand))
#endif /* __cplusplus */
#define InterlockedIncrementAcquire InterlockedIncrement
#define InterlockedIncrementRelease InterlockedIncrement
#define InterlockedDecrementAcquire InterlockedDecrement
#define InterlockedDecrementRelease InterlockedDecrement
#define InterlockedIncrementAcquire InterlockedIncrement
#define InterlockedIncrementRelease InterlockedIncrement
#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
#define InterlockedCompareExchangeRelease InterlockedCompareExchange
#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
#define InterlockedCompareExchangePointerAcquire InterlockedCompareExchangePoint
er
#define InterlockedCompareExchangePointerRelease InterlockedCompareExchangePoint
er
#endif /* X86 | IA64 */
#if defined(_SLIST_HEADER_) && !defined(_NTOSP_)
WINBASEAPI
VOID
WINAPI
InitializeSListHead (
__inout PSLIST_HEADER ListHead
);
WINBASEAPI
PSLIST_ENTRY
WINAPI
InterlockedPopEntrySList (
__inout PSLIST_HEADER ListHead
);
WINBASEAPI
PSLIST_ENTRY
WINAPI
InterlockedPushEntrySList (
__inout PSLIST_HEADER ListHead,
__inout PSLIST_ENTRY ListEntry
);
WINBASEAPI
PSLIST_ENTRY
WINAPI
InterlockedFlushSList (
__inout PSLIST_HEADER ListHead
);
WINBASEAPI
USHORT
WINAPI
QueryDepthSList (
__in PSLIST_HEADER ListHead
);
#endif /* _SLIST_HEADER_ */
#endif /* _NTOS_ */
#endif /* NOWINBASEINTERLOCK */
WINBASEAPI
BOOL
WINAPI
FreeResource(
__in HGLOBAL hResData
);
WINBASEAPI
LPVOID
WINAPI
LockResource(
__in HGLOBAL hResData
);
#define UnlockResource(hResData) ((hResData), 0) #define UnlockResource(hResData) ((hResData), 0)
#define MAXINTATOM 0xC000 #define MAXINTATOM 0xC000
#define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i))) #define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i)))
#define INVALID_ATOM ((ATOM)0) #define INVALID_ATOM ((ATOM)0)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
int int
#if !defined(_MAC) #if !defined(_MAC)
#if defined(_M_CEE_PURE) #if defined(_M_CEE_PURE)
__clrcall __clrcall
#else #else
WINAPI WINAPI
#endif #endif
#else #else
CALLBACK CALLBACK
#endif #endif
WinMain ( WinMain (
__in HINSTANCE hInstance, _In_ HINSTANCE hInstance,
__in_opt HINSTANCE hPrevInstance, _In_opt_ HINSTANCE hPrevInstance,
__in LPSTR lpCmdLine, _In_ LPSTR lpCmdLine,
__in int nShowCmd _In_ int nShowCmd
); );
int int
#if defined(_M_CEE_PURE) #if defined(_M_CEE_PURE)
__clrcall __clrcall
#else #else
WINAPI WINAPI
#endif #endif
wWinMain( wWinMain(
__in HINSTANCE hInstance, _In_ HINSTANCE hInstance,
__in_opt HINSTANCE hPrevInstance, _In_opt_ HINSTANCE hPrevInstance,
__in LPWSTR lpCmdLine, _In_ LPWSTR lpCmdLine,
__in int nShowCmd _In_ int nShowCmd
);
WINBASEAPI
BOOL
WINAPI
FreeLibrary (
__in HMODULE hLibModule
);
WINBASEAPI
DECLSPEC_NORETURN
VOID
WINAPI
FreeLibraryAndExitThread (
__in HMODULE hLibModule,
__in DWORD dwExitCode
);
WINBASEAPI
BOOL
WINAPI
DisableThreadLibraryCalls (
__in HMODULE hLibModule
);
WINBASEAPI
FARPROC
WINAPI
GetProcAddress (
__in HMODULE hModule,
__in LPCSTR lpProcName
);
WINBASEAPI
DWORD
WINAPI
GetVersion (
VOID
); );
WINBASEAPI WINBASEAPI
__out_opt _Success_(return != NULL)
_Post_writable_byte_size_(dwBytes)
HGLOBAL HGLOBAL
WINAPI WINAPI
GlobalAlloc ( GlobalAlloc(
__in UINT uFlags, _In_ UINT uFlags,
__in SIZE_T dwBytes _In_ SIZE_T dwBytes
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_reallocated_bytes_(hMem, dwBytes)
HGLOBAL HGLOBAL
WINAPI WINAPI
GlobalReAlloc ( GlobalReAlloc (
__in HGLOBAL hMem, _Frees_ptr_ HGLOBAL hMem,
__in SIZE_T dwBytes, _In_ SIZE_T dwBytes,
__in UINT uFlags _In_ UINT uFlags
); );
WINBASEAPI WINBASEAPI
SIZE_T SIZE_T
WINAPI WINAPI
GlobalSize ( GlobalSize (
__in HGLOBAL hMem _In_ HGLOBAL hMem
); );
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
GlobalFlags ( GlobalFlags (
__in HGLOBAL hMem _In_ HGLOBAL hMem
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
LPVOID LPVOID
WINAPI WINAPI
GlobalLock ( GlobalLock (
__in HGLOBAL hMem _In_ HGLOBAL hMem
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HGLOBAL HGLOBAL
WINAPI WINAPI
GlobalHandle ( GlobalHandle (
__in LPCVOID pMem _In_ LPCVOID pMem
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GlobalUnlock( GlobalUnlock(
__in HGLOBAL hMem _In_ HGLOBAL hMem
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
_Success_(return==0)
HGLOBAL HGLOBAL
WINAPI WINAPI
GlobalFree( GlobalFree(
__deref HGLOBAL hMem _Frees_ptr_opt_ HGLOBAL hMem
); );
WINBASEAPI WINBASEAPI
SIZE_T SIZE_T
WINAPI WINAPI
GlobalCompact( GlobalCompact(
__in DWORD dwMinFree _In_ DWORD dwMinFree
); );
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
GlobalFix( GlobalFix(
__in HGLOBAL hMem _In_ HGLOBAL hMem
); );
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
GlobalUnfix( GlobalUnfix(
__in HGLOBAL hMem _In_ HGLOBAL hMem
); );
WINBASEAPI WINBASEAPI
__out
LPVOID LPVOID
WINAPI WINAPI
GlobalWire( GlobalWire(
__in HGLOBAL hMem _In_ HGLOBAL hMem
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GlobalUnWire( GlobalUnWire(
__in HGLOBAL hMem _In_ HGLOBAL hMem
); );
__drv_preferredFunction("GlobalMemoryStatusEx","Deprecated. See MSDN for details ")
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
GlobalMemoryStatus( GlobalMemoryStatus(
__out LPMEMORYSTATUS lpBuffer _Out_ LPMEMORYSTATUS lpBuffer
);
typedef struct _MEMORYSTATUSEX {
DWORD dwLength;
DWORD dwMemoryLoad;
DWORDLONG ullTotalPhys;
DWORDLONG ullAvailPhys;
DWORDLONG ullTotalPageFile;
DWORDLONG ullAvailPageFile;
DWORDLONG ullTotalVirtual;
DWORDLONG ullAvailVirtual;
DWORDLONG ullAvailExtendedVirtual;
} MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
WINBASEAPI
BOOL
WINAPI
GlobalMemoryStatusEx(
__out LPMEMORYSTATUSEX lpBuffer
); );
WINBASEAPI WINBASEAPI
__out_bcount_opt( (uFlags&LMEM_FIXED) ? uBytes : 0 ) _Success_(return != NULL)
_Post_writable_byte_size_(uBytes)
HLOCAL HLOCAL
WINAPI WINAPI
LocalAlloc( LocalAlloc(
__in UINT uFlags, _In_ UINT uFlags,
__in SIZE_T uBytes _In_ SIZE_T uBytes
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_reallocated_bytes_(hMem, uBytes)
HLOCAL HLOCAL
WINAPI WINAPI
LocalReAlloc( LocalReAlloc(
__in HLOCAL hMem, _Frees_ptr_opt_ HLOCAL hMem,
__in SIZE_T uBytes, _In_ SIZE_T uBytes,
__in UINT uFlags _In_ UINT uFlags
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
LPVOID LPVOID
WINAPI WINAPI
LocalLock( LocalLock(
__in HLOCAL hMem _In_ HLOCAL hMem
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HLOCAL HLOCAL
WINAPI WINAPI
LocalHandle( LocalHandle(
__in LPCVOID pMem _In_ LPCVOID pMem
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
LocalUnlock( LocalUnlock(
__in HLOCAL hMem _In_ HLOCAL hMem
); );
WINBASEAPI WINBASEAPI
SIZE_T SIZE_T
WINAPI WINAPI
LocalSize( LocalSize(
__in HLOCAL hMem _In_ HLOCAL hMem
); );
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
LocalFlags( LocalFlags(
__in HLOCAL hMem _In_ HLOCAL hMem
); );
WINBASEAPI WINBASEAPI
_Success_(return==0)
_Ret_maybenull_
HLOCAL HLOCAL
WINAPI WINAPI
LocalFree( LocalFree(
__deref HLOCAL hMem _Frees_ptr_opt_ HLOCAL hMem
); );
WINBASEAPI WINBASEAPI
SIZE_T SIZE_T
WINAPI WINAPI
LocalShrink( LocalShrink(
__in HLOCAL hMem, _In_ HLOCAL hMem,
__in UINT cbNewSize _In_ UINT cbNewSize
); );
WINBASEAPI WINBASEAPI
SIZE_T SIZE_T
WINAPI WINAPI
LocalCompact( LocalCompact(
__in UINT uMinFree _In_ UINT uMinFree
);
WINBASEAPI
BOOL
WINAPI
FlushInstructionCache(
__in HANDLE hProcess,
__in_bcount_opt(dwSize) LPCVOID lpBaseAddress,
__in SIZE_T dwSize
);
#if (_WIN32_WINNT >= 0x0600)
WINBASEAPI
VOID
WINAPI
FlushProcessWriteBuffers(
VOID
);
WINBASEAPI
BOOL
WINAPI
QueryThreadCycleTime (
__in HANDLE ThreadHandle,
__out PULONG64 CycleTime
);
WINBASEAPI
BOOL
WINAPI
QueryProcessCycleTime (
__in HANDLE ProcessHandle,
__out PULONG64 CycleTime
);
WINBASEAPI
BOOL
WINAPI
QueryIdleProcessorCycleTime (
__inout PULONG BufferLength,
__out_bcount_opt(*BufferLength) PULONG64 ProcessorIdleCycleTime
); );
#endif
#if (_WIN32_WINNT >= 0x0601) #if (_WIN32_WINNT >= 0x0601)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
QueryIdleProcessorCycleTimeEx (
__in USHORT Group,
__inout PULONG BufferLength,
__out_bcount_opt(*BufferLength) PULONG64 ProcessorIdleCycleTime
);
WINBASEAPI
BOOL
WINAPI
QueryUnbiasedInterruptTime (
__out PULONGLONG UnbiasedTime
);
WINBASEAPI
BOOL
WINAPI
GetProcessorSystemCycleTime ( GetProcessorSystemCycleTime (
__in USHORT Group, _In_ USHORT Group,
__out_bcount_part_opt(*ReturnedLength, *ReturnedLength) PSYSTEM_PROCESSOR_CY _Out_writes_bytes_to_opt_(*ReturnedLength, *ReturnedLength) PSYSTEM_PROCESSO
CLE_TIME_INFORMATION Buffer, R_CYCLE_TIME_INFORMATION Buffer,
__inout PDWORD ReturnedLength _Inout_ PDWORD ReturnedLength
); );
#endif // (_WIN32_WINNT >= 0x0601) #endif // (_WIN32_WINNT >= 0x0601)
WINBASEAPI
__bcount_opt(dwSize)
LPVOID
WINAPI
VirtualAlloc(
__in_opt LPVOID lpAddress,
__in SIZE_T dwSize,
__in DWORD flAllocationType,
__in DWORD flProtect
);
__drv_when(((dwFreeType&(MEM_RELEASE|MEM_DECOMMIT)))==(MEM_RELEASE|MEM_DECOMMIT)
,
__drv_reportError("Passing both MEM_RELEASE and MEM_DECOMMIT to VirtualFree
is not allowed. This results in the failure of this call"))
__drv_when(dwFreeType==0,
__drv_reportError("Passing zero as the dwFreeType parameter to VirtualFree i
s not allowed. This results in the failure of this call"))
__drv_when(((dwFreeType&MEM_RELEASE))!=0 && dwSize!=0,
__drv_reportError("Passing MEM_RELEASE and a non-zero dwSize parameter to Vi
rtualFree is not allowed. This results in the failure of this call"))
WINBASEAPI
BOOL
WINAPI
VirtualFree(
__in LPVOID lpAddress,
__in SIZE_T dwSize,
__in DWORD dwFreeType
);
WINBASEAPI
BOOL
WINAPI
VirtualProtect(
__in LPVOID lpAddress,
__in SIZE_T dwSize,
__in DWORD flNewProtect,
__out PDWORD lpflOldProtect
);
WINBASEAPI
SIZE_T
WINAPI
VirtualQuery(
__in_opt LPCVOID lpAddress,
__out_bcount_part(dwLength, return) PMEMORY_BASIC_INFORMATION lpBuffer,
__in SIZE_T dwLength
);
WINBASEAPI
__bcount_opt(dwSize)
LPVOID
WINAPI
VirtualAllocEx(
__in HANDLE hProcess,
__in_opt LPVOID lpAddress,
__in SIZE_T dwSize,
__in DWORD flAllocationType,
__in DWORD flProtect
);
#if _WIN32_WINNT >= 0x0600
WINBASEAPI
__bcount(dwSize)
LPVOID
WINAPI
VirtualAllocExNuma(
__in HANDLE hProcess,
__in_opt LPVOID lpAddress,
__in SIZE_T dwSize,
__in DWORD flAllocationType,
__in DWORD flProtect,
__in DWORD nndPreferred
);
#endif // _WIN32_WINNT >= 0x0600
WINBASEAPI
UINT
WINAPI
GetWriteWatch(
__in DWORD dwFlags,
__in PVOID lpBaseAddress,
__in SIZE_T dwRegionSize,
__out_ecount_part(*lpdwCount, *lpdwCount) PVOID *lpAddresses,
__inout ULONG_PTR *lpdwCount,
__out PULONG lpdwGranularity
);
WINBASEAPI
UINT
WINAPI
ResetWriteWatch(
__in LPVOID lpBaseAddress,
__in SIZE_T dwRegionSize
);
WINBASEAPI
SIZE_T
WINAPI
GetLargePageMinimum(
VOID
);
WINBASEAPI
UINT
WINAPI
EnumSystemFirmwareTables(
__in DWORD FirmwareTableProviderSignature,
__out_bcount_part_opt(BufferSize, return) PVOID pFirmwareTableEnumBuffer,
__in DWORD BufferSize
);
WINBASEAPI
UINT
WINAPI
GetSystemFirmwareTable(
__in DWORD FirmwareTableProviderSignature,
__in DWORD FirmwareTableID,
__out_bcount_part_opt(BufferSize, return) PVOID pFirmwareTableBuffer,
__in DWORD BufferSize
);
WINBASEAPI
BOOL
WINAPI
GetPhysicallyInstalledSystemMemory(
__out PULONGLONG TotalMemoryInKilobytes
);
__drv_when(((dwFreeType&(MEM_RELEASE|MEM_DECOMMIT)))==(MEM_RELEASE|MEM_DECOMMIT)
,
__drv_reportError("Passing both MEM_RELEASE and MEM_DECOMMIT to VirtualFree
is not allowed. This results in the failure of this call"))
__drv_when(dwFreeType==0,
__drv_reportError("Passing zero as the dwFreeType parameter to VirtualFree i
s not allowed. This results in the failure of this call"))
__drv_when(((dwFreeType&MEM_RELEASE))!=0 && dwSize!=0,
__drv_reportError("Passing MEM_RELEASE and a non-zero dwSize parameter to Vi
rtualFree is not allowed. This results in the failure of this call"))
__drv_when(((dwFreeType&MEM_DECOMMIT))!=0,
__drv_reportError("Calling VirtualFreeEx without the MEM_RELEASE flag frees
memory but not address descriptors (VADs); results in address space leaks"))
WINBASEAPI
BOOL
WINAPI
VirtualFreeEx(
__in HANDLE hProcess,
__in LPVOID lpAddress,
__in SIZE_T dwSize,
__in DWORD dwFreeType
);
WINBASEAPI
BOOL
WINAPI
VirtualProtectEx(
__in HANDLE hProcess,
__in LPVOID lpAddress,
__in SIZE_T dwSize,
__in DWORD flNewProtect,
__out PDWORD lpflOldProtect
);
WINBASEAPI
SIZE_T
WINAPI
VirtualQueryEx(
__in HANDLE hProcess,
__in_opt LPCVOID lpAddress,
__out_bcount_part(dwLength, return) PMEMORY_BASIC_INFORMATION lpBuffer,
__in SIZE_T dwLength
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
HeapCreate(
__in DWORD flOptions,
__in SIZE_T dwInitialSize,
__in SIZE_T dwMaximumSize
);
WINBASEAPI
BOOL
WINAPI
HeapDestroy(
__in HANDLE hHeap
);
WINBASEAPI
__bcount(dwBytes)
LPVOID
WINAPI
HeapAlloc(
__in HANDLE hHeap,
__in DWORD dwFlags,
__in SIZE_T dwBytes
);
WINBASEAPI
__bcount(dwBytes)
LPVOID
WINAPI
HeapReAlloc(
__inout HANDLE hHeap,
__in DWORD dwFlags,
__deref LPVOID lpMem,
__in SIZE_T dwBytes
);
WINBASEAPI
BOOL
WINAPI
HeapFree(
__inout HANDLE hHeap,
__in DWORD dwFlags,
__drv_freesMem(Mem) __post __notvalid __deref LPVOID lpMem
);
WINBASEAPI
SIZE_T
WINAPI
HeapSize(
__in HANDLE hHeap,
__in DWORD dwFlags,
__in LPCVOID lpMem
);
WINBASEAPI
BOOL
WINAPI
HeapValidate(
__in HANDLE hHeap,
__in DWORD dwFlags,
__in_opt LPCVOID lpMem
);
WINBASEAPI
SIZE_T
WINAPI
HeapCompact(
__in HANDLE hHeap,
__in DWORD dwFlags
);
WINBASEAPI
__out
HANDLE
WINAPI
GetProcessHeap( VOID );
WINBASEAPI
DWORD
WINAPI
GetProcessHeaps(
__in DWORD NumberOfHeaps,
__out_ecount_part(NumberOfHeaps, return) PHANDLE ProcessHeaps
);
typedef struct _PROCESS_HEAP_ENTRY {
PVOID lpData;
DWORD cbData;
BYTE cbOverhead;
BYTE iRegionIndex;
WORD wFlags;
union {
struct {
HANDLE hMem;
DWORD dwReserved[ 3 ];
} Block;
struct {
DWORD dwCommittedSize;
DWORD dwUnCommittedSize;
LPVOID lpFirstBlock;
LPVOID lpLastBlock;
} Region;
} DUMMYUNIONNAME;
} PROCESS_HEAP_ENTRY, *LPPROCESS_HEAP_ENTRY, *PPROCESS_HEAP_ENTRY;
#define PROCESS_HEAP_REGION 0x0001
#define PROCESS_HEAP_UNCOMMITTED_RANGE 0x0002
#define PROCESS_HEAP_ENTRY_BUSY 0x0004
#define PROCESS_HEAP_ENTRY_MOVEABLE 0x0010
#define PROCESS_HEAP_ENTRY_DDESHARE 0x0020
WINBASEAPI
BOOL
WINAPI
HeapLock(
__in HANDLE hHeap
);
WINBASEAPI
BOOL
WINAPI
HeapUnlock(
__in HANDLE hHeap
);
WINBASEAPI
BOOL
WINAPI
HeapWalk(
__in HANDLE hHeap,
__inout LPPROCESS_HEAP_ENTRY lpEntry
);
WINBASEAPI
BOOL
WINAPI
HeapSetInformation (
__in_opt HANDLE HeapHandle,
__in HEAP_INFORMATION_CLASS HeapInformationClass,
__in_bcount_opt(HeapInformationLength) PVOID HeapInformation,
__in SIZE_T HeapInformationLength
);
WINBASEAPI
BOOL
WINAPI
HeapQueryInformation (
__in_opt HANDLE HeapHandle,
__in HEAP_INFORMATION_CLASS HeapInformationClass,
__out_bcount_part_opt(HeapInformationLength, *ReturnLength) PVOID HeapInform
ation,
__in SIZE_T HeapInformationLength,
__out_opt PSIZE_T ReturnLength
);
// GetBinaryType return values. // GetBinaryType return values.
#define SCS_32BIT_BINARY 0 #define SCS_32BIT_BINARY 0
#define SCS_DOS_BINARY 1 #define SCS_DOS_BINARY 1
#define SCS_WOW_BINARY 2 #define SCS_WOW_BINARY 2
#define SCS_PIF_BINARY 3 #define SCS_PIF_BINARY 3
#define SCS_POSIX_BINARY 4 #define SCS_POSIX_BINARY 4
#define SCS_OS216_BINARY 5 #define SCS_OS216_BINARY 5
#define SCS_64BIT_BINARY 6 #define SCS_64BIT_BINARY 6
#if defined(_WIN64) #if defined(_WIN64)
# define SCS_THIS_PLATFORM_BINARY SCS_64BIT_BINARY # define SCS_THIS_PLATFORM_BINARY SCS_64BIT_BINARY
#else #else
# define SCS_THIS_PLATFORM_BINARY SCS_32BIT_BINARY # define SCS_THIS_PLATFORM_BINARY SCS_32BIT_BINARY
#endif #endif
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetBinaryTypeA( GetBinaryTypeA(
__in LPCSTR lpApplicationName, _In_ LPCSTR lpApplicationName,
__out LPDWORD lpBinaryType _Out_ LPDWORD lpBinaryType
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetBinaryTypeW( GetBinaryTypeW(
__in LPCWSTR lpApplicationName, _In_ LPCWSTR lpApplicationName,
__out LPDWORD lpBinaryType _Out_ LPDWORD lpBinaryType
); );
#ifdef UNICODE #ifdef UNICODE
#define GetBinaryType GetBinaryTypeW #define GetBinaryType GetBinaryTypeW
#else #else
#define GetBinaryType GetBinaryTypeA #define GetBinaryType GetBinaryTypeA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
_Success_(return != 0 && return < cchBuffer)
DWORD DWORD
WINAPI WINAPI
GetShortPathNameA( GetShortPathNameA(
__in LPCSTR lpszLongPath, _In_ LPCSTR lpszLongPath,
__out_ecount_part_opt(cchBuffer, return + 1) LPSTR lpszShortPath, _Out_writes_to_opt_(cchBuffer, return + 1) LPSTR lpszShortPath,
__in DWORD cchBuffer _In_ DWORD cchBuffer
);
WINBASEAPI
DWORD
WINAPI
GetShortPathNameW(
__in LPCWSTR lpszLongPath,
__out_ecount_part_opt(cchBuffer, return + 1) LPWSTR lpszShortPath,
__in DWORD cchBuffer
); );
#ifdef UNICODE #ifndef UNICODE
#define GetShortPathName GetShortPathNameW
#else
#define GetShortPathName GetShortPathNameA #define GetShortPathName GetShortPathNameA
#endif // !UNICODE #endif
WINBASEAPI
DWORD
WINAPI
GetLongPathNameA(
__in LPCSTR lpszShortPath,
__out_ecount_part_opt(cchBuffer, return + 1) LPSTR lpszLongPath,
__in DWORD cchBuffer
);
WINBASEAPI
DWORD
WINAPI
GetLongPathNameW(
__in LPCWSTR lpszShortPath,
__out_ecount_part_opt(cchBuffer, return + 1) LPWSTR lpszLongPath,
__in DWORD cchBuffer
);
#ifdef UNICODE
#define GetLongPathName GetLongPathNameW
#else
#define GetLongPathName GetLongPathNameA
#endif // !UNICODE
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
_Success_(return != 0 && return < cchBuffer)
DWORD DWORD
WINAPI WINAPI
GetLongPathNameTransactedA( GetLongPathNameTransactedA(
__in LPCSTR lpszShortPath, _In_ LPCSTR lpszShortPath,
__out_ecount_part_opt(cchBuffer, return + 1) LPSTR lpszLongPath, _Out_writes_to_opt_(cchBuffer, return + 1) LPSTR lpszLongPath,
__in DWORD cchBuffer, _In_ DWORD cchBuffer,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
_Success_(return != 0 && return < cchBuffer)
DWORD DWORD
WINAPI WINAPI
GetLongPathNameTransactedW( GetLongPathNameTransactedW(
__in LPCWSTR lpszShortPath, _In_ LPCWSTR lpszShortPath,
__out_ecount_part_opt(cchBuffer, return + 1) LPWSTR lpszLongPath, _Out_writes_to_opt_(cchBuffer, return + 1) LPWSTR lpszLongPath,
__in DWORD cchBuffer, _In_ DWORD cchBuffer,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define GetLongPathNameTransacted GetLongPathNameTransactedW #define GetLongPathNameTransacted GetLongPathNameTransactedW
#else #else
#define GetLongPathNameTransacted GetLongPathNameTransactedA #define GetLongPathNameTransacted GetLongPathNameTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600 #endif // _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetProcessAffinityMask( GetProcessAffinityMask(
__in HANDLE hProcess, _In_ HANDLE hProcess,
__out PDWORD_PTR lpProcessAffinityMask, _Out_ PDWORD_PTR lpProcessAffinityMask,
__out PDWORD_PTR lpSystemAffinityMask _Out_ PDWORD_PTR lpSystemAffinityMask
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetProcessAffinityMask( SetProcessAffinityMask(
__in HANDLE hProcess, _In_ HANDLE hProcess,
__in DWORD_PTR dwProcessAffinityMask _In_ DWORD_PTR dwProcessAffinityMask
);
#if _WIN32_WINNT >= 0x0601
BOOL
WINAPI
GetProcessGroupAffinity(
__in HANDLE hProcess,
__inout PUSHORT GroupCount,
__out_ecount(*GroupCount) PUSHORT GroupArray
);
#endif // _WIN32_WINNT >= 0x0601
#if _WIN32_WINNT >= 0x0501
WINBASEAPI
BOOL
WINAPI
GetProcessHandleCount(
__in HANDLE hProcess,
__out PDWORD pdwHandleCount
);
#endif // (_WIN32_WINNT >= 0x0501)
WINBASEAPI
BOOL
WINAPI
GetProcessTimes(
__in HANDLE hProcess,
__out LPFILETIME lpCreationTime,
__out LPFILETIME lpExitTime,
__out LPFILETIME lpKernelTime,
__out LPFILETIME lpUserTime
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetProcessIoCounters( GetProcessIoCounters(
__in HANDLE hProcess, _In_ HANDLE hProcess,
__out PIO_COUNTERS lpIoCounters _Out_ PIO_COUNTERS lpIoCounters
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetProcessWorkingSetSize( GetProcessWorkingSetSize(
__in HANDLE hProcess, _In_ HANDLE hProcess,
__out PSIZE_T lpMinimumWorkingSetSize, _Out_ PSIZE_T lpMinimumWorkingSetSize,
__out PSIZE_T lpMaximumWorkingSetSize _Out_ PSIZE_T lpMaximumWorkingSetSize
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetProcessWorkingSetSizeEx( SetProcessWorkingSetSize(
__in HANDLE hProcess, _In_ HANDLE hProcess,
__out PSIZE_T lpMinimumWorkingSetSize, _In_ SIZE_T dwMinimumWorkingSetSize,
__out PSIZE_T lpMaximumWorkingSetSize, _In_ SIZE_T dwMaximumWorkingSetSize
__out PDWORD Flags
); );
WINBASEAPI WINBASEAPI
BOOL __analysis_noreturn
VOID
WINAPI WINAPI
SetProcessWorkingSetSize( FatalExit(
__in HANDLE hProcess, _In_ int ExitCode
__in SIZE_T dwMinimumWorkingSetSize,
__in SIZE_T dwMaximumWorkingSetSize
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetProcessWorkingSetSizeEx( SetEnvironmentStringsA(
__in HANDLE hProcess, _In_ _Pre_ _NullNull_terminated_ LPCH NewEnvironment
__in SIZE_T dwMinimumWorkingSetSize,
__in SIZE_T dwMaximumWorkingSetSize,
__in DWORD Flags
); );
#ifndef UNICODE
#define SetEnvironmentStrings SetEnvironmentStringsA
#endif
#if (_WIN32_WINNT >= 0x0600) #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#define PROCESS_AFFINITY_ENABLE_AUTO_UPDATE 0x00000001UL #pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
WINBASEAPI WINBASEAPI
BOOL VOID
WINAPI WINAPI
SetProcessAffinityUpdateMode( RaiseFailFastException(
__in HANDLE hProcess, _In_opt_ PEXCEPTION_RECORD pExceptionRecord,
__in DWORD dwFlags _In_opt_ PCONTEXT pContextRecord,
_In_ DWORD dwFlags
); );
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
BOOL #pragma endregion
WINAPI
QueryProcessAffinityUpdateMode(
__in HANDLE hProcess,
__out_opt LPDWORD lpdwFlags
);
#endif // _WIN32_WINNT >= 0x0600 #if(_WIN32_WINNT >= 0x0400)
WINBASEAPI //
HANDLE // Fiber begin
WINAPI //
OpenProcess(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in DWORD dwProcessId
);
WINBASEAPI #pragma region Application Family
__out #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
HANDLE
WINAPI
GetCurrentProcess(
VOID
);
WINBASEAPI #define FIBER_FLAG_FLOAT_SWITCH 0x1 // context switch floating point
DWORD
WINAPI
GetCurrentProcessId(
VOID
);
WINBASEAPI WINBASEAPI
DECLSPEC_NORETURN
VOID VOID
WINAPI WINAPI
ExitProcess( SwitchToFiber(
__in UINT uExitCode _In_ LPVOID lpFiber
);
WINBASEAPI
BOOL
WINAPI
TerminateProcess(
__in HANDLE hProcess,
__in UINT uExitCode
);
WINBASEAPI
BOOL
WINAPI
GetExitCodeProcess(
__in HANDLE hProcess,
__out LPDWORD lpExitCode
); );
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
FatalExit( DeleteFiber(
__in int ExitCode _In_ LPVOID lpFiber
); );
WINBASEAPI #if (_WIN32_WINNT >= 0x0501)
__out
__nullnullterminated
LPCH
WINAPI
GetEnvironmentStrings(
VOID
);
WINBASEAPI WINBASEAPI
__out BOOL
__nullnullterminated
LPWCH
WINAPI WINAPI
GetEnvironmentStringsW( ConvertFiberToThread(
VOID VOID
); );
#ifdef UNICODE #endif
#define GetEnvironmentStrings GetEnvironmentStringsW
#else
#define GetEnvironmentStringsA GetEnvironmentStrings
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
SetEnvironmentStringsA(
__in __nullnullterminated LPCH NewEnvironment
);
WINBASEAPI
BOOL
WINAPI
SetEnvironmentStringsW(
__in __nullnullterminated LPWCH NewEnvironment
);
#ifdef UNICODE
#define SetEnvironmentStrings SetEnvironmentStringsW
#else
#define SetEnvironmentStrings SetEnvironmentStringsA
#endif // !UNICODE
WINBASEAPI #if (_WIN32_WINNT >= 0x0603)
BOOL
WINAPI
FreeEnvironmentStringsA(
__in __nullnullterminated LPCH
);
WINBASEAPI
BOOL
WINAPI
FreeEnvironmentStringsW(
__in __nullnullterminated LPWCH
);
#ifdef UNICODE
#define FreeEnvironmentStrings FreeEnvironmentStringsW
#else
#define FreeEnvironmentStrings FreeEnvironmentStringsA
#endif // !UNICODE
WINBASEAPI WINBASEAPI
VOID _Ret_maybenull_
PVOID
WINAPI WINAPI
RaiseException( CalloutOnFiberStack(
__in DWORD dwExceptionCode, _In_ PVOID lpFiber,
__in DWORD dwExceptionFlags, _In_ PFIBER_CALLOUT_ROUTINE lpStartAddress,
__in DWORD nNumberOfArguments, _In_opt_ PVOID lpParameter
__in_ecount_opt(nNumberOfArguments) CONST ULONG_PTR *lpArguments
); );
WINBASEAPI #endif
VOID
WINAPI
RaiseFailFastException(
__in_opt PEXCEPTION_RECORD pExceptionRecord,
__in PCONTEXT pContextRecord,
__in DWORD dwFlags
);
__callback
WINBASEAPI WINBASEAPI
LONG _Ret_maybenull_
LPVOID
WINAPI WINAPI
UnhandledExceptionFilter( CreateFiberEx(
__in struct _EXCEPTION_POINTERS *ExceptionInfo _In_ SIZE_T dwStackCommitSize,
); _In_ SIZE_T dwStackReserveSize,
_In_ DWORD dwFlags,
typedef LONG (WINAPI *PTOP_LEVEL_EXCEPTION_FILTER)( _In_ LPFIBER_START_ROUTINE lpStartAddress,
__in struct _EXCEPTION_POINTERS *ExceptionInfo _In_opt_ LPVOID lpParameter
); );
typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
WINBASEAPI WINBASEAPI
LPTOP_LEVEL_EXCEPTION_FILTER _Ret_maybenull_
LPVOID
WINAPI WINAPI
SetUnhandledExceptionFilter( ConvertThreadToFiberEx(
__in_opt LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter _In_opt_ LPVOID lpParameter,
_In_ DWORD dwFlags
); );
#if(_WIN32_WINNT >= 0x0400) #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
//
// Fiber creation flags
//
#define FIBER_FLAG_FLOAT_SWITCH 0x1 // context switch floating point #pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
LPVOID LPVOID
WINAPI WINAPI
CreateFiber( CreateFiber(
__in SIZE_T dwStackSize, _In_ SIZE_T dwStackSize,
__in LPFIBER_START_ROUTINE lpStartAddress, _In_ LPFIBER_START_ROUTINE lpStartAddress,
__in_opt LPVOID lpParameter _In_opt_ LPVOID lpParameter
);
WINBASEAPI
__out_opt
LPVOID
WINAPI
CreateFiberEx(
__in SIZE_T dwStackCommitSize,
__in SIZE_T dwStackReserveSize,
__in DWORD dwFlags,
__in LPFIBER_START_ROUTINE lpStartAddress,
__in_opt LPVOID lpParameter
);
WINBASEAPI
VOID
WINAPI
DeleteFiber(
__in LPVOID lpFiber
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
LPVOID LPVOID
WINAPI WINAPI
ConvertThreadToFiber( ConvertThreadToFiber(
__in_opt LPVOID lpParameter _In_opt_ LPVOID lpParameter
);
WINBASEAPI
__out_opt
LPVOID
WINAPI
ConvertThreadToFiberEx(
__in_opt LPVOID lpParameter,
__in DWORD dwFlags
);
#if (_WIN32_WINNT >= 0x0501)
WINBASEAPI
BOOL
WINAPI
ConvertFiberToThread(
VOID
);
#endif
#if (_WIN32_WINNT >= 0x0600)
WINBASEAPI
BOOL
WINAPI
IsThreadAFiber(
VOID
); );
#endif #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
WINBASEAPI
VOID
WINAPI
SwitchToFiber(
__in LPVOID lpFiber
);
WINBASEAPI //
BOOL // Fiber end
WINAPI //
SwitchToThread(
VOID
);
// //
// UMS begin // UMS begin
// //
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= 0x0601) && !defined(MIDL_PASS) #if (_WIN32_WINNT >= 0x0601) && !defined(MIDL_PASS)
#define UMS_VERSION RTL_UMS_VERSION #define UMS_VERSION RTL_UMS_VERSION
typedef void *PUMS_CONTEXT; typedef void *PUMS_CONTEXT;
typedef void *PUMS_COMPLETION_LIST; typedef void *PUMS_COMPLETION_LIST;
typedef enum _RTL_UMS_THREAD_INFO_CLASS UMS_THREAD_INFO_CLASS, *PUMS_THREAD_INFO _CLASS; typedef enum _RTL_UMS_THREAD_INFO_CLASS UMS_THREAD_INFO_CLASS, *PUMS_THREAD_INFO _CLASS;
skipping to change at line 3750 skipping to change at line 1422
// //
PUMS_SCHEDULER_ENTRY_POINT SchedulerProc; PUMS_SCHEDULER_ENTRY_POINT SchedulerProc;
// //
// pointer to a variable to be passed to the scheduler uppon first activatio n. // pointer to a variable to be passed to the scheduler uppon first activatio n.
// //
PVOID SchedulerParam; PVOID SchedulerParam;
} UMS_SCHEDULER_STARTUP_INFO, *PUMS_SCHEDULER_STARTUP_INFO; } UMS_SCHEDULER_STARTUP_INFO, *PUMS_SCHEDULER_STARTUP_INFO;
__checkReturn typedef struct _UMS_SYSTEM_THREAD_INFORMATION {
ULONG UmsVersion;
union {
struct {
ULONG IsUmsSchedulerThread : 1;
ULONG IsUmsWorkerThread : 1;
} DUMMYSTRUCTNAME;
ULONG ThreadUmsFlags;
} DUMMYUNIONNAME;
} UMS_SYSTEM_THREAD_INFORMATION, *PUMS_SYSTEM_THREAD_INFORMATION;
_Must_inspect_result_
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateUmsCompletionList( CreateUmsCompletionList(
__deref_out PUMS_COMPLETION_LIST* UmsCompletionList _Outptr_ PUMS_COMPLETION_LIST* UmsCompletionList
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DequeueUmsCompletionListItems( DequeueUmsCompletionListItems(
__in PUMS_COMPLETION_LIST UmsCompletionList, _In_ PUMS_COMPLETION_LIST UmsCompletionList,
__in DWORD WaitTimeOut, _In_ DWORD WaitTimeOut,
__out PUMS_CONTEXT* UmsThreadList _Out_ PUMS_CONTEXT* UmsThreadList
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetUmsCompletionListEvent( GetUmsCompletionListEvent(
__in PUMS_COMPLETION_LIST UmsCompletionList, _In_ PUMS_COMPLETION_LIST UmsCompletionList,
__inout PHANDLE UmsCompletionEvent _Inout_ PHANDLE UmsCompletionEvent
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ExecuteUmsThread( ExecuteUmsThread(
__inout PUMS_CONTEXT UmsThread _Inout_ PUMS_CONTEXT UmsThread
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
UmsThreadYield( UmsThreadYield(
__in PVOID SchedulerParam _In_ PVOID SchedulerParam
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DeleteUmsCompletionList( DeleteUmsCompletionList(
__in PUMS_COMPLETION_LIST UmsCompletionList _In_ PUMS_COMPLETION_LIST UmsCompletionList
); );
WINBASEAPI WINBASEAPI
PUMS_CONTEXT PUMS_CONTEXT
WINAPI WINAPI
GetCurrentUmsThread( GetCurrentUmsThread(
VOID VOID
); );
WINBASEAPI WINBASEAPI
PUMS_CONTEXT PUMS_CONTEXT
WINAPI WINAPI
GetNextUmsListItem( GetNextUmsListItem(
__inout PUMS_CONTEXT UmsContext _Inout_ PUMS_CONTEXT UmsContext
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
QueryUmsThreadInformation( QueryUmsThreadInformation(
__in PUMS_CONTEXT UmsThread, _In_ PUMS_CONTEXT UmsThread,
__in UMS_THREAD_INFO_CLASS UmsThreadInfoClass, _In_ UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
__out_bcount_part(UmsThreadInformationLength, *ReturnLength) PVOID UmsThread _Out_writes_bytes_to_(UmsThreadInformationLength, *ReturnLength) PVOID UmsTh
Information, readInformation,
__in ULONG UmsThreadInformationLength, _In_ ULONG UmsThreadInformationLength,
__out_opt PULONG ReturnLength _Out_opt_ PULONG ReturnLength
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetUmsThreadInformation( SetUmsThreadInformation(
__in PUMS_CONTEXT UmsThread, _In_ PUMS_CONTEXT UmsThread,
__in UMS_THREAD_INFO_CLASS UmsThreadInfoClass, _In_ UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
__in PVOID UmsThreadInformation, _In_ PVOID UmsThreadInformation,
__in ULONG UmsThreadInformationLength _In_ ULONG UmsThreadInformationLength
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DeleteUmsThreadContext( DeleteUmsThreadContext(
__in PUMS_CONTEXT UmsThread _In_ PUMS_CONTEXT UmsThread
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateUmsThreadContext( CreateUmsThreadContext(
__deref_out PUMS_CONTEXT *lpUmsThread _Outptr_ PUMS_CONTEXT *lpUmsThread
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnterUmsSchedulingMode( EnterUmsSchedulingMode(
__in PUMS_SCHEDULER_STARTUP_INFO SchedulerStartupInfo _In_ PUMS_SCHEDULER_STARTUP_INFO SchedulerStartupInfo
);
#endif // (_WIN32_WINNT >= 0x0601) && !defined(MIDL_PASS)
//
// UMS end
//
#endif /* _WIN32_WINNT >= 0x0400 */
typedef struct _PROC_THREAD_ATTRIBUTE_LIST *PPROC_THREAD_ATTRIBUTE_LIST, *LPPROC
_THREAD_ATTRIBUTE_LIST;
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateThread(
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in SIZE_T dwStackSize,
__in LPTHREAD_START_ROUTINE lpStartAddress,
__in_opt __deref __drv_aliasesMem LPVOID lpParameter,
__in DWORD dwCreationFlags,
__out_opt LPDWORD lpThreadId
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateRemoteThread(
__in HANDLE hProcess,
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in SIZE_T dwStackSize,
__in LPTHREAD_START_ROUTINE lpStartAddress,
__in_opt LPVOID lpParameter,
__in DWORD dwCreationFlags,
__out_opt LPDWORD lpThreadId
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateRemoteThreadEx(
__in HANDLE hProcess,
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in SIZE_T dwStackSize,
__in LPTHREAD_START_ROUTINE lpStartAddress,
__in_opt LPVOID lpParameter,
__in DWORD dwCreationFlags,
__in_opt LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
__out_opt LPDWORD lpThreadId
);
WINBASEAPI
__out
HANDLE
WINAPI
GetCurrentThread(
VOID
);
WINBASEAPI
DWORD
WINAPI
GetCurrentThreadId(
VOID
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetThreadStackGuarantee ( GetUmsSystemThreadInformation(
__inout PULONG StackSizeInBytes _In_ HANDLE ThreadHandle,
_Inout_ PUMS_SYSTEM_THREAD_INFORMATION SystemThreadInfo
); );
WINBASEAPI #endif // (_WIN32_WINNT >= 0x0601) && !defined(MIDL_PASS)
DWORD
WINAPI
GetProcessIdOfThread(
__in HANDLE Thread
);
#if (_WIN32_WINNT >= 0x0502) #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
WINBASEAPI //
DWORD // UMS end
WINAPI //
GetThreadId(
__in HANDLE Thread
);
#endif // _WIN32_WINNT >= 0x0502 #endif /* _WIN32_WINNT >= 0x0400 */
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINBASEAPI WINBASEAPI
DWORD DWORD_PTR
WINAPI WINAPI
GetProcessId( SetThreadAffinityMask(
__in HANDLE Process _In_ HANDLE hThread,
_In_ DWORD_PTR dwThreadAffinityMask
); );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if(_WIN32_WINNT >= 0x0400)
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetCurrentProcessorNumber( SetThreadIdealProcessor(
VOID _In_ HANDLE hThread,
_In_ DWORD dwIdealProcessor
); );
#endif /* _WIN32_WINNT >= 0x0400 */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#if (_WIN32_WINNT >= 0x0601) #pragma region Desktop Family
WINBASEAPI #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
VOID
WINAPI
GetCurrentProcessorNumberEx(
__out PPROCESSOR_NUMBER ProcNumber
);
#endif
#if (_WIN32_WINNT >= 0x0601) //
WINBASEAPI // Process information classes.
BOOL //
WINAPI
GetThreadGroupAffinity(
__in HANDLE hThread,
__out PGROUP_AFFINITY GroupAffinity
);
#endif // _WIN32_WINNT >= 0x0601
WINBASEAPI typedef enum _PROCESS_INFORMATION_CLASS {
DWORD_PTR ProcessMemoryPriority,
WINAPI ProcessInformationClassMax
SetThreadAffinityMask( } PROCESS_INFORMATION_CLASS;
__in HANDLE hThread,
__in DWORD_PTR dwThreadAffinityMask
);
#if (_WIN32_WINNT >= 0x0601) #if (_WIN32_WINNT >= 0x0602)
WINBASEAPI
BOOL
WINAPI
SetThreadGroupAffinity(
__in HANDLE hThread,
__in CONST GROUP_AFFINITY *GroupAffinity,
__out_opt PGROUP_AFFINITY PreviousGroupAffinity
);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetThreadIdealProcessorEx ( GetProcessInformation (
__in HANDLE hThread, _In_ HANDLE hProcess,
__in PPROCESSOR_NUMBER lpIdealProcessor, _In_ PROCESS_INFORMATION_CLASS ProcessInformationClass,
__out_opt PPROCESSOR_NUMBER lpPreviousIdealProcessor _Out_writes_bytes_(ProcessInformationSize) LPVOID ProcessInformation,
_In_ DWORD ProcessInformationSize
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetThreadIdealProcessorEx ( SetProcessInformation (
__in HANDLE hThread, _In_ HANDLE hProcess,
__out PPROCESSOR_NUMBER lpIdealProcessor _In_ PROCESS_INFORMATION_CLASS ProcessInformationClass,
_In_reads_bytes_(ProcessInformationSize) LPVOID ProcessInformation,
_In_ DWORD ProcessInformationSize
); );
#endif // _WIN32_WINNT >= 0x0601 #endif // _WIN32_WINNT >= 0x0602
#if(_WIN32_WINNT >= 0x0400)
WINBASEAPI
DWORD
WINAPI
SetThreadIdealProcessor(
__in HANDLE hThread,
__in DWORD dwIdealProcessor
);
#endif /* _WIN32_WINNT >= 0x0400 */
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
#define PROCESS_DEP_ENABLE 0x00000001 #define PROCESS_DEP_ENABLE 0x00000001
#define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x00000002 #define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x00000002
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetProcessDEPPolicy( SetProcessDEPPolicy(
__in DWORD dwFlags _In_ DWORD dwFlags
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetProcessDEPPolicy( GetProcessDEPPolicy(
__in HANDLE hProcess, _In_ HANDLE hProcess,
__out LPDWORD lpFlags, _Out_ LPDWORD lpFlags,
__out PBOOL lpPermanent _Out_ PBOOL lpPermanent
); );
#endif // _WIN32_WINNT >= 0x0600 #endif // _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetProcessPriorityBoost(
__in HANDLE hProcess,
__in BOOL bDisablePriorityBoost
);
WINBASEAPI
BOOL
WINAPI
GetProcessPriorityBoost(
__in HANDLE hProcess,
__out PBOOL pDisablePriorityBoost
);
WINBASEAPI
BOOL
WINAPI
RequestWakeupLatency( RequestWakeupLatency(
__in LATENCY_TIME latency _In_ LATENCY_TIME latency
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
IsSystemResumeAutomatic( IsSystemResumeAutomatic(
VOID VOID
); );
WINBASEAPI WINBASEAPI
__out_opt
HANDLE
WINAPI
OpenThread(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in DWORD dwThreadId
);
WINBASEAPI
BOOL
WINAPI
SetThreadPriority(
__in HANDLE hThread,
__in int nPriority
);
WINBASEAPI
BOOL
WINAPI
SetThreadPriorityBoost(
__in HANDLE hThread,
__in BOOL bDisablePriorityBoost
);
WINBASEAPI
BOOL
WINAPI
GetThreadPriorityBoost(
__in HANDLE hThread,
__out PBOOL pDisablePriorityBoost
);
WINBASEAPI
int
WINAPI
GetThreadPriority(
__in HANDLE hThread
);
WINBASEAPI
BOOL
WINAPI
GetThreadTimes(
__in HANDLE hThread,
__out LPFILETIME lpCreationTime,
__out LPFILETIME lpExitTime,
__out LPFILETIME lpKernelTime,
__out LPFILETIME lpUserTime
);
#if _WIN32_WINNT >= 0x0501
WINBASEAPI
BOOL
WINAPI
GetThreadIOPendingFlag(
__in HANDLE hThread,
__out PBOOL lpIOIsPending
);
#endif // (_WIN32_WINNT >= 0x0501)
WINBASEAPI
DECLSPEC_NORETURN
VOID
WINAPI
ExitThread(
__in DWORD dwExitCode
);
WINBASEAPI
BOOL
WINAPI
TerminateThread(
__in HANDLE hThread,
__in DWORD dwExitCode
);
WINBASEAPI
__success(return != 0)
BOOL
WINAPI
GetExitCodeThread(
__in HANDLE hThread,
__out LPDWORD lpExitCode
);
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetThreadSelectorEntry( GetThreadSelectorEntry(
__in HANDLE hThread, _In_ HANDLE hThread,
__in DWORD dwSelector, _In_ DWORD dwSelector,
__out LPLDT_ENTRY lpSelectorEntry _Out_ LPLDT_ENTRY lpSelectorEntry
); );
WINBASEAPI WINBASEAPI
EXECUTION_STATE EXECUTION_STATE
WINAPI WINAPI
SetThreadExecutionState( SetThreadExecutionState(
__in EXECUTION_STATE esFlags _In_ EXECUTION_STATE esFlags
); );
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7) #if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
typedef struct _REASON_CONTEXT {
ULONG Version;
DWORD Flags;
union {
struct {
HMODULE LocalizedReasonModule;
ULONG LocalizedReasonId;
ULONG ReasonStringCount;
LPWSTR *ReasonStrings;
} Detailed;
LPWSTR SimpleReasonString;
} Reason;
} REASON_CONTEXT, *PREASON_CONTEXT;
// //
// Power Request APIs // Power Request APIs
// //
typedef REASON_CONTEXT POWER_REQUEST_CONTEXT, *PPOWER_REQUEST_CONTEXT, *LPPOWER_ REQUEST_CONTEXT; typedef REASON_CONTEXT POWER_REQUEST_CONTEXT, *PPOWER_REQUEST_CONTEXT, *LPPOWER_ REQUEST_CONTEXT;
WINBASEAPI WINBASEAPI
HANDLE HANDLE
WINAPI WINAPI
PowerCreateRequest ( PowerCreateRequest (
__in PREASON_CONTEXT Context _In_ PREASON_CONTEXT Context
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
PowerSetRequest ( PowerSetRequest (
__in HANDLE PowerRequest, _In_ HANDLE PowerRequest,
__in POWER_REQUEST_TYPE RequestType _In_ POWER_REQUEST_TYPE RequestType
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
PowerClearRequest ( PowerClearRequest (
__in HANDLE PowerRequest, _In_ HANDLE PowerRequest,
__in POWER_REQUEST_TYPE RequestType _In_ POWER_REQUEST_TYPE RequestType
); );
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN7) #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 #ifdef _M_CEE_PURE
#define GetLastError System::Runtime::InteropServices::Marshal::GetLastWin32Erro r #define GetLastError System::Runtime::InteropServices::Marshal::GetLastWin32Erro r
#else
WINBASEAPI
__checkReturn
DWORD
WINAPI
GetLastError(
VOID
);
#endif #endif
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
VOID #pragma endregion
WINAPI
SetLastError( #pragma region Desktop Family
__in DWORD dwErrCode #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(RC_INVOKED) // RC warns because "WINBASE_DECLARE_RESTORE_LAST_ERROR " is a bit long.
//#if _WIN32_WINNT >= 0x0501 || defined(WINBASE_DECLARE_RESTORE_LAST_ERROR) //#if _WIN32_WINNT >= 0x0501 || defined(WINBASE_DECLARE_RESTORE_LAST_ERROR)
#if defined(WINBASE_DECLARE_RESTORE_LAST_ERROR) #if defined(WINBASE_DECLARE_RESTORE_LAST_ERROR)
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
RestoreLastError( RestoreLastError(
__in DWORD dwErrCode _In_ DWORD dwErrCode
); );
typedef VOID (WINAPI* PRESTORE_LAST_ERROR)(DWORD); typedef VOID (WINAPI* PRESTORE_LAST_ERROR)(DWORD);
#define RESTORE_LAST_ERROR_NAME_A "RestoreLastError" #define RESTORE_LAST_ERROR_NAME_A "RestoreLastError"
#define RESTORE_LAST_ERROR_NAME_W L"RestoreLastError" #define RESTORE_LAST_ERROR_NAME_W L"RestoreLastError"
#define RESTORE_LAST_ERROR_NAME TEXT("RestoreLastError") #define RESTORE_LAST_ERROR_NAME TEXT("RestoreLastError")
#endif #endif
#endif #endif
#define HasOverlappedIoCompleted(lpOverlapped) (((DWORD)(lpOverlapped)->Internal ) != STATUS_PENDING) #define HasOverlappedIoCompleted(lpOverlapped) (((DWORD)(lpOverlapped)->Internal ) != STATUS_PENDING)
WINBASEAPI
BOOL
WINAPI
GetOverlappedResult(
__in HANDLE hFile,
__in LPOVERLAPPED lpOverlapped,
__out LPDWORD lpNumberOfBytesTransferred,
__in BOOL bWait
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateIoCompletionPort(
__in HANDLE FileHandle,
__in_opt HANDLE ExistingCompletionPort,
__in ULONG_PTR CompletionKey,
__in DWORD NumberOfConcurrentThreads
);
WINBASEAPI
BOOL
WINAPI
GetQueuedCompletionStatus(
__in HANDLE CompletionPort,
__out LPDWORD lpNumberOfBytesTransferred,
__out PULONG_PTR lpCompletionKey,
__out LPOVERLAPPED *lpOverlapped,
__in DWORD dwMilliseconds
);
#if (_WIN32_WINNT >= 0x0600)
WINBASEAPI
BOOL
WINAPI
GetQueuedCompletionStatusEx(
__in HANDLE CompletionPort,
__out_ecount_part(ulCount, *ulNumEntriesRemoved) LPOVERLAPPED_ENTRY lpComple
tionPortEntries,
__in ULONG ulCount,
__out PULONG ulNumEntriesRemoved,
__in DWORD dwMilliseconds,
__in BOOL fAlertable
);
#endif // _WIN32_WINNT >= 0x0600
WINBASEAPI
BOOL
WINAPI
PostQueuedCompletionStatus(
__in HANDLE CompletionPort,
__in DWORD dwNumberOfBytesTransferred,
__in ULONG_PTR dwCompletionKey,
__in_opt LPOVERLAPPED lpOverlapped
);
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
// //
// The following flags allows an application to change // The following flags allows an application to change
// the semantics of IO completion notification. // the semantics of IO completion notification.
// //
// //
// Don't queue an entry to an associated completion port if returning success // Don't queue an entry to an associated completion port if returning success
// synchronously. // synchronously.
skipping to change at line 4351 skipping to change at line 1762
// //
// Don't set the file handle event on IO completion. // Don't set the file handle event on IO completion.
// //
#define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2 #define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetFileCompletionNotificationModes( SetFileCompletionNotificationModes(
__in HANDLE FileHandle, _In_ HANDLE FileHandle,
__in UCHAR Flags _In_ UCHAR Flags
);
WINBASEAPI
BOOL
WINAPI
SetFileIoOverlappedRange(
__in HANDLE FileHandle,
__in PUCHAR OverlappedRangeStart,
__in ULONG Length
); );
#endif // _WIN32_WINNT >= 0x0600 #endif // _WIN32_WINNT >= 0x0600
#define SEM_FAILCRITICALERRORS 0x0001 #define SEM_FAILCRITICALERRORS 0x0001
#define SEM_NOGPFAULTERRORBOX 0x0002 #define SEM_NOGPFAULTERRORBOX 0x0002
#define SEM_NOALIGNMENTFAULTEXCEPT 0x0004 #define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
#define SEM_NOOPENFILEERRORBOX 0x8000 #define SEM_NOOPENFILEERRORBOX 0x8000
WINBASEAPI
UINT
WINAPI
GetErrorMode(
VOID
);
WINBASEAPI
UINT
WINAPI
SetErrorMode(
__in UINT uMode
);
// //
// Thread error mode support // Thread error mode support
// //
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetThreadErrorMode( GetThreadErrorMode(
VOID VOID
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetThreadErrorMode( SetThreadErrorMode(
__in DWORD dwNewMode, _In_ DWORD dwNewMode,
__in_opt LPDWORD lpOldMode _In_opt_ LPDWORD lpOldMode
);
WINBASEAPI
BOOL
WINAPI
ReadProcessMemory(
__in HANDLE hProcess,
__in LPCVOID lpBaseAddress,
__out_bcount_part(nSize, *lpNumberOfBytesRead) LPVOID lpBuffer,
__in SIZE_T nSize,
__out_opt SIZE_T * lpNumberOfBytesRead
);
WINBASEAPI
BOOL
WINAPI
WriteProcessMemory(
__in HANDLE hProcess,
__in LPVOID lpBaseAddress,
__in_bcount(nSize) LPCVOID lpBuffer,
__in SIZE_T nSize,
__out_opt SIZE_T * lpNumberOfBytesWritten
); );
#if !defined(MIDL_PASS) #if !defined(MIDL_PASS)
WINBASEAPI
BOOL
WINAPI
GetThreadContext(
__in HANDLE hThread,
__inout LPCONTEXT lpContext
);
WINBASEAPI #if (_WIN32_WINNT >= 0x0600)
BOOL
WINAPI
SetThreadContext(
__in HANDLE hThread,
__in CONST CONTEXT *lpContext
);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
Wow64GetThreadContext( Wow64GetThreadContext(
__in HANDLE hThread, _In_ HANDLE hThread,
__inout PWOW64_CONTEXT lpContext _Inout_ PWOW64_CONTEXT lpContext
);
#if(_WIN32_WINNT >= 0x0601)
WINBASEAPI
BOOL
WINAPI
Wow64GetThreadSelectorEntry(
__in HANDLE hThread,
__in DWORD dwSelector,
__out PWOW64_LDT_ENTRY lpSelectorEntry
); );
#endif /* _WIN32_WINNT >= 0x0601 */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
Wow64SetThreadContext( Wow64SetThreadContext(
__in HANDLE hThread, _In_ HANDLE hThread,
__in CONST WOW64_CONTEXT *lpContext _In_ CONST WOW64_CONTEXT *lpContext
);
#endif
WINBASEAPI
DWORD
WINAPI
SuspendThread(
__in HANDLE hThread
);
WINBASEAPI
DWORD
WINAPI
Wow64SuspendThread(
__in HANDLE hThread
);
WINBASEAPI
DWORD
WINAPI
ResumeThread(
__in HANDLE hThread
);
#if(_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
WINBASEAPI
DWORD
WINAPI
QueueUserAPC(
__in PAPCFUNC pfnAPC,
__in HANDLE hThread,
__in ULONG_PTR dwData
); );
#endif /* _WIN32_WINNT >= 0x0400 || _WIN32_WINDOWS > 0x0400 */ #endif // (_WIN32_WINNT >= 0x0600)
#if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
WINBASEAPI
BOOL
WINAPI
IsDebuggerPresent(
VOID
);
#endif
#if _WIN32_WINNT >= 0x0501 #if (_WIN32_WINNT >= 0x0601)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CheckRemoteDebuggerPresent( Wow64GetThreadSelectorEntry(
__in HANDLE hProcess, _In_ HANDLE hThread,
__out PBOOL pbDebuggerPresent _In_ DWORD dwSelector,
_Out_ PWOW64_LDT_ENTRY lpSelectorEntry
); );
#endif // (_WIN32_WINNT >= 0x0501) #endif // (_WIN32_WINNT >= 0x0601)
WINBASEAPI
VOID
WINAPI
DebugBreak(
VOID
);
WINBASEAPI #endif // !defined(MIDL_PASS)
BOOL
WINAPI
WaitForDebugEvent(
__in LPDEBUG_EVENT lpDebugEvent,
__in DWORD dwMilliseconds
);
WINBASEAPI #if (_WIN32_WINNT >= 0x0600)
BOOL
WINAPI
ContinueDebugEvent(
__in DWORD dwProcessId,
__in DWORD dwThreadId,
__in DWORD dwContinueStatus
);
WINBASEAPI WINBASEAPI
BOOL DWORD
WINAPI WINAPI
DebugActiveProcess( Wow64SuspendThread(
__in DWORD dwProcessId _In_ HANDLE hThread
); );
WINBASEAPI #endif // (_WIN32_WINNT >= 0x0600)
BOOL
WINAPI
DebugActiveProcessStop(
__in DWORD dwProcessId
);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DebugSetProcessKillOnExit( DebugSetProcessKillOnExit(
__in BOOL KillOnExit _In_ BOOL KillOnExit
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DebugBreakProcess ( DebugBreakProcess (
__in HANDLE Process _In_ HANDLE Process
);
#if (_WIN32_WINNT < _WIN32_WINNT_LONGHORN)
__drv_inTry
#endif
WINBASEAPI
VOID
WINAPI
InitializeCriticalSection(
__out LPCRITICAL_SECTION lpCriticalSection
); );
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
VOID #pragma endregion
WINAPI
EnterCriticalSection(
__inout LPCRITICAL_SECTION lpCriticalSection
);
WINBASEAPI #pragma region Application Family
VOID #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
WINAPI
LeaveCriticalSection(
__inout LPCRITICAL_SECTION lpCriticalSection
);
#if (_WIN32_WINNT >= 0x0403) #if (_WIN32_WINNT >= 0x0403)
#define CRITICAL_SECTION_NO_DEBUG_INFO RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO #define CRITICAL_SECTION_NO_DEBUG_INFO RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO
WINBASEAPI
BOOL
WINAPI
InitializeCriticalSectionAndSpinCount(
__out LPCRITICAL_SECTION lpCriticalSection,
__in DWORD dwSpinCount
);
WINBASEAPI
BOOL
WINAPI
InitializeCriticalSectionEx(
__out LPCRITICAL_SECTION lpCriticalSection,
__in DWORD dwSpinCount,
__in DWORD Flags
);
WINBASEAPI
DWORD
WINAPI
SetCriticalSectionSpinCount(
__inout LPCRITICAL_SECTION lpCriticalSection,
__in DWORD dwSpinCount
);
#endif #endif
#if(_WIN32_WINNT >= 0x0400) #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
WINBASEAPI #pragma endregion
BOOL
WINAPI
TryEnterCriticalSection(
__inout LPCRITICAL_SECTION lpCriticalSection
);
#endif /* _WIN32_WINNT >= 0x0400 */
WINBASEAPI
VOID
WINAPI
DeleteCriticalSection(
__inout LPCRITICAL_SECTION lpCriticalSection
);
WINBASEAPI
BOOL
WINAPI
SetEvent(
__in HANDLE hEvent
);
WINBASEAPI #pragma region Desktop Family
BOOL #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINAPI
ResetEvent(
__in HANDLE hEvent
);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
PulseEvent( PulseEvent(
__in HANDLE hEvent _In_ HANDLE hEvent
);
WINBASEAPI
BOOL
WINAPI
ReleaseSemaphore(
__in HANDLE hSemaphore,
__in LONG lReleaseCount,
__out_opt LPLONG lpPreviousCount
);
WINBASEAPI
BOOL
WINAPI
ReleaseMutex(
__in HANDLE hMutex
);
WINBASEAPI
DWORD
WINAPI
WaitForSingleObject(
__in HANDLE hHandle,
__in DWORD dwMilliseconds
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
WaitForMultipleObjects( WaitForMultipleObjects(
__in DWORD nCount, _In_ DWORD nCount,
__in_ecount(nCount) CONST HANDLE *lpHandles, _In_reads_(nCount) CONST HANDLE *lpHandles,
__in BOOL bWaitAll, _In_ BOOL bWaitAll,
__in DWORD dwMilliseconds _In_ DWORD dwMilliseconds
);
WINBASEAPI
VOID
WINAPI
Sleep(
__in DWORD dwMilliseconds
);
WINBASEAPI
__out_opt
HGLOBAL
WINAPI
LoadResource(
__in_opt HMODULE hModule,
__in HRSRC hResInfo
);
WINBASEAPI
DWORD
WINAPI
SizeofResource(
__in_opt HMODULE hModule,
__in HRSRC hResInfo
); );
WINBASEAPI WINBASEAPI
ATOM ATOM
WINAPI WINAPI
GlobalDeleteAtom( GlobalDeleteAtom(
__in ATOM nAtom _In_ ATOM nAtom
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
InitAtomTable( InitAtomTable(
__in DWORD nSize _In_ DWORD nSize
); );
WINBASEAPI WINBASEAPI
ATOM ATOM
WINAPI WINAPI
DeleteAtom( DeleteAtom(
__in ATOM nAtom _In_ ATOM nAtom
); );
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
SetHandleCount( SetHandleCount(
__in UINT uNumber _In_ UINT uNumber
);
WINBASEAPI
DWORD
WINAPI
GetLogicalDrives(
VOID
);
WINBASEAPI
BOOL
WINAPI
LockFile(
__in HANDLE hFile,
__in DWORD dwFileOffsetLow,
__in DWORD dwFileOffsetHigh,
__in DWORD nNumberOfBytesToLockLow,
__in DWORD nNumberOfBytesToLockHigh
);
WINBASEAPI
BOOL
WINAPI
UnlockFile(
__in HANDLE hFile,
__in DWORD dwFileOffsetLow,
__in DWORD dwFileOffsetHigh,
__in DWORD nNumberOfBytesToUnlockLow,
__in DWORD nNumberOfBytesToUnlockHigh
);
WINBASEAPI
BOOL
WINAPI
LockFileEx(
__in HANDLE hFile,
__in DWORD dwFlags,
__reserved DWORD dwReserved,
__in DWORD nNumberOfBytesToLockLow,
__in DWORD nNumberOfBytesToLockHigh,
__inout LPOVERLAPPED lpOverlapped
);
#define LOCKFILE_FAIL_IMMEDIATELY 0x00000001
#define LOCKFILE_EXCLUSIVE_LOCK 0x00000002
WINBASEAPI
BOOL
WINAPI
UnlockFileEx(
__in HANDLE hFile,
__reserved DWORD dwReserved,
__in DWORD nNumberOfBytesToUnlockLow,
__in DWORD nNumberOfBytesToUnlockHigh,
__inout LPOVERLAPPED lpOverlapped
);
typedef struct _BY_HANDLE_FILE_INFORMATION {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD dwVolumeSerialNumber;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD nNumberOfLinks;
DWORD nFileIndexHigh;
DWORD nFileIndexLow;
} BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_IN
FORMATION;
WINBASEAPI
BOOL
WINAPI
GetFileInformationByHandle(
__in HANDLE hFile,
__out LPBY_HANDLE_FILE_INFORMATION lpFileInformation
);
WINBASEAPI
DWORD
WINAPI
GetFileType(
__in HANDLE hFile
);
WINBASEAPI
DWORD
WINAPI
GetFileSize(
__in HANDLE hFile,
__out_opt LPDWORD lpFileSizeHigh
);
WINBASEAPI
BOOL
WINAPI
GetFileSizeEx(
__in HANDLE hFile,
__out PLARGE_INTEGER lpFileSize
);
WINBASEAPI
HANDLE
WINAPI
GetStdHandle(
__in DWORD nStdHandle
);
WINBASEAPI
BOOL
WINAPI
SetStdHandle(
__in DWORD nStdHandle,
__in HANDLE hHandle
);
#if (_WIN32_WINNT >= 0x0600)
WINBASEAPI
BOOL
WINAPI
SetStdHandleEx(
__in DWORD nStdHandle,
__in HANDLE hHandle,
__out_opt PHANDLE phPrevValue
);
#endif // _WIN32_WINNT >= 0x0600
WINBASEAPI
BOOL
WINAPI
WriteFile(
__in HANDLE hFile,
__in_bcount_opt(nNumberOfBytesToWrite) LPCVOID lpBuffer,
__in DWORD nNumberOfBytesToWrite,
__out_opt LPDWORD lpNumberOfBytesWritten,
__inout_opt LPOVERLAPPED lpOverlapped
);
WINBASEAPI
BOOL
WINAPI
ReadFile(
__in HANDLE hFile,
__out_bcount_part_opt(nNumberOfBytesToRead, *lpNumberOfBytesRead) __out_data
_source(FILE) LPVOID lpBuffer,
__in DWORD nNumberOfBytesToRead,
__out_opt LPDWORD lpNumberOfBytesRead,
__inout_opt LPOVERLAPPED lpOverlapped
);
WINBASEAPI
BOOL
WINAPI
FlushFileBuffers(
__in HANDLE hFile
);
WINBASEAPI
BOOL
WINAPI
DeviceIoControl(
__in HANDLE hDevice,
__in DWORD dwIoControlCode,
__in_bcount_opt(nInBufferSize) LPVOID lpInBuffer,
__in DWORD nInBufferSize,
__out_bcount_part_opt(nOutBufferSize, *lpBytesReturned) LPVOID lpOutBuffer,
__in DWORD nOutBufferSize,
__out_opt LPDWORD lpBytesReturned,
__inout_opt LPOVERLAPPED lpOverlapped
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
RequestDeviceWakeup( RequestDeviceWakeup(
__in HANDLE hDevice _In_ HANDLE hDevice
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CancelDeviceWakeupRequest( CancelDeviceWakeupRequest(
__in HANDLE hDevice _In_ HANDLE hDevice
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetDevicePowerState( GetDevicePowerState(
__in HANDLE hDevice, _In_ HANDLE hDevice,
__out BOOL *pfOn _Out_ BOOL *pfOn
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetMessageWaitingIndicator( SetMessageWaitingIndicator(
__in HANDLE hMsgIndicator, _In_ HANDLE hMsgIndicator,
__in ULONG ulMsgCount _In_ ULONG ulMsgCount
);
WINBASEAPI
BOOL
WINAPI
SetEndOfFile(
__in HANDLE hFile
);
WINBASEAPI
DWORD
WINAPI
SetFilePointer(
__in HANDLE hFile,
__in LONG lDistanceToMove,
__inout_opt PLONG lpDistanceToMoveHigh,
__in DWORD dwMoveMethod
);
WINBASEAPI
BOOL
WINAPI
SetFilePointerEx(
__in HANDLE hFile,
__in LARGE_INTEGER liDistanceToMove,
__out_opt PLARGE_INTEGER lpNewFilePointer,
__in DWORD dwMoveMethod
);
WINBASEAPI
BOOL
WINAPI
FindClose(
__inout HANDLE hFindFile
);
WINBASEAPI
BOOL
WINAPI
GetFileTime(
__in HANDLE hFile,
__out_opt LPFILETIME lpCreationTime,
__out_opt LPFILETIME lpLastAccessTime,
__out_opt LPFILETIME lpLastWriteTime
);
WINBASEAPI
BOOL
WINAPI
SetFileTime(
__in HANDLE hFile,
__in_opt CONST FILETIME *lpCreationTime,
__in_opt CONST FILETIME *lpLastAccessTime,
__in_opt CONST FILETIME *lpLastWriteTime
);
#if _WIN32_WINNT >= 0x0501
WINBASEAPI
BOOL
WINAPI
SetFileValidData(
__in HANDLE hFile,
__in LONGLONG ValidDataLength
); );
#endif // (_WIN32_WINNT >= 0x0501)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetFileShortNameA( SetFileShortNameA(
__in HANDLE hFile, _In_ HANDLE hFile,
__in LPCSTR lpShortName _In_ LPCSTR lpShortName
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetFileShortNameW( SetFileShortNameW(
__in HANDLE hFile, _In_ HANDLE hFile,
__in LPCWSTR lpShortName _In_ LPCWSTR lpShortName
); );
#ifdef UNICODE #ifdef UNICODE
#define SetFileShortName SetFileShortNameW #define SetFileShortName SetFileShortNameW
#else #else
#define SetFileShortName SetFileShortNameA #define SetFileShortName SetFileShortNameA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
CloseHandle(
__in HANDLE hObject
);
WINBASEAPI
BOOL
WINAPI
DuplicateHandle(
__in HANDLE hSourceProcessHandle,
__in HANDLE hSourceHandle,
__in HANDLE hTargetProcessHandle,
__deref_out LPHANDLE lpTargetHandle,
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in DWORD dwOptions
);
WINBASEAPI
BOOL
WINAPI
GetHandleInformation(
__in HANDLE hObject,
__out LPDWORD lpdwFlags
);
WINBASEAPI
BOOL
WINAPI
SetHandleInformation(
__in HANDLE hObject,
__in DWORD dwMask,
__in DWORD dwFlags
);
#define HANDLE_FLAG_INHERIT 0x00000001 #define HANDLE_FLAG_INHERIT 0x00000001
#define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x00000002 #define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x00000002
#define HINSTANCE_ERROR 32 #define HINSTANCE_ERROR 32
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
LoadModule( LoadModule(
__in LPCSTR lpModuleName, _In_ LPCSTR lpModuleName,
__in LPVOID lpParameterBlock _In_ LPVOID lpParameterBlock
); );
__drv_preferredFunction("CreateProcess","Deprecated. See MSDN for details") __drv_preferredFunction("CreateProcess","Deprecated. See MSDN for details")
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
WinExec( WinExec(
__in LPCSTR lpCmdLine, _In_ LPCSTR lpCmdLine,
__in UINT uCmdShow _In_ UINT uCmdShow
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ClearCommBreak( ClearCommBreak(
__in HANDLE hFile _In_ HANDLE hFile
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ClearCommError( ClearCommError(
__in HANDLE hFile, _In_ HANDLE hFile,
__out_opt LPDWORD lpErrors, _Out_opt_ LPDWORD lpErrors,
__out_opt LPCOMSTAT lpStat _Out_opt_ LPCOMSTAT lpStat
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetupComm( SetupComm(
__in HANDLE hFile, _In_ HANDLE hFile,
__in DWORD dwInQueue, _In_ DWORD dwInQueue,
__in DWORD dwOutQueue _In_ DWORD dwOutQueue
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EscapeCommFunction( EscapeCommFunction(
__in HANDLE hFile, _In_ HANDLE hFile,
__in DWORD dwFunc _In_ DWORD dwFunc
); );
WINBASEAPI WINBASEAPI
__success(return == TRUE) _Success_(return != FALSE)
BOOL BOOL
WINAPI WINAPI
GetCommConfig( GetCommConfig(
__in HANDLE hCommDev, _In_ HANDLE hCommDev,
__out_bcount_opt(*lpdwSize) LPCOMMCONFIG lpCC, _Out_writes_bytes_opt_(*lpdwSize) LPCOMMCONFIG lpCC,
__inout LPDWORD lpdwSize _Inout_ LPDWORD lpdwSize
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetCommMask( GetCommMask(
__in HANDLE hFile, _In_ HANDLE hFile,
__out LPDWORD lpEvtMask _Out_ LPDWORD lpEvtMask
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetCommProperties( GetCommProperties(
__in HANDLE hFile, _In_ HANDLE hFile,
__inout LPCOMMPROP lpCommProp _Inout_ LPCOMMPROP lpCommProp
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetCommModemStatus( GetCommModemStatus(
__in HANDLE hFile, _In_ HANDLE hFile,
__out LPDWORD lpModemStat _Out_ LPDWORD lpModemStat
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetCommState( GetCommState(
__in HANDLE hFile, _In_ HANDLE hFile,
__out LPDCB lpDCB _Out_ LPDCB lpDCB
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetCommTimeouts( GetCommTimeouts(
__in HANDLE hFile, _In_ HANDLE hFile,
__out LPCOMMTIMEOUTS lpCommTimeouts _Out_ LPCOMMTIMEOUTS lpCommTimeouts
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
PurgeComm( PurgeComm(
__in HANDLE hFile, _In_ HANDLE hFile,
__in DWORD dwFlags _In_ DWORD dwFlags
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetCommBreak( SetCommBreak(
__in HANDLE hFile _In_ HANDLE hFile
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetCommConfig( SetCommConfig(
__in HANDLE hCommDev, _In_ HANDLE hCommDev,
__in_bcount(dwSize) LPCOMMCONFIG lpCC, _In_reads_bytes_(dwSize) LPCOMMCONFIG lpCC,
__in DWORD dwSize _In_ DWORD dwSize
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetCommMask( SetCommMask(
__in HANDLE hFile, _In_ HANDLE hFile,
__in DWORD dwEvtMask _In_ DWORD dwEvtMask
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetCommState( SetCommState(
__in HANDLE hFile, _In_ HANDLE hFile,
__in LPDCB lpDCB _In_ LPDCB lpDCB
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetCommTimeouts( SetCommTimeouts(
__in HANDLE hFile, _In_ HANDLE hFile,
__in LPCOMMTIMEOUTS lpCommTimeouts _In_ LPCOMMTIMEOUTS lpCommTimeouts
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
TransmitCommChar( TransmitCommChar(
__in HANDLE hFile, _In_ HANDLE hFile,
__in char cChar _In_ char cChar
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WaitCommEvent( WaitCommEvent(
__in HANDLE hFile, _In_ HANDLE hFile,
__inout LPDWORD lpEvtMask, _Inout_ LPDWORD lpEvtMask,
__inout_opt LPOVERLAPPED lpOverlapped _Inout_opt_ LPOVERLAPPED lpOverlapped
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
SetTapePosition( SetTapePosition(
__in HANDLE hDevice, _In_ HANDLE hDevice,
__in DWORD dwPositionMethod, _In_ DWORD dwPositionMethod,
__in DWORD dwPartition, _In_ DWORD dwPartition,
__in DWORD dwOffsetLow, _In_ DWORD dwOffsetLow,
__in DWORD dwOffsetHigh, _In_ DWORD dwOffsetHigh,
__in BOOL bImmediate _In_ BOOL bImmediate
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetTapePosition( GetTapePosition(
__in HANDLE hDevice, _In_ HANDLE hDevice,
__in DWORD dwPositionType, _In_ DWORD dwPositionType,
__out LPDWORD lpdwPartition, _Out_ LPDWORD lpdwPartition,
__out LPDWORD lpdwOffsetLow, _Out_ LPDWORD lpdwOffsetLow,
__out LPDWORD lpdwOffsetHigh _Out_ LPDWORD lpdwOffsetHigh
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
PrepareTape( PrepareTape(
__in HANDLE hDevice, _In_ HANDLE hDevice,
__in DWORD dwOperation, _In_ DWORD dwOperation,
__in BOOL bImmediate _In_ BOOL bImmediate
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
EraseTape( EraseTape(
__in HANDLE hDevice, _In_ HANDLE hDevice,
__in DWORD dwEraseType, _In_ DWORD dwEraseType,
__in BOOL bImmediate _In_ BOOL bImmediate
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
CreateTapePartition( CreateTapePartition(
__in HANDLE hDevice, _In_ HANDLE hDevice,
__in DWORD dwPartitionMethod, _In_ DWORD dwPartitionMethod,
__in DWORD dwCount, _In_ DWORD dwCount,
__in DWORD dwSize _In_ DWORD dwSize
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
WriteTapemark( WriteTapemark(
__in HANDLE hDevice, _In_ HANDLE hDevice,
__in DWORD dwTapemarkType, _In_ DWORD dwTapemarkType,
__in DWORD dwTapemarkCount, _In_ DWORD dwTapemarkCount,
__in BOOL bImmediate _In_ BOOL bImmediate
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetTapeStatus( GetTapeStatus(
__in HANDLE hDevice _In_ HANDLE hDevice
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetTapeParameters( GetTapeParameters(
__in HANDLE hDevice, _In_ HANDLE hDevice,
__in DWORD dwOperation, _In_ DWORD dwOperation,
__inout LPDWORD lpdwSize, _Inout_ LPDWORD lpdwSize,
__out_bcount(*lpdwSize) LPVOID lpTapeInformation _Out_writes_bytes_(*lpdwSize) LPVOID lpTapeInformation
); );
#define GET_TAPE_MEDIA_INFORMATION 0 #define GET_TAPE_MEDIA_INFORMATION 0
#define GET_TAPE_DRIVE_INFORMATION 1 #define GET_TAPE_DRIVE_INFORMATION 1
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
SetTapeParameters( SetTapeParameters(
__in HANDLE hDevice, _In_ HANDLE hDevice,
__in DWORD dwOperation, _In_ DWORD dwOperation,
__in LPVOID lpTapeInformation _In_ LPVOID lpTapeInformation
); );
#define SET_TAPE_MEDIA_INFORMATION 0 #define SET_TAPE_MEDIA_INFORMATION 0
#define SET_TAPE_DRIVE_INFORMATION 1 #define SET_TAPE_DRIVE_INFORMATION 1
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
BOOL #pragma endregion
WINAPI
Beep( #pragma region Application Family
__in DWORD dwFreq, #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
__in DWORD dwDuration
);
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
MulDiv( MulDiv(
__in int nNumber, _In_ int nNumber,
__in int nNumerator, _In_ int nNumerator,
__in int nDenominator _In_ int nDenominator
);
WINBASEAPI
VOID
WINAPI
GetSystemTime(
__out LPSYSTEMTIME lpSystemTime
);
WINBASEAPI
VOID
WINAPI
GetSystemTimeAsFileTime(
__out LPFILETIME lpSystemTimeAsFileTime
);
WINBASEAPI
BOOL
WINAPI
SetSystemTime(
__in CONST SYSTEMTIME *lpSystemTime
);
WINBASEAPI
VOID
WINAPI
GetLocalTime(
__out LPSYSTEMTIME lpSystemTime
); );
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
BOOL #pragma endregion
WINAPI
SetLocalTime(
__in CONST SYSTEMTIME *lpSystemTime
);
WINBASEAPI #pragma region Desktop Family
VOID #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINAPI
GetSystemInfo(
__out LPSYSTEM_INFO lpSystemInfo
);
typedef enum _DEP_SYSTEM_POLICY_TYPE { typedef enum _DEP_SYSTEM_POLICY_TYPE {
DEPPolicyAlwaysOff = 0, DEPPolicyAlwaysOff = 0,
DEPPolicyAlwaysOn, DEPPolicyAlwaysOn,
DEPPolicyOptIn, DEPPolicyOptIn,
DEPPolicyOptOut, DEPPolicyOptOut,
DEPTotalPolicyCount DEPTotalPolicyCount
} DEP_SYSTEM_POLICY_TYPE; } DEP_SYSTEM_POLICY_TYPE;
#if (NTDDI_VERSION >= NTDDI_WINXPSP3)
WINBASEAPI WINBASEAPI
DEP_SYSTEM_POLICY_TYPE DEP_SYSTEM_POLICY_TYPE
WINAPI WINAPI
GetSystemDEPPolicy( GetSystemDEPPolicy(
VOID VOID
); );
#if _WIN32_WINNT >= 0x0502 #endif // (NTDDI_VERSION >= NTDDI_WINXPSP3)
#define FILE_CACHE_FLAGS_DEFINED
#define FILE_CACHE_MAX_HARD_ENABLE 0x00000001
#define FILE_CACHE_MAX_HARD_DISABLE 0x00000002
#define FILE_CACHE_MIN_HARD_ENABLE 0x00000004
#define FILE_CACHE_MIN_HARD_DISABLE 0x00000008
WINBASEAPI
BOOL
WINAPI
SetSystemFileCacheSize (
__in SIZE_T MinimumFileCacheSize,
__in SIZE_T MaximumFileCacheSize,
__in DWORD Flags
);
WINBASEAPI
BOOL
WINAPI
GetSystemFileCacheSize (
__out PSIZE_T lpMinimumFileCacheSize,
__out PSIZE_T lpMaximumFileCacheSize,
__out PDWORD lpFlags
);
#endif // (_WIN32_WINNT >= 0x0502)
#if _WIN32_WINNT >= 0x0501 #if _WIN32_WINNT >= 0x0501
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetSystemRegistryQuota( GetSystemRegistryQuota(
__out_opt PDWORD pdwQuotaAllowed, _Out_opt_ PDWORD pdwQuotaAllowed,
__out_opt PDWORD pdwQuotaUsed _Out_opt_ PDWORD pdwQuotaUsed
);
BOOL
WINAPI
GetSystemTimes(
__out_opt LPFILETIME lpIdleTime,
__out_opt LPFILETIME lpKernelTime,
__out_opt LPFILETIME lpUserTime
); );
#endif // (_WIN32_WINNT >= 0x0501) #endif // (_WIN32_WINNT >= 0x0501)
#if _WIN32_WINNT >= 0x0501
WINBASEAPI
VOID
WINAPI
GetNativeSystemInfo(
__out LPSYSTEM_INFO lpSystemInfo
);
#endif
WINBASEAPI
BOOL
WINAPI
IsProcessorFeaturePresent(
__in DWORD ProcessorFeature
);
typedef struct _TIME_ZONE_INFORMATION {
LONG Bias;
WCHAR StandardName[ 32 ];
SYSTEMTIME StandardDate;
LONG StandardBias;
WCHAR DaylightName[ 32 ];
SYSTEMTIME DaylightDate;
LONG DaylightBias;
} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
typedef struct _TIME_DYNAMIC_ZONE_INFORMATION {
LONG Bias;
WCHAR StandardName[ 32 ];
SYSTEMTIME StandardDate;
LONG StandardBias;
WCHAR DaylightName[ 32 ];
SYSTEMTIME DaylightDate;
LONG DaylightBias;
WCHAR TimeZoneKeyName[ 128 ];
BOOLEAN DynamicDaylightTimeDisabled;
} DYNAMIC_TIME_ZONE_INFORMATION, *PDYNAMIC_TIME_ZONE_INFORMATION;
WINBASEAPI
BOOL
WINAPI
SystemTimeToTzSpecificLocalTime(
__in_opt CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation,
__in CONST SYSTEMTIME *lpUniversalTime,
__out LPSYSTEMTIME lpLocalTime
);
WINBASEAPI
BOOL
WINAPI
TzSpecificLocalTimeToSystemTime(
__in_opt CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation,
__in CONST SYSTEMTIME *lpLocalTime,
__out LPSYSTEMTIME lpUniversalTime
);
BOOL
WINAPI
GetTimeZoneInformationForYear(
__in USHORT wYear,
__in_opt PDYNAMIC_TIME_ZONE_INFORMATION pdtzi,
__out LPTIME_ZONE_INFORMATION ptzi
);
WINBASEAPI
DWORD
WINAPI
GetTimeZoneInformation(
__out LPTIME_ZONE_INFORMATION lpTimeZoneInformation
);
WINBASEAPI
BOOL
WINAPI
SetTimeZoneInformation(
__in CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation
);
WINBASEAPI
DWORD
WINAPI
GetDynamicTimeZoneInformation(
__out PDYNAMIC_TIME_ZONE_INFORMATION pTimeZoneInformation
);
WINBASEAPI
BOOL
WINAPI
SetDynamicTimeZoneInformation(
__in CONST DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation
);
// //
// Routines to convert back and forth between system time and file time // Routines to convert back and forth between system time and file time
// //
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SystemTimeToFileTime(
__in CONST SYSTEMTIME *lpSystemTime,
__out LPFILETIME lpFileTime
);
WINBASEAPI
BOOL
WINAPI
FileTimeToLocalFileTime(
__in CONST FILETIME *lpFileTime,
__out LPFILETIME lpLocalFileTime
);
WINBASEAPI
BOOL
WINAPI
LocalFileTimeToFileTime(
__in CONST FILETIME *lpLocalFileTime,
__out LPFILETIME lpFileTime
);
WINBASEAPI
BOOL
WINAPI
FileTimeToSystemTime(
__in CONST FILETIME *lpFileTime,
__out LPSYSTEMTIME lpSystemTime
);
WINBASEAPI
LONG
WINAPI
CompareFileTime(
__in CONST FILETIME *lpFileTime1,
__in CONST FILETIME *lpFileTime2
);
WINBASEAPI
BOOL
WINAPI
FileTimeToDosDateTime( FileTimeToDosDateTime(
__in CONST FILETIME *lpFileTime, _In_ CONST FILETIME *lpFileTime,
__out LPWORD lpFatDate, _Out_ LPWORD lpFatDate,
__out LPWORD lpFatTime _Out_ LPWORD lpFatTime
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DosDateTimeToFileTime( DosDateTimeToFileTime(
__in WORD wFatDate, _In_ WORD wFatDate,
__in WORD wFatTime, _In_ WORD wFatTime,
__out LPFILETIME lpFileTime _Out_ LPFILETIME lpFileTime
);
__drv_preferredFunction("GetTickCount64", "GetTickCount overflows roughly every
49 days. Code that does not take that into account can loop indefinitely. GetT
ickCount64 operates on 64 bit values and does not have that problem")
WINBASEAPI
DWORD
WINAPI
GetTickCount(
VOID
);
#if (_WIN32_WINNT >= 0x0600)
WINBASEAPI
ULONGLONG
WINAPI
GetTickCount64(
VOID
); );
#endif #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
WINBASEAPI
BOOL
WINAPI
SetSystemTimeAdjustment(
__in DWORD dwTimeAdjustment,
__in BOOL bTimeAdjustmentDisabled
);
WINBASEAPI #pragma region Application Family
BOOL #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
WINAPI
GetSystemTimeAdjustment(
__out PDWORD lpTimeAdjustment,
__out PDWORD lpTimeIncrement,
__out PBOOL lpTimeAdjustmentDisabled
);
#if !defined(MIDL_PASS) #if !defined(MIDL_PASS)
WINBASEAPI WINBASEAPI
_Success_(return != 0)
DWORD DWORD
WINAPI WINAPI
FormatMessageA( FormatMessageA(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in_opt LPCVOID lpSource, _In_opt_ LPCVOID lpSource,
__in DWORD dwMessageId, _In_ DWORD dwMessageId,
__in DWORD dwLanguageId, _In_ DWORD dwLanguageId,
__out LPSTR lpBuffer, _Out_ LPSTR lpBuffer,
__in DWORD nSize, _In_ DWORD nSize,
__in_opt va_list *Arguments _In_opt_ va_list *Arguments
); );
WINBASEAPI WINBASEAPI
_Success_(return != 0)
DWORD DWORD
WINAPI WINAPI
FormatMessageW( FormatMessageW(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in_opt LPCVOID lpSource, _In_opt_ LPCVOID lpSource,
__in DWORD dwMessageId, _In_ DWORD dwMessageId,
__in DWORD dwLanguageId, _In_ DWORD dwLanguageId,
__out LPWSTR lpBuffer, _Out_ LPWSTR lpBuffer,
__in DWORD nSize, _In_ DWORD nSize,
__in_opt va_list *Arguments _In_opt_ va_list *Arguments
); );
#ifdef UNICODE #ifdef UNICODE
#define FormatMessage FormatMessageW #define FormatMessage FormatMessageW
#else #else
#define FormatMessage FormatMessageA #define FormatMessage FormatMessageA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef FormatMessage #undef FormatMessage
__inline __inline
skipping to change at line 5718 skipping to change at line 2372
dwMessageId, dwMessageId,
dwLanguageId, dwLanguageId,
lpBuffer, lpBuffer,
nSize, nSize,
Arguments Arguments
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
#endif /* MIDL_PASS */ #endif /* MIDL_PASS */
#define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
#define FORMAT_MESSAGE_IGNORE_INSERTS 0x00000200 #define FORMAT_MESSAGE_IGNORE_INSERTS 0x00000200
#define FORMAT_MESSAGE_FROM_STRING 0x00000400 #define FORMAT_MESSAGE_FROM_STRING 0x00000400
#define FORMAT_MESSAGE_FROM_HMODULE 0x00000800 #define FORMAT_MESSAGE_FROM_HMODULE 0x00000800
#define FORMAT_MESSAGE_FROM_SYSTEM 0x00001000 #define FORMAT_MESSAGE_FROM_SYSTEM 0x00001000
#define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x00002000 #define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x00002000
#define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF #define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
BOOL #pragma endregion
WINAPI
CreatePipe(
__out_ecount_full(1) PHANDLE hReadPipe,
__out_ecount_full(1) PHANDLE hWritePipe,
__in_opt LPSECURITY_ATTRIBUTES lpPipeAttributes,
__in DWORD nSize
);
WINBASEAPI #pragma region Desktop Family
BOOL #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINAPI
ConnectNamedPipe(
__in HANDLE hNamedPipe,
__inout_opt LPOVERLAPPED lpOverlapped
);
WINBASEAPI //
BOOL // FORMAT_MESSAGE_ALLOCATE_BUFFER requires use of LocalFree which is in the
WINAPI // "Desktop Family" only.
DisconnectNamedPipe( //
__in HANDLE hNamedPipe
);
WINBASEAPI #define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
BOOL
WINAPI
SetNamedPipeHandleState(
__in HANDLE hNamedPipe,
__in_opt LPDWORD lpMode,
__in_opt LPDWORD lpMaxCollectionCount,
__in_opt LPDWORD lpCollectDataTimeout
);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNamedPipeInfo( GetNamedPipeInfo(
__in HANDLE hNamedPipe, _In_ HANDLE hNamedPipe,
__out_opt LPDWORD lpFlags, _Out_opt_ LPDWORD lpFlags,
__out_opt LPDWORD lpOutBufferSize, _Out_opt_ LPDWORD lpOutBufferSize,
__out_opt LPDWORD lpInBufferSize, _Out_opt_ LPDWORD lpInBufferSize,
__out_opt LPDWORD lpMaxInstances _Out_opt_ LPDWORD lpMaxInstances
);
WINBASEAPI
BOOL
WINAPI
PeekNamedPipe(
__in HANDLE hNamedPipe,
__out_bcount_part_opt(nBufferSize, *lpBytesRead) LPVOID lpBuffer,
__in DWORD nBufferSize,
__out_opt LPDWORD lpBytesRead,
__out_opt LPDWORD lpTotalBytesAvail,
__out_opt LPDWORD lpBytesLeftThisMessage
);
WINBASEAPI
BOOL
WINAPI
TransactNamedPipe(
__in HANDLE hNamedPipe,
__in_bcount_opt(nInBufferSize) LPVOID lpInBuffer,
__in DWORD nInBufferSize,
__out_bcount_part_opt(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
__in DWORD nOutBufferSize,
__out LPDWORD lpBytesRead,
__inout_opt LPOVERLAPPED lpOverlapped
); );
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
CreateMailslotA( CreateMailslotA(
__in LPCSTR lpName, _In_ LPCSTR lpName,
__in DWORD nMaxMessageSize, _In_ DWORD nMaxMessageSize,
__in DWORD lReadTimeout, _In_ DWORD lReadTimeout,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
); );
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
CreateMailslotW( CreateMailslotW(
__in LPCWSTR lpName, _In_ LPCWSTR lpName,
__in DWORD nMaxMessageSize, _In_ DWORD nMaxMessageSize,
__in DWORD lReadTimeout, _In_ DWORD lReadTimeout,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateMailslot CreateMailslotW #define CreateMailslot CreateMailslotW
#else #else
#define CreateMailslot CreateMailslotA #define CreateMailslot CreateMailslotA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetMailslotInfo( GetMailslotInfo(
__in HANDLE hMailslot, _In_ HANDLE hMailslot,
__out_opt LPDWORD lpMaxMessageSize, _Out_opt_ LPDWORD lpMaxMessageSize,
__out_opt LPDWORD lpNextSize, _Out_opt_ LPDWORD lpNextSize,
__out_opt LPDWORD lpMessageCount, _Out_opt_ LPDWORD lpMessageCount,
__out_opt LPDWORD lpReadTimeout _Out_opt_ LPDWORD lpReadTimeout
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetMailslotInfo( SetMailslotInfo(
__in HANDLE hMailslot, _In_ HANDLE hMailslot,
__in DWORD lReadTimeout _In_ DWORD lReadTimeout
);
WINBASEAPI
__out_opt __out_data_source(FILE)
LPVOID
WINAPI
MapViewOfFile(
__in HANDLE hFileMappingObject,
__in DWORD dwDesiredAccess,
__in DWORD dwFileOffsetHigh,
__in DWORD dwFileOffsetLow,
__in SIZE_T dwNumberOfBytesToMap
);
WINBASEAPI
BOOL
WINAPI
FlushViewOfFile(
__in LPCVOID lpBaseAddress,
__in SIZE_T dwNumberOfBytesToFlush
);
WINBASEAPI
BOOL
WINAPI
UnmapViewOfFile(
__in LPCVOID lpBaseAddress
); );
// //
// File Encryption API // File Encryption API
// //
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
EncryptFileA( EncryptFileA(
__in LPCSTR lpFileName _In_ LPCSTR lpFileName
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
EncryptFileW( EncryptFileW(
__in LPCWSTR lpFileName _In_ LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define EncryptFile EncryptFileW #define EncryptFile EncryptFileW
#else #else
#define EncryptFile EncryptFileA #define EncryptFile EncryptFileA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
DecryptFileA( DecryptFileA(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__reserved DWORD dwReserved _Reserved_ DWORD dwReserved
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
DecryptFileW( DecryptFileW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__reserved DWORD dwReserved _Reserved_ DWORD dwReserved
); );
#ifdef UNICODE #ifdef UNICODE
#define DecryptFile DecryptFileW #define DecryptFile DecryptFileW
#else #else
#define DecryptFile DecryptFileA #define DecryptFile DecryptFileA
#endif // !UNICODE #endif // !UNICODE
// //
// Encryption Status Value // Encryption Status Value
// //
skipping to change at line 5930 skipping to change at line 2507
#define FILE_UNKNOWN 5 #define FILE_UNKNOWN 5
#define FILE_SYSTEM_NOT_SUPPORT 6 #define FILE_SYSTEM_NOT_SUPPORT 6
#define FILE_USER_DISALLOWED 7 #define FILE_USER_DISALLOWED 7
#define FILE_READ_ONLY 8 #define FILE_READ_ONLY 8
#define FILE_DIR_DISALLOWED 9 #define FILE_DIR_DISALLOWED 9
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
FileEncryptionStatusA( FileEncryptionStatusA(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__out LPDWORD lpStatus _Out_ LPDWORD lpStatus
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
FileEncryptionStatusW( FileEncryptionStatusW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__out LPDWORD lpStatus _Out_ LPDWORD lpStatus
); );
#ifdef UNICODE #ifdef UNICODE
#define FileEncryptionStatus FileEncryptionStatusW #define FileEncryptionStatus FileEncryptionStatusW
#else #else
#define FileEncryptionStatus FileEncryptionStatusA #define FileEncryptionStatus FileEncryptionStatusA
#endif // !UNICODE #endif // !UNICODE
// //
// Currently defined recovery flags // Currently defined recovery flags
// //
#define EFS_USE_RECOVERY_KEYS (0x1) #define EFS_USE_RECOVERY_KEYS (0x1)
typedef typedef
DWORD DWORD
(WINAPI *PFE_EXPORT_FUNC)( (WINAPI *PFE_EXPORT_FUNC)(
__in_bcount(ulLength) PBYTE pbData, _In_reads_bytes_(ulLength) PBYTE pbData,
__in_opt PVOID pvCallbackContext, _In_opt_ PVOID pvCallbackContext,
__in ULONG ulLength _In_ ULONG ulLength
); );
typedef typedef
DWORD DWORD
(WINAPI *PFE_IMPORT_FUNC)( (WINAPI *PFE_IMPORT_FUNC)(
__out_bcount_part(*ulLength, *ulLength) PBYTE pbData, _Out_writes_bytes_to_(*ulLength, *ulLength) PBYTE pbData,
__in_opt PVOID pvCallbackContext, _In_opt_ PVOID pvCallbackContext,
__inout PULONG ulLength _Inout_ PULONG ulLength
); );
// //
// OpenRaw flag values // OpenRaw flag values
// //
#define CREATE_FOR_IMPORT (1) #define CREATE_FOR_IMPORT (1)
#define CREATE_FOR_DIR (2) #define CREATE_FOR_DIR (2)
#define OVERWRITE_HIDDEN (4) #define OVERWRITE_HIDDEN (4)
#define EFSRPC_SECURE_ONLY (8) #define EFSRPC_SECURE_ONLY (8)
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
OpenEncryptedFileRawA( OpenEncryptedFileRawA(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__in ULONG ulFlags, _In_ ULONG ulFlags,
__deref_out PVOID *pvContext _Outptr_ PVOID *pvContext
); );
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
OpenEncryptedFileRawW( OpenEncryptedFileRawW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in ULONG ulFlags, _In_ ULONG ulFlags,
__deref_out PVOID *pvContext _Outptr_ PVOID *pvContext
); );
#ifdef UNICODE #ifdef UNICODE
#define OpenEncryptedFileRaw OpenEncryptedFileRawW #define OpenEncryptedFileRaw OpenEncryptedFileRawW
#else #else
#define OpenEncryptedFileRaw OpenEncryptedFileRawA #define OpenEncryptedFileRaw OpenEncryptedFileRawA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
ReadEncryptedFileRaw( ReadEncryptedFileRaw(
__in PFE_EXPORT_FUNC pfExportCallback, _In_ PFE_EXPORT_FUNC pfExportCallback,
__in_opt PVOID pvCallbackContext, _In_opt_ PVOID pvCallbackContext,
__in PVOID pvContext _In_ PVOID pvContext
); );
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
WriteEncryptedFileRaw( WriteEncryptedFileRaw(
__in PFE_IMPORT_FUNC pfImportCallback, _In_ PFE_IMPORT_FUNC pfImportCallback,
__in_opt PVOID pvCallbackContext, _In_opt_ PVOID pvCallbackContext,
__in PVOID pvContext _In_ PVOID pvContext
); );
WINADVAPI WINADVAPI
VOID VOID
WINAPI WINAPI
CloseEncryptedFileRaw( CloseEncryptedFileRaw(
__in PVOID pvContext _In_ PVOID pvContext
); );
// //
// _l Compat Functions // _l Compat Functions
// //
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
lstrcmpA( lstrcmpA(
__in LPCSTR lpString1, _In_ LPCSTR lpString1,
__in LPCSTR lpString2 _In_ LPCSTR lpString2
); );
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
lstrcmpW( lstrcmpW(
__in LPCWSTR lpString1, _In_ LPCWSTR lpString1,
__in LPCWSTR lpString2 _In_ LPCWSTR lpString2
); );
#ifdef UNICODE #ifdef UNICODE
#define lstrcmp lstrcmpW #define lstrcmp lstrcmpW
#else #else
#define lstrcmp lstrcmpA #define lstrcmp lstrcmpA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
lstrcmpiA( lstrcmpiA(
__in LPCSTR lpString1, _In_ LPCSTR lpString1,
__in LPCSTR lpString2 _In_ LPCSTR lpString2
); );
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
lstrcmpiW( lstrcmpiW(
__in LPCWSTR lpString1, _In_ LPCWSTR lpString1,
__in LPCWSTR lpString2 _In_ LPCWSTR lpString2
); );
#ifdef UNICODE #ifdef UNICODE
#define lstrcmpi lstrcmpiW #define lstrcmpi lstrcmpiW
#else #else
#define lstrcmpi lstrcmpiA #define lstrcmpi lstrcmpiA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
__out _Check_return_
_Success_(return != NULL)
_Post_satisfies_(return == lpString1)
_Ret_maybenull_
LPSTR LPSTR
WINAPI WINAPI
lstrcpynA( lstrcpynA(
__out_ecount(iMaxLength) LPSTR lpString1, _Out_writes_(iMaxLength) LPSTR lpString1,
__in LPCSTR lpString2, _In_ LPCSTR lpString2,
__in int iMaxLength _In_ int iMaxLength
); );
WINBASEAPI WINBASEAPI
__out _Check_return_
_Success_(return != NULL)
_Post_satisfies_(return == lpString1)
_Ret_maybenull_
LPWSTR LPWSTR
WINAPI WINAPI
lstrcpynW( lstrcpynW(
__out_ecount(iMaxLength) LPWSTR lpString1, _Out_writes_(iMaxLength) LPWSTR lpString1,
__in LPCWSTR lpString2, _In_ LPCWSTR lpString2,
__in int iMaxLength _In_ int iMaxLength
); );
#ifdef UNICODE #ifdef UNICODE
#define lstrcpyn lstrcpynW #define lstrcpyn lstrcpynW
#else #else
#define lstrcpyn lstrcpynA #define lstrcpyn lstrcpynA
#endif // !UNICODE #endif // !UNICODE
#if defined(DEPRECATE_SUPPORTED) #if defined(DEPRECATE_SUPPORTED)
#pragma warning(push) #pragma warning(push)
#pragma warning(disable:4995) #pragma warning(disable:4995)
#endif #endif
WINBASEAPI WINBASEAPI
__out
LPSTR LPSTR
WINAPI WINAPI
lstrcpyA( lstrcpyA(
__out_z LPSTR lpString1, // deprecated: annotation is as good as it gets _Out_writes_(_String_length_(lpString2) + 1) LPSTR lpString1, // deprecated:
__in LPCSTR lpString2 annotation is as good as it gets
_In_ LPCSTR lpString2
); );
WINBASEAPI WINBASEAPI
__out
LPWSTR LPWSTR
WINAPI WINAPI
lstrcpyW( lstrcpyW(
__out_z LPWSTR lpString1, // deprecated: annotation is as good as it gets _Out_writes_(_String_length_(lpString2) + 1) LPWSTR lpString1, // deprecated
__in LPCWSTR lpString2 : annotation is as good as it gets
_In_ LPCWSTR lpString2
); );
#ifdef UNICODE #ifdef UNICODE
#define lstrcpy lstrcpyW #define lstrcpy lstrcpyW
#else #else
#define lstrcpy lstrcpyA #define lstrcpy lstrcpyA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
__out
LPSTR LPSTR
WINAPI WINAPI
lstrcatA( lstrcatA(
__inout LPSTR lpString1, _Inout_updates_z_(_String_length_(lpString1) + _String_length_(lpString2) +
__in LPCSTR lpString2 1) LPSTR lpString1, // deprecated: annotation is as good as it gets
_In_ LPCSTR lpString2
); );
WINBASEAPI WINBASEAPI
__out
LPWSTR LPWSTR
WINAPI WINAPI
lstrcatW( lstrcatW(
__inout LPWSTR lpString1, _Inout_updates_z_(_String_length_(lpString1) + _String_length_(lpString2) +
__in LPCWSTR lpString2 1) LPWSTR lpString1, // deprecated: annotation is as good as it gets
_In_ LPCWSTR lpString2
); );
#ifdef UNICODE #ifdef UNICODE
#define lstrcat lstrcatW #define lstrcat lstrcatW
#else #else
#define lstrcat lstrcatA #define lstrcat lstrcatA
#endif // !UNICODE #endif // !UNICODE
#if defined(DEPRECATE_SUPPORTED) #if defined(DEPRECATE_SUPPORTED)
#pragma warning(pop) #pragma warning(pop)
#endif #endif
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
lstrlenA( lstrlenA(
__in LPCSTR lpString _In_ LPCSTR lpString
); );
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
lstrlenW( lstrlenW(
__in LPCWSTR lpString _In_ LPCWSTR lpString
); );
#ifdef UNICODE #ifdef UNICODE
#define lstrlen lstrlenW #define lstrlen lstrlenW
#else #else
#define lstrlen lstrlenA #define lstrlen lstrlenA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
HFILE HFILE
WINAPI WINAPI
OpenFile( OpenFile(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__inout LPOFSTRUCT lpReOpenBuff, _Inout_ LPOFSTRUCT lpReOpenBuff,
__in UINT uStyle _In_ UINT uStyle
); );
WINBASEAPI WINBASEAPI
HFILE HFILE
WINAPI WINAPI
_lopen( _lopen(
__in LPCSTR lpPathName, _In_ LPCSTR lpPathName,
__in int iReadWrite _In_ int iReadWrite
); );
WINBASEAPI WINBASEAPI
HFILE HFILE
WINAPI WINAPI
_lcreat( _lcreat(
__in LPCSTR lpPathName, _In_ LPCSTR lpPathName,
__in int iAttribute _In_ int iAttribute
); );
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
_lread( _lread(
__in HFILE hFile, _In_ HFILE hFile,
__out_bcount_part(uBytes, return) LPVOID lpBuffer, _Out_writes_bytes_to_(uBytes, return) LPVOID lpBuffer,
__in UINT uBytes _In_ UINT uBytes
); );
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
_lwrite( _lwrite(
__in HFILE hFile, _In_ HFILE hFile,
__in_bcount(uBytes) LPCCH lpBuffer, _In_reads_bytes_(uBytes) LPCCH lpBuffer,
__in UINT uBytes _In_ UINT uBytes
); );
WINBASEAPI WINBASEAPI
long long
WINAPI WINAPI
_hread( _hread(
__in HFILE hFile, _In_ HFILE hFile,
__out_bcount_part(lBytes, return) LPVOID lpBuffer, _Out_writes_bytes_to_(lBytes, return) LPVOID lpBuffer,
__in long lBytes _In_ long lBytes
); );
WINBASEAPI WINBASEAPI
long long
WINAPI WINAPI
_hwrite( _hwrite(
__in HFILE hFile, _In_ HFILE hFile,
__in_bcount(lBytes) LPCCH lpBuffer, _In_reads_bytes_(lBytes) LPCCH lpBuffer,
__in long lBytes _In_ long lBytes
); );
WINBASEAPI WINBASEAPI
HFILE HFILE
WINAPI WINAPI
_lclose( _lclose(
__in HFILE hFile _In_ HFILE hFile
); );
WINBASEAPI WINBASEAPI
LONG LONG
WINAPI WINAPI
_llseek( _llseek(
__in HFILE hFile, _In_ HFILE hFile,
__in LONG lOffset, _In_ LONG lOffset,
__in int iOrigin _In_ int iOrigin
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
IsTextUnicode( IsTextUnicode(
__in_bcount(iSize) CONST VOID* lpv, _In_reads_bytes_(iSize) CONST VOID* lpv,
__in int iSize, _In_ int iSize,
__inout_opt LPINT lpiResult _Inout_opt_ LPINT lpiResult
);
#define FLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
WINBASEAPI
DWORD
WINAPI
FlsAlloc(
__in_opt PFLS_CALLBACK_FUNCTION lpCallback
);
WINBASEAPI
PVOID
WINAPI
FlsGetValue(
__in DWORD dwFlsIndex
);
WINBASEAPI
BOOL
WINAPI
FlsSetValue(
__in DWORD dwFlsIndex,
__in_opt PVOID lpFlsData
);
WINBASEAPI
BOOL
WINAPI
FlsFree(
__in DWORD dwFlsIndex
);
#define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
WINBASEAPI
DWORD
WINAPI
TlsAlloc(
VOID
);
WINBASEAPI
LPVOID
WINAPI
TlsGetValue(
__in DWORD dwTlsIndex
);
WINBASEAPI
BOOL
WINAPI
TlsSetValue(
__in DWORD dwTlsIndex,
__in_opt LPVOID lpTlsValue
);
WINBASEAPI
BOOL
WINAPI
TlsFree(
__in DWORD dwTlsIndex
);
typedef
VOID
(WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)(
__in DWORD dwErrorCode,
__in DWORD dwNumberOfBytesTransfered,
__inout LPOVERLAPPED lpOverlapped
);
WINBASEAPI
DWORD
WINAPI
SleepEx(
__in DWORD dwMilliseconds,
__in BOOL bAlertable
);
WINBASEAPI
DWORD
WINAPI
WaitForSingleObjectEx(
__in HANDLE hHandle,
__in DWORD dwMilliseconds,
__in BOOL bAlertable
);
WINBASEAPI
DWORD
WINAPI
WaitForMultipleObjectsEx(
__in DWORD nCount,
__in_ecount(nCount) CONST HANDLE *lpHandles,
__in BOOL bWaitAll,
__in DWORD dwMilliseconds,
__in BOOL bAlertable
); );
#if(_WIN32_WINNT >= 0x0400) #if(_WIN32_WINNT >= 0x0400)
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
SignalObjectAndWait( SignalObjectAndWait(
__in HANDLE hObjectToSignal, _In_ HANDLE hObjectToSignal,
__in HANDLE hObjectToWaitOn, _In_ HANDLE hObjectToWaitOn,
__in DWORD dwMilliseconds, _In_ DWORD dwMilliseconds,
__in BOOL bAlertable _In_ BOOL bAlertable
); );
#endif /* _WIN32_WINNT >= 0x0400 */ #endif /* _WIN32_WINNT >= 0x0400 */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadFileEx(
__in HANDLE hFile,
__out_bcount_opt(nNumberOfBytesToRead) __out_data_source(FILE) LPVOID lpBuff
er,
__in DWORD nNumberOfBytesToRead,
__inout LPOVERLAPPED lpOverlapped,
__in_opt LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
);
WINBASEAPI
BOOL
WINAPI
WriteFileEx(
__in HANDLE hFile,
__in_bcount_opt(nNumberOfBytesToWrite) LPCVOID lpBuffer,
__in DWORD nNumberOfBytesToWrite,
__inout LPOVERLAPPED lpOverlapped,
__in_opt LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
);
WINBASEAPI
BOOL
WINAPI
BackupRead( BackupRead(
__in HANDLE hFile, _In_ HANDLE hFile,
__out_bcount_part(nNumberOfBytesToRead, *lpNumberOfBytesRead) LPBYTE lpBuffe _Out_writes_bytes_to_(nNumberOfBytesToRead, *lpNumberOfBytesRead) LPBYTE lpB
r, uffer,
__in DWORD nNumberOfBytesToRead, _In_ DWORD nNumberOfBytesToRead,
__out LPDWORD lpNumberOfBytesRead, _Out_ LPDWORD lpNumberOfBytesRead,
__in BOOL bAbort, _In_ BOOL bAbort,
__in BOOL bProcessSecurity, _In_ BOOL bProcessSecurity,
__inout LPVOID *lpContext _Inout_ LPVOID *lpContext
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
BackupSeek( BackupSeek(
__in HANDLE hFile, _In_ HANDLE hFile,
__in DWORD dwLowBytesToSeek, _In_ DWORD dwLowBytesToSeek,
__in DWORD dwHighBytesToSeek, _In_ DWORD dwHighBytesToSeek,
__out LPDWORD lpdwLowByteSeeked, _Out_ LPDWORD lpdwLowByteSeeked,
__out LPDWORD lpdwHighByteSeeked, _Out_ LPDWORD lpdwHighByteSeeked,
__inout LPVOID *lpContext _Inout_ LPVOID *lpContext
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
BackupWrite( BackupWrite(
__in HANDLE hFile, _In_ HANDLE hFile,
__in_bcount(nNumberOfBytesToWrite) LPBYTE lpBuffer, _In_reads_bytes_(nNumberOfBytesToWrite) LPBYTE lpBuffer,
__in DWORD nNumberOfBytesToWrite, _In_ DWORD nNumberOfBytesToWrite,
__out LPDWORD lpNumberOfBytesWritten, _Out_ LPDWORD lpNumberOfBytesWritten,
__in BOOL bAbort, _In_ BOOL bAbort,
__in BOOL bProcessSecurity, _In_ BOOL bProcessSecurity,
__inout LPVOID *lpContext _Inout_ LPVOID *lpContext
); );
// //
// Stream id structure // Stream id structure
// //
typedef struct _WIN32_STREAM_ID { typedef struct _WIN32_STREAM_ID {
DWORD dwStreamId ; DWORD dwStreamId ;
DWORD dwStreamAttributes ; DWORD dwStreamAttributes ;
LARGE_INTEGER Size ; LARGE_INTEGER Size ;
DWORD dwStreamNameSize ; DWORD dwStreamNameSize ;
skipping to change at line 6456 skipping to change at line 2915
// //
// Stream Attributes // Stream Attributes
// //
#define STREAM_NORMAL_ATTRIBUTE 0x00000000 #define STREAM_NORMAL_ATTRIBUTE 0x00000000
#define STREAM_MODIFIED_WHEN_READ 0x00000001 #define STREAM_MODIFIED_WHEN_READ 0x00000001
#define STREAM_CONTAINS_SECURITY 0x00000002 #define STREAM_CONTAINS_SECURITY 0x00000002
#define STREAM_CONTAINS_PROPERTIES 0x00000004 #define STREAM_CONTAINS_PROPERTIES 0x00000004
#define STREAM_SPARSE_ATTRIBUTE 0x00000008 #define STREAM_SPARSE_ATTRIBUTE 0x00000008
WINBASEAPI
BOOL
WINAPI
ReadFileScatter(
__in HANDLE hFile,
__in FILE_SEGMENT_ELEMENT aSegmentArray[],
__in DWORD nNumberOfBytesToRead,
__reserved LPDWORD lpReserved,
__inout LPOVERLAPPED lpOverlapped
);
WINBASEAPI
BOOL
WINAPI
WriteFileGather(
__in HANDLE hFile,
__in FILE_SEGMENT_ELEMENT aSegmentArray[],
__in DWORD nNumberOfBytesToWrite,
__reserved LPDWORD lpReserved,
__inout LPOVERLAPPED lpOverlapped
);
// //
// Dual Mode API below this line. Dual Mode Structures also included. // Dual Mode API below this line. Dual Mode Structures also included.
// //
#define STARTF_USESHOWWINDOW 0x00000001 #define STARTF_USESHOWWINDOW 0x00000001
#define STARTF_USESIZE 0x00000002 #define STARTF_USESIZE 0x00000002
#define STARTF_USEPOSITION 0x00000004 #define STARTF_USEPOSITION 0x00000004
#define STARTF_USECOUNTCHARS 0x00000008 #define STARTF_USECOUNTCHARS 0x00000008
#define STARTF_USEFILLATTRIBUTE 0x00000010 #define STARTF_USEFILLATTRIBUTE 0x00000010
#define STARTF_RUNFULLSCREEN 0x00000020 // ignored for non-x86 platforms #define STARTF_RUNFULLSCREEN 0x00000020 // ignored for non-x86 platforms
#define STARTF_FORCEONFEEDBACK 0x00000040 #define STARTF_FORCEONFEEDBACK 0x00000040
#define STARTF_FORCEOFFFEEDBACK 0x00000080 #define STARTF_FORCEOFFFEEDBACK 0x00000080
#define STARTF_USESTDHANDLES 0x00000100 #define STARTF_USESTDHANDLES 0x00000100
#if(WINVER >= 0x0400) #if(WINVER >= 0x0400)
#define STARTF_USEHOTKEY 0x00000200 #define STARTF_USEHOTKEY 0x00000200
#define STARTF_TITLEISLINKNAME 0x00000800 #define STARTF_TITLEISLINKNAME 0x00000800
#define STARTF_TITLEISAPPID 0x00001000 #define STARTF_TITLEISAPPID 0x00001000
#define STARTF_PREVENTPINNING 0x00002000 #define STARTF_PREVENTPINNING 0x00002000
#endif /* WINVER >= 0x0400 */ #endif /* WINVER >= 0x0400 */
typedef struct _STARTUPINFOA {
DWORD cb;
LPSTR lpReserved;
LPSTR lpDesktop;
LPSTR lpTitle;
DWORD dwX;
DWORD dwY;
DWORD dwXSize;
DWORD dwYSize;
DWORD dwXCountChars;
DWORD dwYCountChars;
DWORD dwFillAttribute;
DWORD dwFlags;
WORD wShowWindow;
WORD cbReserved2;
LPBYTE lpReserved2;
HANDLE hStdInput;
HANDLE hStdOutput;
HANDLE hStdError;
} STARTUPINFOA, *LPSTARTUPINFOA;
typedef struct _STARTUPINFOW {
DWORD cb;
LPWSTR lpReserved;
LPWSTR lpDesktop;
LPWSTR lpTitle;
DWORD dwX;
DWORD dwY;
DWORD dwXSize;
DWORD dwYSize;
DWORD dwXCountChars;
DWORD dwYCountChars;
DWORD dwFillAttribute;
DWORD dwFlags;
WORD wShowWindow;
WORD cbReserved2;
LPBYTE lpReserved2;
HANDLE hStdInput;
HANDLE hStdOutput;
HANDLE hStdError;
} STARTUPINFOW, *LPSTARTUPINFOW;
#ifdef UNICODE
typedef STARTUPINFOW STARTUPINFO;
typedef LPSTARTUPINFOW LPSTARTUPINFO;
#else
typedef STARTUPINFOA STARTUPINFO;
typedef LPSTARTUPINFOA LPSTARTUPINFO;
#endif // UNICODE
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
typedef struct _STARTUPINFOEXA { typedef struct _STARTUPINFOEXA {
STARTUPINFOA StartupInfo; STARTUPINFOA StartupInfo;
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList; LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList;
} STARTUPINFOEXA, *LPSTARTUPINFOEXA; } STARTUPINFOEXA, *LPSTARTUPINFOEXA;
typedef struct _STARTUPINFOEXW { typedef struct _STARTUPINFOEXW {
STARTUPINFOW StartupInfo; STARTUPINFOW StartupInfo;
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList; LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList;
} STARTUPINFOEXW, *LPSTARTUPINFOEXW; } STARTUPINFOEXW, *LPSTARTUPINFOEXW;
skipping to change at line 6570 skipping to change at line 2959
typedef LPSTARTUPINFOEXW LPSTARTUPINFOEX; typedef LPSTARTUPINFOEXW LPSTARTUPINFOEX;
#else #else
typedef STARTUPINFOEXA STARTUPINFOEX; typedef STARTUPINFOEXA STARTUPINFOEX;
typedef LPSTARTUPINFOEXA LPSTARTUPINFOEX; typedef LPSTARTUPINFOEXA LPSTARTUPINFOEX;
#endif // UNICODE #endif // UNICODE
#endif // (_WIN32_WINNT >= 0x0600) #endif // (_WIN32_WINNT >= 0x0600)
#define SHUTDOWN_NORETRY 0x00000001 #define SHUTDOWN_NORETRY 0x00000001
typedef struct _WIN32_FIND_DATAA { #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
DWORD dwFileAttributes; #pragma endregion
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
CHAR cFileName[ MAX_PATH ];
CHAR cAlternateFileName[ 14 ];
#ifdef _MAC
DWORD dwFileType;
DWORD dwCreatorType;
WORD wFinderFlags;
#endif
} WIN32_FIND_DATAA, *PWIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
typedef struct _WIN32_FIND_DATAW {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
WCHAR cFileName[ MAX_PATH ];
WCHAR cAlternateFileName[ 14 ];
#ifdef _MAC
DWORD dwFileType;
DWORD dwCreatorType;
WORD wFinderFlags;
#endif
} WIN32_FIND_DATAW, *PWIN32_FIND_DATAW, *LPWIN32_FIND_DATAW;
#ifdef UNICODE
typedef WIN32_FIND_DATAW WIN32_FIND_DATA;
typedef PWIN32_FIND_DATAW PWIN32_FIND_DATA;
typedef LPWIN32_FIND_DATAW LPWIN32_FIND_DATA;
#else
typedef WIN32_FIND_DATAA WIN32_FIND_DATA;
typedef PWIN32_FIND_DATAA PWIN32_FIND_DATA;
typedef LPWIN32_FIND_DATAA LPWIN32_FIND_DATA;
#endif // UNICODE
typedef struct _WIN32_FILE_ATTRIBUTE_DATA {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
} WIN32_FILE_ATTRIBUTE_DATA, *LPWIN32_FILE_ATTRIBUTE_DATA;
//
// Synchronization APIs
//
WINBASEAPI #pragma region Desktop Family
__out_opt #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
HANDLE
WINAPI
CreateMutexA(
__in_opt LPSECURITY_ATTRIBUTES lpMutexAttributes,
__in BOOL bInitialOwner,
__in_opt LPCSTR lpName
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateMutexW(
__in_opt LPSECURITY_ATTRIBUTES lpMutexAttributes,
__in BOOL bInitialOwner,
__in_opt LPCWSTR lpName
);
#ifdef UNICODE
#define CreateMutex CreateMutexW
#else
#define CreateMutex CreateMutexA
#endif // !UNICODE
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
OpenMutexA( OpenMutexA(
__in DWORD dwDesiredAccess, _In_ DWORD dwDesiredAccess,
__in BOOL bInheritHandle, _In_ BOOL bInheritHandle,
__in LPCSTR lpName _In_ LPCSTR lpName
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
OpenMutexW(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in LPCWSTR lpName
); );
#ifdef UNICODE #ifndef UNICODE
#define OpenMutex OpenMutexW
#else
#define OpenMutex OpenMutexA #define OpenMutex OpenMutexA
#endif // !UNICODE #endif
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateEventA(
__in_opt LPSECURITY_ATTRIBUTES lpEventAttributes,
__in BOOL bManualReset,
__in BOOL bInitialState,
__in_opt LPCSTR lpName
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateEventW(
__in_opt LPSECURITY_ATTRIBUTES lpEventAttributes,
__in BOOL bManualReset,
__in BOOL bInitialState,
__in_opt LPCWSTR lpName
);
#ifdef UNICODE
#define CreateEvent CreateEventW
#else
#define CreateEvent CreateEventA
#endif // !UNICODE
WINBASEAPI
__out_opt
HANDLE
WINAPI
OpenEventA(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in LPCSTR lpName
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
OpenEventW(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in LPCWSTR lpName
);
#ifdef UNICODE
#define OpenEvent OpenEventW
#else
#define OpenEvent OpenEventA
#endif // !UNICODE
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
CreateSemaphoreA( CreateSemaphoreA(
__in_opt LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
__in LONG lInitialCount, _In_ LONG lInitialCount,
__in LONG lMaximumCount, _In_ LONG lMaximumCount,
__in_opt LPCSTR lpName _In_opt_ LPCSTR lpName
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
CreateSemaphoreW( CreateSemaphoreW(
__in_opt LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
__in LONG lInitialCount, _In_ LONG lInitialCount,
__in LONG lMaximumCount, _In_ LONG lMaximumCount,
__in_opt LPCWSTR lpName _In_opt_ LPCWSTR lpName
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateSemaphore CreateSemaphoreW #define CreateSemaphore CreateSemaphoreW
#else #else
#define CreateSemaphore CreateSemaphoreA #define CreateSemaphore CreateSemaphoreA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
OpenSemaphoreA( OpenSemaphoreA(
__in DWORD dwDesiredAccess, _In_ DWORD dwDesiredAccess,
__in BOOL bInheritHandle, _In_ BOOL bInheritHandle,
__in LPCSTR lpName _In_ LPCSTR lpName
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
OpenSemaphoreW(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in LPCWSTR lpName
); );
#ifdef UNICODE #ifndef UNICODE
#define OpenSemaphore OpenSemaphoreW
#else
#define OpenSemaphore OpenSemaphoreA #define OpenSemaphore OpenSemaphoreA
#endif // !UNICODE #endif
#if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
typedef
VOID
(APIENTRY *PTIMERAPCROUTINE)(
__in_opt LPVOID lpArgToCompletionRoutine,
__in DWORD dwTimerLowValue,
__in DWORD dwTimerHighValue
);
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
CreateWaitableTimerA( CreateWaitableTimerA(
__in_opt LPSECURITY_ATTRIBUTES lpTimerAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpTimerAttributes,
__in BOOL bManualReset, _In_ BOOL bManualReset,
__in_opt LPCSTR lpTimerName _In_opt_ LPCSTR lpTimerName
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
CreateWaitableTimerW( CreateWaitableTimerW(
__in_opt LPSECURITY_ATTRIBUTES lpTimerAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpTimerAttributes,
__in BOOL bManualReset, _In_ BOOL bManualReset,
__in_opt LPCWSTR lpTimerName _In_opt_ LPCWSTR lpTimerName
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateWaitableTimer CreateWaitableTimerW #define CreateWaitableTimer CreateWaitableTimerW
#else #else
#define CreateWaitableTimer CreateWaitableTimerA #define CreateWaitableTimer CreateWaitableTimerA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
OpenWaitableTimerA( OpenWaitableTimerA(
__in DWORD dwDesiredAccess, _In_ DWORD dwDesiredAccess,
__in BOOL bInheritHandle, _In_ BOOL bInheritHandle,
__in LPCSTR lpTimerName _In_ LPCSTR lpTimerName
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
OpenWaitableTimerW(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in LPCWSTR lpTimerName
); );
#ifdef UNICODE #ifndef UNICODE
#define OpenWaitableTimer OpenWaitableTimerW
#else
#define OpenWaitableTimer OpenWaitableTimerA #define OpenWaitableTimer OpenWaitableTimerA
#endif // !UNICODE #endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
BOOL
WINAPI
SetWaitableTimerEx(
__in HANDLE hTimer,
__in const LARGE_INTEGER *lpDueTime,
__in LONG lPeriod,
__in_opt PTIMERAPCROUTINE pfnCompletionRoutine,
__in_opt LPVOID lpArgToCompletionRoutine,
__in_opt PREASON_CONTEXT WakeContext,
__in ULONG TolerableDelay
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
WINBASEAPI
BOOL
WINAPI
SetWaitableTimer(
__in HANDLE hTimer,
__in const LARGE_INTEGER *lpDueTime,
__in LONG lPeriod,
__in_opt PTIMERAPCROUTINE pfnCompletionRoutine,
__in_opt LPVOID lpArgToCompletionRoutine,
__in BOOL fResume
);
WINBASEAPI
BOOL
WINAPI
CancelWaitableTimer(
__in HANDLE hTimer
);
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
#define CREATE_MUTEX_INITIAL_OWNER 0x00000001
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateMutexExA(
__in_opt LPSECURITY_ATTRIBUTES lpMutexAttributes,
__in_opt LPCSTR lpName,
__in DWORD dwFlags,
__in DWORD dwDesiredAccess
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateMutexExW(
__in_opt LPSECURITY_ATTRIBUTES lpMutexAttributes,
__in_opt LPCWSTR lpName,
__in DWORD dwFlags,
__in DWORD dwDesiredAccess
);
#ifdef UNICODE
#define CreateMutexEx CreateMutexExW
#else
#define CreateMutexEx CreateMutexExA
#endif // !UNICODE
#define CREATE_EVENT_MANUAL_RESET 0x00000001
#define CREATE_EVENT_INITIAL_SET 0x00000002
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateEventExA(
__in_opt LPSECURITY_ATTRIBUTES lpEventAttributes,
__in_opt LPCSTR lpName,
__in DWORD dwFlags,
__in DWORD dwDesiredAccess
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateEventExW(
__in_opt LPSECURITY_ATTRIBUTES lpEventAttributes,
__in_opt LPCWSTR lpName,
__in DWORD dwFlags,
__in DWORD dwDesiredAccess
);
#ifdef UNICODE
#define CreateEventEx CreateEventExW
#else
#define CreateEventEx CreateEventExA
#endif // !UNICODE
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
CreateSemaphoreExA( CreateSemaphoreExA(
__in_opt LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
__in LONG lInitialCount, _In_ LONG lInitialCount,
__in LONG lMaximumCount, _In_ LONG lMaximumCount,
__in_opt LPCSTR lpName, _In_opt_ LPCSTR lpName,
__reserved DWORD dwFlags, _Reserved_ DWORD dwFlags,
__in DWORD dwDesiredAccess _In_ DWORD dwDesiredAccess
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateSemaphoreExW(
__in_opt LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
__in LONG lInitialCount,
__in LONG lMaximumCount,
__in_opt LPCWSTR lpName,
__reserved DWORD dwFlags,
__in DWORD dwDesiredAccess
); );
#ifdef UNICODE #ifndef UNICODE
#define CreateSemaphoreEx CreateSemaphoreExW
#else
#define CreateSemaphoreEx CreateSemaphoreExA #define CreateSemaphoreEx CreateSemaphoreExA
#endif // !UNICODE #endif
#define CREATE_WAITABLE_TIMER_MANUAL_RESET 0x00000001
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
CreateWaitableTimerExA( CreateWaitableTimerExA(
__in_opt LPSECURITY_ATTRIBUTES lpTimerAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpTimerAttributes,
__in_opt LPCSTR lpTimerName, _In_opt_ LPCSTR lpTimerName,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in DWORD dwDesiredAccess _In_ DWORD dwDesiredAccess
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateWaitableTimerExW(
__in_opt LPSECURITY_ATTRIBUTES lpTimerAttributes,
__in_opt LPCWSTR lpTimerName,
__in DWORD dwFlags,
__in DWORD dwDesiredAccess
); );
#ifdef UNICODE #ifndef UNICODE
#define CreateWaitableTimerEx CreateWaitableTimerExW
#else
#define CreateWaitableTimerEx CreateWaitableTimerExA #define CreateWaitableTimerEx CreateWaitableTimerExA
#endif // !UNICODE #endif
#endif /* (_WIN32_WINNT >= 0x0600) */ #endif /* (_WIN32_WINNT >= 0x0600) */
#endif /* (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) */ #endif /* (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) */
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
CreateFileMappingA( CreateFileMappingA(
__in HANDLE hFile, _In_ HANDLE hFile,
__in_opt LPSECURITY_ATTRIBUTES lpFileMappingAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
__in DWORD flProtect, _In_ DWORD flProtect,
__in DWORD dwMaximumSizeHigh, _In_ DWORD dwMaximumSizeHigh,
__in DWORD dwMaximumSizeLow, _In_ DWORD dwMaximumSizeLow,
__in_opt LPCSTR lpName _In_opt_ LPCSTR lpName
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateFileMappingW(
__in HANDLE hFile,
__in_opt LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
__in DWORD flProtect,
__in DWORD dwMaximumSizeHigh,
__in DWORD dwMaximumSizeLow,
__in_opt LPCWSTR lpName
); );
#ifdef UNICODE #ifndef UNICODE
#define CreateFileMapping CreateFileMappingW
#else
#define CreateFileMapping CreateFileMappingA #define CreateFileMapping CreateFileMappingA
#endif // !UNICODE #endif
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
CreateFileMappingNumaA( CreateFileMappingNumaA(
__in HANDLE hFile, _In_ HANDLE hFile,
__in_opt LPSECURITY_ATTRIBUTES lpFileMappingAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
__in DWORD flProtect, _In_ DWORD flProtect,
__in DWORD dwMaximumSizeHigh, _In_ DWORD dwMaximumSizeHigh,
__in DWORD dwMaximumSizeLow, _In_ DWORD dwMaximumSizeLow,
__in_opt LPCSTR lpName, _In_opt_ LPCSTR lpName,
__in DWORD nndPreferred _In_ DWORD nndPreferred
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateFileMappingNumaW(
__in HANDLE hFile,
__in_opt LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
__in DWORD flProtect,
__in DWORD dwMaximumSizeHigh,
__in DWORD dwMaximumSizeLow,
__in_opt LPCWSTR lpName,
__in DWORD nndPreferred
); );
#ifdef UNICODE
#define CreateFileMappingNuma CreateFileMappingNumaW #ifndef UNICODE
#else
#define CreateFileMappingNuma CreateFileMappingNumaA #define CreateFileMappingNuma CreateFileMappingNumaA
#endif // !UNICODE #endif
#endif // _WIN32_WINNT >= 0x0600 #endif // _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
OpenFileMappingA( OpenFileMappingA(
__in DWORD dwDesiredAccess, _In_ DWORD dwDesiredAccess,
__in BOOL bInheritHandle, _In_ BOOL bInheritHandle,
__in LPCSTR lpName _In_ LPCSTR lpName
);
WINBASEAPI
__out
HANDLE
WINAPI
OpenFileMappingW(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in LPCWSTR lpName
); );
#ifdef UNICODE #ifndef UNICODE
#define OpenFileMapping OpenFileMappingW
#else
#define OpenFileMapping OpenFileMappingA #define OpenFileMapping OpenFileMappingA
#endif // !UNICODE #endif
WINBASEAPI WINBASEAPI
_Success_(return != 0 && return <= nBufferLength)
DWORD DWORD
WINAPI WINAPI
GetLogicalDriveStringsA( GetLogicalDriveStringsA(
__in DWORD nBufferLength, _In_ DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer _Out_writes_to_opt_(nBufferLength, return + 1) LPSTR lpBuffer
);
WINBASEAPI
DWORD
WINAPI
GetLogicalDriveStringsW(
__in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer
); );
#ifdef UNICODE #ifndef UNICODE
#define GetLogicalDriveStrings GetLogicalDriveStringsW
#else
#define GetLogicalDriveStrings GetLogicalDriveStringsA #define GetLogicalDriveStrings GetLogicalDriveStringsA
#endif // !UNICODE #endif
#if _WIN32_WINNT >= 0x0501
typedef enum _MEMORY_RESOURCE_NOTIFICATION_TYPE {
LowMemoryResourceNotification,
HighMemoryResourceNotification
} MEMORY_RESOURCE_NOTIFICATION_TYPE;
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateMemoryResourceNotification(
__in MEMORY_RESOURCE_NOTIFICATION_TYPE NotificationType
);
WINBASEAPI
BOOL
WINAPI
QueryMemoryResourceNotification(
__in HANDLE ResourceNotificationHandle,
__out PBOOL ResourceState
);
#endif // _WIN32_WINNT >= 0x0501
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HMODULE HMODULE
WINAPI WINAPI
LoadLibraryA( LoadLibraryA(
__in LPCSTR lpLibFileName _In_ LPCSTR lpLibFileName
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HMODULE HMODULE
WINAPI WINAPI
LoadLibraryW( LoadLibraryW(
__in LPCWSTR lpLibFileName _In_ LPCWSTR lpLibFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define LoadLibrary LoadLibraryW #define LoadLibrary LoadLibraryW
#else #else
#define LoadLibrary LoadLibraryA #define LoadLibrary LoadLibraryA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
__out_opt #pragma endregion
HMODULE
WINAPI
LoadLibraryExA(
__in LPCSTR lpLibFileName,
__reserved HANDLE hFile,
__in DWORD dwFlags
);
WINBASEAPI
__out_opt
HMODULE
WINAPI
LoadLibraryExW(
__in LPCWSTR lpLibFileName,
__reserved HANDLE hFile,
__in DWORD dwFlags
);
#ifdef UNICODE
#define LoadLibraryEx LoadLibraryExW
#else
#define LoadLibraryEx LoadLibraryExA
#endif // !UNICODE
#define DONT_RESOLVE_DLL_REFERENCES 0x00000001 #pragma region Application Family
#define LOAD_LIBRARY_AS_DATAFILE 0x00000002 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008
#define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x00000010
#define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x00000020
#define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x00000040
#define LOAD_LIBRARY_REQUIRE_SIGNED_TARGET 0x00000080
WINBASEAPI #if (_WIN32_WINNT >= 0x0602)
DWORD
WINAPI
GetModuleFileNameA(
__in_opt HMODULE hModule,
__out_ecount_part(nSize, return + 1) LPSTR lpFilename,
__in DWORD nSize
);
WINBASEAPI
DWORD
WINAPI
GetModuleFileNameW(
__in_opt HMODULE hModule,
__out_ecount_part(nSize, return + 1) LPWSTR lpFilename,
__in DWORD nSize
);
#ifdef UNICODE
#define GetModuleFileName GetModuleFileNameW
#else
#define GetModuleFileName GetModuleFileNameA
#endif // !UNICODE
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HMODULE
WINAPI
GetModuleHandleA(
__in_opt LPCSTR lpModuleName
);
WINBASEAPI
__out_opt
HMODULE HMODULE
WINAPI WINAPI
GetModuleHandleW( LoadPackagedLibrary (
__in_opt LPCWSTR lpModuleName _In_ LPCWSTR lpwLibFileName,
); _Reserved_ DWORD Reserved
#ifdef UNICODE
#define GetModuleHandle GetModuleHandleW
#else
#define GetModuleHandle GetModuleHandleA
#endif // !UNICODE
#if !defined(RC_INVOKED)
#if _WIN32_WINNT > 0x0500 || defined(WINBASE_DECLARE_GET_MODULE_HANDLE_EX) || IS
OLATION_AWARE_ENABLED
#define GET_MODULE_HANDLE_EX_FLAG_PIN (0x00000001)
#define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT (0x00000002)
#define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS (0x00000004)
typedef
BOOL
(WINAPI*
PGET_MODULE_HANDLE_EXA)(
__in DWORD dwFlags,
__in_opt LPCSTR lpModuleName,
__deref_out HMODULE* phModule
);
typedef
BOOL
(WINAPI*
PGET_MODULE_HANDLE_EXW)(
__in DWORD dwFlags,
__in_opt LPCWSTR lpModuleName,
__deref_out HMODULE* phModule
);
#ifdef UNICODE
#define PGET_MODULE_HANDLE_EX PGET_MODULE_HANDLE_EXW
#else
#define PGET_MODULE_HANDLE_EX PGET_MODULE_HANDLE_EXA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
GetModuleHandleExA(
__in DWORD dwFlags,
__in_opt LPCSTR lpModuleName,
__out HMODULE* phModule
);
WINBASEAPI
BOOL
WINAPI
GetModuleHandleExW(
__in DWORD dwFlags,
__in_opt LPCWSTR lpModuleName,
__out HMODULE* phModule
); );
#ifdef UNICODE
#define GetModuleHandleEx GetModuleHandleExW
#else
#define GetModuleHandleEx GetModuleHandleExA
#endif // !UNICODE
#endif
#endif
#if _WIN32_WINNT >= 0x0502 #endif // _WIN32_WINNT >= 0x0602
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
BOOL #pragma endregion
WINAPI
NeedCurrentDirectoryForExePathA(
__in LPCSTR ExeName
);
WINBASEAPI
BOOL
WINAPI
NeedCurrentDirectoryForExePathW(
__in LPCWSTR ExeName
);
#ifdef UNICODE
#define NeedCurrentDirectoryForExePath NeedCurrentDirectoryForExePathW
#else
#define NeedCurrentDirectoryForExePath NeedCurrentDirectoryForExePathA
#endif // !UNICODE
#endif #pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if _WIN32_WINNT >= 0x0600 #if (_WIN32_WINNT >= 0x0600)
#define PROCESS_NAME_NATIVE 0x00000001 #define PROCESS_NAME_NATIVE 0x00000001
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
QueryFullProcessImageNameA( QueryFullProcessImageNameA(
__in HANDLE hProcess, _In_ HANDLE hProcess,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__out_ecount_part(*lpdwSize, *lpdwSize) LPSTR lpExeName, _Out_writes_to_(*lpdwSize, *lpdwSize) LPSTR lpExeName,
__inout PDWORD lpdwSize _Inout_ PDWORD lpdwSize
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
QueryFullProcessImageNameW( QueryFullProcessImageNameW(
__in HANDLE hProcess, _In_ HANDLE hProcess,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__out_ecount_part(*lpdwSize, *lpdwSize) LPWSTR lpExeName, _Out_writes_to_(*lpdwSize, *lpdwSize) LPWSTR lpExeName,
__inout PDWORD lpdwSize _Inout_ PDWORD lpdwSize
); );
#ifdef UNICODE #ifdef UNICODE
#define QueryFullProcessImageName QueryFullProcessImageNameW #define QueryFullProcessImageName QueryFullProcessImageNameW
#else #else
#define QueryFullProcessImageName QueryFullProcessImageNameA #define QueryFullProcessImageName QueryFullProcessImageNameA
#endif // !UNICODE #endif // !UNICODE
#endif #endif
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
// //
// Extended process and thread attribute support // Extended process and thread attribute support
// //
#define PROC_THREAD_ATTRIBUTE_NUMBER 0x0000FFFF #define PROC_THREAD_ATTRIBUTE_NUMBER 0x0000FFFF
#define PROC_THREAD_ATTRIBUTE_THREAD 0x00010000 // Attribute may be used wit h thread creation #define PROC_THREAD_ATTRIBUTE_THREAD 0x00010000 // Attribute may be used wit h thread creation
#define PROC_THREAD_ATTRIBUTE_INPUT 0x00020000 // Attribute is input only #define PROC_THREAD_ATTRIBUTE_INPUT 0x00020000 // Attribute is input only
#define PROC_THREAD_ATTRIBUTE_ADDITIVE 0x00040000 // Attribute may be "accumul ated," e.g. bitmasks, counters, etc. #define PROC_THREAD_ATTRIBUTE_ADDITIVE 0x00040000 // Attribute may be "accumul ated," e.g. bitmasks, counters, etc.
#define PROTECTION_LEVEL_SAME 0xFFFFFFFF
#ifndef _USE_FULL_PROC_THREAD_ATTRIBUTE
typedef enum _PROC_THREAD_ATTRIBUTE_NUM { typedef enum _PROC_THREAD_ATTRIBUTE_NUM {
ProcThreadAttributeParentProcess = 0, ProcThreadAttributeParentProcess = 0,
ProcThreadAttributeExtendedFlags, ProcThreadAttributeHandleList = 2,
ProcThreadAttributeHandleList, #if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
ProcThreadAttributeGroupAffinity, ProcThreadAttributeGroupAffinity = 3,
ProcThreadAttributePreferredNode, ProcThreadAttributePreferredNode = 4,
ProcThreadAttributeIdealProcessor, ProcThreadAttributeIdealProcessor = 5,
ProcThreadAttributeUmsThread, ProcThreadAttributeUmsThread = 6,
ProcThreadAttributeMitigationPolicy, ProcThreadAttributeMitigationPolicy = 7,
ProcThreadAttributeMax #endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
ProcThreadAttributeSecurityCapabilities = 9,
#endif
ProcThreadAttributeProtectionLevel = 11,
} PROC_THREAD_ATTRIBUTE_NUM; } PROC_THREAD_ATTRIBUTE_NUM;
#endif
#define ProcThreadAttributeValue(Number, Thread, Input, Additive) \ #define ProcThreadAttributeValue(Number, Thread, Input, Additive) \
(((Number) & PROC_THREAD_ATTRIBUTE_NUMBER) | \ (((Number) & PROC_THREAD_ATTRIBUTE_NUMBER) | \
((Thread != FALSE) ? PROC_THREAD_ATTRIBUTE_THREAD : 0) | \ ((Thread != FALSE) ? PROC_THREAD_ATTRIBUTE_THREAD : 0) | \
((Input != FALSE) ? PROC_THREAD_ATTRIBUTE_INPUT : 0) | \ ((Input != FALSE) ? PROC_THREAD_ATTRIBUTE_INPUT : 0) | \
((Additive != FALSE) ? PROC_THREAD_ATTRIBUTE_ADDITIVE : 0)) ((Additive != FALSE) ? PROC_THREAD_ATTRIBUTE_ADDITIVE : 0))
#define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS \ #define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS \
ProcThreadAttributeValue (ProcThreadAttributeParentProcess, FALSE, TRUE, FAL SE) ProcThreadAttributeValue (ProcThreadAttributeParentProcess, FALSE, TRUE, FAL SE)
#define PROC_THREAD_ATTRIBUTE_EXTENDED_FLAGS \
ProcThreadAttributeValue (ProcThreadAttributeExtendedFlags, FALSE, TRUE, TRU
E)
#define PROC_THREAD_ATTRIBUTE_HANDLE_LIST \ #define PROC_THREAD_ATTRIBUTE_HANDLE_LIST \
ProcThreadAttributeValue (ProcThreadAttributeHandleList, FALSE, TRUE, FALSE) ProcThreadAttributeValue (ProcThreadAttributeHandleList, FALSE, TRUE, FALSE)
#endif // (_WIN32_WINNT >= 0x0600)
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
#define PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY \ #define PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY \
ProcThreadAttributeValue (ProcThreadAttributeGroupAffinity, TRUE, TRUE, FALS E) ProcThreadAttributeValue (ProcThreadAttributeGroupAffinity, TRUE, TRUE, FALS E)
#define PROC_THREAD_ATTRIBUTE_PREFERRED_NODE \ #define PROC_THREAD_ATTRIBUTE_PREFERRED_NODE \
ProcThreadAttributeValue (ProcThreadAttributePreferredNode, FALSE, TRUE, FAL SE) ProcThreadAttributeValue (ProcThreadAttributePreferredNode, FALSE, TRUE, FAL SE)
#define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR \ #define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR \
ProcThreadAttributeValue (ProcThreadAttributeIdealProcessor, TRUE, TRUE, FAL SE) ProcThreadAttributeValue (ProcThreadAttributeIdealProcessor, TRUE, TRUE, FAL SE)
#define PROC_THREAD_ATTRIBUTE_UMS_THREAD \ #define PROC_THREAD_ATTRIBUTE_UMS_THREAD \
ProcThreadAttributeValue (ProcThreadAttributeUmsThread, TRUE, TRUE, FALSE) ProcThreadAttributeValue (ProcThreadAttributeUmsThread, TRUE, TRUE, FALSE)
#define PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY \ #define PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY \
ProcThreadAttributeValue (ProcThreadAttributeMitigationPolicy, FALSE, TRUE, FALSE) ProcThreadAttributeValue (ProcThreadAttributeMitigationPolicy, FALSE, TRUE, FALSE)
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#define PROC_THREAD_ATTRIBUTE_SECURITY_CAPABILITIES \
ProcThreadAttributeValue (ProcThreadAttributeSecurityCapabilities, FALSE, TR
UE, FALSE)
#endif
#define PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL \
ProcThreadAttributeValue (ProcThreadAttributeProtectionLevel, FALSE, TRUE, F
ALSE)
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
//
// Define legacy creation mitigation policy options, which are straight
// bitmasks. Bits 0-5 are legacy bits.
//
#define PROCESS_CREATION_MITIGATION_POLICY_DEP_ENABLE 0x01 #define PROCESS_CREATION_MITIGATION_POLICY_DEP_ENABLE 0x01
#define PROCESS_CREATION_MITIGATION_POLICY_DEP_ATL_THUNK_ENABLE 0x02 #define PROCESS_CREATION_MITIGATION_POLICY_DEP_ATL_THUNK_ENABLE 0x02
#define PROCESS_CREATION_MITIGATION_POLICY_SEHOP_ENABLE 0x04 #define PROCESS_CREATION_MITIGATION_POLICY_SEHOP_ENABLE 0x04
#endif
WINBASEAPI #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
BOOL //
WINAPI // Define mandatory ASLR options. Mandatory ASLR forcibly rebases images that
InitializeProcThreadAttributeList( // are not dynamic base compatible by acting as though there were an image base
__out_xcount_opt(*lpSize) LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList, // collision at load time.
__in DWORD dwAttributeCount, //
__reserved DWORD dwFlags, // Note that 'require relocations' mode refuses load of images that do not have
__inout PSIZE_T lpSize // a base relocation section.
); //
WINBASEAPI #define PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_MASK
VOID (0x00000003 << 8)
WINAPI #define PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_DEFER
DeleteProcThreadAttributeList( (0x00000000 << 8)
__inout LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList #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_R
ELOCS (0x00000003 << 8)
#define PROC_THREAD_ATTRIBUTE_REPLACE_VALUE 0x00000001 //
// Define heap terminate on corruption options. Note that 'always off' does
// not override the default opt-in for binaries with current subsystem versions
// set in the image header.
//
// Heap terminate on corruption is user mode enforced.
//
WINBASEAPI #define PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_MASK
BOOL (0x00000003 << 12)
WINAPI #define PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_DEFER
UpdateProcThreadAttribute( (0x00000000 << 12)
__inout LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList, #define PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_ALWAYS_ON
__in DWORD dwFlags, (0x00000001 << 12)
__in DWORD_PTR Attribute, #define PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_ALWAYS_OFF
__in_bcount_opt(cbSize) PVOID lpValue, (0x00000002 << 12)
__in SIZE_T cbSize, #define PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_RESERVED
__out_bcount_opt(cbSize) PVOID lpPreviousValue, (0x00000003 << 12)
__in_opt PSIZE_T lpReturnSize
);
#endif // (_WIN32_WINNT >= 0x0600) //
// Define bottom up randomization (includes stack randomization) options,
// i.e. randomization of the lowest user address.
//
WINBASEAPI #define PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_MASK
BOOL (0x00000003 << 16)
WINAPI #define PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_DEFER
CreateProcessA( (0x00000000 << 16)
__in_opt LPCSTR lpApplicationName, #define PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_ALWAYS_ON
__inout_opt LPSTR lpCommandLine, (0x00000001 << 16)
__in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes, #define PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_ALWAYS_OFF
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes, (0x00000002 << 16)
__in BOOL bInheritHandles, #define PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_RESERVED
__in DWORD dwCreationFlags, (0x00000003 << 16)
__in_opt LPVOID lpEnvironment,
__in_opt LPCSTR lpCurrentDirectory,
__in LPSTARTUPINFOA lpStartupInfo,
__out LPPROCESS_INFORMATION lpProcessInformation
);
WINBASEAPI
BOOL
WINAPI
CreateProcessW(
__in_opt LPCWSTR lpApplicationName,
__inout_opt LPWSTR lpCommandLine,
__in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes,
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in BOOL bInheritHandles,
__in DWORD dwCreationFlags,
__in_opt LPVOID lpEnvironment,
__in_opt LPCWSTR lpCurrentDirectory,
__in LPSTARTUPINFOW lpStartupInfo,
__out LPPROCESS_INFORMATION lpProcessInformation
);
#ifdef UNICODE
#define CreateProcess CreateProcessW
#else
#define CreateProcess CreateProcessA
#endif // !UNICODE
WINBASEAPI //
BOOL // Define high entropy bottom up randomization. Note that high entropy bottom
WINAPI // up randomization is effective if and only if bottom up ASLR is also enabled.
SetProcessShutdownParameters( //
__in DWORD dwLevel, // N.B. High entropy mode is only meaningful for native 64-bit processes. in
__in DWORD dwFlags // high entropy mode, up to 1TB of bottom up variance is enabled.
); //
#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 handle checking enforcement options. Handle checking enforcement
// causes an exception to be raised immediately on a bad handle reference,
// versus simply returning a failure status from the handle reference.
//
#define 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 win32k system call disable options. Win32k system call disable
// prevents a process from making Win32k calls.
//
#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 the extension point disable options. Extension point disable allows
// a process to opt-out of loading various arbitrary extension point DLLs.
//
#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 dynamic code options.
//
#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_RESERVED
(0x00000003ui64 << 36)
//
// Define module signature options. When enabled, this option will
// block mapping of non-microsoft binaries.
//
#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_O
N (0x00000001ui64 << 44)
#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_O
FF (0x00000002ui64 << 44)
#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_RESERVED
(0x00000003ui64 << 44)
#endif // _WIN32_WINNT_WINBLUE
#endif // _WIN32_WINNT_WIN8
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetProcessShutdownParameters( GetProcessShutdownParameters(
__out LPDWORD lpdwLevel, _Out_ LPDWORD lpdwLevel,
__out LPDWORD lpdwFlags _Out_ LPDWORD lpdwFlags
);
WINBASEAPI
DWORD
WINAPI
GetProcessVersion(
__in DWORD ProcessId
); );
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
FatalAppExitA( FatalAppExitA(
__in UINT uAction, _In_ UINT uAction,
__in LPCSTR lpMessageText _In_ LPCSTR lpMessageText
); );
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
FatalAppExitW( FatalAppExitW(
__in UINT uAction, _In_ UINT uAction,
__in LPCWSTR lpMessageText _In_ LPCWSTR lpMessageText
); );
#ifdef UNICODE #ifdef UNICODE
#define FatalAppExit FatalAppExitW #define FatalAppExit FatalAppExitW
#else #else
#define FatalAppExit FatalAppExitA #define FatalAppExit FatalAppExitA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
GetStartupInfoA( GetStartupInfoA(
__out LPSTARTUPINFOA lpStartupInfo _Out_ LPSTARTUPINFOA lpStartupInfo
);
WINBASEAPI
VOID
WINAPI
GetStartupInfoW(
__out LPSTARTUPINFOW lpStartupInfo
); );
#ifdef UNICODE #ifndef UNICODE
#define GetStartupInfo GetStartupInfoW
#else
#define GetStartupInfo GetStartupInfoA #define GetStartupInfo GetStartupInfoA
#endif // !UNICODE #endif
WINBASEAPI
__out
LPSTR
WINAPI
GetCommandLineA(
VOID
);
WINBASEAPI
__out
LPWSTR
WINAPI
GetCommandLineW(
VOID
);
#ifdef UNICODE
#define GetCommandLine GetCommandLineW
#else
#define GetCommandLine GetCommandLineA
#endif // !UNICODE
WINBASEAPI
__success(return < nSize)
__success(return != 0)
DWORD
WINAPI
GetEnvironmentVariableA(
__in_opt LPCSTR lpName,
__out_ecount_part_opt(nSize, return + 1) LPSTR lpBuffer,
__in DWORD nSize
);
WINBASEAPI
__success(return < nSize)
__success(return != 0)
DWORD
WINAPI
GetEnvironmentVariableW(
__in_opt LPCWSTR lpName,
__out_ecount_part_opt(nSize, return + 1) LPWSTR lpBuffer,
__in DWORD nSize
);
#ifdef UNICODE
#define GetEnvironmentVariable GetEnvironmentVariableW
#else
#define GetEnvironmentVariable GetEnvironmentVariableA
#endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef GetEnvironmentVariable #undef GetEnvironmentVariable
#if _MSC_VER >= 1400
#pragma warning(push)
#pragma warning(disable: 6103)
#endif _MSC_VER >= 1400 /* _MSC_VER >= 1400 */
_Success_(return != 0 && return < nSize)
__inline __inline
DWORD DWORD
GetEnvironmentVariable( GetEnvironmentVariable(
__in_opt LPCTSTR lpName, _In_opt_ LPCTSTR lpName,
__out_ecount_part_opt(nSize, return + 1) LPTSTR lpBuffer, _Out_writes_to_opt_(nSize, return + 1) LPTSTR lpBuffer,
__in DWORD nSize _In_ DWORD nSize
) )
{ {
#ifdef UNICODE #ifdef UNICODE
return GetEnvironmentVariableW( return GetEnvironmentVariableW(
#else #else
return GetEnvironmentVariableA( return GetEnvironmentVariableA(
#endif #endif
lpName, lpName,
lpBuffer, lpBuffer,
nSize nSize
); );
} }
#endif /* _M_CEE */
WINBASEAPI #if _MSC_VER >= 1400
BOOL #pragma warning(pop)
WINAPI #endif _MSC_VER >= 1400 /* _MSC_VER >= 1400 */
SetEnvironmentVariableA(
__in LPCSTR lpName, #endif /* _M_CEE */
__in_opt LPCSTR lpValue
);
WINBASEAPI
BOOL
WINAPI
SetEnvironmentVariableW(
__in LPCWSTR lpName,
__in_opt LPCWSTR lpValue
);
#ifdef UNICODE
#define SetEnvironmentVariable SetEnvironmentVariableW
#else
#define SetEnvironmentVariable SetEnvironmentVariableA
#endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef SetEnvironmentVariable #undef SetEnvironmentVariable
__inline __inline
BOOL BOOL
SetEnvironmentVariable( SetEnvironmentVariable(
LPCTSTR lpName, LPCTSTR lpName,
LPCTSTR lpValue LPCTSTR lpValue
) )
{ {
skipping to change at line 7613 skipping to change at line 3511
#else #else
return SetEnvironmentVariableA( return SetEnvironmentVariableA(
#endif #endif
lpName, lpName,
lpValue lpValue
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
WINBASEAPI WINBASEAPI
__success(return <= nSize)
__success(return != 0)
DWORD DWORD
WINAPI WINAPI
ExpandEnvironmentStringsA( GetFirmwareEnvironmentVariableA(
__in LPCSTR lpSrc, _In_ LPCSTR lpName,
__out_ecount_part_opt(nSize, return) LPSTR lpDst, _In_ LPCSTR lpGuid,
__in DWORD nSize _Out_writes_bytes_to_opt_(nSize, return) PVOID pBuffer,
_In_ DWORD nSize
); );
WINBASEAPI WINBASEAPI
__success(return <= nSize)
__success(return != 0)
DWORD DWORD
WINAPI WINAPI
ExpandEnvironmentStringsW( GetFirmwareEnvironmentVariableW(
__in LPCWSTR lpSrc, _In_ LPCWSTR lpName,
__out_ecount_part_opt(nSize, return) LPWSTR lpDst, _In_ LPCWSTR lpGuid,
__in DWORD nSize _Out_writes_bytes_to_opt_(nSize, return) PVOID pBuffer,
_In_ DWORD nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define ExpandEnvironmentStrings ExpandEnvironmentStringsW #define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableW
#else #else
#define ExpandEnvironmentStrings ExpandEnvironmentStringsA #define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetFirmwareEnvironmentVariableA( GetFirmwareEnvironmentVariableExA(
__in LPCSTR lpName, _In_ LPCSTR lpName,
__in LPCSTR lpGuid, _In_ LPCSTR lpGuid,
__out_bcount_part_opt(nSize, return) PVOID pBuffer, _Out_writes_bytes_to_opt_(nSize, return) PVOID pBuffer,
__in DWORD nSize _In_ DWORD nSize,
_Out_opt_ PDWORD pdwAttribubutes
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetFirmwareEnvironmentVariableW( GetFirmwareEnvironmentVariableExW(
__in LPCWSTR lpName, _In_ LPCWSTR lpName,
__in LPCWSTR lpGuid, _In_ LPCWSTR lpGuid,
__out_bcount_part_opt(nSize, return) PVOID pBuffer, _Out_writes_bytes_to_opt_(nSize, return) PVOID pBuffer,
__in DWORD nSize _In_ DWORD nSize,
_Out_opt_ PDWORD pdwAttribubutes
); );
#ifdef UNICODE #ifdef UNICODE
#define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableW #define GetFirmwareEnvironmentVariableEx GetFirmwareEnvironmentVariableExW
#else #else
#define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableA #define GetFirmwareEnvironmentVariableEx GetFirmwareEnvironmentVariableExA
#endif // !UNICODE #endif // !UNICODE
#endif
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetFirmwareEnvironmentVariableA( SetFirmwareEnvironmentVariableA(
__in LPCSTR lpName, _In_ LPCSTR lpName,
__in LPCSTR lpGuid, _In_ LPCSTR lpGuid,
__in_bcount_opt(nSize) PVOID pValue, _In_reads_bytes_opt_(nSize) PVOID pValue,
__in DWORD nSize _In_ DWORD nSize
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetFirmwareEnvironmentVariableW( SetFirmwareEnvironmentVariableW(
__in LPCWSTR lpName, _In_ LPCWSTR lpName,
__in LPCWSTR lpGuid, _In_ LPCWSTR lpGuid,
__in_bcount_opt(nSize) PVOID pValue, _In_reads_bytes_opt_(nSize) PVOID pValue,
__in DWORD nSize _In_ DWORD nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableW #define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableW
#else #else
#define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableA #define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
WINBASEAPI WINBASEAPI
VOID BOOL
WINAPI WINAPI
OutputDebugStringA( SetFirmwareEnvironmentVariableExA(
__in_opt LPCSTR lpOutputString _In_ LPCSTR lpName,
_In_ LPCSTR lpGuid,
_In_reads_bytes_opt_(nSize) PVOID pValue,
_In_ DWORD nSize,
_In_ DWORD dwAttributes
); );
WINBASEAPI WINBASEAPI
VOID BOOL
WINAPI WINAPI
OutputDebugStringW( SetFirmwareEnvironmentVariableExW(
__in_opt LPCWSTR lpOutputString _In_ LPCWSTR lpName,
_In_ LPCWSTR lpGuid,
_In_reads_bytes_opt_(nSize) PVOID pValue,
_In_ DWORD nSize,
_In_ DWORD dwAttributes
); );
#ifdef UNICODE #ifdef UNICODE
#define OutputDebugString OutputDebugStringW #define SetFirmwareEnvironmentVariableEx SetFirmwareEnvironmentVariableExW
#else #else
#define OutputDebugString OutputDebugStringA #define SetFirmwareEnvironmentVariableEx SetFirmwareEnvironmentVariableExA
#endif // !UNICODE #endif // !UNICODE
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
WINBASEAPI WINBASEAPI
__out_opt BOOL
WINAPI
GetFirmwareType (
_Inout_ PFIRMWARE_TYPE FirmwareType
);
WINBASEAPI
BOOL
WINAPI
IsNativeVhdBoot (
_Out_ PBOOL NativeVhdBoot
);
#endif // _WIN32_WINNT >= _WIN32_WINNT_WIN8
WINBASEAPI
_Ret_maybenull_
HRSRC HRSRC
WINAPI WINAPI
FindResourceA( FindResourceA(
__in_opt HMODULE hModule, _In_opt_ HMODULE hModule,
__in LPCSTR lpName, _In_ LPCSTR lpName,
__in LPCSTR lpType _In_ LPCSTR lpType
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HRSRC HRSRC
WINAPI WINAPI
FindResourceW( FindResourceW(
__in_opt HMODULE hModule, _In_opt_ HMODULE hModule,
__in LPCWSTR lpName, _In_ LPCWSTR lpName,
__in LPCWSTR lpType _In_ LPCWSTR lpType
); );
#ifdef UNICODE #ifdef UNICODE
#define FindResource FindResourceW #define FindResource FindResourceW
#else #else
#define FindResource FindResourceA #define FindResource FindResourceA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HRSRC HRSRC
WINAPI WINAPI
FindResourceExA( FindResourceExA(
__in_opt HMODULE hModule, _In_opt_ HMODULE hModule,
__in LPCSTR lpType, _In_ LPCSTR lpType,
__in LPCSTR lpName, _In_ LPCSTR lpName,
__in WORD wLanguage _In_ WORD wLanguage
);
WINBASEAPI
__out_opt
HRSRC
WINAPI
FindResourceExW(
__in_opt HMODULE hModule,
__in LPCWSTR lpType,
__in LPCWSTR lpName,
__in WORD wLanguage
); );
#ifdef UNICODE #ifndef UNICODE
#define FindResourceEx FindResourceExW
#else
#define FindResourceEx FindResourceExA #define FindResourceEx FindResourceExA
#endif // !UNICODE
#ifdef STRICT
typedef BOOL (CALLBACK* ENUMRESTYPEPROCA)(__in_opt HMODULE hModule, __in LPSTR l
pType,
__in LONG_PTR lParam);
typedef BOOL (CALLBACK* ENUMRESTYPEPROCW)(__in_opt HMODULE hModule, __in LPWSTR
lpType,
__in LONG_PTR lParam);
#ifdef UNICODE
#define ENUMRESTYPEPROC ENUMRESTYPEPROCW
#else
#define ENUMRESTYPEPROC ENUMRESTYPEPROCA
#endif // !UNICODE
typedef BOOL (CALLBACK* ENUMRESNAMEPROCA)(__in_opt HMODULE hModule, __in LPCSTR
lpType,
__in LPSTR lpName, __in LONG_PTR lParam);
typedef BOOL (CALLBACK* ENUMRESNAMEPROCW)(__in_opt HMODULE hModule, __in LPCWSTR
lpType,
__in LPWSTR lpName, __in LONG_PTR lParam);
#ifdef UNICODE
#define ENUMRESNAMEPROC ENUMRESNAMEPROCW
#else
#define ENUMRESNAMEPROC ENUMRESNAMEPROCA
#endif // !UNICODE
typedef BOOL (CALLBACK* ENUMRESLANGPROCA)(__in_opt HMODULE hModule, __in LPCSTR
lpType,
__in LPCSTR lpName, __in WORD wLanguage, __in LONG_PTR lParam);
typedef BOOL (CALLBACK* ENUMRESLANGPROCW)(__in_opt HMODULE hModule, __in LPCWSTR
lpType,
__in LPCWSTR lpName, __in WORD wLanguage, __in LONG_PTR lParam);
#ifdef UNICODE
#define ENUMRESLANGPROC ENUMRESLANGPROCW
#else
#define ENUMRESLANGPROC ENUMRESLANGPROCA
#endif // !UNICODE
#else
typedef FARPROC ENUMRESTYPEPROCA;
typedef FARPROC ENUMRESTYPEPROCW;
#ifdef UNICODE
typedef ENUMRESTYPEPROCW ENUMRESTYPEPROC;
#else
typedef ENUMRESTYPEPROCA ENUMRESTYPEPROC;
#endif // UNICODE
typedef FARPROC ENUMRESNAMEPROCA;
typedef FARPROC ENUMRESNAMEPROCW;
#ifdef UNICODE
typedef ENUMRESNAMEPROCW ENUMRESNAMEPROC;
#else
typedef ENUMRESNAMEPROCA ENUMRESNAMEPROC;
#endif // UNICODE
typedef FARPROC ENUMRESLANGPROCA;
typedef FARPROC ENUMRESLANGPROCW;
#ifdef UNICODE
typedef ENUMRESLANGPROCW ENUMRESLANGPROC;
#else
typedef ENUMRESLANGPROCA ENUMRESLANGPROC;
#endif // UNICODE
#endif #endif
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumResourceTypesA( EnumResourceTypesA(
__in_opt HMODULE hModule, _In_opt_ HMODULE hModule,
__in ENUMRESTYPEPROCA lpEnumFunc, _In_ ENUMRESTYPEPROCA lpEnumFunc,
__in LONG_PTR lParam _In_ LONG_PTR lParam
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumResourceTypesW( EnumResourceTypesW(
__in_opt HMODULE hModule, _In_opt_ HMODULE hModule,
__in ENUMRESTYPEPROCW lpEnumFunc, _In_ ENUMRESTYPEPROCW lpEnumFunc,
__in LONG_PTR lParam _In_ LONG_PTR lParam
); );
#ifdef UNICODE #ifdef UNICODE
#define EnumResourceTypes EnumResourceTypesW #define EnumResourceTypes EnumResourceTypesW
#else #else
#define EnumResourceTypes EnumResourceTypesA #define EnumResourceTypes EnumResourceTypesA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumResourceNamesA( EnumResourceNamesA(
__in_opt HMODULE hModule, _In_opt_ HMODULE hModule,
__in LPCSTR lpType, _In_ LPCSTR lpType,
__in ENUMRESNAMEPROCA lpEnumFunc, _In_ ENUMRESNAMEPROCA lpEnumFunc,
__in LONG_PTR lParam _In_ LONG_PTR lParam
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumResourceNamesW( EnumResourceNamesW(
__in_opt HMODULE hModule, _In_opt_ HMODULE hModule,
__in LPCWSTR lpType, _In_ LPCWSTR lpType,
__in ENUMRESNAMEPROCW lpEnumFunc, _In_ ENUMRESNAMEPROCW lpEnumFunc,
__in LONG_PTR lParam _In_ LONG_PTR lParam
); );
#ifdef UNICODE #ifdef UNICODE
#define EnumResourceNames EnumResourceNamesW #define EnumResourceNames EnumResourceNamesW
#else #else
#define EnumResourceNames EnumResourceNamesA #define EnumResourceNames EnumResourceNamesA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumResourceLanguagesA( EnumResourceLanguagesA(
__in_opt HMODULE hModule, _In_opt_ HMODULE hModule,
__in LPCSTR lpType, _In_ LPCSTR lpType,
__in LPCSTR lpName, _In_ LPCSTR lpName,
__in ENUMRESLANGPROCA lpEnumFunc, _In_ ENUMRESLANGPROCA lpEnumFunc,
__in LONG_PTR lParam _In_ LONG_PTR lParam
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumResourceLanguagesW( EnumResourceLanguagesW(
__in_opt HMODULE hModule, _In_opt_ HMODULE hModule,
__in LPCWSTR lpType, _In_ LPCWSTR lpType,
__in LPCWSTR lpName, _In_ LPCWSTR lpName,
__in ENUMRESLANGPROCW lpEnumFunc, _In_ ENUMRESLANGPROCW lpEnumFunc,
__in LONG_PTR lParam _In_ LONG_PTR lParam
); );
#ifdef UNICODE #ifdef UNICODE
#define EnumResourceLanguages EnumResourceLanguagesW #define EnumResourceLanguages EnumResourceLanguagesW
#else #else
#define EnumResourceLanguages EnumResourceLanguagesA #define EnumResourceLanguages EnumResourceLanguagesA
#endif // !UNICODE #endif // !UNICODE
#define RESOURCE_ENUM_LN (0x0001)
#define RESOURCE_ENUM_MUI (0x0002)
#define RESOURCE_ENUM_MUI_SYSTEM (0x0004)
#define RESOURCE_ENUM_VALIDATE (0x0008)
#define RESOURCE_ENUM_MODULE_EXACT (0x0010)
WINBASEAPI
BOOL
WINAPI
EnumResourceTypesExA(
__in_opt HMODULE hModule,
__in ENUMRESTYPEPROCA lpEnumFunc,
__in LONG_PTR lParam,
DWORD dwFlags,
LANGID LangId
);
WINBASEAPI
BOOL
WINAPI
EnumResourceTypesExW(
__in_opt HMODULE hModule,
__in ENUMRESTYPEPROCW lpEnumFunc,
__in LONG_PTR lParam,
DWORD dwFlags,
LANGID LangId
);
#ifdef UNICODE
#define EnumResourceTypesEx EnumResourceTypesExW
#else
#define EnumResourceTypesEx EnumResourceTypesExA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
EnumResourceNamesExA(
__in_opt HMODULE hModule,
__in LPCSTR lpType,
__in ENUMRESNAMEPROCA lpEnumFunc,
__in LONG_PTR lParam,
DWORD dwFlags,
LANGID LangId
);
WINBASEAPI
BOOL
WINAPI
EnumResourceNamesExW(
__in_opt HMODULE hModule,
__in LPCWSTR lpType,
__in ENUMRESNAMEPROCW lpEnumFunc,
__in LONG_PTR lParam,
DWORD dwFlags,
LANGID LangId
);
#ifdef UNICODE
#define EnumResourceNamesEx EnumResourceNamesExW
#else
#define EnumResourceNamesEx EnumResourceNamesExA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
EnumResourceLanguagesExA(
__in_opt HMODULE hModule,
__in LPCSTR lpType,
__in LPCSTR lpName,
__in ENUMRESLANGPROCA lpEnumFunc,
__in LONG_PTR lParam,
DWORD dwFlags,
LANGID LangId
);
WINBASEAPI
BOOL
WINAPI
EnumResourceLanguagesExW(
__in_opt HMODULE hModule,
__in LPCWSTR lpType,
__in LPCWSTR lpName,
__in ENUMRESLANGPROCW lpEnumFunc,
__in LONG_PTR lParam,
DWORD dwFlags,
LANGID LangId
);
#ifdef UNICODE
#define EnumResourceLanguagesEx EnumResourceLanguagesExW
#else
#define EnumResourceLanguagesEx EnumResourceLanguagesExA
#endif // !UNICODE
WINBASEAPI WINBASEAPI
HANDLE HANDLE
WINAPI WINAPI
BeginUpdateResourceA( BeginUpdateResourceA(
__in LPCSTR pFileName, _In_ LPCSTR pFileName,
__in BOOL bDeleteExistingResources _In_ BOOL bDeleteExistingResources
); );
WINBASEAPI WINBASEAPI
HANDLE HANDLE
WINAPI WINAPI
BeginUpdateResourceW( BeginUpdateResourceW(
__in LPCWSTR pFileName, _In_ LPCWSTR pFileName,
__in BOOL bDeleteExistingResources _In_ BOOL bDeleteExistingResources
); );
#ifdef UNICODE #ifdef UNICODE
#define BeginUpdateResource BeginUpdateResourceW #define BeginUpdateResource BeginUpdateResourceW
#else #else
#define BeginUpdateResource BeginUpdateResourceA #define BeginUpdateResource BeginUpdateResourceA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
UpdateResourceA( UpdateResourceA(
__in HANDLE hUpdate, _In_ HANDLE hUpdate,
__in LPCSTR lpType, _In_ LPCSTR lpType,
__in LPCSTR lpName, _In_ LPCSTR lpName,
__in WORD wLanguage, _In_ WORD wLanguage,
__in_bcount_opt(cb) LPVOID lpData, _In_reads_bytes_opt_(cb) LPVOID lpData,
__in DWORD cb _In_ DWORD cb
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
UpdateResourceW( UpdateResourceW(
__in HANDLE hUpdate, _In_ HANDLE hUpdate,
__in LPCWSTR lpType, _In_ LPCWSTR lpType,
__in LPCWSTR lpName, _In_ LPCWSTR lpName,
__in WORD wLanguage, _In_ WORD wLanguage,
__in_bcount_opt(cb) LPVOID lpData, _In_reads_bytes_opt_(cb) LPVOID lpData,
__in DWORD cb _In_ DWORD cb
); );
#ifdef UNICODE #ifdef UNICODE
#define UpdateResource UpdateResourceW #define UpdateResource UpdateResourceW
#else #else
#define UpdateResource UpdateResourceA #define UpdateResource UpdateResourceA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EndUpdateResourceA( EndUpdateResourceA(
__in HANDLE hUpdate, _In_ HANDLE hUpdate,
__in BOOL fDiscard _In_ BOOL fDiscard
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EndUpdateResourceW( EndUpdateResourceW(
__in HANDLE hUpdate, _In_ HANDLE hUpdate,
__in BOOL fDiscard _In_ BOOL fDiscard
); );
#ifdef UNICODE #ifdef UNICODE
#define EndUpdateResource EndUpdateResourceW #define EndUpdateResource EndUpdateResourceW
#else #else
#define EndUpdateResource EndUpdateResourceA #define EndUpdateResource EndUpdateResourceA
#endif // !UNICODE #endif // !UNICODE
#define ATOM_FLAG_GLOBAL 0x2
WINBASEAPI WINBASEAPI
ATOM ATOM
WINAPI WINAPI
GlobalAddAtomA( GlobalAddAtomA(
__in_opt LPCSTR lpString _In_opt_ LPCSTR lpString
); );
WINBASEAPI WINBASEAPI
ATOM ATOM
WINAPI WINAPI
GlobalAddAtomW( GlobalAddAtomW(
__in_opt LPCWSTR lpString _In_opt_ LPCWSTR lpString
); );
#ifdef UNICODE #ifdef UNICODE
#define GlobalAddAtom GlobalAddAtomW #define GlobalAddAtom GlobalAddAtomW
#else #else
#define GlobalAddAtom GlobalAddAtomA #define GlobalAddAtom GlobalAddAtomA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
ATOM ATOM
WINAPI WINAPI
GlobalAddAtomExA(
_In_opt_ LPCSTR lpString,
_In_ DWORD Flags
);
WINBASEAPI
ATOM
WINAPI
GlobalAddAtomExW(
_In_opt_ LPCWSTR lpString,
_In_ DWORD Flags
);
#ifdef UNICODE
#define GlobalAddAtomEx GlobalAddAtomExW
#else
#define GlobalAddAtomEx GlobalAddAtomExA
#endif // !UNICODE
WINBASEAPI
ATOM
WINAPI
GlobalFindAtomA( GlobalFindAtomA(
__in_opt LPCSTR lpString _In_opt_ LPCSTR lpString
); );
WINBASEAPI WINBASEAPI
ATOM ATOM
WINAPI WINAPI
GlobalFindAtomW( GlobalFindAtomW(
__in_opt LPCWSTR lpString _In_opt_ LPCWSTR lpString
); );
#ifdef UNICODE #ifdef UNICODE
#define GlobalFindAtom GlobalFindAtomW #define GlobalFindAtom GlobalFindAtomW
#else #else
#define GlobalFindAtom GlobalFindAtomA #define GlobalFindAtom GlobalFindAtomA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
GlobalGetAtomNameA( GlobalGetAtomNameA(
__in ATOM nAtom, _In_ ATOM nAtom,
__out_ecount_part(nSize, return + 1) LPSTR lpBuffer, _Out_writes_to_(nSize, return + 1) LPSTR lpBuffer,
__in int nSize _In_ int nSize
); );
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
GlobalGetAtomNameW( GlobalGetAtomNameW(
__in ATOM nAtom, _In_ ATOM nAtom,
__out_ecount_part(nSize, return + 1) LPWSTR lpBuffer, _Out_writes_to_(nSize, return + 1) LPWSTR lpBuffer,
__in int nSize _In_ int nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define GlobalGetAtomName GlobalGetAtomNameW #define GlobalGetAtomName GlobalGetAtomNameW
#else #else
#define GlobalGetAtomName GlobalGetAtomNameA #define GlobalGetAtomName GlobalGetAtomNameA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
ATOM ATOM
WINAPI WINAPI
AddAtomA( AddAtomA(
__in_opt LPCSTR lpString _In_opt_ LPCSTR lpString
); );
WINBASEAPI WINBASEAPI
ATOM ATOM
WINAPI WINAPI
AddAtomW( AddAtomW(
__in_opt LPCWSTR lpString _In_opt_ LPCWSTR lpString
); );
#ifdef UNICODE #ifdef UNICODE
#define AddAtom AddAtomW #define AddAtom AddAtomW
#else #else
#define AddAtom AddAtomA #define AddAtom AddAtomA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
ATOM ATOM
WINAPI WINAPI
FindAtomA( FindAtomA(
__in_opt LPCSTR lpString _In_opt_ LPCSTR lpString
); );
WINBASEAPI WINBASEAPI
ATOM ATOM
WINAPI WINAPI
FindAtomW( FindAtomW(
__in_opt LPCWSTR lpString _In_opt_ LPCWSTR lpString
); );
#ifdef UNICODE #ifdef UNICODE
#define FindAtom FindAtomW #define FindAtom FindAtomW
#else #else
#define FindAtom FindAtomA #define FindAtom FindAtomA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
GetAtomNameA( GetAtomNameA(
__in ATOM nAtom, _In_ ATOM nAtom,
__out_ecount_part(nSize, return + 1) LPSTR lpBuffer, _Out_writes_to_(nSize, return + 1) LPSTR lpBuffer,
__in int nSize _In_ int nSize
); );
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
GetAtomNameW( GetAtomNameW(
__in ATOM nAtom, _In_ ATOM nAtom,
__out_ecount_part(nSize, return + 1) LPWSTR lpBuffer, _Out_writes_to_(nSize, return + 1) LPWSTR lpBuffer,
__in int nSize _In_ int nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define GetAtomName GetAtomNameW #define GetAtomName GetAtomNameW
#else #else
#define GetAtomName GetAtomNameA #define GetAtomName GetAtomNameA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
GetProfileIntA( GetProfileIntA(
__in LPCSTR lpAppName, _In_ LPCSTR lpAppName,
__in LPCSTR lpKeyName, _In_ LPCSTR lpKeyName,
__in INT nDefault _In_ INT nDefault
); );
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
GetProfileIntW( GetProfileIntW(
__in LPCWSTR lpAppName, _In_ LPCWSTR lpAppName,
__in LPCWSTR lpKeyName, _In_ LPCWSTR lpKeyName,
__in INT nDefault _In_ INT nDefault
); );
#ifdef UNICODE #ifdef UNICODE
#define GetProfileInt GetProfileIntW #define GetProfileInt GetProfileIntW
#else #else
#define GetProfileInt GetProfileIntA #define GetProfileInt GetProfileIntA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetProfileStringA( GetProfileStringA(
__in_opt LPCSTR lpAppName, _In_opt_ LPCSTR lpAppName,
__in_opt LPCSTR lpKeyName, _In_opt_ LPCSTR lpKeyName,
__in_opt LPCSTR lpDefault, _In_opt_ LPCSTR lpDefault,
__out_ecount_part_opt(nSize, return + 1) LPSTR lpReturnedString, _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
__in DWORD nSize _In_ DWORD nSize
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetProfileStringW( GetProfileStringW(
__in_opt LPCWSTR lpAppName, _In_opt_ LPCWSTR lpAppName,
__in_opt LPCWSTR lpKeyName, _In_opt_ LPCWSTR lpKeyName,
__in_opt LPCWSTR lpDefault, _In_opt_ LPCWSTR lpDefault,
__out_ecount_part_opt(nSize, return + 1) LPWSTR lpReturnedString, _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
__in DWORD nSize _In_ DWORD nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define GetProfileString GetProfileStringW #define GetProfileString GetProfileStringW
#else #else
#define GetProfileString GetProfileStringA #define GetProfileString GetProfileStringA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteProfileStringA( WriteProfileStringA(
__in_opt LPCSTR lpAppName, _In_opt_ LPCSTR lpAppName,
__in_opt LPCSTR lpKeyName, _In_opt_ LPCSTR lpKeyName,
__in_opt LPCSTR lpString _In_opt_ LPCSTR lpString
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteProfileStringW( WriteProfileStringW(
__in_opt LPCWSTR lpAppName, _In_opt_ LPCWSTR lpAppName,
__in_opt LPCWSTR lpKeyName, _In_opt_ LPCWSTR lpKeyName,
__in_opt LPCWSTR lpString _In_opt_ LPCWSTR lpString
); );
#ifdef UNICODE #ifdef UNICODE
#define WriteProfileString WriteProfileStringW #define WriteProfileString WriteProfileStringW
#else #else
#define WriteProfileString WriteProfileStringA #define WriteProfileString WriteProfileStringA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetProfileSectionA( GetProfileSectionA(
__in LPCSTR lpAppName, _In_ LPCSTR lpAppName,
__out_ecount_part_opt(nSize, return + 1) LPSTR lpReturnedString, _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
__in DWORD nSize _In_ DWORD nSize
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetProfileSectionW( GetProfileSectionW(
__in LPCWSTR lpAppName, _In_ LPCWSTR lpAppName,
__out_ecount_part_opt(nSize, return + 1) LPWSTR lpReturnedString, _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
__in DWORD nSize _In_ DWORD nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define GetProfileSection GetProfileSectionW #define GetProfileSection GetProfileSectionW
#else #else
#define GetProfileSection GetProfileSectionA #define GetProfileSection GetProfileSectionA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteProfileSectionA( WriteProfileSectionA(
__in LPCSTR lpAppName, _In_ LPCSTR lpAppName,
__in LPCSTR lpString _In_ LPCSTR lpString
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteProfileSectionW( WriteProfileSectionW(
__in LPCWSTR lpAppName, _In_ LPCWSTR lpAppName,
__in LPCWSTR lpString _In_ LPCWSTR lpString
); );
#ifdef UNICODE #ifdef UNICODE
#define WriteProfileSection WriteProfileSectionW #define WriteProfileSection WriteProfileSectionW
#else #else
#define WriteProfileSection WriteProfileSectionA #define WriteProfileSection WriteProfileSectionA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
GetPrivateProfileIntA( GetPrivateProfileIntA(
__in LPCSTR lpAppName, _In_ LPCSTR lpAppName,
__in LPCSTR lpKeyName, _In_ LPCSTR lpKeyName,
__in INT nDefault, _In_ INT nDefault,
__in_opt LPCSTR lpFileName _In_opt_ LPCSTR lpFileName
); );
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
GetPrivateProfileIntW( GetPrivateProfileIntW(
__in LPCWSTR lpAppName, _In_ LPCWSTR lpAppName,
__in LPCWSTR lpKeyName, _In_ LPCWSTR lpKeyName,
__in INT nDefault, _In_ INT nDefault,
__in_opt LPCWSTR lpFileName _In_opt_ LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define GetPrivateProfileInt GetPrivateProfileIntW #define GetPrivateProfileInt GetPrivateProfileIntW
#else #else
#define GetPrivateProfileInt GetPrivateProfileIntA #define GetPrivateProfileInt GetPrivateProfileIntA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef GetPrivateProfileInt #undef GetPrivateProfileInt
__inline __inline
skipping to change at line 8316 skipping to change at line 4116
nDefault, nDefault,
lpFileName lpFileName
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetPrivateProfileStringA( GetPrivateProfileStringA(
__in_opt LPCSTR lpAppName, _In_opt_ LPCSTR lpAppName,
__in_opt LPCSTR lpKeyName, _In_opt_ LPCSTR lpKeyName,
__in_opt LPCSTR lpDefault, _In_opt_ LPCSTR lpDefault,
__out_ecount_part_opt(nSize, return + 1) LPSTR lpReturnedString, _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
__in DWORD nSize, _In_ DWORD nSize,
__in_opt LPCSTR lpFileName _In_opt_ LPCSTR lpFileName
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetPrivateProfileStringW( GetPrivateProfileStringW(
__in_opt LPCWSTR lpAppName, _In_opt_ LPCWSTR lpAppName,
__in_opt LPCWSTR lpKeyName, _In_opt_ LPCWSTR lpKeyName,
__in_opt LPCWSTR lpDefault, _In_opt_ LPCWSTR lpDefault,
__out_ecount_part_opt(nSize, return + 1) LPWSTR lpReturnedString, _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
__in DWORD nSize, _In_ DWORD nSize,
__in_opt LPCWSTR lpFileName _In_opt_ LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define GetPrivateProfileString GetPrivateProfileStringW #define GetPrivateProfileString GetPrivateProfileStringW
#else #else
#define GetPrivateProfileString GetPrivateProfileStringA #define GetPrivateProfileString GetPrivateProfileStringA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef GetPrivateProfileString #undef GetPrivateProfileString
__inline __inline
skipping to change at line 8372 skipping to change at line 4172
nSize, nSize,
lpFileName lpFileName
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WritePrivateProfileStringA( WritePrivateProfileStringA(
__in_opt LPCSTR lpAppName, _In_opt_ LPCSTR lpAppName,
__in_opt LPCSTR lpKeyName, _In_opt_ LPCSTR lpKeyName,
__in_opt LPCSTR lpString, _In_opt_ LPCSTR lpString,
__in_opt LPCSTR lpFileName _In_opt_ LPCSTR lpFileName
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WritePrivateProfileStringW( WritePrivateProfileStringW(
__in_opt LPCWSTR lpAppName, _In_opt_ LPCWSTR lpAppName,
__in_opt LPCWSTR lpKeyName, _In_opt_ LPCWSTR lpKeyName,
__in_opt LPCWSTR lpString, _In_opt_ LPCWSTR lpString,
__in_opt LPCWSTR lpFileName _In_opt_ LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define WritePrivateProfileString WritePrivateProfileStringW #define WritePrivateProfileString WritePrivateProfileStringW
#else #else
#define WritePrivateProfileString WritePrivateProfileStringA #define WritePrivateProfileString WritePrivateProfileStringA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetPrivateProfileSectionA( GetPrivateProfileSectionA(
__in LPCSTR lpAppName, _In_ LPCSTR lpAppName,
__out_ecount_part_opt(nSize, return + 1) LPSTR lpReturnedString, _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
__in DWORD nSize, _In_ DWORD nSize,
__in_opt LPCSTR lpFileName _In_opt_ LPCSTR lpFileName
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetPrivateProfileSectionW( GetPrivateProfileSectionW(
__in LPCWSTR lpAppName, _In_ LPCWSTR lpAppName,
__out_ecount_part_opt(nSize, return + 1) LPWSTR lpReturnedString, _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
__in DWORD nSize, _In_ DWORD nSize,
__in_opt LPCWSTR lpFileName _In_opt_ LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define GetPrivateProfileSection GetPrivateProfileSectionW #define GetPrivateProfileSection GetPrivateProfileSectionW
#else #else
#define GetPrivateProfileSection GetPrivateProfileSectionA #define GetPrivateProfileSection GetPrivateProfileSectionA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef GetPrivateProfileSection #undef GetPrivateProfileSection
__inline __inline
skipping to change at line 8444 skipping to change at line 4244
nSize, nSize,
lpFileName lpFileName
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WritePrivateProfileSectionA( WritePrivateProfileSectionA(
__in_opt LPCSTR lpAppName, _In_opt_ LPCSTR lpAppName,
__in_opt LPCSTR lpString, _In_opt_ LPCSTR lpString,
__in_opt LPCSTR lpFileName _In_opt_ LPCSTR lpFileName
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WritePrivateProfileSectionW( WritePrivateProfileSectionW(
__in_opt LPCWSTR lpAppName, _In_opt_ LPCWSTR lpAppName,
__in_opt LPCWSTR lpString, _In_opt_ LPCWSTR lpString,
__in_opt LPCWSTR lpFileName _In_opt_ LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define WritePrivateProfileSection WritePrivateProfileSectionW #define WritePrivateProfileSection WritePrivateProfileSectionW
#else #else
#define WritePrivateProfileSection WritePrivateProfileSectionA #define WritePrivateProfileSection WritePrivateProfileSectionA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetPrivateProfileSectionNamesA( GetPrivateProfileSectionNamesA(
__out_ecount_part_opt(nSize, return + 1) LPSTR lpszReturnBuffer, _Out_writes_to_opt_(nSize, return + 1) LPSTR lpszReturnBuffer,
__in DWORD nSize, _In_ DWORD nSize,
__in_opt LPCSTR lpFileName _In_opt_ LPCSTR lpFileName
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetPrivateProfileSectionNamesW( GetPrivateProfileSectionNamesW(
__out_ecount_part_opt(nSize, return + 1) LPWSTR lpszReturnBuffer, _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpszReturnBuffer,
__in DWORD nSize, _In_ DWORD nSize,
__in_opt LPCWSTR lpFileName _In_opt_ LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesW #define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesW
#else #else
#define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesA #define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef GetPrivateProfileSectionNames #undef GetPrivateProfileSectionNames
__inline __inline
skipping to change at line 8510 skipping to change at line 4310
nSize, nSize,
lpFileName lpFileName
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetPrivateProfileStructA( GetPrivateProfileStructA(
__in LPCSTR lpszSection, _In_ LPCSTR lpszSection,
__in LPCSTR lpszKey, _In_ LPCSTR lpszKey,
__out_bcount_opt(uSizeStruct) LPVOID lpStruct, _Out_writes_bytes_opt_(uSizeStruct) LPVOID lpStruct,
__in UINT uSizeStruct, _In_ UINT uSizeStruct,
__in_opt LPCSTR szFile _In_opt_ LPCSTR szFile
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetPrivateProfileStructW( GetPrivateProfileStructW(
__in LPCWSTR lpszSection, _In_ LPCWSTR lpszSection,
__in LPCWSTR lpszKey, _In_ LPCWSTR lpszKey,
__out_bcount_opt(uSizeStruct) LPVOID lpStruct, _Out_writes_bytes_opt_(uSizeStruct) LPVOID lpStruct,
__in UINT uSizeStruct, _In_ UINT uSizeStruct,
__in_opt LPCWSTR szFile _In_opt_ LPCWSTR szFile
); );
#ifdef UNICODE #ifdef UNICODE
#define GetPrivateProfileStruct GetPrivateProfileStructW #define GetPrivateProfileStruct GetPrivateProfileStructW
#else #else
#define GetPrivateProfileStruct GetPrivateProfileStructA #define GetPrivateProfileStruct GetPrivateProfileStructA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef GetPrivateProfileStruct #undef GetPrivateProfileStruct
__inline __inline
skipping to change at line 8562 skipping to change at line 4362
uSizeStruct, uSizeStruct,
szFile szFile
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WritePrivateProfileStructA( WritePrivateProfileStructA(
__in LPCSTR lpszSection, _In_ LPCSTR lpszSection,
__in LPCSTR lpszKey, _In_ LPCSTR lpszKey,
__in_bcount_opt(uSizeStruct) LPVOID lpStruct, _In_reads_bytes_opt_(uSizeStruct) LPVOID lpStruct,
__in UINT uSizeStruct, _In_ UINT uSizeStruct,
__in_opt LPCSTR szFile _In_opt_ LPCSTR szFile
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WritePrivateProfileStructW( WritePrivateProfileStructW(
__in LPCWSTR lpszSection, _In_ LPCWSTR lpszSection,
__in LPCWSTR lpszKey, _In_ LPCWSTR lpszKey,
__in_bcount_opt(uSizeStruct) LPVOID lpStruct, _In_reads_bytes_opt_(uSizeStruct) LPVOID lpStruct,
__in UINT uSizeStruct, _In_ UINT uSizeStruct,
__in_opt LPCWSTR szFile _In_opt_ LPCWSTR szFile
); );
#ifdef UNICODE #ifdef UNICODE
#define WritePrivateProfileStruct WritePrivateProfileStructW #define WritePrivateProfileStruct WritePrivateProfileStructW
#else #else
#define WritePrivateProfileStruct WritePrivateProfileStructA #define WritePrivateProfileStruct WritePrivateProfileStructA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
UINT
WINAPI
GetDriveTypeA(
__in_opt LPCSTR lpRootPathName
);
WINBASEAPI
UINT
WINAPI
GetDriveTypeW(
__in_opt LPCWSTR lpRootPathName
);
#ifdef UNICODE
#define GetDriveType GetDriveTypeW
#else
#define GetDriveType GetDriveTypeA
#endif // !UNICODE
WINBASEAPI
UINT
WINAPI
GetSystemDirectoryA(
__out_ecount_part_opt(uSize, return + 1) LPSTR lpBuffer,
__in UINT uSize
);
WINBASEAPI
UINT
WINAPI
GetSystemDirectoryW(
__out_ecount_part_opt(uSize, return + 1) LPWSTR lpBuffer,
__in UINT uSize
);
#ifdef UNICODE
#define GetSystemDirectory GetSystemDirectoryW
#else
#define GetSystemDirectory GetSystemDirectoryA
#endif // !UNICODE
WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetTempPathA( GetTempPathA(
__in DWORD nBufferLength, _In_ DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer _Out_writes_to_opt_(nBufferLength, return + 1) LPSTR lpBuffer
);
WINBASEAPI
DWORD
WINAPI
GetTempPathW(
__in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer
); );
#ifdef UNICODE #ifndef UNICODE
#define GetTempPath GetTempPathW
#else
#define GetTempPath GetTempPathA #define GetTempPath GetTempPathA
#endif // !UNICODE #endif
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
GetTempFileNameA( GetTempFileNameA(
__in LPCSTR lpPathName, _In_ LPCSTR lpPathName,
__in LPCSTR lpPrefixString, _In_ LPCSTR lpPrefixString,
__in UINT uUnique, _In_ UINT uUnique,
__out_ecount(MAX_PATH) LPSTR lpTempFileName _Out_writes_(MAX_PATH) LPSTR lpTempFileName
);
WINBASEAPI
UINT
WINAPI
GetTempFileNameW(
__in LPCWSTR lpPathName,
__in LPCWSTR lpPrefixString,
__in UINT uUnique,
__out_ecount(MAX_PATH) LPWSTR lpTempFileName
); );
#ifdef UNICODE #ifndef UNICODE
#define GetTempFileName GetTempFileNameW
#else
#define GetTempFileName GetTempFileNameA #define GetTempFileName GetTempFileNameA
#endif // !UNICODE #endif
#if defined(_M_CEE) #if defined(_M_CEE)
#undef GetTempFileName #undef GetTempFileName
__inline __inline
UINT UINT
GetTempFileName( GetTempFileName(
LPCTSTR lpPathName, LPCTSTR lpPathName,
LPCTSTR lpPrefixString, LPCTSTR lpPrefixString,
UINT uUnique, UINT uUnique,
LPTSTR lpTempFileName LPTSTR lpTempFileName
skipping to change at line 8690 skipping to change at line 4432
return GetTempFileNameA( return GetTempFileNameA(
#endif #endif
lpPathName, lpPathName,
lpPrefixString, lpPrefixString,
uUnique, uUnique,
lpTempFileName lpTempFileName
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
WINBASEAPI
UINT
WINAPI
GetWindowsDirectoryA(
__out_ecount_part_opt(uSize, return + 1) LPSTR lpBuffer,
__in UINT uSize
);
WINBASEAPI
UINT
WINAPI
GetWindowsDirectoryW(
__out_ecount_part_opt(uSize, return + 1) LPWSTR lpBuffer,
__in UINT uSize
);
#ifdef UNICODE
#define GetWindowsDirectory GetWindowsDirectoryW
#else
#define GetWindowsDirectory GetWindowsDirectoryA
#endif // !UNICODE
WINBASEAPI
UINT
WINAPI
GetSystemWindowsDirectoryA(
__out_ecount_part_opt(uSize, return + 1) LPSTR lpBuffer,
__in UINT uSize
);
WINBASEAPI
UINT
WINAPI
GetSystemWindowsDirectoryW(
__out_ecount_part_opt(uSize, return + 1) LPWSTR lpBuffer,
__in UINT uSize
);
#ifdef UNICODE
#define GetSystemWindowsDirectory GetSystemWindowsDirectoryW
#else
#define GetSystemWindowsDirectory GetSystemWindowsDirectoryA
#endif // !UNICODE
#if !defined(RC_INVOKED) // RC warns because "WINBASE_DECLARE_GET_SYSTEM_WOW64_D IRECTORY" is a bit long. #if !defined(RC_INVOKED) // RC warns because "WINBASE_DECLARE_GET_SYSTEM_WOW64_D IRECTORY" is a bit long.
#if _WIN32_WINNT >= 0x0501 || defined(WINBASE_DECLARE_GET_SYSTEM_WOW64_DIRECTORY ) #if _WIN32_WINNT >= 0x0501 || defined(WINBASE_DECLARE_GET_SYSTEM_WOW64_DIRECTORY )
WINBASEAPI WINBASEAPI
_Success_(return != 0 && return < uSize)
UINT UINT
WINAPI WINAPI
GetSystemWow64DirectoryA( GetSystemWow64DirectoryA(
__out_ecount_part_opt(uSize, return + 1) LPSTR lpBuffer, _Out_writes_to_opt_(uSize, return + 1) LPSTR lpBuffer,
__in UINT uSize _In_ UINT uSize
); );
WINBASEAPI WINBASEAPI
_Success_(return != 0 && return < uSize)
UINT UINT
WINAPI WINAPI
GetSystemWow64DirectoryW( GetSystemWow64DirectoryW(
__out_ecount_part_opt(uSize, return + 1) LPWSTR lpBuffer, _Out_writes_to_opt_(uSize, return + 1) LPWSTR lpBuffer,
__in UINT uSize _In_ UINT uSize
); );
#ifdef UNICODE #ifdef UNICODE
#define GetSystemWow64Directory GetSystemWow64DirectoryW #define GetSystemWow64Directory GetSystemWow64DirectoryW
#else #else
#define GetSystemWow64Directory GetSystemWow64DirectoryA #define GetSystemWow64Directory GetSystemWow64DirectoryA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOLEAN BOOLEAN
WINAPI WINAPI
Wow64EnableWow64FsRedirection ( Wow64EnableWow64FsRedirection (
__in BOOLEAN Wow64FsEnableRedirection _In_ BOOLEAN Wow64FsEnableRedirection
);
WINBASEAPI
BOOL
WINAPI
Wow64DisableWow64FsRedirection (
__out PVOID *OldValue
);
WINBASEAPI
BOOL
WINAPI
Wow64RevertWow64FsRedirection (
__in PVOID OlValue
); );
// //
// for GetProcAddress // for GetProcAddress
// //
typedef UINT (WINAPI* PGET_SYSTEM_WOW64_DIRECTORY_A)(__out_ecount_part_opt(uSize typedef UINT (WINAPI* PGET_SYSTEM_WOW64_DIRECTORY_A)(_Out_writes_to_opt_(uSize,
, return + 1) LPSTR lpBuffer, __in UINT uSize); return + 1) LPSTR lpBuffer, _In_ UINT uSize);
typedef UINT (WINAPI* PGET_SYSTEM_WOW64_DIRECTORY_W)(__out_ecount_part_opt(uSize typedef UINT (WINAPI* PGET_SYSTEM_WOW64_DIRECTORY_W)(_Out_writes_to_opt_(uSize,
, return + 1) LPWSTR lpBuffer, __in UINT uSize); return + 1) LPWSTR lpBuffer, _In_ UINT uSize);
// //
// GetProcAddress only accepts GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A, // GetProcAddress only accepts GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A,
// GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A, GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A. // GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A, GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A.
// The others are if you want to use the strings in some other way. // The others are if you want to use the strings in some other way.
// //
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A "GetSystemWow64DirectoryA" #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_W L"GetSystemWow64DirectoryA"
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T TEXT("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_A "GetSystemWow64DirectoryW"
skipping to change at line 8805 skipping to change at line 4495
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T
#else #else
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A #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_W GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W
#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T
#endif #endif
#endif // _WIN32_WINNT >= 0x0501 #endif // _WIN32_WINNT >= 0x0501
#endif #endif
WINBASEAPI
BOOL
WINAPI
SetCurrentDirectoryA(
__in LPCSTR lpPathName
);
WINBASEAPI
BOOL
WINAPI
SetCurrentDirectoryW(
__in LPCWSTR lpPathName
);
#ifdef UNICODE
#define SetCurrentDirectory SetCurrentDirectoryW
#else
#define SetCurrentDirectory SetCurrentDirectoryA
#endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef SetCurrentDirectory #undef SetCurrentDirectory
__inline __inline
BOOL BOOL
SetCurrentDirectory( SetCurrentDirectory(
LPCTSTR lpPathName LPCTSTR lpPathName
) )
{ {
#ifdef UNICODE #ifdef UNICODE
return SetCurrentDirectoryW( return SetCurrentDirectoryW(
#else #else
return SetCurrentDirectoryA( return SetCurrentDirectoryA(
#endif #endif
lpPathName lpPathName
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
WINBASEAPI
DWORD
WINAPI
GetCurrentDirectoryA(
__in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer
);
WINBASEAPI
DWORD
WINAPI
GetCurrentDirectoryW(
__in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer
);
#ifdef UNICODE
#define GetCurrentDirectory GetCurrentDirectoryW
#else
#define GetCurrentDirectory GetCurrentDirectoryA
#endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef GetCurrentDirectory #undef GetCurrentDirectory
__inline __inline
DWORD DWORD
GetCurrentDirectory( GetCurrentDirectory(
DWORD nBufferLength, DWORD nBufferLength,
LPTSTR lpBuffer LPTSTR lpBuffer
) )
{ {
#ifdef UNICODE #ifdef UNICODE
skipping to change at line 8887 skipping to change at line 4539
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
#if _WIN32_WINNT >= 0x0502 #if _WIN32_WINNT >= 0x0502
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetDllDirectoryA( SetDllDirectoryA(
__in_opt LPCSTR lpPathName _In_opt_ LPCSTR lpPathName
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetDllDirectoryW( SetDllDirectoryW(
__in_opt LPCWSTR lpPathName _In_opt_ LPCWSTR lpPathName
); );
#ifdef UNICODE #ifdef UNICODE
#define SetDllDirectory SetDllDirectoryW #define SetDllDirectory SetDllDirectoryW
#else #else
#define SetDllDirectory SetDllDirectoryA #define SetDllDirectory SetDllDirectoryA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
_Success_(return != 0 && return < nBufferLength)
DWORD DWORD
WINAPI WINAPI
GetDllDirectoryA( GetDllDirectoryA(
__in DWORD nBufferLength, _In_ DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer _Out_writes_to_opt_(nBufferLength, return + 1) LPSTR lpBuffer
); );
WINBASEAPI WINBASEAPI
_Success_(return != 0 && return < nBufferLength)
DWORD DWORD
WINAPI WINAPI
GetDllDirectoryW( GetDllDirectoryW(
__in DWORD nBufferLength, _In_ DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer _Out_writes_to_opt_(nBufferLength, return + 1) LPWSTR lpBuffer
); );
#ifdef UNICODE #ifdef UNICODE
#define GetDllDirectory GetDllDirectoryW #define GetDllDirectory GetDllDirectoryW
#else #else
#define GetDllDirectory GetDllDirectoryA #define GetDllDirectory GetDllDirectoryA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0502 #endif // _WIN32_WINNT >= 0x0502
#define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE 0x1 #define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE 0x1
#define BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE 0x10000 #define BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE 0x10000
#define BASE_SEARCH_PATH_PERMANENT 0x8000 #define BASE_SEARCH_PATH_PERMANENT 0x8000
#define BASE_SEARCH_PATH_INVALID_FLAGS ~0x18001 #define BASE_SEARCH_PATH_INVALID_FLAGS ~0x18001
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetSearchPathMode ( SetSearchPathMode (
__in DWORD Flags _In_ DWORD Flags
);
WINBASEAPI
BOOL
WINAPI
GetDiskFreeSpaceA(
__in_opt LPCSTR lpRootPathName,
__out_opt LPDWORD lpSectorsPerCluster,
__out_opt LPDWORD lpBytesPerSector,
__out_opt LPDWORD lpNumberOfFreeClusters,
__out_opt LPDWORD lpTotalNumberOfClusters
);
WINBASEAPI
BOOL
WINAPI
GetDiskFreeSpaceW(
__in_opt LPCWSTR lpRootPathName,
__out_opt LPDWORD lpSectorsPerCluster,
__out_opt LPDWORD lpBytesPerSector,
__out_opt LPDWORD lpNumberOfFreeClusters,
__out_opt LPDWORD lpTotalNumberOfClusters
); );
#ifdef UNICODE
#define GetDiskFreeSpace GetDiskFreeSpaceW
#else
#define GetDiskFreeSpace GetDiskFreeSpaceA
#endif // !UNICODE
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
BOOL #pragma endregion
WINAPI
GetDiskFreeSpaceExA(
__in_opt LPCSTR lpDirectoryName,
__out_opt PULARGE_INTEGER lpFreeBytesAvailableToCaller,
__out_opt PULARGE_INTEGER lpTotalNumberOfBytes,
__out_opt PULARGE_INTEGER lpTotalNumberOfFreeBytes
);
WINBASEAPI
BOOL
WINAPI
GetDiskFreeSpaceExW(
__in_opt LPCWSTR lpDirectoryName,
__out_opt PULARGE_INTEGER lpFreeBytesAvailableToCaller,
__out_opt PULARGE_INTEGER lpTotalNumberOfBytes,
__out_opt PULARGE_INTEGER lpTotalNumberOfFreeBytes
);
#ifdef UNICODE
#define GetDiskFreeSpaceEx GetDiskFreeSpaceExW
#else
#define GetDiskFreeSpaceEx GetDiskFreeSpaceExA
#endif // !UNICODE
WINBASEAPI #pragma region Application Family
BOOL #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
WINAPI
CreateDirectoryA(
__in LPCSTR lpPathName,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
WINBASEAPI
BOOL
WINAPI
CreateDirectoryW(
__in LPCWSTR lpPathName,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
#ifdef UNICODE
#define CreateDirectory CreateDirectoryW
#else
#define CreateDirectory CreateDirectoryA
#endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef CreateDirectory #undef CreateDirectory
__inline __inline
BOOL BOOL
CreateDirectory( CreateDirectory(
LPCTSTR lpPathName, LPCTSTR lpPathName,
LPSECURITY_ATTRIBUTES lpSecurityAttributes LPSECURITY_ATTRIBUTES lpSecurityAttributes
) )
{ {
skipping to change at line 9025 skipping to change at line 4615
return CreateDirectoryW( return CreateDirectoryW(
#else #else
return CreateDirectoryA( return CreateDirectoryA(
#endif #endif
lpPathName, lpPathName,
lpSecurityAttributes lpSecurityAttributes
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateDirectoryExA( CreateDirectoryExA(
__in LPCSTR lpTemplateDirectory, _In_ LPCSTR lpTemplateDirectory,
__in LPCSTR lpNewDirectory, _In_ LPCSTR lpNewDirectory,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateDirectoryExW( CreateDirectoryExW(
__in LPCWSTR lpTemplateDirectory, _In_ LPCWSTR lpTemplateDirectory,
__in LPCWSTR lpNewDirectory, _In_ LPCWSTR lpNewDirectory,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateDirectoryEx CreateDirectoryExW #define CreateDirectoryEx CreateDirectoryExW
#else #else
#define CreateDirectoryEx CreateDirectoryExA #define CreateDirectoryEx CreateDirectoryExA
#endif // !UNICODE #endif // !UNICODE
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateDirectoryTransactedA( CreateDirectoryTransactedA(
__in_opt LPCSTR lpTemplateDirectory, _In_opt_ LPCSTR lpTemplateDirectory,
__in LPCSTR lpNewDirectory, _In_ LPCSTR lpNewDirectory,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateDirectoryTransactedW( CreateDirectoryTransactedW(
__in_opt LPCWSTR lpTemplateDirectory, _In_opt_ LPCWSTR lpTemplateDirectory,
__in LPCWSTR lpNewDirectory, _In_ LPCWSTR lpNewDirectory,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateDirectoryTransacted CreateDirectoryTransactedW #define CreateDirectoryTransacted CreateDirectoryTransactedW
#else #else
#define CreateDirectoryTransacted CreateDirectoryTransactedA #define CreateDirectoryTransacted CreateDirectoryTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600
WINBASEAPI
BOOL
WINAPI
RemoveDirectoryA(
__in LPCSTR lpPathName
);
WINBASEAPI
BOOL
WINAPI
RemoveDirectoryW(
__in LPCWSTR lpPathName
);
#ifdef UNICODE
#define RemoveDirectory RemoveDirectoryW
#else
#define RemoveDirectory RemoveDirectoryA
#endif // !UNICODE
#if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
RemoveDirectoryTransactedA( RemoveDirectoryTransactedA(
__in LPCSTR lpPathName, _In_ LPCSTR lpPathName,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
RemoveDirectoryTransactedW( RemoveDirectoryTransactedW(
__in LPCWSTR lpPathName, _In_ LPCWSTR lpPathName,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define RemoveDirectoryTransacted RemoveDirectoryTransactedW #define RemoveDirectoryTransacted RemoveDirectoryTransactedW
#else #else
#define RemoveDirectoryTransacted RemoveDirectoryTransactedA #define RemoveDirectoryTransacted RemoveDirectoryTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600
WINBASEAPI
DWORD
WINAPI
GetFullPathNameA(
__in LPCSTR lpFileName,
__in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer,
__deref_opt_out LPSTR *lpFilePart
);
WINBASEAPI
DWORD
WINAPI
GetFullPathNameW(
__in LPCWSTR lpFileName,
__in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer,
__deref_opt_out LPWSTR *lpFilePart
);
#ifdef UNICODE
#define GetFullPathName GetFullPathNameW
#else
#define GetFullPathName GetFullPathNameA
#endif // !UNICODE
#if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
_Success_(return != 0 && return < nBufferLength)
DWORD DWORD
WINAPI WINAPI
GetFullPathNameTransactedA( GetFullPathNameTransactedA(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__in DWORD nBufferLength, _In_ DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer, _Out_writes_to_opt_(nBufferLength, return + 1) LPSTR lpBuffer,
__deref_opt_out LPSTR *lpFilePart, _Outptr_opt_ LPSTR *lpFilePart,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
_Success_(return != 0 && return < nBufferLength)
DWORD DWORD
WINAPI WINAPI
GetFullPathNameTransactedW( GetFullPathNameTransactedW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in DWORD nBufferLength, _In_ DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer, _Out_writes_to_opt_(nBufferLength, return + 1) LPWSTR lpBuffer,
__deref_opt_out LPWSTR *lpFilePart, _Outptr_opt_ LPWSTR *lpFilePart,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define GetFullPathNameTransacted GetFullPathNameTransactedW #define GetFullPathNameTransacted GetFullPathNameTransactedW
#else #else
#define GetFullPathNameTransacted GetFullPathNameTransactedA #define GetFullPathNameTransacted GetFullPathNameTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600 #endif // _WIN32_WINNT >= 0x0600
#define DDD_RAW_TARGET_PATH 0x00000001 #define DDD_RAW_TARGET_PATH 0x00000001
#define DDD_REMOVE_DEFINITION 0x00000002 #define DDD_REMOVE_DEFINITION 0x00000002
#define DDD_EXACT_MATCH_ON_REMOVE 0x00000004 #define DDD_EXACT_MATCH_ON_REMOVE 0x00000004
#define DDD_NO_BROADCAST_SYSTEM 0x00000008 #define DDD_NO_BROADCAST_SYSTEM 0x00000008
#define DDD_LUID_BROADCAST_DRIVE 0x00000010 #define DDD_LUID_BROADCAST_DRIVE 0x00000010
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DefineDosDeviceA( DefineDosDeviceA(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LPCSTR lpDeviceName, _In_ LPCSTR lpDeviceName,
__in_opt LPCSTR lpTargetPath _In_opt_ LPCSTR lpTargetPath
);
WINBASEAPI
BOOL
WINAPI
DefineDosDeviceW(
__in DWORD dwFlags,
__in LPCWSTR lpDeviceName,
__in_opt LPCWSTR lpTargetPath
); );
#ifdef UNICODE #ifndef UNICODE
#define DefineDosDevice DefineDosDeviceW
#else
#define DefineDosDevice DefineDosDeviceA #define DefineDosDevice DefineDosDeviceA
#endif // !UNICODE #endif
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
QueryDosDeviceA( QueryDosDeviceA(
__in_opt LPCSTR lpDeviceName, _In_opt_ LPCSTR lpDeviceName,
__out_ecount_part_opt(ucchMax, return) LPSTR lpTargetPath, _Out_writes_to_opt_(ucchMax, return) LPSTR lpTargetPath,
__in DWORD ucchMax _In_ DWORD ucchMax
);
WINBASEAPI
DWORD
WINAPI
QueryDosDeviceW(
__in_opt LPCWSTR lpDeviceName,
__out_ecount_part_opt(ucchMax, return) LPWSTR lpTargetPath,
__in DWORD ucchMax
); );
#ifdef UNICODE #ifndef UNICODE
#define QueryDosDevice QueryDosDeviceW
#else
#define QueryDosDevice QueryDosDeviceA #define QueryDosDevice QueryDosDeviceA
#endif // !UNICODE #endif
#define EXPAND_LOCAL_DRIVES #define EXPAND_LOCAL_DRIVES
WINBASEAPI
__out
HANDLE
WINAPI
CreateFileA(
__in LPCSTR lpFileName,
__in DWORD dwDesiredAccess,
__in DWORD dwShareMode,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in DWORD dwCreationDisposition,
__in DWORD dwFlagsAndAttributes,
__in_opt HANDLE hTemplateFile
);
WINBASEAPI
__out
HANDLE
WINAPI
CreateFileW(
__in LPCWSTR lpFileName,
__in DWORD dwDesiredAccess,
__in DWORD dwShareMode,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in DWORD dwCreationDisposition,
__in DWORD dwFlagsAndAttributes,
__in_opt HANDLE hTemplateFile
);
#ifdef UNICODE
#define CreateFile CreateFileW
#else
#define CreateFile CreateFileA
#endif // !UNICODE
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
CreateFileTransactedA( CreateFileTransactedA(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__in DWORD dwDesiredAccess, _In_ DWORD dwDesiredAccess,
__in DWORD dwShareMode, _In_ DWORD dwShareMode,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in DWORD dwCreationDisposition, _In_ DWORD dwCreationDisposition,
__in DWORD dwFlagsAndAttributes, _In_ DWORD dwFlagsAndAttributes,
__in_opt HANDLE hTemplateFile, _In_opt_ HANDLE hTemplateFile,
__in HANDLE hTransaction, _In_ HANDLE hTransaction,
__in_opt PUSHORT pusMiniVersion, _In_opt_ PUSHORT pusMiniVersion,
__reserved PVOID lpExtendedParameter _Reserved_ PVOID lpExtendedParameter
); );
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
CreateFileTransactedW( CreateFileTransactedW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in DWORD dwDesiredAccess, _In_ DWORD dwDesiredAccess,
__in DWORD dwShareMode, _In_ DWORD dwShareMode,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in DWORD dwCreationDisposition, _In_ DWORD dwCreationDisposition,
__in DWORD dwFlagsAndAttributes, _In_ DWORD dwFlagsAndAttributes,
__in_opt HANDLE hTemplateFile, _In_opt_ HANDLE hTemplateFile,
__in HANDLE hTransaction, _In_ HANDLE hTransaction,
__in_opt PUSHORT pusMiniVersion, _In_opt_ PUSHORT pusMiniVersion,
__reserved PVOID lpExtendedParameter _Reserved_ PVOID lpExtendedParameter
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateFileTransacted CreateFileTransactedW #define CreateFileTransacted CreateFileTransactedW
#else #else
#define CreateFileTransacted CreateFileTransactedA #define CreateFileTransacted CreateFileTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600 #endif // _WIN32_WINNT >= 0x0600
#if _WIN32_WINNT >= 0x0502 #if _WIN32_WINNT >= 0x0502
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
ReOpenFile( ReOpenFile(
__in HANDLE hOriginalFile, _In_ HANDLE hOriginalFile,
__in DWORD dwDesiredAccess, _In_ DWORD dwDesiredAccess,
__in DWORD dwShareMode, _In_ DWORD dwShareMode,
__in DWORD dwFlagsAndAttributes _In_ DWORD dwFlagsAndAttributes
); );
#endif // _WIN32_WINNT >= 0x0502 #endif // _WIN32_WINNT >= 0x0502
WINBASEAPI
BOOL
WINAPI
SetFileAttributesA(
__in LPCSTR lpFileName,
__in DWORD dwFileAttributes
);
WINBASEAPI
BOOL
WINAPI
SetFileAttributesW(
__in LPCWSTR lpFileName,
__in DWORD dwFileAttributes
);
#ifdef UNICODE
#define SetFileAttributes SetFileAttributesW
#else
#define SetFileAttributes SetFileAttributesA
#endif // !UNICODE
WINBASEAPI
DWORD
WINAPI
GetFileAttributesA(
__in LPCSTR lpFileName
);
WINBASEAPI
DWORD
WINAPI
GetFileAttributesW(
__in LPCWSTR lpFileName
);
#ifdef UNICODE
#define GetFileAttributes GetFileAttributesW
#else
#define GetFileAttributes GetFileAttributesA
#endif // !UNICODE
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetFileAttributesTransactedA( SetFileAttributesTransactedA(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__in DWORD dwFileAttributes, _In_ DWORD dwFileAttributes,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetFileAttributesTransactedW( SetFileAttributesTransactedW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in DWORD dwFileAttributes, _In_ DWORD dwFileAttributes,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define SetFileAttributesTransacted SetFileAttributesTransactedW #define SetFileAttributesTransacted SetFileAttributesTransactedW
#else #else
#define SetFileAttributesTransacted SetFileAttributesTransactedA #define SetFileAttributesTransacted SetFileAttributesTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600
typedef enum _GET_FILEEX_INFO_LEVELS {
GetFileExInfoStandard,
GetFileExMaxInfoLevel
} GET_FILEEX_INFO_LEVELS;
#if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetFileAttributesTransactedA( GetFileAttributesTransactedA(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__in GET_FILEEX_INFO_LEVELS fInfoLevelId, _In_ GET_FILEEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFileInformation, _Out_writes_bytes_(sizeof(WIN32_FILE_ATTRIBUTE_DATA)) LPVOID lpFileInformati
__in HANDLE hTransaction on,
_In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetFileAttributesTransactedW( GetFileAttributesTransactedW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in GET_FILEEX_INFO_LEVELS fInfoLevelId, _In_ GET_FILEEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFileInformation, _Out_writes_bytes_(sizeof(WIN32_FILE_ATTRIBUTE_DATA)) LPVOID lpFileInformati
__in HANDLE hTransaction on,
_In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define GetFileAttributesTransacted GetFileAttributesTransactedW #define GetFileAttributesTransacted GetFileAttributesTransactedW
#else #else
#define GetFileAttributesTransacted GetFileAttributesTransactedA #define GetFileAttributesTransacted GetFileAttributesTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600
WINBASEAPI
BOOL
WINAPI
GetFileAttributesExA(
__in LPCSTR lpFileName,
__in GET_FILEEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFileInformation
);
WINBASEAPI
BOOL
WINAPI
GetFileAttributesExW(
__in LPCWSTR lpFileName,
__in GET_FILEEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFileInformation
);
#ifdef UNICODE
#define GetFileAttributesEx GetFileAttributesExW
#else
#define GetFileAttributesEx GetFileAttributesExA
#endif // !UNICODE
WINBASEAPI
DWORD
WINAPI
GetCompressedFileSizeA(
__in LPCSTR lpFileName,
__out_opt LPDWORD lpFileSizeHigh
);
WINBASEAPI
DWORD
WINAPI
GetCompressedFileSizeW(
__in LPCWSTR lpFileName,
__out_opt LPDWORD lpFileSizeHigh
);
#ifdef UNICODE
#define GetCompressedFileSize GetCompressedFileSizeW
#else
#define GetCompressedFileSize GetCompressedFileSizeA
#endif // !UNICODE
#if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetCompressedFileSizeTransactedA( GetCompressedFileSizeTransactedA(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__out_opt LPDWORD lpFileSizeHigh, _Out_opt_ LPDWORD lpFileSizeHigh,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetCompressedFileSizeTransactedW( GetCompressedFileSizeTransactedW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__out_opt LPDWORD lpFileSizeHigh, _Out_opt_ LPDWORD lpFileSizeHigh,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define GetCompressedFileSizeTransacted GetCompressedFileSizeTransactedW #define GetCompressedFileSizeTransacted GetCompressedFileSizeTransactedW
#else #else
#define GetCompressedFileSizeTransacted GetCompressedFileSizeTransactedA #define GetCompressedFileSizeTransacted GetCompressedFileSizeTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600
WINBASEAPI
BOOL
WINAPI
DeleteFileA(
__in LPCSTR lpFileName
);
WINBASEAPI
BOOL
WINAPI
DeleteFileW(
__in LPCWSTR lpFileName
);
#ifdef UNICODE
#define DeleteFile DeleteFileW
#else
#define DeleteFile DeleteFileA
#endif // !UNICODE
#if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DeleteFileTransactedA( DeleteFileTransactedA(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DeleteFileTransactedW( DeleteFileTransactedW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define DeleteFileTransacted DeleteFileTransactedW #define DeleteFileTransacted DeleteFileTransactedW
#else #else
#define DeleteFileTransacted DeleteFileTransactedA #define DeleteFileTransacted DeleteFileTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600 #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) #if defined(_M_CEE)
#undef DeleteFile #undef DeleteFile
__inline __inline
BOOL BOOL
DeleteFile( DeleteFile(
LPCTSTR lpFileName LPCTSTR lpFileName
) )
{ {
#ifdef UNICODE #ifdef UNICODE
return DeleteFileW( return DeleteFileW(
#else #else
return DeleteFileA( return DeleteFileA(
#endif #endif
lpFileName lpFileName
); );
} }
#endif /* _M_CEE */ #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 #if _WIN32_WINNT >= 0x0501
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CheckNameLegalDOS8Dot3A( CheckNameLegalDOS8Dot3A(
__in LPCSTR lpName, _In_ LPCSTR lpName,
__out_ecount_opt(OemNameSize) LPSTR lpOemName, _Out_writes_opt_(OemNameSize) LPSTR lpOemName,
__in DWORD OemNameSize, _In_ DWORD OemNameSize,
__out_opt PBOOL pbNameContainsSpaces OPTIONAL, _Out_opt_ PBOOL pbNameContainsSpaces OPTIONAL,
__out PBOOL pbNameLegal _Out_ PBOOL pbNameLegal
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CheckNameLegalDOS8Dot3W( CheckNameLegalDOS8Dot3W(
__in LPCWSTR lpName, _In_ LPCWSTR lpName,
__out_ecount_opt(OemNameSize) LPSTR lpOemName, _Out_writes_opt_(OemNameSize) LPSTR lpOemName,
__in DWORD OemNameSize, _In_ DWORD OemNameSize,
__out_opt PBOOL pbNameContainsSpaces OPTIONAL, _Out_opt_ PBOOL pbNameContainsSpaces OPTIONAL,
__out PBOOL pbNameLegal _Out_ PBOOL pbNameLegal
); );
#ifdef UNICODE #ifdef UNICODE
#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W #define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W
#else #else
#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A #define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0501) #endif // (_WIN32_WINNT >= 0x0501)
#if(_WIN32_WINNT >= 0x0400) #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
typedef enum _FINDEX_INFO_LEVELS { #pragma endregion
FindExInfoStandard,
FindExInfoBasic,
FindExInfoMaxInfoLevel
} FINDEX_INFO_LEVELS;
typedef enum _FINDEX_SEARCH_OPS {
FindExSearchNameMatch,
FindExSearchLimitToDirectories,
FindExSearchLimitToDevices,
FindExSearchMaxSearchOp
} FINDEX_SEARCH_OPS;
#define FIND_FIRST_EX_CASE_SENSITIVE 0x00000001 #if(_WIN32_WINNT >= 0x0400)
#define FIND_FIRST_EX_LARGE_FETCH 0x00000002
WINBASEAPI #pragma region Desktop Family
__out #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
HANDLE
WINAPI
FindFirstFileExA(
__in LPCSTR lpFileName,
__in FINDEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFindFileData,
__in FINDEX_SEARCH_OPS fSearchOp,
__reserved LPVOID lpSearchFilter,
__in DWORD dwAdditionalFlags
);
WINBASEAPI
__out
HANDLE
WINAPI
FindFirstFileExW(
__in LPCWSTR lpFileName,
__in FINDEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFindFileData,
__in FINDEX_SEARCH_OPS fSearchOp,
__reserved LPVOID lpSearchFilter,
__in DWORD dwAdditionalFlags
);
#ifdef UNICODE
#define FindFirstFileEx FindFirstFileExW
#else
#define FindFirstFileEx FindFirstFileExA
#endif // !UNICODE
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
FindFirstFileTransactedA( FindFirstFileTransactedA(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__in FINDEX_INFO_LEVELS fInfoLevelId, _In_ FINDEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFindFileData, _Out_writes_bytes_(sizeof(WIN32_FIND_DATAA)) LPVOID lpFindFileData,
__in FINDEX_SEARCH_OPS fSearchOp, _In_ FINDEX_SEARCH_OPS fSearchOp,
__reserved LPVOID lpSearchFilter, _Reserved_ LPVOID lpSearchFilter,
__in DWORD dwAdditionalFlags, _In_ DWORD dwAdditionalFlags,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
FindFirstFileTransactedW( FindFirstFileTransactedW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in FINDEX_INFO_LEVELS fInfoLevelId, _In_ FINDEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFindFileData, _Out_writes_bytes_(sizeof(WIN32_FIND_DATAW)) LPVOID lpFindFileData,
__in FINDEX_SEARCH_OPS fSearchOp, _In_ FINDEX_SEARCH_OPS fSearchOp,
__reserved LPVOID lpSearchFilter, _Reserved_ LPVOID lpSearchFilter,
__in DWORD dwAdditionalFlags, _In_ DWORD dwAdditionalFlags,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define FindFirstFileTransacted FindFirstFileTransactedW #define FindFirstFileTransacted FindFirstFileTransactedW
#else #else
#define FindFirstFileTransacted FindFirstFileTransactedA #define FindFirstFileTransacted FindFirstFileTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif #endif
#endif /* _WIN32_WINNT >= 0x0400 */ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
WINBASEAPI
__out
HANDLE
WINAPI
FindFirstFileA(
__in LPCSTR lpFileName,
__out LPWIN32_FIND_DATAA lpFindFileData
);
WINBASEAPI
__out
HANDLE
WINAPI
FindFirstFileW(
__in LPCWSTR lpFileName,
__out LPWIN32_FIND_DATAW lpFindFileData
);
#ifdef UNICODE
#define FindFirstFile FindFirstFileW
#else
#define FindFirstFile FindFirstFileA
#endif // !UNICODE
WINBASEAPI #endif /* _WIN32_WINNT >= 0x0400 */
BOOL
WINAPI
FindNextFileA(
__in HANDLE hFindFile,
__out LPWIN32_FIND_DATAA lpFindFileData
);
WINBASEAPI
BOOL
WINAPI
FindNextFileW(
__in HANDLE hFindFile,
__out LPWIN32_FIND_DATAW lpFindFileData
);
#ifdef UNICODE
#define FindNextFile FindNextFileW
#else
#define FindNextFile FindNextFileA
#endif // !UNICODE
WINBASEAPI #pragma region Desktop Family
DWORD #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINAPI
SearchPathA(
__in_opt LPCSTR lpPath,
__in LPCSTR lpFileName,
__in_opt LPCSTR lpExtension,
__in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer,
__out_opt LPSTR *lpFilePart
);
WINBASEAPI
DWORD
WINAPI
SearchPathW(
__in_opt LPCWSTR lpPath,
__in LPCWSTR lpFileName,
__in_opt LPCWSTR lpExtension,
__in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer,
__out_opt LPWSTR *lpFilePart
);
#ifdef UNICODE
#define SearchPath SearchPathW
#else
#define SearchPath SearchPathA
#endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CopyFileA( CopyFileA(
__in LPCSTR lpExistingFileName, _In_ LPCSTR lpExistingFileName,
__in LPCSTR lpNewFileName, _In_ LPCSTR lpNewFileName,
__in BOOL bFailIfExists _In_ BOOL bFailIfExists
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CopyFileW( CopyFileW(
__in LPCWSTR lpExistingFileName, _In_ LPCWSTR lpExistingFileName,
__in LPCWSTR lpNewFileName, _In_ LPCWSTR lpNewFileName,
__in BOOL bFailIfExists _In_ BOOL bFailIfExists
); );
#ifdef UNICODE #ifdef UNICODE
#define CopyFile CopyFileW #define CopyFile CopyFileW
#else #else
#define CopyFile CopyFileA #define CopyFile CopyFileA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef CopyFile #undef CopyFile
__inline __inline
skipping to change at line 9765 skipping to change at line 5051
#else #else
return CopyFileA( return CopyFileA(
#endif #endif
lpExistingFileName, lpExistingFileName,
lpNewFileName, lpNewFileName,
bFailIfExists bFailIfExists
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#if(_WIN32_WINNT >= 0x0400) #if(_WIN32_WINNT >= 0x0400)
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
typedef typedef
DWORD DWORD
(WINAPI *LPPROGRESS_ROUTINE)( (WINAPI *LPPROGRESS_ROUTINE)(
__in LARGE_INTEGER TotalFileSize, _In_ LARGE_INTEGER TotalFileSize,
__in LARGE_INTEGER TotalBytesTransferred, _In_ LARGE_INTEGER TotalBytesTransferred,
__in LARGE_INTEGER StreamSize, _In_ LARGE_INTEGER StreamSize,
__in LARGE_INTEGER StreamBytesTransferred, _In_ LARGE_INTEGER StreamBytesTransferred,
__in DWORD dwStreamNumber, _In_ DWORD dwStreamNumber,
__in DWORD dwCallbackReason, _In_ DWORD dwCallbackReason,
__in HANDLE hSourceFile, _In_ HANDLE hSourceFile,
__in HANDLE hDestinationFile, _In_ HANDLE hDestinationFile,
__in_opt LPVOID lpData _In_opt_ LPVOID lpData
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CopyFileExA( CopyFileExA(
__in LPCSTR lpExistingFileName, _In_ LPCSTR lpExistingFileName,
__in LPCSTR lpNewFileName, _In_ LPCSTR lpNewFileName,
__in_opt LPPROGRESS_ROUTINE lpProgressRoutine, _In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
__in_opt LPVOID lpData, _In_opt_ LPVOID lpData,
__in_opt LPBOOL pbCancel, _When_(pbCancel != NULL, _Pre_satisfies_(*pbCancel == FALSE))
__in DWORD dwCopyFlags _Inout_opt_ LPBOOL pbCancel,
_In_ DWORD dwCopyFlags
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CopyFileExW( CopyFileExW(
__in LPCWSTR lpExistingFileName, _In_ LPCWSTR lpExistingFileName,
__in LPCWSTR lpNewFileName, _In_ LPCWSTR lpNewFileName,
__in_opt LPPROGRESS_ROUTINE lpProgressRoutine, _In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
__in_opt LPVOID lpData, _In_opt_ LPVOID lpData,
__in_opt LPBOOL pbCancel, _When_(pbCancel != NULL, _Pre_satisfies_(*pbCancel == FALSE))
__in DWORD dwCopyFlags _Inout_opt_ LPBOOL pbCancel,
_In_ DWORD dwCopyFlags
); );
#ifdef UNICODE #ifdef UNICODE
#define CopyFileEx CopyFileExW #define CopyFileEx CopyFileExW
#else #else
#define CopyFileEx CopyFileExA #define CopyFileEx CopyFileExA
#endif // !UNICODE #endif // !UNICODE
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CopyFileTransactedA( CopyFileTransactedA(
__in LPCSTR lpExistingFileName, _In_ LPCSTR lpExistingFileName,
__in LPCSTR lpNewFileName, _In_ LPCSTR lpNewFileName,
__in_opt LPPROGRESS_ROUTINE lpProgressRoutine, _In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
__in_opt LPVOID lpData, _In_opt_ LPVOID lpData,
__in_opt LPBOOL pbCancel, _In_opt_ LPBOOL pbCancel,
__in DWORD dwCopyFlags, _In_ DWORD dwCopyFlags,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CopyFileTransactedW( CopyFileTransactedW(
__in LPCWSTR lpExistingFileName, _In_ LPCWSTR lpExistingFileName,
__in LPCWSTR lpNewFileName, _In_ LPCWSTR lpNewFileName,
__in_opt LPPROGRESS_ROUTINE lpProgressRoutine, _In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
__in_opt LPVOID lpData, _In_opt_ LPVOID lpData,
__in_opt LPBOOL pbCancel, _In_opt_ LPBOOL pbCancel,
__in DWORD dwCopyFlags, _In_ DWORD dwCopyFlags,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define CopyFileTransacted CopyFileTransactedW #define CopyFileTransacted CopyFileTransactedW
#else #else
#define CopyFileTransacted CopyFileTransactedA #define CopyFileTransacted CopyFileTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600 #endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
//
// TODO: Win7 for now, when we roll over the version number this needs to be upd
ated.
//
#if _WIN32_WINNT >= 0x0601
typedef enum _COPYFILE2_MESSAGE_TYPE {
COPYFILE2_CALLBACK_NONE = 0,
COPYFILE2_CALLBACK_CHUNK_STARTED,
COPYFILE2_CALLBACK_CHUNK_FINISHED,
COPYFILE2_CALLBACK_STREAM_STARTED,
COPYFILE2_CALLBACK_STREAM_FINISHED,
COPYFILE2_CALLBACK_POLL_CONTINUE,
COPYFILE2_CALLBACK_ERROR,
COPYFILE2_CALLBACK_MAX,
} COPYFILE2_MESSAGE_TYPE;
typedef enum _COPYFILE2_MESSAGE_ACTION {
COPYFILE2_PROGRESS_CONTINUE = 0,
COPYFILE2_PROGRESS_CANCEL,
COPYFILE2_PROGRESS_STOP,
COPYFILE2_PROGRESS_QUIET,
COPYFILE2_PROGRESS_PAUSE,
} COPYFILE2_MESSAGE_ACTION;
typedef enum _COPYFILE2_COPY_PHASE {
COPYFILE2_PHASE_NONE = 0,
COPYFILE2_PHASE_PREPARE_SOURCE,
COPYFILE2_PHASE_PREPARE_DEST,
COPYFILE2_PHASE_READ_SOURCE,
COPYFILE2_PHASE_WRITE_DESTINATION,
COPYFILE2_PHASE_SERVER_COPY,
COPYFILE2_PHASE_NAMEGRAFT_COPY,
// ... etc phases.
COPYFILE2_PHASE_MAX,
} COPYFILE2_COPY_PHASE;
#define COPYFILE2_MESSAGE_COPY_OFFLOAD (0x00000001L)
typedef struct COPYFILE2_MESSAGE {
COPYFILE2_MESSAGE_TYPE Type;
DWORD dwPadding;
union {
struct {
DWORD dwStreamNumber; // monotonically increasing stream n
umber
DWORD dwReserved;
HANDLE hSourceFile; // handle to the source stream
HANDLE hDestinationFile; // handle to the destination stre
am
ULARGE_INTEGER uliChunkNumber; // monotonically increasing chunk nu
mber
ULARGE_INTEGER uliChunkSize; // size of the copied chunk
ULARGE_INTEGER uliStreamSize; // size of the current stream
ULARGE_INTEGER uliTotalFileSize; // size of all streams for this fi
le
} ChunkStarted;
struct {
DWORD dwStreamNumber; // monotonically increasing stream n
umber
DWORD dwFlags;
HANDLE hSourceFile; // handle to the source stream
HANDLE hDestinationFile; // handle to the destination stre
am
ULARGE_INTEGER uliChunkNumber; // monotonically increasing chunk nu
mber
ULARGE_INTEGER uliChunkSize; // size of the copied chunk
ULARGE_INTEGER uliStreamSize; // size of the current stream
ULARGE_INTEGER uliStreamBytesTransferred; // bytes copied for this
stream so far
ULARGE_INTEGER uliTotalFileSize; // size of all streams for this fi
le
ULARGE_INTEGER uliTotalBytesTransferred; // total bytes copied so f
ar
} ChunkFinished;
struct {
DWORD dwStreamNumber;
DWORD dwReserved;
HANDLE hSourceFile; // handle to the source stream
HANDLE hDestinationFile; // handle to the destination stre
am
ULARGE_INTEGER uliStreamSize; // size of this stream
ULARGE_INTEGER uliTotalFileSize; // total size of all streams for t
his file
} StreamStarted;
struct {
DWORD dwStreamNumber;
DWORD dwReserved;
HANDLE hSourceFile; // handle to the source stream
HANDLE hDestinationFile; // handle to the destination stre
am
ULARGE_INTEGER uliStreamSize;
ULARGE_INTEGER uliStreamBytesTransferred;
ULARGE_INTEGER uliTotalFileSize;
ULARGE_INTEGER uliTotalBytesTransferred;
} StreamFinished;
struct {
DWORD dwReserved;
} PollContinue;
struct {
COPYFILE2_COPY_PHASE CopyPhase;
DWORD dwStreamNumber;
HRESULT hrFailure;
DWORD dwReserved;
ULARGE_INTEGER uliChunkNumber;
ULARGE_INTEGER uliStreamSize;
ULARGE_INTEGER uliStreamBytesTransferred;
ULARGE_INTEGER uliTotalFileSize;
ULARGE_INTEGER uliTotalBytesTransferred;
} Error;
} Info;
} COPYFILE2_MESSAGE;
typedef
COPYFILE2_MESSAGE_ACTION (CALLBACK *PCOPYFILE2_PROGRESS_ROUTINE)(
_In_ const COPYFILE2_MESSAGE *pMessage,
_In_opt_ PVOID pvCallbackContext
);
typedef struct COPYFILE2_EXTENDED_PARAMETERS {
DWORD dwSize;
DWORD dwCopyFlags;
BOOL *pfCancel;
PCOPYFILE2_PROGRESS_ROUTINE pProgressRoutine;
PVOID pvCallbackContext;
} COPYFILE2_EXTENDED_PARAMETERS;
WINBASEAPI
HRESULT
WINAPI
CopyFile2(
_In_ PCWSTR pwszExistingFileName,
_In_ PCWSTR pwszNewFileName,
_In_opt_ COPYFILE2_EXTENDED_PARAMETERS *pExtendedParameters
);
#endif // _WIN32_WINNT >= 0x0601
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#endif /* _WIN32_WINNT >= 0x0400 */ #endif /* _WIN32_WINNT >= 0x0400 */
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
MoveFileA( MoveFileA(
__in LPCSTR lpExistingFileName, _In_ LPCSTR lpExistingFileName,
__in LPCSTR lpNewFileName _In_ LPCSTR lpNewFileName
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
MoveFileW( MoveFileW(
__in LPCWSTR lpExistingFileName, _In_ LPCWSTR lpExistingFileName,
__in LPCWSTR lpNewFileName _In_ LPCWSTR lpNewFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define MoveFile MoveFileW #define MoveFile MoveFileW
#else #else
#define MoveFile MoveFileA #define MoveFile MoveFileA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef MoveFile #undef MoveFile
__inline __inline
skipping to change at line 9883 skipping to change at line 5326
return MoveFileW( return MoveFileW(
#else #else
return MoveFileA( return MoveFileA(
#endif #endif
lpExistingFileName, lpExistingFileName,
lpNewFileName lpNewFileName
); );
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
MoveFileExA( MoveFileExA(
__in LPCSTR lpExistingFileName, _In_ LPCSTR lpExistingFileName,
__in_opt LPCSTR lpNewFileName, _In_opt_ LPCSTR lpNewFileName,
__in DWORD dwFlags _In_ DWORD dwFlags
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
MoveFileExW( MoveFileExW(
__in LPCWSTR lpExistingFileName, _In_ LPCWSTR lpExistingFileName,
__in_opt LPCWSTR lpNewFileName, _In_opt_ LPCWSTR lpNewFileName,
__in DWORD dwFlags _In_ DWORD dwFlags
); );
#ifdef UNICODE #ifdef UNICODE
#define MoveFileEx MoveFileExW #define MoveFileEx MoveFileExW
#else #else
#define MoveFileEx MoveFileExA #define MoveFileEx MoveFileExA
#endif // !UNICODE #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 >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
MoveFileWithProgressA( MoveFileWithProgressA(
__in LPCSTR lpExistingFileName, _In_ LPCSTR lpExistingFileName,
__in_opt LPCSTR lpNewFileName, _In_opt_ LPCSTR lpNewFileName,
__in_opt LPPROGRESS_ROUTINE lpProgressRoutine, _In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
__in_opt LPVOID lpData, _In_opt_ LPVOID lpData,
__in DWORD dwFlags _In_ DWORD dwFlags
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
MoveFileWithProgressW( MoveFileWithProgressW(
__in LPCWSTR lpExistingFileName, _In_ LPCWSTR lpExistingFileName,
__in_opt LPCWSTR lpNewFileName, _In_opt_ LPCWSTR lpNewFileName,
__in_opt LPPROGRESS_ROUTINE lpProgressRoutine, _In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
__in_opt LPVOID lpData, _In_opt_ LPVOID lpData,
__in DWORD dwFlags _In_ DWORD dwFlags
); );
#ifdef UNICODE #ifdef UNICODE
#define MoveFileWithProgress MoveFileWithProgressW #define MoveFileWithProgress MoveFileWithProgressW
#else #else
#define MoveFileWithProgress MoveFileWithProgressA #define MoveFileWithProgress MoveFileWithProgressA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0500) #endif // (_WIN32_WINNT >= 0x0500)
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
MoveFileTransactedA( MoveFileTransactedA(
__in LPCSTR lpExistingFileName, _In_ LPCSTR lpExistingFileName,
__in_opt LPCSTR lpNewFileName, _In_opt_ LPCSTR lpNewFileName,
__in_opt LPPROGRESS_ROUTINE lpProgressRoutine, _In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
__in_opt LPVOID lpData, _In_opt_ LPVOID lpData,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
MoveFileTransactedW( MoveFileTransactedW(
__in LPCWSTR lpExistingFileName, _In_ LPCWSTR lpExistingFileName,
__in_opt LPCWSTR lpNewFileName, _In_opt_ LPCWSTR lpNewFileName,
__in_opt LPPROGRESS_ROUTINE lpProgressRoutine, _In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
__in_opt LPVOID lpData, _In_opt_ LPVOID lpData,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define MoveFileTransacted MoveFileTransactedW #define MoveFileTransacted MoveFileTransactedW
#else #else
#define MoveFileTransacted MoveFileTransactedA #define MoveFileTransacted MoveFileTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0600) #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_REPLACE_EXISTING 0x00000001
#define MOVEFILE_COPY_ALLOWED 0x00000002 #define MOVEFILE_COPY_ALLOWED 0x00000002
#define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004 #define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
#define MOVEFILE_WRITE_THROUGH 0x00000008 #define MOVEFILE_WRITE_THROUGH 0x00000008
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
#define MOVEFILE_CREATE_HARDLINK 0x00000010 #define MOVEFILE_CREATE_HARDLINK 0x00000010
#define MOVEFILE_FAIL_IF_NOT_TRACKABLE 0x00000020 #define MOVEFILE_FAIL_IF_NOT_TRACKABLE 0x00000020
#endif // (_WIN32_WINNT >= 0x0500) #endif // (_WIN32_WINNT >= 0x0500)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReplaceFileA( ReplaceFileA(
__in LPCSTR lpReplacedFileName, _In_ LPCSTR lpReplacedFileName,
__in LPCSTR lpReplacementFileName, _In_ LPCSTR lpReplacementFileName,
__in_opt LPCSTR lpBackupFileName, _In_opt_ LPCSTR lpBackupFileName,
__in DWORD dwReplaceFlags, _In_ DWORD dwReplaceFlags,
__reserved LPVOID lpExclude, _Reserved_ LPVOID lpExclude,
__reserved LPVOID lpReserved _Reserved_ LPVOID lpReserved
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReplaceFileW( ReplaceFileW(
__in LPCWSTR lpReplacedFileName, _In_ LPCWSTR lpReplacedFileName,
__in LPCWSTR lpReplacementFileName, _In_ LPCWSTR lpReplacementFileName,
__in_opt LPCWSTR lpBackupFileName, _In_opt_ LPCWSTR lpBackupFileName,
__in DWORD dwReplaceFlags, _In_ DWORD dwReplaceFlags,
__reserved LPVOID lpExclude, _Reserved_ LPVOID lpExclude,
__reserved LPVOID lpReserved _Reserved_ LPVOID lpReserved
); );
#ifdef UNICODE #ifdef UNICODE
#define ReplaceFile ReplaceFileW #define ReplaceFile ReplaceFileW
#else #else
#define ReplaceFile ReplaceFileA #define ReplaceFile ReplaceFileA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0500) #endif // (_WIN32_WINNT >= 0x0500)
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
// //
// API call to create hard links. // API call to create hard links.
// //
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateHardLinkA( CreateHardLinkA(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__in LPCSTR lpExistingFileName, _In_ LPCSTR lpExistingFileName,
__reserved LPSECURITY_ATTRIBUTES lpSecurityAttributes _Reserved_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateHardLinkW( CreateHardLinkW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in LPCWSTR lpExistingFileName, _In_ LPCWSTR lpExistingFileName,
__reserved LPSECURITY_ATTRIBUTES lpSecurityAttributes _Reserved_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateHardLink CreateHardLinkW #define CreateHardLink CreateHardLinkW
#else #else
#define CreateHardLink CreateHardLinkA #define CreateHardLink CreateHardLinkA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0500) #endif // (_WIN32_WINNT >= 0x0500)
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
// //
// API call to create hard links. // API call to create hard links.
// //
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateHardLinkTransactedA( CreateHardLinkTransactedA(
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__in LPCSTR lpExistingFileName, _In_ LPCSTR lpExistingFileName,
__reserved LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Reserved_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateHardLinkTransactedW( CreateHardLinkTransactedW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in LPCWSTR lpExistingFileName, _In_ LPCWSTR lpExistingFileName,
__reserved LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Reserved_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateHardLinkTransacted CreateHardLinkTransactedW #define CreateHardLinkTransacted CreateHardLinkTransactedW
#else #else
#define CreateHardLinkTransacted CreateHardLinkTransactedA #define CreateHardLinkTransacted CreateHardLinkTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0600) #endif // (_WIN32_WINNT >= 0x0600)
#if (_WIN32_WINNT >= 0x0501) #if (_WIN32_WINNT >= 0x0501)
skipping to change at line 10084 skipping to change at line 5551
} STREAM_INFO_LEVELS; } STREAM_INFO_LEVELS;
typedef struct _WIN32_FIND_STREAM_DATA { typedef struct _WIN32_FIND_STREAM_DATA {
LARGE_INTEGER StreamSize; LARGE_INTEGER StreamSize;
WCHAR cStreamName[ MAX_PATH + 36 ]; WCHAR cStreamName[ MAX_PATH + 36 ];
} WIN32_FIND_STREAM_DATA, *PWIN32_FIND_STREAM_DATA; } WIN32_FIND_STREAM_DATA, *PWIN32_FIND_STREAM_DATA;
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
FindFirstStreamW( FindFirstStreamW(
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in STREAM_INFO_LEVELS InfoLevel, _In_ STREAM_INFO_LEVELS InfoLevel,
__out LPVOID lpFindStreamData, _Out_writes_bytes_(sizeof(WIN32_FIND_STREAM_DATA)) LPVOID lpFindStreamData,
__reserved DWORD dwFlags _Reserved_ DWORD dwFlags
); );
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
HANDLE HANDLE
WINAPI WINAPI
FindFirstStreamTransactedW ( FindFirstStreamTransactedW (
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in STREAM_INFO_LEVELS InfoLevel, _In_ STREAM_INFO_LEVELS InfoLevel,
__out LPVOID lpFindStreamData, _Out_writes_bytes_(sizeof(WIN32_FIND_STREAM_DATA)) LPVOID lpFindStreamData,
__reserved DWORD dwFlags, _Reserved_ DWORD dwFlags,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#endif // _WIN32_WINNT >= 0x600 #endif // _WIN32_WINNT >= 0x600
WINBASEAPI WINBASEAPI
BOOL BOOL
APIENTRY APIENTRY
FindNextStreamW( FindNextStreamW(
__in HANDLE hFindStream, _In_ HANDLE hFindStream,
__out LPVOID lpFindStreamData _Out_writes_bytes_(sizeof(WIN32_FIND_STREAM_DATA)) LPVOID lpFindStreamData
); );
#endif // (_WIN32_WINNT >= 0x0501) #endif // (_WIN32_WINNT >= 0x0501)
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
HANDLE HANDLE
WINAPI WINAPI
FindFirstFileNameW ( FindFirstFileNameW (
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__inout LPDWORD StringLength, _Inout_ LPDWORD StringLength,
__inout_ecount(*StringLength) PWCHAR LinkName _Out_writes_(*StringLength) PWSTR LinkName
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
APIENTRY APIENTRY
FindNextFileNameW ( FindNextFileNameW (
__in HANDLE hFindStream, _In_ HANDLE hFindStream,
__inout LPDWORD StringLength, _Inout_ LPDWORD StringLength,
__inout_ecount(*StringLength) PWCHAR LinkName _Out_writes_(*StringLength) PWSTR LinkName
); );
WINBASEAPI WINBASEAPI
HANDLE HANDLE
WINAPI WINAPI
FindFirstFileNameTransactedW ( FindFirstFileNameTransactedW (
__in LPCWSTR lpFileName, _In_ LPCWSTR lpFileName,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__inout LPDWORD StringLength, _Inout_ LPDWORD StringLength,
__inout_ecount(*StringLength) PWCHAR LinkName, _Out_writes_(*StringLength) PWSTR LinkName,
__in_opt HANDLE hTransaction _In_opt_ HANDLE hTransaction
); );
#endif #endif
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
CreateNamedPipeA( CreateNamedPipeA(
__in LPCSTR lpName, _In_ LPCSTR lpName,
__in DWORD dwOpenMode, _In_ DWORD dwOpenMode,
__in DWORD dwPipeMode, _In_ DWORD dwPipeMode,
__in DWORD nMaxInstances, _In_ DWORD nMaxInstances,
__in DWORD nOutBufferSize, _In_ DWORD nOutBufferSize,
__in DWORD nInBufferSize, _In_ DWORD nInBufferSize,
__in DWORD nDefaultTimeOut, _In_ DWORD nDefaultTimeOut,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
WINBASEAPI
__out
HANDLE
WINAPI
CreateNamedPipeW(
__in LPCWSTR lpName,
__in DWORD dwOpenMode,
__in DWORD dwPipeMode,
__in DWORD nMaxInstances,
__in DWORD nOutBufferSize,
__in DWORD nInBufferSize,
__in DWORD nDefaultTimeOut,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
); );
#ifdef UNICODE #ifndef UNICODE
#define CreateNamedPipe CreateNamedPipeW
#else
#define CreateNamedPipe CreateNamedPipeA #define CreateNamedPipe CreateNamedPipeA
#endif // !UNICODE #endif
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNamedPipeHandleStateA( GetNamedPipeHandleStateA(
__in HANDLE hNamedPipe, _In_ HANDLE hNamedPipe,
__out_opt LPDWORD lpState, _Out_opt_ LPDWORD lpState,
__out_opt LPDWORD lpCurInstances, _Out_opt_ LPDWORD lpCurInstances,
__out_opt LPDWORD lpMaxCollectionCount, _Out_opt_ LPDWORD lpMaxCollectionCount,
__out_opt LPDWORD lpCollectDataTimeout, _Out_opt_ LPDWORD lpCollectDataTimeout,
__out_ecount_opt(nMaxUserNameSize) LPSTR lpUserName, _Out_writes_opt_(nMaxUserNameSize) LPSTR lpUserName,
__in DWORD nMaxUserNameSize _In_ DWORD nMaxUserNameSize
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNamedPipeHandleStateW( GetNamedPipeHandleStateW(
__in HANDLE hNamedPipe, _In_ HANDLE hNamedPipe,
__out_opt LPDWORD lpState, _Out_opt_ LPDWORD lpState,
__out_opt LPDWORD lpCurInstances, _Out_opt_ LPDWORD lpCurInstances,
__out_opt LPDWORD lpMaxCollectionCount, _Out_opt_ LPDWORD lpMaxCollectionCount,
__out_opt LPDWORD lpCollectDataTimeout, _Out_opt_ LPDWORD lpCollectDataTimeout,
__out_ecount_opt(nMaxUserNameSize) LPWSTR lpUserName, _Out_writes_opt_(nMaxUserNameSize) LPWSTR lpUserName,
__in DWORD nMaxUserNameSize _In_ DWORD nMaxUserNameSize
); );
#ifdef UNICODE #ifdef UNICODE
#define GetNamedPipeHandleState GetNamedPipeHandleStateW #define GetNamedPipeHandleState GetNamedPipeHandleStateW
#else #else
#define GetNamedPipeHandleState GetNamedPipeHandleStateA #define GetNamedPipeHandleState GetNamedPipeHandleStateA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CallNamedPipeA( CallNamedPipeA(
__in LPCSTR lpNamedPipeName, _In_ LPCSTR lpNamedPipeName,
__in_bcount_opt(nInBufferSize) LPVOID lpInBuffer, _In_reads_bytes_opt_(nInBufferSize) LPVOID lpInBuffer,
__in DWORD nInBufferSize, _In_ DWORD nInBufferSize,
__out_bcount_part_opt(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer, _Out_writes_bytes_to_opt_(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
__in DWORD nOutBufferSize, _In_ DWORD nOutBufferSize,
__out LPDWORD lpBytesRead, _Out_ LPDWORD lpBytesRead,
__in DWORD nTimeOut _In_ DWORD nTimeOut
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CallNamedPipeW( CallNamedPipeW(
__in LPCWSTR lpNamedPipeName, _In_ LPCWSTR lpNamedPipeName,
__in_bcount_opt(nInBufferSize) LPVOID lpInBuffer, _In_reads_bytes_opt_(nInBufferSize) LPVOID lpInBuffer,
__in DWORD nInBufferSize, _In_ DWORD nInBufferSize,
__out_bcount_part_opt(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer, _Out_writes_bytes_to_opt_(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
__in DWORD nOutBufferSize, _In_ DWORD nOutBufferSize,
__out LPDWORD lpBytesRead, _Out_ LPDWORD lpBytesRead,
__in DWORD nTimeOut _In_ DWORD nTimeOut
); );
#ifdef UNICODE #ifdef UNICODE
#define CallNamedPipe CallNamedPipeW #define CallNamedPipe CallNamedPipeW
#else #else
#define CallNamedPipe CallNamedPipeA #define CallNamedPipe CallNamedPipeA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WaitNamedPipeA( WaitNamedPipeA(
__in LPCSTR lpNamedPipeName, _In_ LPCSTR lpNamedPipeName,
__in DWORD nTimeOut _In_ DWORD nTimeOut
);
WINBASEAPI
BOOL
WINAPI
WaitNamedPipeW(
__in LPCWSTR lpNamedPipeName,
__in DWORD nTimeOut
); );
#ifdef UNICODE #ifndef UNICODE
#define WaitNamedPipe WaitNamedPipeW
#else
#define WaitNamedPipe WaitNamedPipeA #define WaitNamedPipe WaitNamedPipeA
#endif // !UNICODE #endif
typedef enum {
PipeAttribute,
PipeConnectionAttribute,
PipeHandleAttribute
} PIPE_ATTRIBUTE_TYPE;
WINBASEAPI
BOOL
WINAPI
GetNamedPipeAttribute(
__in HANDLE Pipe,
__in PIPE_ATTRIBUTE_TYPE AttributeType,
__in PSTR AttributeName,
__out_bcount(*AttributeValueLength) PVOID AttributeValue,
__inout PSIZE_T AttributeValueLength
);
WINBASEAPI #if (_WIN32_WINNT >= 0x0600)
BOOL
WINAPI
SetNamedPipeAttribute(
__in HANDLE Pipe,
__in PIPE_ATTRIBUTE_TYPE AttributeType,
__in PSTR AttributeName,
__in PVOID AttributeValue,
__in SIZE_T AttributeValueLength
);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNamedPipeClientComputerNameA( GetNamedPipeClientComputerNameA(
__in HANDLE Pipe, _In_ HANDLE Pipe,
__out_bcount(ClientComputerNameLength) LPSTR ClientComputerName, _Out_writes_bytes_(ClientComputerNameLength) LPSTR ClientComputerName,
__in ULONG ClientComputerNameLength _In_ ULONG ClientComputerNameLength
);
WINBASEAPI
BOOL
WINAPI
GetNamedPipeClientComputerNameW(
__in HANDLE Pipe,
__out_bcount(ClientComputerNameLength) LPWSTR ClientComputerName,
__in ULONG ClientComputerNameLength
); );
#ifdef UNICODE
#define GetNamedPipeClientComputerName GetNamedPipeClientComputerNameW #ifndef UNICODE
#else
#define GetNamedPipeClientComputerName GetNamedPipeClientComputerNameA #define GetNamedPipeClientComputerName GetNamedPipeClientComputerNameA
#endif // !UNICODE #endif
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNamedPipeClientProcessId( GetNamedPipeClientProcessId(
__in HANDLE Pipe, _In_ HANDLE Pipe,
__out PULONG ClientProcessId _Out_ PULONG ClientProcessId
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNamedPipeClientSessionId( GetNamedPipeClientSessionId(
__in HANDLE Pipe, _In_ HANDLE Pipe,
__out PULONG ClientSessionId _Out_ PULONG ClientSessionId
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNamedPipeServerProcessId( GetNamedPipeServerProcessId(
__in HANDLE Pipe, _In_ HANDLE Pipe,
__out PULONG ServerProcessId _Out_ PULONG ServerProcessId
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNamedPipeServerSessionId( GetNamedPipeServerSessionId(
__in HANDLE Pipe, _In_ HANDLE Pipe,
__out PULONG ServerSessionId _Out_ PULONG ServerSessionId
); );
#endif // (_WIN32_WINNT >= 0x0600)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetVolumeLabelA( SetVolumeLabelA(
__in_opt LPCSTR lpRootPathName, _In_opt_ LPCSTR lpRootPathName,
__in_opt LPCSTR lpVolumeName _In_opt_ LPCSTR lpVolumeName
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetVolumeLabelW( SetVolumeLabelW(
__in_opt LPCWSTR lpRootPathName, _In_opt_ LPCWSTR lpRootPathName,
__in_opt LPCWSTR lpVolumeName _In_opt_ LPCWSTR lpVolumeName
); );
#ifdef UNICODE #ifdef UNICODE
#define SetVolumeLabel SetVolumeLabelW #define SetVolumeLabel SetVolumeLabelW
#else #else
#define SetVolumeLabel SetVolumeLabelA #define SetVolumeLabel SetVolumeLabelA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
skipping to change at line 10385 skipping to change at line 5792
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
AreFileApisANSI( VOID ); AreFileApisANSI( VOID );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetVolumeInformationA( GetVolumeInformationA(
__in_opt LPCSTR lpRootPathName, _In_opt_ LPCSTR lpRootPathName,
__out_ecount_opt(nVolumeNameSize) LPSTR lpVolumeNameBuffer, _Out_writes_opt_(nVolumeNameSize) LPSTR lpVolumeNameBuffer,
__in DWORD nVolumeNameSize, _In_ DWORD nVolumeNameSize,
__out_opt LPDWORD lpVolumeSerialNumber, _Out_opt_ LPDWORD lpVolumeSerialNumber,
__out_opt LPDWORD lpMaximumComponentLength, _Out_opt_ LPDWORD lpMaximumComponentLength,
__out_opt LPDWORD lpFileSystemFlags, _Out_opt_ LPDWORD lpFileSystemFlags,
__out_ecount_opt(nFileSystemNameSize) LPSTR lpFileSystemNameBuffer, _Out_writes_opt_(nFileSystemNameSize) LPSTR lpFileSystemNameBuffer,
__in DWORD nFileSystemNameSize _In_ DWORD nFileSystemNameSize
);
WINBASEAPI
BOOL
WINAPI
GetVolumeInformationW(
__in_opt LPCWSTR lpRootPathName,
__out_ecount_opt(nVolumeNameSize) LPWSTR lpVolumeNameBuffer,
__in DWORD nVolumeNameSize,
__out_opt LPDWORD lpVolumeSerialNumber,
__out_opt LPDWORD lpMaximumComponentLength,
__out_opt LPDWORD lpFileSystemFlags,
__out_ecount_opt(nFileSystemNameSize) LPWSTR lpFileSystemNameBuffer,
__in DWORD nFileSystemNameSize
);
#ifdef UNICODE
#define GetVolumeInformation GetVolumeInformationW
#else
#define GetVolumeInformation GetVolumeInformationA
#endif // !UNICODE
#if(_WIN32_WINNT >= 0x0600)
WINBASEAPI
BOOL
WINAPI
GetVolumeInformationByHandleW(
__in HANDLE hFile,
__out_ecount_opt(nVolumeNameSize) LPWSTR lpVolumeNameBuffer,
__in DWORD nVolumeNameSize,
__out_opt LPDWORD lpVolumeSerialNumber,
__out_opt LPDWORD lpMaximumComponentLength,
__out_opt LPDWORD lpFileSystemFlags,
__out_ecount_opt(nFileSystemNameSize) LPWSTR lpFileSystemNameBuffer,
__in DWORD nFileSystemNameSize
);
#endif /* _WIN32_WINNT >= 0x0600 */
WINBASEAPI
BOOL
WINAPI
CancelSynchronousIo(
__in HANDLE hThread
); );
WINBASEAPI #ifndef UNICODE
BOOL #define GetVolumeInformation GetVolumeInformationA
WINAPI #endif
CancelIoEx(
__in HANDLE hFile,
__in_opt LPOVERLAPPED lpOverlapped
);
WINBASEAPI #if (_WIN32_WINNT >= 0x0600)
BOOL
WINAPI
CancelIo(
__in HANDLE hFile
);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetFileBandwidthReservation( SetFileBandwidthReservation(
__in HANDLE hFile, _In_ HANDLE hFile,
__in DWORD nPeriodMilliseconds, _In_ DWORD nPeriodMilliseconds,
__in DWORD nBytesPerPeriod, _In_ DWORD nBytesPerPeriod,
__in BOOL bDiscardable, _In_ BOOL bDiscardable,
__out LPDWORD lpTransferSize, _Out_ LPDWORD lpTransferSize,
__out LPDWORD lpNumOutstandingRequests _Out_ LPDWORD lpNumOutstandingRequests
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetFileBandwidthReservation( GetFileBandwidthReservation(
__in HANDLE hFile, _In_ HANDLE hFile,
__out LPDWORD lpPeriodMilliseconds, _Out_ LPDWORD lpPeriodMilliseconds,
__out LPDWORD lpBytesPerPeriod, _Out_ LPDWORD lpBytesPerPeriod,
__out LPBOOL pDiscardable, _Out_ LPBOOL pDiscardable,
__out LPDWORD lpTransferSize, _Out_ LPDWORD lpTransferSize,
__out LPDWORD lpNumOutstandingRequests _Out_ LPDWORD lpNumOutstandingRequests
); );
#endif // (_WIN32_WINNT >= 0x0600)
// //
// Event logging APIs // Event logging APIs
// //
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
ClearEventLogA ( ClearEventLogA (
__in HANDLE hEventLog, _In_ HANDLE hEventLog,
__in_opt LPCSTR lpBackupFileName _In_opt_ LPCSTR lpBackupFileName
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
ClearEventLogW ( ClearEventLogW (
__in HANDLE hEventLog, _In_ HANDLE hEventLog,
__in_opt LPCWSTR lpBackupFileName _In_opt_ LPCWSTR lpBackupFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define ClearEventLog ClearEventLogW #define ClearEventLog ClearEventLogW
#else #else
#define ClearEventLog ClearEventLogA #define ClearEventLog ClearEventLogA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
BackupEventLogA ( BackupEventLogA (
__in HANDLE hEventLog, _In_ HANDLE hEventLog,
__in LPCSTR lpBackupFileName _In_ LPCSTR lpBackupFileName
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
BackupEventLogW ( BackupEventLogW (
__in HANDLE hEventLog, _In_ HANDLE hEventLog,
__in LPCWSTR lpBackupFileName _In_ LPCWSTR lpBackupFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define BackupEventLog BackupEventLogW #define BackupEventLog BackupEventLogW
#else #else
#define BackupEventLog BackupEventLogA #define BackupEventLog BackupEventLogA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
CloseEventLog ( CloseEventLog (
__in HANDLE hEventLog _In_ HANDLE hEventLog
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
DeregisterEventSource ( DeregisterEventSource (
__in HANDLE hEventLog _In_ HANDLE hEventLog
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
NotifyChangeEventLog( NotifyChangeEventLog(
__in HANDLE hEventLog, _In_ HANDLE hEventLog,
__in HANDLE hEvent _In_ HANDLE hEvent
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
GetNumberOfEventLogRecords ( GetNumberOfEventLogRecords (
__in HANDLE hEventLog, _In_ HANDLE hEventLog,
__out PDWORD NumberOfRecords _Out_ PDWORD NumberOfRecords
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
GetOldestEventLogRecord ( GetOldestEventLogRecord (
__in HANDLE hEventLog, _In_ HANDLE hEventLog,
__out PDWORD OldestRecord _Out_ PDWORD OldestRecord
); );
WINADVAPI WINADVAPI
__out
HANDLE HANDLE
WINAPI WINAPI
OpenEventLogA ( OpenEventLogA (
__in_opt LPCSTR lpUNCServerName, _In_opt_ LPCSTR lpUNCServerName,
__in LPCSTR lpSourceName _In_ LPCSTR lpSourceName
); );
WINADVAPI WINADVAPI
__out
HANDLE HANDLE
WINAPI WINAPI
OpenEventLogW ( OpenEventLogW (
__in_opt LPCWSTR lpUNCServerName, _In_opt_ LPCWSTR lpUNCServerName,
__in LPCWSTR lpSourceName _In_ LPCWSTR lpSourceName
); );
#ifdef UNICODE #ifdef UNICODE
#define OpenEventLog OpenEventLogW #define OpenEventLog OpenEventLogW
#else #else
#define OpenEventLog OpenEventLogA #define OpenEventLog OpenEventLogA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
__out
HANDLE HANDLE
WINAPI WINAPI
RegisterEventSourceA ( RegisterEventSourceA (
__in_opt LPCSTR lpUNCServerName, _In_opt_ LPCSTR lpUNCServerName,
__in LPCSTR lpSourceName _In_ LPCSTR lpSourceName
); );
WINADVAPI WINADVAPI
__out
HANDLE HANDLE
WINAPI WINAPI
RegisterEventSourceW ( RegisterEventSourceW (
__in_opt LPCWSTR lpUNCServerName, _In_opt_ LPCWSTR lpUNCServerName,
__in LPCWSTR lpSourceName _In_ LPCWSTR lpSourceName
); );
#ifdef UNICODE #ifdef UNICODE
#define RegisterEventSource RegisterEventSourceW #define RegisterEventSource RegisterEventSourceW
#else #else
#define RegisterEventSource RegisterEventSourceA #define RegisterEventSource RegisterEventSourceA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
__out
HANDLE HANDLE
WINAPI WINAPI
OpenBackupEventLogA ( OpenBackupEventLogA (
__in_opt LPCSTR lpUNCServerName, _In_opt_ LPCSTR lpUNCServerName,
__in LPCSTR lpFileName _In_ LPCSTR lpFileName
); );
WINADVAPI WINADVAPI
__out
HANDLE HANDLE
WINAPI WINAPI
OpenBackupEventLogW ( OpenBackupEventLogW (
__in_opt LPCWSTR lpUNCServerName, _In_opt_ LPCWSTR lpUNCServerName,
__in LPCWSTR lpFileName _In_ LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define OpenBackupEventLog OpenBackupEventLogW #define OpenBackupEventLog OpenBackupEventLogW
#else #else
#define OpenBackupEventLog OpenBackupEventLogA #define OpenBackupEventLog OpenBackupEventLogA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
ReadEventLogA ( ReadEventLogA (
__in HANDLE hEventLog, _In_ HANDLE hEventLog,
__in DWORD dwReadFlags, _In_ DWORD dwReadFlags,
__in DWORD dwRecordOffset, _In_ DWORD dwRecordOffset,
__out_bcount_part(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer, _Out_writes_bytes_to_(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffe
__in DWORD nNumberOfBytesToRead, r,
__out DWORD *pnBytesRead, _In_ DWORD nNumberOfBytesToRead,
__out DWORD *pnMinNumberOfBytesNeeded _Out_ DWORD *pnBytesRead,
_Out_ DWORD *pnMinNumberOfBytesNeeded
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
ReadEventLogW ( ReadEventLogW (
__in HANDLE hEventLog, _In_ HANDLE hEventLog,
__in DWORD dwReadFlags, _In_ DWORD dwReadFlags,
__in DWORD dwRecordOffset, _In_ DWORD dwRecordOffset,
__out_bcount_part(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer, _Out_writes_bytes_to_(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffe
__in DWORD nNumberOfBytesToRead, r,
__out DWORD *pnBytesRead, _In_ DWORD nNumberOfBytesToRead,
__out DWORD *pnMinNumberOfBytesNeeded _Out_ DWORD *pnBytesRead,
_Out_ DWORD *pnMinNumberOfBytesNeeded
); );
#ifdef UNICODE #ifdef UNICODE
#define ReadEventLog ReadEventLogW #define ReadEventLog ReadEventLogW
#else #else
#define ReadEventLog ReadEventLogA #define ReadEventLog ReadEventLogA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
ReportEventA ( ReportEventA (
__in HANDLE hEventLog, _In_ HANDLE hEventLog,
__in WORD wType, _In_ WORD wType,
__in WORD wCategory, _In_ WORD wCategory,
__in DWORD dwEventID, _In_ DWORD dwEventID,
__in_opt PSID lpUserSid, _In_opt_ PSID lpUserSid,
__in WORD wNumStrings, _In_ WORD wNumStrings,
__in DWORD dwDataSize, _In_ DWORD dwDataSize,
__in_ecount_opt(wNumStrings) LPCSTR *lpStrings, _In_reads_opt_(wNumStrings) LPCSTR *lpStrings,
__in_bcount_opt(dwDataSize) LPVOID lpRawData _In_reads_bytes_opt_(dwDataSize) LPVOID lpRawData
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
ReportEventW ( ReportEventW (
__in HANDLE hEventLog, _In_ HANDLE hEventLog,
__in WORD wType, _In_ WORD wType,
__in WORD wCategory, _In_ WORD wCategory,
__in DWORD dwEventID, _In_ DWORD dwEventID,
__in_opt PSID lpUserSid, _In_opt_ PSID lpUserSid,
__in WORD wNumStrings, _In_ WORD wNumStrings,
__in DWORD dwDataSize, _In_ DWORD dwDataSize,
__in_ecount_opt(wNumStrings) LPCWSTR *lpStrings, _In_reads_opt_(wNumStrings) LPCWSTR *lpStrings,
__in_bcount_opt(dwDataSize) LPVOID lpRawData _In_reads_bytes_opt_(dwDataSize) LPVOID lpRawData
); );
#ifdef UNICODE #ifdef UNICODE
#define ReportEvent ReportEventW #define ReportEvent ReportEventW
#else #else
#define ReportEvent ReportEventA #define ReportEvent ReportEventA
#endif // !UNICODE #endif // !UNICODE
#define EVENTLOG_FULL_INFO 0 #define EVENTLOG_FULL_INFO 0
typedef struct _EVENTLOG_FULL_INFORMATION typedef struct _EVENTLOG_FULL_INFORMATION
{ {
DWORD dwFull; DWORD dwFull;
} }
EVENTLOG_FULL_INFORMATION, *LPEVENTLOG_FULL_INFORMATION; EVENTLOG_FULL_INFORMATION, *LPEVENTLOG_FULL_INFORMATION;
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
GetEventLogInformation ( GetEventLogInformation (
__in HANDLE hEventLog, _In_ HANDLE hEventLog,
__in DWORD dwInfoLevel, _In_ DWORD dwInfoLevel,
__out_bcount_part(cbBufSize, *pcbBytesNeeded) LPVOID lpBuffer, _Out_writes_bytes_to_(cbBufSize, *pcbBytesNeeded) LPVOID lpBuffer,
__in DWORD cbBufSize, _In_ DWORD cbBufSize,
__out LPDWORD pcbBytesNeeded _Out_ LPDWORD pcbBytesNeeded
); );
#if (_WIN32_WINNT >= 0x0602)
// //
// Operation prefetch API.
// //
// Security APIs
//
WINADVAPI
BOOL
WINAPI
DuplicateToken(
__in HANDLE ExistingTokenHandle,
__in SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
__deref_out PHANDLE DuplicateTokenHandle
);
WINADVAPI
BOOL
WINAPI
GetKernelObjectSecurity (
__in HANDLE Handle,
__in SECURITY_INFORMATION RequestedInformation,
__out_bcount_opt(nLength) PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in DWORD nLength,
__out LPDWORD lpnLengthNeeded
);
WINADVAPI
BOOL
WINAPI
ImpersonateNamedPipeClient(
__in HANDLE hNamedPipe
);
WINADVAPI
BOOL
WINAPI
ImpersonateSelf(
__in SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
);
WINADVAPI
BOOL
WINAPI
RevertToSelf (
VOID
);
WINADVAPI #define OPERATION_API_VERSION 1
BOOL typedef ULONG OPERATION_ID;
APIENTRY
SetThreadToken (
__in_opt PHANDLE Thread,
__in_opt HANDLE Token
);
WINADVAPI //
BOOL // OperationStart() parameters.
WINAPI //
AccessCheck (
__in PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in HANDLE ClientToken,
__in DWORD DesiredAccess,
__in PGENERIC_MAPPING GenericMapping,
__out_bcount_part_opt(*PrivilegeSetLength, *PrivilegeSetLength) PPRIVILEGE_S
ET PrivilegeSet,
__inout LPDWORD PrivilegeSetLength,
__out LPDWORD GrantedAccess,
__out LPBOOL AccessStatus
);
#if(_WIN32_WINNT >= 0x0500) typedef struct _OPERATION_START_PARAMETERS {
WINADVAPI ULONG Version;
BOOL OPERATION_ID OperationId;
WINAPI ULONG Flags;
AccessCheckByType ( } OPERATION_START_PARAMETERS, *POPERATION_START_PARAMETERS;
__in PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in_opt PSID PrincipalSelfSid,
__in HANDLE ClientToken,
__in DWORD DesiredAccess,
__inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
__in DWORD ObjectTypeListLength,
__in PGENERIC_MAPPING GenericMapping,
__out_bcount_part_opt(*PrivilegeSetLength, *PrivilegeSetLength) PPRIVILEGE_S
ET PrivilegeSet,
__inout LPDWORD PrivilegeSetLength,
__out LPDWORD GrantedAccess,
__out LPBOOL AccessStatus
);
WINADVAPI #define OPERATION_START_TRACE_CURRENT_THREAD 0x1
BOOL
WINAPI
AccessCheckByTypeResultList (
__in PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in_opt PSID PrincipalSelfSid,
__in HANDLE ClientToken,
__in DWORD DesiredAccess,
__inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
__in DWORD ObjectTypeListLength,
__in PGENERIC_MAPPING GenericMapping,
__out_bcount_part_opt(*PrivilegeSetLength, *PrivilegeSetLength) PPRIVILEGE_S
ET PrivilegeSet,
__inout LPDWORD PrivilegeSetLength,
__out LPDWORD GrantedAccessList,
__out LPDWORD AccessStatusList
);
#endif /* _WIN32_WINNT >= 0x0500 */
WINADVAPI //
BOOL // OperationEnd() parameters.
WINAPI //
OpenProcessToken (
__in HANDLE ProcessHandle,
__in DWORD DesiredAccess,
__deref_out PHANDLE TokenHandle
);
WINADVAPI typedef struct _OPERATION_END_PARAMETERS {
BOOL ULONG Version;
WINAPI OPERATION_ID OperationId;
OpenThreadToken ( ULONG Flags;
__in HANDLE ThreadHandle, } OPERATION_END_PARAMETERS, *POPERATION_END_PARAMETERS;
__in DWORD DesiredAccess,
__in BOOL OpenAsSelf,
__deref_out PHANDLE TokenHandle
);
WINADVAPI #define OPERATION_END_DISCARD 0x1
BOOL
WINAPI
GetTokenInformation (
__in HANDLE TokenHandle,
__in TOKEN_INFORMATION_CLASS TokenInformationClass,
__out_bcount_part_opt(TokenInformationLength, *ReturnLength) LPVOID TokenInf
ormation,
__in DWORD TokenInformationLength,
__out PDWORD ReturnLength
);
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
SetTokenInformation ( OperationStart (
__in HANDLE TokenHandle, _In_ OPERATION_START_PARAMETERS* OperationStartParams
__in TOKEN_INFORMATION_CLASS TokenInformationClass,
__in_bcount(TokenInformationLength) LPVOID TokenInformation,
__in DWORD TokenInformationLength
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
AdjustTokenPrivileges ( OperationEnd (
__in HANDLE TokenHandle, _In_ OPERATION_END_PARAMETERS* OperationEndParams
__in BOOL DisableAllPrivileges,
__in_opt PTOKEN_PRIVILEGES NewState,
__in DWORD BufferLength,
__out_bcount_part_opt(BufferLength, *ReturnLength) PTOKEN_PRIVILEGES Previou
sState,
__out_opt PDWORD ReturnLength
); );
WINADVAPI #endif // _WIN32_WINNT >= 0x0602
BOOL
WINAPI
AdjustTokenGroups (
__in HANDLE TokenHandle,
__in BOOL ResetToDefault,
__in_opt PTOKEN_GROUPS NewState,
__in DWORD BufferLength,
__out_bcount_part_opt(BufferLength, *ReturnLength) PTOKEN_GROUPS PreviousSta
te,
__out_opt PDWORD ReturnLength
);
WINADVAPI //
BOOL //
WINAPI // Security APIs
PrivilegeCheck ( //
__in HANDLE ClientToken,
__inout PPRIVILEGE_SET RequiredPrivileges,
__out LPBOOL pfResult
);
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
AccessCheckAndAuditAlarmA ( AccessCheckAndAuditAlarmA (
__in LPCSTR SubsystemName, _In_ LPCSTR SubsystemName,
__in_opt LPVOID HandleId, _In_opt_ LPVOID HandleId,
__in LPSTR ObjectTypeName, _In_ LPSTR ObjectTypeName,
__in_opt LPSTR ObjectName, _In_opt_ LPSTR ObjectName,
__in PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
__in DWORD DesiredAccess, _In_ DWORD DesiredAccess,
__in PGENERIC_MAPPING GenericMapping, _In_ PGENERIC_MAPPING GenericMapping,
__in BOOL ObjectCreation, _In_ BOOL ObjectCreation,
__out LPDWORD GrantedAccess, _Out_ LPDWORD GrantedAccess,
__out LPBOOL AccessStatus, _Out_ LPBOOL AccessStatus,
__out LPBOOL pfGenerateOnClose _Out_ LPBOOL pfGenerateOnClose
);
WINADVAPI
BOOL
WINAPI
AccessCheckAndAuditAlarmW (
__in LPCWSTR SubsystemName,
__in_opt LPVOID HandleId,
__in LPWSTR ObjectTypeName,
__in_opt LPWSTR ObjectName,
__in PSECURITY_DESCRIPTOR SecurityDescriptor,
__in DWORD DesiredAccess,
__in PGENERIC_MAPPING GenericMapping,
__in BOOL ObjectCreation,
__out LPDWORD GrantedAccess,
__out LPBOOL AccessStatus,
__out LPBOOL pfGenerateOnClose
); );
#ifdef UNICODE #ifndef UNICODE
#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW
#else
#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA
#endif // !UNICODE #endif
#if(_WIN32_WINNT >= 0x0500) #if(_WIN32_WINNT >= 0x0500)
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
AccessCheckByTypeAndAuditAlarmA ( AccessCheckByTypeAndAuditAlarmA (
__in LPCSTR SubsystemName, _In_ LPCSTR SubsystemName,
__in LPVOID HandleId, _In_ LPVOID HandleId,
__in LPCSTR ObjectTypeName, _In_ LPCSTR ObjectTypeName,
__in_opt LPCSTR ObjectName, _In_opt_ LPCSTR ObjectName,
__in PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
__in_opt PSID PrincipalSelfSid, _In_opt_ PSID PrincipalSelfSid,
__in DWORD DesiredAccess, _In_ DWORD DesiredAccess,
__in AUDIT_EVENT_TYPE AuditType, _In_ AUDIT_EVENT_TYPE AuditType,
__in DWORD Flags, _In_ DWORD Flags,
__inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList, _Inout_updates_opt_(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
__in DWORD ObjectTypeListLength, _In_ DWORD ObjectTypeListLength,
__in PGENERIC_MAPPING GenericMapping, _In_ PGENERIC_MAPPING GenericMapping,
__in BOOL ObjectCreation, _In_ BOOL ObjectCreation,
__out LPDWORD GrantedAccess, _Out_ LPDWORD GrantedAccess,
__out LPBOOL AccessStatus, _Out_ LPBOOL AccessStatus,
__out LPBOOL pfGenerateOnClose _Out_ LPBOOL pfGenerateOnClose
);
WINADVAPI
BOOL
WINAPI
AccessCheckByTypeAndAuditAlarmW (
__in LPCWSTR SubsystemName,
__in LPVOID HandleId,
__in LPCWSTR ObjectTypeName,
__in_opt LPCWSTR ObjectName,
__in PSECURITY_DESCRIPTOR SecurityDescriptor,
__in_opt PSID PrincipalSelfSid,
__in DWORD DesiredAccess,
__in AUDIT_EVENT_TYPE AuditType,
__in DWORD Flags,
__inout_ecount_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
); );
#ifdef UNICODE #ifndef UNICODE
#define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmW
#else
#define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmA #define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmA
#endif // !UNICODE #endif
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
AccessCheckByTypeResultListAndAuditAlarmA ( AccessCheckByTypeResultListAndAuditAlarmA (
__in LPCSTR SubsystemName, _In_ LPCSTR SubsystemName,
__in LPVOID HandleId, _In_ LPVOID HandleId,
__in LPCSTR ObjectTypeName, _In_ LPCSTR ObjectTypeName,
__in_opt LPCSTR ObjectName, _In_opt_ LPCSTR ObjectName,
__in PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
__in_opt PSID PrincipalSelfSid, _In_opt_ PSID PrincipalSelfSid,
__in DWORD DesiredAccess, _In_ DWORD DesiredAccess,
__in AUDIT_EVENT_TYPE AuditType, _In_ AUDIT_EVENT_TYPE AuditType,
__in DWORD Flags, _In_ DWORD Flags,
__inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList, _Inout_updates_opt_(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
__in DWORD ObjectTypeListLength, _In_ DWORD ObjectTypeListLength,
__in PGENERIC_MAPPING GenericMapping, _In_ PGENERIC_MAPPING GenericMapping,
__in BOOL ObjectCreation, _In_ BOOL ObjectCreation,
__out LPDWORD GrantedAccess, _Out_writes_(ObjectTypeListLength) LPDWORD GrantedAccess,
__out LPDWORD AccessStatusList, _Out_writes_(ObjectTypeListLength) LPDWORD AccessStatusList,
__out LPBOOL pfGenerateOnClose _Out_ LPBOOL pfGenerateOnClose
);
WINADVAPI
BOOL
WINAPI
AccessCheckByTypeResultListAndAuditAlarmW (
__in LPCWSTR SubsystemName,
__in LPVOID HandleId,
__in LPCWSTR ObjectTypeName,
__in_opt LPCWSTR ObjectName,
__in PSECURITY_DESCRIPTOR SecurityDescriptor,
__in_opt PSID PrincipalSelfSid,
__in DWORD DesiredAccess,
__in AUDIT_EVENT_TYPE AuditType,
__in DWORD Flags,
__inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
__in DWORD ObjectTypeListLength,
__in PGENERIC_MAPPING GenericMapping,
__in BOOL ObjectCreation,
__out LPDWORD GrantedAccess,
__out LPDWORD AccessStatusList,
__out LPBOOL pfGenerateOnClose
); );
#ifdef UNICODE #ifndef UNICODE
#define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAnd
AuditAlarmW
#else
#define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAnd AuditAlarmA #define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAnd AuditAlarmA
#endif // !UNICODE #endif
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
AccessCheckByTypeResultListAndAuditAlarmByHandleA ( AccessCheckByTypeResultListAndAuditAlarmByHandleA (
__in LPCSTR SubsystemName, _In_ LPCSTR SubsystemName,
__in LPVOID HandleId, _In_ LPVOID HandleId,
__in HANDLE ClientToken, _In_ HANDLE ClientToken,
__in LPCSTR ObjectTypeName, _In_ LPCSTR ObjectTypeName,
__in_opt LPCSTR ObjectName, _In_opt_ LPCSTR ObjectName,
__in PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
__in_opt PSID PrincipalSelfSid, _In_opt_ PSID PrincipalSelfSid,
__in DWORD DesiredAccess, _In_ DWORD DesiredAccess,
__in AUDIT_EVENT_TYPE AuditType, _In_ AUDIT_EVENT_TYPE AuditType,
__in DWORD Flags, _In_ DWORD Flags,
__inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList, _Inout_updates_opt_(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
__in DWORD ObjectTypeListLength, _In_ DWORD ObjectTypeListLength,
__in PGENERIC_MAPPING GenericMapping, _In_ PGENERIC_MAPPING GenericMapping,
__in BOOL ObjectCreation, _In_ BOOL ObjectCreation,
__out LPDWORD GrantedAccess, _Out_writes_(ObjectTypeListLength) LPDWORD GrantedAccess,
__out LPDWORD AccessStatusList, _Out_writes_(ObjectTypeListLength) LPDWORD AccessStatusList,
__out LPBOOL pfGenerateOnClose _Out_ LPBOOL pfGenerateOnClose
);
WINADVAPI
BOOL
WINAPI
AccessCheckByTypeResultListAndAuditAlarmByHandleW (
__in LPCWSTR SubsystemName,
__in LPVOID HandleId,
__in HANDLE ClientToken,
__in LPCWSTR ObjectTypeName,
__in_opt LPCWSTR ObjectName,
__in PSECURITY_DESCRIPTOR SecurityDescriptor,
__in_opt PSID PrincipalSelfSid,
__in DWORD DesiredAccess,
__in AUDIT_EVENT_TYPE AuditType,
__in DWORD Flags,
__inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
__in DWORD ObjectTypeListLength,
__in PGENERIC_MAPPING GenericMapping,
__in BOOL ObjectCreation,
__out LPDWORD GrantedAccess,
__out LPDWORD AccessStatusList,
__out LPBOOL pfGenerateOnClose
); );
#ifdef UNICODE #ifndef UNICODE
#define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResul
tListAndAuditAlarmByHandleW
#else
#define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResul tListAndAuditAlarmByHandleA #define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResul tListAndAuditAlarmByHandleA
#endif // !UNICODE #endif
#endif //(_WIN32_WINNT >= 0x0500) #endif //(_WIN32_WINNT >= 0x0500)
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
ObjectOpenAuditAlarmA ( ObjectOpenAuditAlarmA (
__in LPCSTR SubsystemName, _In_ LPCSTR SubsystemName,
__in LPVOID HandleId, _In_ LPVOID HandleId,
__in LPSTR ObjectTypeName, _In_ LPSTR ObjectTypeName,
__in_opt LPSTR ObjectName, _In_opt_ LPSTR ObjectName,
__in PSECURITY_DESCRIPTOR pSecurityDescriptor, _In_ PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in HANDLE ClientToken, _In_ HANDLE ClientToken,
__in DWORD DesiredAccess, _In_ DWORD DesiredAccess,
__in DWORD GrantedAccess, _In_ DWORD GrantedAccess,
__in_opt PPRIVILEGE_SET Privileges, _In_opt_ PPRIVILEGE_SET Privileges,
__in BOOL ObjectCreation, _In_ BOOL ObjectCreation,
__in BOOL AccessGranted, _In_ BOOL AccessGranted,
__out LPBOOL GenerateOnClose _Out_ LPBOOL GenerateOnClose
);
WINADVAPI
BOOL
WINAPI
ObjectOpenAuditAlarmW (
__in LPCWSTR SubsystemName,
__in LPVOID HandleId,
__in LPWSTR ObjectTypeName,
__in_opt LPWSTR ObjectName,
__in PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in HANDLE ClientToken,
__in DWORD DesiredAccess,
__in DWORD GrantedAccess,
__in_opt PPRIVILEGE_SET Privileges,
__in BOOL ObjectCreation,
__in BOOL AccessGranted,
__out LPBOOL GenerateOnClose
); );
#ifdef UNICODE #ifndef UNICODE
#define ObjectOpenAuditAlarm ObjectOpenAuditAlarmW
#else
#define ObjectOpenAuditAlarm ObjectOpenAuditAlarmA #define ObjectOpenAuditAlarm ObjectOpenAuditAlarmA
#endif // !UNICODE #endif
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
ObjectPrivilegeAuditAlarmA ( ObjectPrivilegeAuditAlarmA (
__in LPCSTR SubsystemName, _In_ LPCSTR SubsystemName,
__in LPVOID HandleId, _In_ LPVOID HandleId,
__in HANDLE ClientToken, _In_ HANDLE ClientToken,
__in DWORD DesiredAccess, _In_ DWORD DesiredAccess,
__in PPRIVILEGE_SET Privileges, _In_ PPRIVILEGE_SET Privileges,
__in BOOL AccessGranted _In_ BOOL AccessGranted
);
WINADVAPI
BOOL
WINAPI
ObjectPrivilegeAuditAlarmW (
__in LPCWSTR SubsystemName,
__in LPVOID HandleId,
__in HANDLE ClientToken,
__in DWORD DesiredAccess,
__in PPRIVILEGE_SET Privileges,
__in BOOL AccessGranted
); );
#ifdef UNICODE #ifndef UNICODE
#define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmW
#else
#define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmA #define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmA
#endif // !UNICODE #endif
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
ObjectCloseAuditAlarmA ( ObjectCloseAuditAlarmA (
__in LPCSTR SubsystemName, _In_ LPCSTR SubsystemName,
__in LPVOID HandleId, _In_ LPVOID HandleId,
__in BOOL GenerateOnClose _In_ BOOL GenerateOnClose
);
WINADVAPI
BOOL
WINAPI
ObjectCloseAuditAlarmW (
__in LPCWSTR SubsystemName,
__in LPVOID HandleId,
__in BOOL GenerateOnClose
); );
#ifdef UNICODE #ifndef UNICODE
#define ObjectCloseAuditAlarm ObjectCloseAuditAlarmW
#else
#define ObjectCloseAuditAlarm ObjectCloseAuditAlarmA #define ObjectCloseAuditAlarm ObjectCloseAuditAlarmA
#endif // !UNICODE #endif
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
ObjectDeleteAuditAlarmA ( ObjectDeleteAuditAlarmA (
__in LPCSTR SubsystemName, _In_ LPCSTR SubsystemName,
__in LPVOID HandleId, _In_ LPVOID HandleId,
__in BOOL GenerateOnClose _In_ BOOL GenerateOnClose
);
WINADVAPI
BOOL
WINAPI
ObjectDeleteAuditAlarmW (
__in LPCWSTR SubsystemName,
__in LPVOID HandleId,
__in BOOL GenerateOnClose
); );
#ifdef UNICODE #ifndef UNICODE
#define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmW
#else
#define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmA #define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmA
#endif // !UNICODE #endif
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
PrivilegedServiceAuditAlarmA ( PrivilegedServiceAuditAlarmA (
__in LPCSTR SubsystemName, _In_ LPCSTR SubsystemName,
__in LPCSTR ServiceName, _In_ LPCSTR ServiceName,
__in HANDLE ClientToken, _In_ HANDLE ClientToken,
__in PPRIVILEGE_SET Privileges, _In_ PPRIVILEGE_SET Privileges,
__in BOOL AccessGranted _In_ BOOL AccessGranted
);
WINADVAPI
BOOL
WINAPI
PrivilegedServiceAuditAlarmW (
__in LPCWSTR SubsystemName,
__in LPCWSTR ServiceName,
__in HANDLE ClientToken,
__in PPRIVILEGE_SET Privileges,
__in BOOL AccessGranted
); );
#ifdef UNICODE #ifndef UNICODE
#define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmW
#else
#define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmA #define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmA
#endif // !UNICODE #endif
#if(_WIN32_WINNT >= 0x0501)
WINADVAPI
BOOL
WINAPI
IsWellKnownSid (
__in PSID pSid,
__in WELL_KNOWN_SID_TYPE WellKnownSidType
);
WINADVAPI
__success(return != FALSE) BOOL
WINAPI
CreateWellKnownSid(
__in WELL_KNOWN_SID_TYPE WellKnownSidType,
__in_opt PSID DomainSid,
__out_bcount_part_opt(*cbSid, *cbSid) PSID pSid,
__inout DWORD *cbSid
);
WINADVAPI
__success(return != FALSE) BOOL
WINAPI
EqualDomainSid(
__in PSID pSid1,
__in PSID pSid2,
__out BOOL *pfEqual
);
WINADVAPI
__success(return != FALSE) BOOL
WINAPI
GetWindowsAccountDomainSid(
__in PSID pSid,
__out_bcount_part_opt(*cbDomainSid, *cbDomainSid) PSID pDomainSid,
__inout DWORD* cbDomainSid
);
#endif //(_WIN32_WINNT >= 0x0501)
WINADVAPI
BOOL
WINAPI
IsValidSid (
__in PSID pSid
);
WINADVAPI
BOOL
WINAPI
EqualSid (
__in PSID pSid1,
__in PSID pSid2
);
WINADVAPI
BOOL
WINAPI
EqualPrefixSid (
__in PSID pSid1,
__in PSID pSid2
);
WINADVAPI
DWORD
WINAPI
GetSidLengthRequired (
__in UCHAR nSubAuthorityCount
);
WINADVAPI
BOOL
WINAPI
AllocateAndInitializeSid (
__in PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
__in BYTE nSubAuthorityCount,
__in DWORD nSubAuthority0,
__in DWORD nSubAuthority1,
__in DWORD nSubAuthority2,
__in DWORD nSubAuthority3,
__in DWORD nSubAuthority4,
__in DWORD nSubAuthority5,
__in DWORD nSubAuthority6,
__in DWORD nSubAuthority7,
__deref_out PSID *pSid
);
WINADVAPI
PVOID
WINAPI
FreeSid(
__in PSID pSid
);
WINADVAPI
BOOL
WINAPI
InitializeSid (
__out PSID Sid,
__in PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
__in BYTE nSubAuthorityCount
);
WINADVAPI
__out
PSID_IDENTIFIER_AUTHORITY
WINAPI
GetSidIdentifierAuthority (
__in PSID pSid
);
WINADVAPI
__out
PDWORD
WINAPI
GetSidSubAuthority (
__in PSID pSid,
__in DWORD nSubAuthority
);
WINADVAPI
__out
PUCHAR
WINAPI
GetSidSubAuthorityCount (
__in PSID pSid
);
WINADVAPI
DWORD
WINAPI
GetLengthSid (
__in PSID pSid
);
WINADVAPI
BOOL
WINAPI
CopySid (
__in DWORD nDestinationSidLength,
__out_bcount(nDestinationSidLength) PSID pDestinationSid,
__in PSID pSourceSid
);
WINADVAPI
BOOL
WINAPI
AreAllAccessesGranted (
__in DWORD GrantedAccess,
__in DWORD DesiredAccess
);
WINADVAPI
BOOL
WINAPI
AreAnyAccessesGranted (
__in DWORD GrantedAccess,
__in DWORD DesiredAccess
);
WINADVAPI
VOID
WINAPI
MapGenericMask (
__inout PDWORD AccessMask,
__in PGENERIC_MAPPING GenericMapping
);
WINADVAPI
BOOL
WINAPI
IsValidAcl (
__in PACL pAcl
);
WINADVAPI
BOOL
WINAPI
InitializeAcl (
__out_bcount(nAclLength) PACL pAcl,
__in DWORD nAclLength,
__in DWORD dwAclRevision
);
WINADVAPI
BOOL
WINAPI
GetAclInformation (
__in PACL pAcl,
__out_bcount(nAclInformationLength) LPVOID pAclInformation,
__in DWORD nAclInformationLength,
__in ACL_INFORMATION_CLASS dwAclInformationClass
);
WINADVAPI
BOOL
WINAPI
SetAclInformation (
__inout PACL pAcl,
__in_bcount(nAclInformationLength) LPVOID pAclInformation,
__in DWORD nAclInformationLength,
__in ACL_INFORMATION_CLASS dwAclInformationClass
);
WINADVAPI
BOOL
WINAPI
AddAce (
__inout PACL pAcl,
__in DWORD dwAceRevision,
__in DWORD dwStartingAceIndex,
__in_bcount(nAceListLength) LPVOID pAceList,
__in DWORD nAceListLength
);
WINADVAPI
BOOL
WINAPI
DeleteAce (
__inout PACL pAcl,
__in DWORD dwAceIndex
);
WINADVAPI
BOOL
WINAPI
GetAce (
__in PACL pAcl,
__in DWORD dwAceIndex,
__deref_out LPVOID *pAce
);
WINADVAPI
BOOL
WINAPI
AddAccessAllowedAce (
__inout PACL pAcl,
__in DWORD dwAceRevision,
__in DWORD AccessMask,
__in PSID pSid
);
#if(_WIN32_WINNT >= 0x0500)
WINADVAPI
BOOL
WINAPI
AddAccessAllowedAceEx (
__inout PACL pAcl,
__in DWORD dwAceRevision,
__in DWORD AceFlags,
__in DWORD AccessMask,
__in PSID pSid
);
#endif /* _WIN32_WINNT >= 0x0500 */
#if(_WIN32_WINNT >= 0x0600)
WINADVAPI
BOOL
WINAPI
AddMandatoryAce (
__inout PACL pAcl,
__in DWORD dwAceRevision,
__in DWORD AceFlags,
__in DWORD MandatoryPolicy,
__in PSID pLabelSid
);
#endif /* _WIN32_WINNT >= 0x0600 */
#if(_WIN32_WINNT >= 0x0601) #if(_WIN32_WINNT >= 0x0601)
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
AddConditionalAce ( AddConditionalAce (
__inout PACL pAcl, _Inout_ PACL pAcl,
__in DWORD dwAceRevision, _In_ DWORD dwAceRevision,
__in DWORD AceFlags, _In_ DWORD AceFlags,
__in UCHAR AceType, _In_ UCHAR AceType,
__in DWORD AccessMask, _In_ DWORD AccessMask,
__in PSID pSid, _In_ PSID pSid,
__in PWCHAR ConditionStr, _In_ _Null_terminated_ PWCHAR ConditionStr,
__out DWORD *ReturnLength _Out_ DWORD *ReturnLength
); );
#endif /* _WIN32_WINNT >= 0x0601 */ #endif /* _WIN32_WINNT >= 0x0601 */
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
AddAccessDeniedAce (
__inout PACL pAcl,
__in DWORD dwAceRevision,
__in DWORD AccessMask,
__in PSID pSid
);
#if(_WIN32_WINNT >= 0x0500)
WINADVAPI
BOOL
WINAPI
AddAccessDeniedAceEx (
__inout PACL pAcl,
__in DWORD dwAceRevision,
__in DWORD AceFlags,
__in DWORD AccessMask,
__in PSID pSid
);
#endif /* _WIN32_WINNT >= 0x0500 */
WINADVAPI
BOOL
WINAPI
AddAuditAccessAce(
__inout PACL pAcl,
__in DWORD dwAceRevision,
__in DWORD dwAccessMask,
__in PSID pSid,
__in BOOL bAuditSuccess,
__in BOOL bAuditFailure
);
#if(_WIN32_WINNT >= 0x0500)
WINADVAPI
BOOL
WINAPI
AddAuditAccessAceEx(
__inout PACL pAcl,
__in DWORD dwAceRevision,
__in DWORD AceFlags,
__in DWORD dwAccessMask,
__in PSID pSid,
__in BOOL bAuditSuccess,
__in BOOL bAuditFailure
);
WINADVAPI
BOOL
WINAPI
AddAccessAllowedObjectAce (
__inout PACL pAcl,
__in DWORD dwAceRevision,
__in DWORD AceFlags,
__in DWORD AccessMask,
__in_opt GUID *ObjectTypeGuid,
__in_opt GUID *InheritedObjectTypeGuid,
__in PSID pSid
);
WINADVAPI
BOOL
WINAPI
AddAccessDeniedObjectAce (
__inout PACL pAcl,
__in DWORD dwAceRevision,
__in DWORD AceFlags,
__in DWORD AccessMask,
__in_opt GUID *ObjectTypeGuid,
__in_opt GUID *InheritedObjectTypeGuid,
__in PSID pSid
);
WINADVAPI
BOOL
WINAPI
AddAuditAccessObjectAce (
__inout PACL pAcl,
__in DWORD dwAceRevision,
__in DWORD AceFlags,
__in DWORD AccessMask,
__in_opt GUID *ObjectTypeGuid,
__in_opt GUID *InheritedObjectTypeGuid,
__in PSID pSid,
__in BOOL bAuditSuccess,
__in BOOL bAuditFailure
);
#endif /* _WIN32_WINNT >= 0x0500 */
WINADVAPI
BOOL
WINAPI
FindFirstFreeAce (
__in PACL pAcl,
__deref_out LPVOID *pAce
);
WINADVAPI
BOOL
WINAPI
InitializeSecurityDescriptor (
__out PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in DWORD dwRevision
);
WINADVAPI
BOOL
WINAPI
IsValidSecurityDescriptor (
__in PSECURITY_DESCRIPTOR pSecurityDescriptor
);
WINADVAPI
BOOL
WINAPI
IsValidRelativeSecurityDescriptor (
__in PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in ULONG SecurityDescriptorLength,
__in SECURITY_INFORMATION RequiredInformation
);
WINADVAPI
DWORD
WINAPI
GetSecurityDescriptorLength (
__in PSECURITY_DESCRIPTOR pSecurityDescriptor
);
WINADVAPI
BOOL
WINAPI
GetSecurityDescriptorControl (
__in PSECURITY_DESCRIPTOR pSecurityDescriptor,
__out PSECURITY_DESCRIPTOR_CONTROL pControl,
__out LPDWORD lpdwRevision
);
#if(_WIN32_WINNT >= 0x0500)
WINADVAPI
BOOL
WINAPI
SetSecurityDescriptorControl (
__in PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,
__in SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet
);
#endif /* _WIN32_WINNT >= 0x0500 */
WINADVAPI
BOOL
WINAPI
SetSecurityDescriptorDacl (
__inout PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in BOOL bDaclPresent,
__in_opt PACL pDacl,
__in BOOL bDaclDefaulted
);
WINADVAPI
BOOL
WINAPI
GetSecurityDescriptorDacl (
__in PSECURITY_DESCRIPTOR pSecurityDescriptor,
__out LPBOOL lpbDaclPresent,
__deref_out PACL *pDacl,
__out LPBOOL lpbDaclDefaulted
);
WINADVAPI
BOOL
WINAPI
SetSecurityDescriptorSacl (
__inout PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in BOOL bSaclPresent,
__in_opt PACL pSacl,
__in BOOL bSaclDefaulted
);
WINADVAPI
BOOL
WINAPI
GetSecurityDescriptorSacl (
__in PSECURITY_DESCRIPTOR pSecurityDescriptor,
__out LPBOOL lpbSaclPresent,
__deref_out PACL *pSacl,
__out LPBOOL lpbSaclDefaulted
);
WINADVAPI
BOOL
WINAPI
SetSecurityDescriptorOwner (
__inout PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in_opt PSID pOwner,
__in BOOL bOwnerDefaulted
);
WINADVAPI
BOOL
WINAPI
GetSecurityDescriptorOwner (
__in PSECURITY_DESCRIPTOR pSecurityDescriptor,
__deref_out PSID *pOwner,
__out LPBOOL lpbOwnerDefaulted
);
WINADVAPI
BOOL
WINAPI
SetSecurityDescriptorGroup (
__inout PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in_opt PSID pGroup,
__in BOOL bGroupDefaulted
);
WINADVAPI
BOOL
WINAPI
GetSecurityDescriptorGroup (
__in PSECURITY_DESCRIPTOR pSecurityDescriptor,
__deref_out PSID *pGroup,
__out LPBOOL lpbGroupDefaulted
);
WINADVAPI
DWORD
WINAPI
SetSecurityDescriptorRMControl(
__inout PSECURITY_DESCRIPTOR SecurityDescriptor,
__in_opt PUCHAR RMControl
);
WINADVAPI
DWORD
WINAPI
GetSecurityDescriptorRMControl(
__in PSECURITY_DESCRIPTOR SecurityDescriptor,
__out PUCHAR RMControl
);
WINADVAPI
BOOL
WINAPI
CreatePrivateObjectSecurity (
__in_opt PSECURITY_DESCRIPTOR ParentDescriptor,
__in_opt PSECURITY_DESCRIPTOR CreatorDescriptor,
__deref_out PSECURITY_DESCRIPTOR * NewDescriptor,
__in BOOL IsDirectoryObject,
__in_opt HANDLE Token,
__in PGENERIC_MAPPING GenericMapping
);
#if(_WIN32_WINNT >= 0x0500)
WINADVAPI
BOOL
WINAPI
ConvertToAutoInheritPrivateObjectSecurity(
__in_opt PSECURITY_DESCRIPTOR ParentDescriptor,
__in PSECURITY_DESCRIPTOR CurrentSecurityDescriptor,
__deref_out PSECURITY_DESCRIPTOR *NewSecurityDescriptor,
__in_opt GUID *ObjectType,
__in BOOLEAN IsDirectoryObject,
__in PGENERIC_MAPPING GenericMapping
);
WINADVAPI
BOOL
WINAPI
CreatePrivateObjectSecurityEx (
__in_opt PSECURITY_DESCRIPTOR ParentDescriptor,
__in_opt PSECURITY_DESCRIPTOR CreatorDescriptor,
__deref_out PSECURITY_DESCRIPTOR * NewDescriptor,
__in_opt GUID *ObjectType,
__in BOOL IsContainerObject,
__in ULONG AutoInheritFlags,
__in_opt HANDLE Token,
__in PGENERIC_MAPPING GenericMapping
);
WINADVAPI
BOOL
WINAPI
CreatePrivateObjectSecurityWithMultipleInheritance (
__in_opt PSECURITY_DESCRIPTOR ParentDescriptor,
__in_opt PSECURITY_DESCRIPTOR CreatorDescriptor,
__deref_out PSECURITY_DESCRIPTOR * NewDescriptor,
__in_ecount_opt(GuidCount) GUID **ObjectTypes,
__in ULONG GuidCount,
__in BOOL IsContainerObject,
__in ULONG AutoInheritFlags,
__in_opt HANDLE Token,
__in PGENERIC_MAPPING GenericMapping
);
#endif /* _WIN32_WINNT >= 0x0500 */
WINADVAPI
BOOL
WINAPI
SetPrivateObjectSecurity (
__in SECURITY_INFORMATION SecurityInformation,
__in PSECURITY_DESCRIPTOR ModificationDescriptor,
__deref_inout PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
__in PGENERIC_MAPPING GenericMapping,
__in_opt HANDLE Token
);
#if(_WIN32_WINNT >= 0x0500)
WINADVAPI
BOOL
WINAPI
SetPrivateObjectSecurityEx (
__in SECURITY_INFORMATION SecurityInformation,
__in PSECURITY_DESCRIPTOR ModificationDescriptor,
__deref_inout PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
__in ULONG AutoInheritFlags,
__in PGENERIC_MAPPING GenericMapping,
__in_opt HANDLE Token
);
#endif /* _WIN32_WINNT >= 0x0500 */
WINADVAPI
__success(return != FALSE) BOOL
WINAPI
GetPrivateObjectSecurity (
__in PSECURITY_DESCRIPTOR ObjectDescriptor,
__in SECURITY_INFORMATION SecurityInformation,
__out_bcount_part_opt(DescriptorLength, *ReturnLength) PSECURITY_DESCRIPTOR
ResultantDescriptor,
__in DWORD DescriptorLength,
__out PDWORD ReturnLength
);
WINADVAPI
BOOL
WINAPI
DestroyPrivateObjectSecurity (
__deref PSECURITY_DESCRIPTOR * ObjectDescriptor
);
WINADVAPI
__success(return != FALSE) BOOL
WINAPI
MakeSelfRelativeSD (
__in PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
__out_bcount_part_opt(*lpdwBufferLength, *lpdwBufferLength) PSECURITY_DESCRI
PTOR pSelfRelativeSecurityDescriptor,
__inout LPDWORD lpdwBufferLength
);
WINADVAPI
__success(return != FALSE) BOOL
WINAPI
MakeAbsoluteSD (
__in PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
__out_bcount_part_opt(*lpdwAbsoluteSecurityDescriptorSize, *lpdwAbsoluteSecu
rityDescriptorSize) PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
__inout LPDWORD lpdwAbsoluteSecurityDescriptorSize,
__out_bcount_part_opt(*lpdwDaclSize, *lpdwDaclSize) PACL pDacl,
__inout LPDWORD lpdwDaclSize,
__out_bcount_part_opt(*lpdwSaclSize, *lpdwSaclSize) PACL pSacl,
__inout LPDWORD lpdwSaclSize,
__out_bcount_part_opt(*lpdwOwnerSize, *lpdwOwnerSize) PSID pOwner,
__inout LPDWORD lpdwOwnerSize,
__out_bcount_part_opt(*lpdwPrimaryGroupSize, *lpdwPrimaryGroupSize) PSID pPr
imaryGroup,
__inout LPDWORD lpdwPrimaryGroupSize
);
WINADVAPI
__success(return != FALSE) BOOL
WINAPI
MakeAbsoluteSD2 (
__inout_bcount_part(*lpdwBufferSize, *lpdwBufferSize) PSECURITY_DESCRIPTOR p
SelfRelativeSecurityDescriptor,
__inout LPDWORD lpdwBufferSize
);
WINADVAPI
VOID
WINAPI
QuerySecurityAccessMask(
__in SECURITY_INFORMATION SecurityInformation,
__out LPDWORD DesiredAccess
);
WINADVAPI
VOID
WINAPI
SetSecurityAccessMask(
__in SECURITY_INFORMATION SecurityInformation,
__out LPDWORD DesiredAccess
);
WINADVAPI
BOOL
WINAPI
SetFileSecurityA ( SetFileSecurityA (
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__in SECURITY_INFORMATION SecurityInformation, _In_ SECURITY_INFORMATION SecurityInformation,
__in PSECURITY_DESCRIPTOR pSecurityDescriptor _In_ PSECURITY_DESCRIPTOR pSecurityDescriptor
);
WINADVAPI
BOOL
WINAPI
SetFileSecurityW (
__in LPCWSTR lpFileName,
__in SECURITY_INFORMATION SecurityInformation,
__in PSECURITY_DESCRIPTOR pSecurityDescriptor
); );
#ifdef UNICODE #ifndef UNICODE
#define SetFileSecurity SetFileSecurityW
#else
#define SetFileSecurity SetFileSecurityA #define SetFileSecurity SetFileSecurityA
#endif // !UNICODE #endif
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
GetFileSecurityA ( GetFileSecurityA (
__in LPCSTR lpFileName, _In_ LPCSTR lpFileName,
__in SECURITY_INFORMATION RequestedInformation, _In_ SECURITY_INFORMATION RequestedInformation,
__out_bcount_part_opt(nLength, *lpnLengthNeeded) PSECURITY_DESCRIPTOR pSecur _Out_writes_bytes_to_opt_(nLength, *lpnLengthNeeded) PSECURITY_DESCRIPTOR pS
ityDescriptor, ecurityDescriptor,
__in DWORD nLength, _In_ DWORD nLength,
__out LPDWORD lpnLengthNeeded _Out_ LPDWORD lpnLengthNeeded
);
WINADVAPI
BOOL
WINAPI
GetFileSecurityW (
__in LPCWSTR lpFileName,
__in SECURITY_INFORMATION RequestedInformation,
__out_bcount_part_opt(nLength, *lpnLengthNeeded) PSECURITY_DESCRIPTOR pSecur
ityDescriptor,
__in DWORD nLength,
__out LPDWORD lpnLengthNeeded
); );
#ifdef UNICODE #ifndef UNICODE
#define GetFileSecurity GetFileSecurityW
#else
#define GetFileSecurity GetFileSecurityA #define GetFileSecurity GetFileSecurityA
#endif // !UNICODE #endif
WINADVAPI
BOOL
WINAPI
SetKernelObjectSecurity (
__in HANDLE Handle,
__in SECURITY_INFORMATION SecurityInformation,
__in PSECURITY_DESCRIPTOR SecurityDescriptor
);
WINBASEAPI
__out
HANDLE
WINAPI
FindFirstChangeNotificationA(
__in LPCSTR lpPathName,
__in BOOL bWatchSubtree,
__in DWORD dwNotifyFilter
);
WINBASEAPI
__out
HANDLE
WINAPI
FindFirstChangeNotificationW(
__in LPCWSTR lpPathName,
__in BOOL bWatchSubtree,
__in DWORD dwNotifyFilter
);
#ifdef UNICODE
#define FindFirstChangeNotification FindFirstChangeNotificationW
#else
#define FindFirstChangeNotification FindFirstChangeNotificationA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
FindNextChangeNotification(
__in HANDLE hChangeHandle
);
WINBASEAPI
BOOL
WINAPI
FindCloseChangeNotification(
__in HANDLE hChangeHandle
);
#if(_WIN32_WINNT >= 0x0400) #if(_WIN32_WINNT >= 0x0400)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadDirectoryChangesW( ReadDirectoryChangesW(
__in HANDLE hDirectory, _In_ HANDLE hDirectory,
__out_bcount_part(nBufferLength, *lpBytesReturned) LPVOID lpBuffer, _Out_writes_bytes_to_(nBufferLength, *lpBytesReturned) LPVOID lpBuffer,
__in DWORD nBufferLength, _In_ DWORD nBufferLength,
__in BOOL bWatchSubtree, _In_ BOOL bWatchSubtree,
__in DWORD dwNotifyFilter, _In_ DWORD dwNotifyFilter,
__out_opt LPDWORD lpBytesReturned, _Out_opt_ LPDWORD lpBytesReturned,
__inout_opt LPOVERLAPPED lpOverlapped, _Inout_opt_ LPOVERLAPPED lpOverlapped,
__in_opt LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine _In_opt_ LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
); );
#endif /* _WIN32_WINNT >= 0x0400 */ #endif /* _WIN32_WINNT >= 0x0400 */
WINBASEAPI
BOOL
WINAPI
VirtualLock(
__in LPVOID lpAddress,
__in SIZE_T dwSize
);
WINBASEAPI
BOOL
WINAPI
VirtualUnlock(
__in LPVOID lpAddress,
__in SIZE_T dwSize
);
WINBASEAPI
__out_opt __out_data_source(FILE)
LPVOID
WINAPI
MapViewOfFileEx(
__in HANDLE hFileMappingObject,
__in DWORD dwDesiredAccess,
__in DWORD dwFileOffsetHigh,
__in DWORD dwFileOffsetLow,
__in SIZE_T dwNumberOfBytesToMap,
__in_opt LPVOID lpBaseAddress
);
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
__out __out_data_source(FILE) _Ret_maybenull_ __out_data_source(FILE)
LPVOID LPVOID
WINAPI WINAPI
MapViewOfFileExNuma( MapViewOfFileExNuma(
__in HANDLE hFileMappingObject, _In_ HANDLE hFileMappingObject,
__in DWORD dwDesiredAccess, _In_ DWORD dwDesiredAccess,
__in DWORD dwFileOffsetHigh, _In_ DWORD dwFileOffsetHigh,
__in DWORD dwFileOffsetLow, _In_ DWORD dwFileOffsetLow,
__in SIZE_T dwNumberOfBytesToMap, _In_ SIZE_T dwNumberOfBytesToMap,
__in_opt LPVOID lpBaseAddress, _In_opt_ LPVOID lpBaseAddress,
__in DWORD nndPreferred _In_ DWORD nndPreferred
); );
#endif // _WIN32_WINNT >= 0x0600 #endif // _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetPriorityClass(
__in HANDLE hProcess,
__in DWORD dwPriorityClass
);
WINBASEAPI
DWORD
WINAPI
GetPriorityClass(
__in HANDLE hProcess
);
WINBASEAPI
BOOL
WINAPI
IsBadReadPtr( IsBadReadPtr(
__in_opt CONST VOID *lp, _In_opt_ CONST VOID *lp,
__in UINT_PTR ucb _In_ UINT_PTR ucb
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
IsBadWritePtr( IsBadWritePtr(
__in_opt LPVOID lp, _In_opt_ LPVOID lp,
__in UINT_PTR ucb _In_ UINT_PTR ucb
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
IsBadHugeReadPtr( IsBadHugeReadPtr(
__in_opt CONST VOID *lp, _In_opt_ CONST VOID *lp,
__in UINT_PTR ucb _In_ UINT_PTR ucb
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
IsBadHugeWritePtr( IsBadHugeWritePtr(
__in_opt LPVOID lp, _In_opt_ LPVOID lp,
__in UINT_PTR ucb _In_ UINT_PTR ucb
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
IsBadCodePtr( IsBadCodePtr(
__in_opt FARPROC lpfn _In_opt_ FARPROC lpfn
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
IsBadStringPtrA( IsBadStringPtrA(
__in_opt LPCSTR lpsz, _In_opt_ LPCSTR lpsz,
__in UINT_PTR ucchMax _In_ UINT_PTR ucchMax
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
IsBadStringPtrW( IsBadStringPtrW(
__in_opt LPCWSTR lpsz, _In_opt_ LPCWSTR lpsz,
__in UINT_PTR ucchMax _In_ UINT_PTR ucchMax
); );
#ifdef UNICODE #ifdef UNICODE
#define IsBadStringPtr IsBadStringPtrW #define IsBadStringPtr IsBadStringPtrW
#else #else
#define IsBadStringPtr IsBadStringPtrA #define IsBadStringPtr IsBadStringPtrA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL _Success_(return != FALSE) BOOL
WINAPI WINAPI
LookupAccountSidA( LookupAccountSidA(
__in_opt LPCSTR lpSystemName, _In_opt_ LPCSTR lpSystemName,
__in PSID Sid, _In_ PSID Sid,
__out_ecount_part_opt(*cchName, *cchName + 1) LPSTR Name, _Out_writes_to_opt_(*cchName, *cchName + 1) LPSTR Name,
__inout LPDWORD cchName, _Inout_ LPDWORD cchName,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 _Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1)
) LPSTR ReferencedDomainName, LPSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName, _Inout_ LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse _Out_ PSID_NAME_USE peUse
); );
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL _Success_(return != FALSE) BOOL
WINAPI WINAPI
LookupAccountSidW( LookupAccountSidW(
__in_opt LPCWSTR lpSystemName, _In_opt_ LPCWSTR lpSystemName,
__in PSID Sid, _In_ PSID Sid,
__out_ecount_part_opt(*cchName, *cchName + 1) LPWSTR Name, _Out_writes_to_opt_(*cchName, *cchName + 1) LPWSTR Name,
__inout LPDWORD cchName, _Inout_ LPDWORD cchName,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 _Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1)
) LPWSTR ReferencedDomainName, LPWSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName, _Inout_ LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse _Out_ PSID_NAME_USE peUse
); );
#ifdef UNICODE #ifdef UNICODE
#define LookupAccountSid LookupAccountSidW #define LookupAccountSid LookupAccountSidW
#else #else
#define LookupAccountSid LookupAccountSidA #define LookupAccountSid LookupAccountSidA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL _Success_(return != FALSE) BOOL
WINAPI WINAPI
LookupAccountSidLocalA( LookupAccountNameA(
__in PSID Sid, _In_opt_ LPCSTR lpSystemName,
__out_ecount_part_opt(*cchName, *cchName + 1) LPSTR Name, _In_ LPCSTR lpAccountName,
__inout LPDWORD cchName, _Out_writes_bytes_to_opt_(*cbSid, *cbSid) PSID Sid,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 _Inout_ LPDWORD cbSid,
) LPSTR ReferencedDomainName, _Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1)
__inout LPDWORD cchReferencedDomainName, LPSTR ReferencedDomainName,
__out PSID_NAME_USE peUse _Inout_ LPDWORD cchReferencedDomainName,
_Out_ PSID_NAME_USE peUse
); );
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL _Success_(return != FALSE) BOOL
WINAPI WINAPI
LookupAccountSidLocalW( LookupAccountNameW(
__in PSID Sid, _In_opt_ LPCWSTR lpSystemName,
__out_ecount_part_opt(*cchName, *cchName + 1) LPWSTR Name, _In_ LPCWSTR lpAccountName,
__inout LPDWORD cchName, _Out_writes_bytes_to_opt_(*cbSid, *cbSid) PSID Sid,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 _Inout_ LPDWORD cbSid,
) LPWSTR ReferencedDomainName, _Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1)
__inout LPDWORD cchReferencedDomainName, LPWSTR ReferencedDomainName,
__out PSID_NAME_USE peUse _Inout_ LPDWORD cchReferencedDomainName,
_Out_ PSID_NAME_USE peUse
); );
#ifdef UNICODE #ifdef UNICODE
#define LookupAccountSidLocal LookupAccountSidLocalW #define LookupAccountName LookupAccountNameW
#else #else
#define LookupAccountSidLocal LookupAccountSidLocalA #define LookupAccountName LookupAccountNameA
#endif // !UNICODE #endif // !UNICODE
#if _WIN32_WINNT >= 0x0601
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL _Success_(return != FALSE) BOOL
WINAPI WINAPI
LookupAccountNameA( LookupAccountNameLocalA(
__in_opt LPCSTR lpSystemName, _In_ LPCSTR lpAccountName,
__in LPCSTR lpAccountName, _Out_writes_bytes_to_opt_(*cbSid, *cbSid) PSID Sid,
__out_bcount_part_opt(*cbSid, *cbSid) PSID Sid, _Inout_ LPDWORD cbSid,
__inout LPDWORD cbSid, _Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1)
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 LPSTR ReferencedDomainName,
) LPSTR ReferencedDomainName, _Inout_ LPDWORD cchReferencedDomainName,
__inout LPDWORD cchReferencedDomainName, _Out_ PSID_NAME_USE peUse
__out PSID_NAME_USE peUse
); );
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL _Success_(return != FALSE) BOOL
WINAPI WINAPI
LookupAccountNameW( LookupAccountNameLocalW(
__in_opt LPCWSTR lpSystemName, _In_ LPCWSTR lpAccountName,
__in LPCWSTR lpAccountName, _Out_writes_bytes_to_opt_(*cbSid, *cbSid) PSID Sid,
__out_bcount_part_opt(*cbSid, *cbSid) PSID Sid, _Inout_ LPDWORD cbSid,
__inout LPDWORD cbSid, _Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1)
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 LPWSTR ReferencedDomainName,
) LPWSTR ReferencedDomainName, _Inout_ LPDWORD cchReferencedDomainName,
__inout LPDWORD cchReferencedDomainName, _Out_ PSID_NAME_USE peUse
__out PSID_NAME_USE peUse
); );
#ifdef UNICODE #ifdef UNICODE
#define LookupAccountName LookupAccountNameW #define LookupAccountNameLocal LookupAccountNameLocalW
#else #else
#define LookupAccountName LookupAccountNameA #define LookupAccountNameLocal LookupAccountNameLocalA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL _Success_(return != FALSE) BOOL
WINAPI WINAPI
LookupAccountNameLocalA( LookupAccountSidLocalA(
__in LPCSTR lpAccountName, _In_ PSID Sid,
__out_bcount_part_opt(*cbSid, *cbSid) PSID Sid, _Out_writes_to_opt_(*cchName, *cchName + 1) LPSTR Name,
__inout LPDWORD cbSid, _Inout_ LPDWORD cchName,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 _Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1)
) LPSTR ReferencedDomainName, LPSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName, _Inout_ LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse _Out_ PSID_NAME_USE peUse
); );
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL _Success_(return != FALSE) BOOL
WINAPI WINAPI
LookupAccountNameLocalW( LookupAccountSidLocalW(
__in LPCWSTR lpAccountName, _In_ PSID Sid,
__out_bcount_part_opt(*cbSid, *cbSid) PSID Sid, _Out_writes_to_opt_(*cchName, *cchName + 1) LPWSTR Name,
__inout LPDWORD cbSid, _Inout_ LPDWORD cchName,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 _Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1)
) LPWSTR ReferencedDomainName, LPWSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName, _Inout_ LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse _Out_ PSID_NAME_USE peUse
); );
#ifdef UNICODE #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 #define LookupAccountNameLocal LookupAccountNameLocalW
#else #else
#define LookupAccountNameLocal LookupAccountNameLocalA #define LookupAccountNameLocal LookupAccountNameLocalA
#endif // !UNICODE #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
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
LookupPrivilegeValueA( LookupPrivilegeValueA(
__in_opt LPCSTR lpSystemName, _In_opt_ LPCSTR lpSystemName,
__in LPCSTR lpName, _In_ LPCSTR lpName,
__out PLUID lpLuid _Out_ PLUID lpLuid
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
LookupPrivilegeValueW( LookupPrivilegeValueW(
__in_opt LPCWSTR lpSystemName, _In_opt_ LPCWSTR lpSystemName,
__in LPCWSTR lpName, _In_ LPCWSTR lpName,
__out PLUID lpLuid _Out_ PLUID lpLuid
); );
#ifdef UNICODE #ifdef UNICODE
#define LookupPrivilegeValue LookupPrivilegeValueW #define LookupPrivilegeValue LookupPrivilegeValueW
#else #else
#define LookupPrivilegeValue LookupPrivilegeValueA #define LookupPrivilegeValue LookupPrivilegeValueA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL _Success_(return != FALSE) BOOL
WINAPI WINAPI
LookupPrivilegeNameA( LookupPrivilegeNameA(
__in_opt LPCSTR lpSystemName, _In_opt_ LPCSTR lpSystemName,
__in PLUID lpLuid, _In_ PLUID lpLuid,
__out_ecount_part_opt(*cchName, *cchName + 1) LPSTR lpName, _Out_writes_to_opt_(*cchName, *cchName + 1) LPSTR lpName,
__inout LPDWORD cchName _Inout_ LPDWORD cchName
); );
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL _Success_(return != FALSE) BOOL
WINAPI WINAPI
LookupPrivilegeNameW( LookupPrivilegeNameW(
__in_opt LPCWSTR lpSystemName, _In_opt_ LPCWSTR lpSystemName,
__in PLUID lpLuid, _In_ PLUID lpLuid,
__out_ecount_part_opt(*cchName, *cchName + 1) LPWSTR lpName, _Out_writes_to_opt_(*cchName, *cchName + 1) LPWSTR lpName,
__inout LPDWORD cchName _Inout_ LPDWORD cchName
); );
#ifdef UNICODE #ifdef UNICODE
#define LookupPrivilegeName LookupPrivilegeNameW #define LookupPrivilegeName LookupPrivilegeNameW
#else #else
#define LookupPrivilegeName LookupPrivilegeNameA #define LookupPrivilegeName LookupPrivilegeNameA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL _Success_(return != FALSE) BOOL
WINAPI WINAPI
LookupPrivilegeDisplayNameA( LookupPrivilegeDisplayNameA(
__in_opt LPCSTR lpSystemName, _In_opt_ LPCSTR lpSystemName,
__in LPCSTR lpName, _In_ LPCSTR lpName,
__out_ecount_part_opt(*cchDisplayName, *cchDisplayName + 1) LPSTR lpDisplayN _Out_writes_to_opt_(*cchDisplayName, *cchDisplayName + 1) LPSTR lpDisplayNam
ame, e,
__inout LPDWORD cchDisplayName, _Inout_ LPDWORD cchDisplayName,
__out LPDWORD lpLanguageId _Out_ LPDWORD lpLanguageId
); );
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL _Success_(return != FALSE) BOOL
WINAPI WINAPI
LookupPrivilegeDisplayNameW( LookupPrivilegeDisplayNameW(
__in_opt LPCWSTR lpSystemName, _In_opt_ LPCWSTR lpSystemName,
__in LPCWSTR lpName, _In_ LPCWSTR lpName,
__out_ecount_part_opt(*cchDisplayName, *cchDisplayName + 1) LPWSTR lpDisplay _Out_writes_to_opt_(*cchDisplayName, *cchDisplayName + 1) LPWSTR lpDisplayNa
Name, me,
__inout LPDWORD cchDisplayName, _Inout_ LPDWORD cchDisplayName,
__out LPDWORD lpLanguageId _Out_ LPDWORD lpLanguageId
); );
#ifdef UNICODE #ifdef UNICODE
#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW
#else #else
#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameA #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI
BOOL
WINAPI
AllocateLocallyUniqueId(
__out PLUID Luid
);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
BuildCommDCBA( BuildCommDCBA(
__in LPCSTR lpDef, _In_ LPCSTR lpDef,
__out LPDCB lpDCB _Out_ LPDCB lpDCB
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
BuildCommDCBW( BuildCommDCBW(
__in LPCWSTR lpDef, _In_ LPCWSTR lpDef,
__out LPDCB lpDCB _Out_ LPDCB lpDCB
); );
#ifdef UNICODE #ifdef UNICODE
#define BuildCommDCB BuildCommDCBW #define BuildCommDCB BuildCommDCBW
#else #else
#define BuildCommDCB BuildCommDCBA #define BuildCommDCB BuildCommDCBA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
BuildCommDCBAndTimeoutsA( BuildCommDCBAndTimeoutsA(
__in LPCSTR lpDef, _In_ LPCSTR lpDef,
__out LPDCB lpDCB, _Out_ LPDCB lpDCB,
__out LPCOMMTIMEOUTS lpCommTimeouts _Out_ LPCOMMTIMEOUTS lpCommTimeouts
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
BuildCommDCBAndTimeoutsW( BuildCommDCBAndTimeoutsW(
__in LPCWSTR lpDef, _In_ LPCWSTR lpDef,
__out LPDCB lpDCB, _Out_ LPDCB lpDCB,
__out LPCOMMTIMEOUTS lpCommTimeouts _Out_ LPCOMMTIMEOUTS lpCommTimeouts
); );
#ifdef UNICODE #ifdef UNICODE
#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsW #define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsW
#else #else
#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsA #define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CommConfigDialogA( CommConfigDialogA(
__in LPCSTR lpszName, _In_ LPCSTR lpszName,
__in_opt HWND hWnd, _In_opt_ HWND hWnd,
__inout LPCOMMCONFIG lpCC _Inout_ LPCOMMCONFIG lpCC
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CommConfigDialogW( CommConfigDialogW(
__in LPCWSTR lpszName, _In_ LPCWSTR lpszName,
__in_opt HWND hWnd, _In_opt_ HWND hWnd,
__inout LPCOMMCONFIG lpCC _Inout_ LPCOMMCONFIG lpCC
); );
#ifdef UNICODE #ifdef UNICODE
#define CommConfigDialog CommConfigDialogW #define CommConfigDialog CommConfigDialogW
#else #else
#define CommConfigDialog CommConfigDialogA #define CommConfigDialog CommConfigDialogA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetDefaultCommConfigA( GetDefaultCommConfigA(
__in LPCSTR lpszName, _In_ LPCSTR lpszName,
__out_bcount_part(*lpdwSize, *lpdwSize) LPCOMMCONFIG lpCC, _Out_writes_bytes_to_(*lpdwSize, *lpdwSize) LPCOMMCONFIG lpCC,
__inout LPDWORD lpdwSize _Inout_ LPDWORD lpdwSize
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetDefaultCommConfigW( GetDefaultCommConfigW(
__in LPCWSTR lpszName, _In_ LPCWSTR lpszName,
__out_bcount_part(*lpdwSize, *lpdwSize) LPCOMMCONFIG lpCC, _Out_writes_bytes_to_(*lpdwSize, *lpdwSize) LPCOMMCONFIG lpCC,
__inout LPDWORD lpdwSize _Inout_ LPDWORD lpdwSize
); );
#ifdef UNICODE #ifdef UNICODE
#define GetDefaultCommConfig GetDefaultCommConfigW #define GetDefaultCommConfig GetDefaultCommConfigW
#else #else
#define GetDefaultCommConfig GetDefaultCommConfigA #define GetDefaultCommConfig GetDefaultCommConfigA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetDefaultCommConfigA( SetDefaultCommConfigA(
__in LPCSTR lpszName, _In_ LPCSTR lpszName,
__in_bcount(dwSize) LPCOMMCONFIG lpCC, _In_reads_bytes_(dwSize) LPCOMMCONFIG lpCC,
__in DWORD dwSize _In_ DWORD dwSize
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetDefaultCommConfigW( SetDefaultCommConfigW(
__in LPCWSTR lpszName, _In_ LPCWSTR lpszName,
__in_bcount(dwSize) LPCOMMCONFIG lpCC, _In_reads_bytes_(dwSize) LPCOMMCONFIG lpCC,
__in DWORD dwSize _In_ DWORD dwSize
); );
#ifdef UNICODE #ifdef UNICODE
#define SetDefaultCommConfig SetDefaultCommConfigW #define SetDefaultCommConfig SetDefaultCommConfigW
#else #else
#define SetDefaultCommConfig SetDefaultCommConfigA #define SetDefaultCommConfig SetDefaultCommConfigA
#endif // !UNICODE #endif // !UNICODE
#ifndef _MAC #ifndef _MAC
#define MAX_COMPUTERNAME_LENGTH 15 #define MAX_COMPUTERNAME_LENGTH 15
#else #else
#define MAX_COMPUTERNAME_LENGTH 31 #define MAX_COMPUTERNAME_LENGTH 31
#endif #endif
WINBASEAPI WINBASEAPI
__success(return != 0) _Success_(return != 0)
BOOL BOOL
WINAPI WINAPI
GetComputerNameA ( GetComputerNameA (
__out_ecount_part_opt(*nSize, *nSize + 1) LPSTR lpBuffer, _Out_writes_to_opt_(*nSize, *nSize + 1) LPSTR lpBuffer,
__inout LPDWORD nSize _Inout_ LPDWORD nSize
); );
WINBASEAPI WINBASEAPI
__success(return != 0) _Success_(return != 0)
BOOL BOOL
WINAPI WINAPI
GetComputerNameW ( GetComputerNameW (
__out_ecount_part_opt(*nSize, *nSize + 1) LPWSTR lpBuffer, _Out_writes_to_opt_(*nSize, *nSize + 1) LPWSTR lpBuffer,
__inout LPDWORD nSize _Inout_ LPDWORD nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define GetComputerName GetComputerNameW #define GetComputerName GetComputerNameW
#else #else
#define GetComputerName GetComputerNameA #define GetComputerName GetComputerNameA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetComputerNameA ( SetComputerNameA (
__in LPCSTR lpComputerName _In_ LPCSTR lpComputerName
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetComputerNameW ( SetComputerNameW (
__in LPCWSTR lpComputerName _In_ LPCWSTR lpComputerName
); );
#ifdef UNICODE #ifdef UNICODE
#define SetComputerName SetComputerNameW #define SetComputerName SetComputerNameW
#else #else
#define SetComputerName SetComputerNameA #define SetComputerName SetComputerNameA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
typedef enum _COMPUTER_NAME_FORMAT {
ComputerNameNetBIOS,
ComputerNameDnsHostname,
ComputerNameDnsDomain,
ComputerNameDnsFullyQualified,
ComputerNamePhysicalNetBIOS,
ComputerNamePhysicalDnsHostname,
ComputerNamePhysicalDnsDomain,
ComputerNamePhysicalDnsFullyQualified,
ComputerNameMax
} COMPUTER_NAME_FORMAT ;
WINBASEAPI
__success(return != 0)
BOOL
WINAPI
GetComputerNameExA (
__in COMPUTER_NAME_FORMAT NameType,
__out_ecount_part_opt(*nSize, *nSize + 1) LPSTR lpBuffer,
__inout LPDWORD nSize
);
WINBASEAPI
__success(return != 0)
BOOL
WINAPI
GetComputerNameExW (
__in COMPUTER_NAME_FORMAT NameType,
__out_ecount_part_opt(*nSize, *nSize + 1) LPWSTR lpBuffer,
__inout LPDWORD nSize
);
#ifdef UNICODE
#define GetComputerNameEx GetComputerNameExW
#else
#define GetComputerNameEx GetComputerNameExA
#endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetComputerNameExA ( SetComputerNameExA (
__in COMPUTER_NAME_FORMAT NameType, _In_ COMPUTER_NAME_FORMAT NameType,
__in LPCSTR lpBuffer _In_ LPCSTR lpBuffer
);
WINBASEAPI
BOOL
WINAPI
SetComputerNameExW (
__in COMPUTER_NAME_FORMAT NameType,
__in LPCWSTR lpBuffer
); );
#ifdef UNICODE #ifndef UNICODE
#define SetComputerNameEx SetComputerNameExW #define SetComputerNameEx SetComputerNameExA
#else #endif
#define SetComputerNameEx SetComputerNameExA
#endif // !UNICODE
WINBASEAPI WINBASEAPI
__success(return == TRUE) _Success_(return != FALSE)
BOOL BOOL
WINAPI WINAPI
DnsHostnameToComputerNameA ( DnsHostnameToComputerNameA (
__in LPCSTR Hostname, _In_ LPCSTR Hostname,
__out_ecount_part_opt(*nSize, *nSize + 1) LPSTR ComputerName, _Out_writes_to_opt_(*nSize, *nSize + 1) LPSTR ComputerName,
__inout LPDWORD nSize _Inout_ LPDWORD nSize
); );
WINBASEAPI WINBASEAPI
__success(return == TRUE) _Success_(return != FALSE)
BOOL BOOL
WINAPI WINAPI
DnsHostnameToComputerNameW ( DnsHostnameToComputerNameW (
__in LPCWSTR Hostname, _In_ LPCWSTR Hostname,
__out_ecount_part_opt(*nSize, *nSize + 1) LPWSTR ComputerName, _Out_writes_to_opt_(*nSize, *nSize + 1) LPWSTR ComputerName,
__inout LPDWORD nSize _Inout_ LPDWORD nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define DnsHostnameToComputerName DnsHostnameToComputerNameW #define DnsHostnameToComputerName DnsHostnameToComputerNameW
#else #else
#define DnsHostnameToComputerName DnsHostnameToComputerNameA #define DnsHostnameToComputerName DnsHostnameToComputerNameA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT #endif // _WIN32_WINNT
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
GetUserNameA ( GetUserNameA (
__out_ecount_part_opt(*pcbBuffer, *pcbBuffer) LPSTR lpBuffer, _Out_writes_to_opt_(*pcbBuffer, *pcbBuffer) LPSTR lpBuffer,
__inout LPDWORD pcbBuffer _Inout_ LPDWORD pcbBuffer
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
GetUserNameW ( GetUserNameW (
__out_ecount_part_opt(*pcbBuffer, *pcbBuffer) LPWSTR lpBuffer, _Out_writes_to_opt_(*pcbBuffer, *pcbBuffer) LPWSTR lpBuffer,
__inout LPDWORD pcbBuffer _Inout_ LPDWORD pcbBuffer
); );
#ifdef UNICODE #ifdef UNICODE
#define GetUserName GetUserNameW #define GetUserName GetUserNameW
#else #else
#define GetUserName GetUserNameA #define GetUserName GetUserNameA
#endif // !UNICODE #endif // !UNICODE
// //
// Logon Support APIs // Logon Support APIs
// //
skipping to change at line 12598 skipping to change at line 6878
#define LOGON32_PROVIDER_WINNT50 3 #define LOGON32_PROVIDER_WINNT50 3
#endif // (_WIN32_WINNT >= 0x0500) #endif // (_WIN32_WINNT >= 0x0500)
#if(_WIN32_WINNT >= 0x0600) #if(_WIN32_WINNT >= 0x0600)
#define LOGON32_PROVIDER_VIRTUAL 4 #define LOGON32_PROVIDER_VIRTUAL 4
#endif // (_WIN32_WINNT >= 0x0600) #endif // (_WIN32_WINNT >= 0x0600)
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
LogonUserA ( LogonUserA (
__in LPCSTR lpszUsername, _In_ LPCSTR lpszUsername,
__in_opt LPCSTR lpszDomain, _In_opt_ LPCSTR lpszDomain,
__in LPCSTR lpszPassword, _In_opt_ LPCSTR lpszPassword,
__in DWORD dwLogonType, _In_ DWORD dwLogonType,
__in DWORD dwLogonProvider, _In_ DWORD dwLogonProvider,
__deref_out PHANDLE phToken _Outptr_ PHANDLE phToken
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
LogonUserW ( LogonUserW (
__in LPCWSTR lpszUsername, _In_ LPCWSTR lpszUsername,
__in_opt LPCWSTR lpszDomain, _In_opt_ LPCWSTR lpszDomain,
__in LPCWSTR lpszPassword, _In_opt_ LPCWSTR lpszPassword,
__in DWORD dwLogonType, _In_ DWORD dwLogonType,
__in DWORD dwLogonProvider, _In_ DWORD dwLogonProvider,
__deref_out PHANDLE phToken _Outptr_ PHANDLE phToken
); );
#ifdef UNICODE #ifdef UNICODE
#define LogonUser LogonUserW #define LogonUser LogonUserW
#else #else
#define LogonUser LogonUserA #define LogonUser LogonUserA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
LogonUserExA ( LogonUserExA (
__in LPCSTR lpszUsername, _In_ LPCSTR lpszUsername,
__in_opt LPCSTR lpszDomain, _In_opt_ LPCSTR lpszDomain,
__in LPCSTR lpszPassword, _In_opt_ LPCSTR lpszPassword,
__in DWORD dwLogonType, _In_ DWORD dwLogonType,
__in DWORD dwLogonProvider, _In_ DWORD dwLogonProvider,
__deref_opt_out PHANDLE phToken, _Outptr_opt_ PHANDLE phToken,
__deref_opt_out PSID *ppLogonSid, _Outptr_opt_ PSID *ppLogonSid,
__deref_opt_out_bcount_full(*pdwProfileLength) PVOID *ppProfileBuffer, _Outptr_opt_result_bytebuffer_all_(*pdwProfileLength) PVOID *ppProfileBuffer
__out_opt LPDWORD pdwProfileLength, ,
__out_opt PQUOTA_LIMITS pQuotaLimits _Out_opt_ LPDWORD pdwProfileLength,
_Out_opt_ PQUOTA_LIMITS pQuotaLimits
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
LogonUserExW ( LogonUserExW (
__in LPCWSTR lpszUsername, _In_ LPCWSTR lpszUsername,
__in_opt LPCWSTR lpszDomain, _In_opt_ LPCWSTR lpszDomain,
__in LPCWSTR lpszPassword, _In_opt_ LPCWSTR lpszPassword,
__in DWORD dwLogonType, _In_ DWORD dwLogonType,
__in DWORD dwLogonProvider, _In_ DWORD dwLogonProvider,
__deref_opt_out PHANDLE phToken, _Outptr_opt_ PHANDLE phToken,
__deref_opt_out PSID *ppLogonSid, _Outptr_opt_ PSID *ppLogonSid,
__deref_opt_out_bcount_full(*pdwProfileLength) PVOID *ppProfileBuffer, _Outptr_opt_result_bytebuffer_all_(*pdwProfileLength) PVOID *ppProfileBuffer
__out_opt LPDWORD pdwProfileLength, ,
__out_opt PQUOTA_LIMITS pQuotaLimits _Out_opt_ LPDWORD pdwProfileLength,
_Out_opt_ PQUOTA_LIMITS pQuotaLimits
); );
#ifdef UNICODE #ifdef UNICODE
#define LogonUserEx LogonUserExW #define LogonUserEx LogonUserExW
#else #else
#define LogonUserEx LogonUserExA #define LogonUserEx LogonUserExA
#endif // !UNICODE #endif // !UNICODE
#if(_WIN32_WINNT >= 0x0600) #if(_WIN32_WINNT >= 0x0600)
#endif // (_WIN32_WINNT >= 0x0600) #endif // (_WIN32_WINNT >= 0x0600)
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
ImpersonateLoggedOnUser(
__in HANDLE hToken
);
WINADVAPI
BOOL
WINAPI
CreateProcessAsUserA ( CreateProcessAsUserA (
__in_opt HANDLE hToken, _In_opt_ HANDLE hToken,
__in_opt LPCSTR lpApplicationName, _In_opt_ LPCSTR lpApplicationName,
__inout_opt LPSTR lpCommandLine, _Inout_opt_ LPSTR lpCommandLine,
__in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpProcessAttributes,
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in BOOL bInheritHandles, _In_ BOOL bInheritHandles,
__in DWORD dwCreationFlags, _In_ DWORD dwCreationFlags,
__in_opt LPVOID lpEnvironment, _In_opt_ LPVOID lpEnvironment,
__in_opt LPCSTR lpCurrentDirectory, _In_opt_ LPCSTR lpCurrentDirectory,
__in LPSTARTUPINFOA lpStartupInfo, _In_ LPSTARTUPINFOA lpStartupInfo,
__out LPPROCESS_INFORMATION lpProcessInformation _Out_ LPPROCESS_INFORMATION lpProcessInformation
);
WINADVAPI
BOOL
WINAPI
CreateProcessAsUserW (
__in_opt HANDLE hToken,
__in_opt LPCWSTR lpApplicationName,
__inout_opt LPWSTR lpCommandLine,
__in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes,
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in BOOL bInheritHandles,
__in DWORD dwCreationFlags,
__in_opt LPVOID lpEnvironment,
__in_opt LPCWSTR lpCurrentDirectory,
__in LPSTARTUPINFOW lpStartupInfo,
__out LPPROCESS_INFORMATION lpProcessInformation
); );
#ifdef UNICODE #ifndef UNICODE
#define CreateProcessAsUser CreateProcessAsUserW
#else
#define CreateProcessAsUser CreateProcessAsUserA #define CreateProcessAsUser CreateProcessAsUserA
#endif // !UNICODE #endif
#if(_WIN32_WINNT >= 0x0500) #if(_WIN32_WINNT >= 0x0500)
// //
// LogonFlags // LogonFlags
// //
#define LOGON_WITH_PROFILE 0x00000001 #define LOGON_WITH_PROFILE 0x00000001
#define LOGON_NETCREDENTIALS_ONLY 0x00000002 #define LOGON_NETCREDENTIALS_ONLY 0x00000002
#define LOGON_ZERO_PASSWORD_BUFFER 0x80000000 #define LOGON_ZERO_PASSWORD_BUFFER 0x80000000
WINADVAPI WINADVAPI
__checkReturn BOOL _Must_inspect_result_ BOOL
WINAPI WINAPI
CreateProcessWithLogonW( CreateProcessWithLogonW(
__in LPCWSTR lpUsername, _In_ LPCWSTR lpUsername,
__in_opt LPCWSTR lpDomain, _In_opt_ LPCWSTR lpDomain,
__in LPCWSTR lpPassword, _In_ LPCWSTR lpPassword,
__in DWORD dwLogonFlags, _In_ DWORD dwLogonFlags,
__in_opt LPCWSTR lpApplicationName, _In_opt_ LPCWSTR lpApplicationName,
__inout_opt LPWSTR lpCommandLine, _Inout_opt_ LPWSTR lpCommandLine,
__in DWORD dwCreationFlags, _In_ DWORD dwCreationFlags,
__in_opt LPVOID lpEnvironment, _In_opt_ LPVOID lpEnvironment,
__in_opt LPCWSTR lpCurrentDirectory, _In_opt_ LPCWSTR lpCurrentDirectory,
__in LPSTARTUPINFOW lpStartupInfo, _In_ LPSTARTUPINFOW lpStartupInfo,
__out LPPROCESS_INFORMATION lpProcessInformation _Out_ LPPROCESS_INFORMATION lpProcessInformation
); );
WINADVAPI WINADVAPI
__checkReturn BOOL _Must_inspect_result_ BOOL
WINAPI WINAPI
CreateProcessWithTokenW( CreateProcessWithTokenW(
__in HANDLE hToken, _In_ HANDLE hToken,
__in DWORD dwLogonFlags, _In_ DWORD dwLogonFlags,
__in_opt LPCWSTR lpApplicationName, _In_opt_ LPCWSTR lpApplicationName,
__inout_opt LPWSTR lpCommandLine, _Inout_opt_ LPWSTR lpCommandLine,
__in DWORD dwCreationFlags, _In_ DWORD dwCreationFlags,
__in_opt LPVOID lpEnvironment, _In_opt_ LPVOID lpEnvironment,
__in_opt LPCWSTR lpCurrentDirectory, _In_opt_ LPCWSTR lpCurrentDirectory,
__in LPSTARTUPINFOW lpStartupInfo, _In_ LPSTARTUPINFOW lpStartupInfo,
__out LPPROCESS_INFORMATION lpProcessInformation _Out_ LPPROCESS_INFORMATION lpProcessInformation
); );
#endif // (_WIN32_WINNT >= 0x0500) #endif // (_WIN32_WINNT >= 0x0500)
WINADVAPI WINADVAPI
BOOL BOOL
APIENTRY
ImpersonateAnonymousToken(
__in HANDLE ThreadHandle
);
WINADVAPI
BOOL
WINAPI
DuplicateTokenEx(
__in HANDLE hExistingToken,
__in DWORD dwDesiredAccess,
__in_opt LPSECURITY_ATTRIBUTES lpTokenAttributes,
__in SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
__in TOKEN_TYPE TokenType,
__deref_out PHANDLE phNewToken);
WINADVAPI
BOOL
APIENTRY
CreateRestrictedToken(
__in HANDLE ExistingTokenHandle,
__in DWORD Flags,
__in DWORD DisableSidCount,
__in_ecount_opt(DisableSidCount) PSID_AND_ATTRIBUTES SidsToDisable,
__in DWORD DeletePrivilegeCount,
__in_ecount_opt(DeletePrivilegeCount) PLUID_AND_ATTRIBUTES PrivilegesToDelet
e,
__in DWORD RestrictedSidCount,
__in_ecount_opt(RestrictedSidCount) PSID_AND_ATTRIBUTES SidsToRestrict,
__deref_out PHANDLE NewTokenHandle
);
WINADVAPI
BOOL
WINAPI
IsTokenRestricted(
__in HANDLE TokenHandle
);
WINADVAPI
BOOL
WINAPI WINAPI
IsTokenUntrusted( IsTokenUntrusted(
__in HANDLE TokenHandle _In_ HANDLE TokenHandle
);
WINADVAPI
BOOL
APIENTRY
CheckTokenMembership(
__in_opt HANDLE TokenHandle,
__in PSID SidToCheck,
__out PBOOL IsMember
); );
// //
// Thread pool API's // Thread pool API's
// //
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK ;
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
RegisterWaitForSingleObject( RegisterWaitForSingleObject(
__deref_out PHANDLE phNewWaitObject, _Outptr_ PHANDLE phNewWaitObject,
__in HANDLE hObject, _In_ HANDLE hObject,
__in WAITORTIMERCALLBACK Callback, _In_ WAITORTIMERCALLBACK Callback,
__in_opt PVOID Context, _In_opt_ PVOID Context,
__in ULONG dwMilliseconds, _In_ ULONG dwMilliseconds,
__in ULONG dwFlags _In_ ULONG dwFlags
);
WINBASEAPI
HANDLE
WINAPI
RegisterWaitForSingleObjectEx(
__in HANDLE hObject,
__in WAITORTIMERCALLBACK Callback,
__in_opt PVOID Context,
__in ULONG dwMilliseconds,
__in ULONG dwFlags
); );
WINBASEAPI WINBASEAPI
__checkReturn _Must_inspect_result_
BOOL BOOL
WINAPI WINAPI
UnregisterWait( UnregisterWait(
__in HANDLE WaitHandle _In_ HANDLE WaitHandle
);
WINBASEAPI
__checkReturn
BOOL
WINAPI
UnregisterWaitEx(
__in HANDLE WaitHandle,
__in_opt HANDLE CompletionEvent
);
WINBASEAPI
BOOL
WINAPI
QueueUserWorkItem(
__in LPTHREAD_START_ROUTINE Function,
__in_opt PVOID Context,
__in ULONG Flags
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
BindIoCompletionCallback ( BindIoCompletionCallback (
__in HANDLE FileHandle, _In_ HANDLE FileHandle,
__in LPOVERLAPPED_COMPLETION_ROUTINE Function, _In_ LPOVERLAPPED_COMPLETION_ROUTINE Function,
__in ULONG Flags _In_ ULONG Flags
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateTimerQueue(
VOID
);
WINBASEAPI
BOOL
WINAPI
CreateTimerQueueTimer(
__deref_out PHANDLE phNewTimer,
__in_opt HANDLE TimerQueue,
__in WAITORTIMERCALLBACK Callback,
__in_opt PVOID Parameter,
__in DWORD DueTime,
__in DWORD Period,
__in ULONG Flags
) ;
WINBASEAPI
__checkReturn
BOOL
WINAPI
ChangeTimerQueueTimer(
__in_opt HANDLE TimerQueue,
__inout HANDLE Timer,
__in ULONG DueTime,
__in ULONG Period
);
WINBASEAPI
__checkReturn
BOOL
WINAPI
DeleteTimerQueueTimer(
__in_opt HANDLE TimerQueue,
__in HANDLE Timer,
__in_opt HANDLE CompletionEvent
);
WINBASEAPI
__checkReturn
BOOL
WINAPI
DeleteTimerQueueEx(
__in HANDLE TimerQueue,
__in_opt HANDLE CompletionEvent
); );
WINBASEAPI WINBASEAPI
HANDLE HANDLE
WINAPI WINAPI
SetTimerQueueTimer( SetTimerQueueTimer(
__in_opt HANDLE TimerQueue, _In_opt_ HANDLE TimerQueue,
__in WAITORTIMERCALLBACK Callback, _In_ WAITORTIMERCALLBACK Callback,
__in_opt PVOID Parameter, _In_opt_ PVOID Parameter,
__in DWORD DueTime, _In_ DWORD DueTime,
__in DWORD Period, _In_ DWORD Period,
__in BOOL PreferIo _In_ BOOL PreferIo
); );
WINBASEAPI WINBASEAPI
__checkReturn _Must_inspect_result_
BOOL BOOL
WINAPI WINAPI
CancelTimerQueueTimer( CancelTimerQueueTimer(
__in_opt HANDLE TimerQueue, _In_opt_ HANDLE TimerQueue,
__in HANDLE Timer _In_ HANDLE Timer
); );
WINBASEAPI WINBASEAPI
__checkReturn _Must_inspect_result_
BOOL BOOL
WINAPI WINAPI
DeleteTimerQueue( DeleteTimerQueue(
__in HANDLE TimerQueue _In_ HANDLE TimerQueue
); );
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
typedef VOID (WINAPI *PTP_WIN32_IO_CALLBACK)(
__inout PTP_CALLBACK_INSTANCE Instance,
__inout_opt PVOID Context,
__inout_opt PVOID Overlapped,
__in ULONG IoResult,
__in ULONG_PTR NumberOfBytesTransferred,
__inout PTP_IO Io
);
WINBASEAPI
__checkReturn
__out
PTP_POOL
WINAPI
CreateThreadpool(
__reserved PVOID reserved
);
WINBASEAPI
VOID
WINAPI
SetThreadpoolThreadMaximum(
__inout PTP_POOL ptpp,
__in DWORD cthrdMost
);
WINBASEAPI
BOOL
WINAPI
SetThreadpoolThreadMinimum(
__inout PTP_POOL ptpp,
__in DWORD cthrdMic
);
WINBASEAPI
BOOL
WINAPI
SetThreadpoolStackInformation(
__inout PTP_POOL ptpp,
__in PTP_POOL_STACK_INFORMATION ptpsi
);
WINBASEAPI
BOOL
WINAPI
QueryThreadpoolStackInformation(
__in PTP_POOL ptpp,
__out PTP_POOL_STACK_INFORMATION ptpsi
);
WINBASEAPI
VOID
WINAPI
CloseThreadpool(
__inout PTP_POOL ptpp
);
WINBASEAPI
__checkReturn
__out
PTP_CLEANUP_GROUP
WINAPI
CreateThreadpoolCleanupGroup(
VOID
);
WINBASEAPI
VOID
WINAPI
CloseThreadpoolCleanupGroupMembers(
__inout PTP_CLEANUP_GROUP ptpcg,
__in BOOL fCancelPendingCallbacks,
__inout_opt PVOID pvCleanupContext
);
WINBASEAPI
VOID
WINAPI
CloseThreadpoolCleanupGroup(
__inout PTP_CLEANUP_GROUP ptpcg
);
#if !defined(MIDL_PASS) #if !defined(MIDL_PASS)
FORCEINLINE FORCEINLINE
VOID VOID
InitializeThreadpoolEnvironment( InitializeThreadpoolEnvironment(
__out PTP_CALLBACK_ENVIRON pcbe _Out_ PTP_CALLBACK_ENVIRON pcbe
) )
{ {
TpInitializeCallbackEnviron(pcbe); TpInitializeCallbackEnviron(pcbe);
} }
FORCEINLINE FORCEINLINE
VOID VOID
SetThreadpoolCallbackPool( SetThreadpoolCallbackPool(
__inout PTP_CALLBACK_ENVIRON pcbe, _Inout_ PTP_CALLBACK_ENVIRON pcbe,
__in PTP_POOL ptpp _In_ PTP_POOL ptpp
) )
{ {
TpSetCallbackThreadpool(pcbe, ptpp); TpSetCallbackThreadpool(pcbe, ptpp);
} }
FORCEINLINE FORCEINLINE
VOID VOID
SetThreadpoolCallbackCleanupGroup( SetThreadpoolCallbackCleanupGroup(
__inout PTP_CALLBACK_ENVIRON pcbe, _Inout_ PTP_CALLBACK_ENVIRON pcbe,
__in PTP_CLEANUP_GROUP ptpcg, _In_ PTP_CLEANUP_GROUP ptpcg,
__in_opt PTP_CLEANUP_GROUP_CANCEL_CALLBACK pfng _In_opt_ PTP_CLEANUP_GROUP_CANCEL_CALLBACK pfng
) )
{ {
TpSetCallbackCleanupGroup(pcbe, ptpcg, pfng); TpSetCallbackCleanupGroup(pcbe, ptpcg, pfng);
} }
FORCEINLINE FORCEINLINE
VOID VOID
SetThreadpoolCallbackRunsLong( SetThreadpoolCallbackRunsLong(
__inout PTP_CALLBACK_ENVIRON pcbe _Inout_ PTP_CALLBACK_ENVIRON pcbe
) )
{ {
TpSetCallbackLongFunction(pcbe); TpSetCallbackLongFunction(pcbe);
} }
FORCEINLINE FORCEINLINE
VOID VOID
SetThreadpoolCallbackLibrary( SetThreadpoolCallbackLibrary(
__inout PTP_CALLBACK_ENVIRON pcbe, _Inout_ PTP_CALLBACK_ENVIRON pcbe,
__in PVOID mod _In_ PVOID mod
) )
{ {
TpSetCallbackRaceWithDll(pcbe, mod); TpSetCallbackRaceWithDll(pcbe, mod);
} }
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7) #if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
FORCEINLINE FORCEINLINE
VOID VOID
SetThreadpoolCallbackPriority( SetThreadpoolCallbackPriority(
__inout PTP_CALLBACK_ENVIRON pcbe, _Inout_ PTP_CALLBACK_ENVIRON pcbe,
__in TP_CALLBACK_PRIORITY Priority _In_ TP_CALLBACK_PRIORITY Priority
) )
{ {
TpSetCallbackPriority(pcbe, Priority); TpSetCallbackPriority(pcbe, Priority);
} }
#endif #endif
FORCEINLINE FORCEINLINE
VOID VOID
SetThreadpoolCallbackPersistent( SetThreadpoolCallbackPersistent(
__inout PTP_CALLBACK_ENVIRON pcbe _Inout_ PTP_CALLBACK_ENVIRON pcbe
) )
{ {
TpSetCallbackPersistent(pcbe); TpSetCallbackPersistent(pcbe);
} }
FORCEINLINE FORCEINLINE
VOID VOID
DestroyThreadpoolEnvironment( DestroyThreadpoolEnvironment(
__inout PTP_CALLBACK_ENVIRON pcbe _Inout_ PTP_CALLBACK_ENVIRON pcbe
) )
{ {
TpDestroyCallbackEnviron(pcbe); TpDestroyCallbackEnviron(pcbe);
} }
#endif // !defined(MIDL_PASS) #endif // !defined(MIDL_PASS)
WINBASEAPI
VOID
WINAPI
SetEventWhenCallbackReturns(
__inout PTP_CALLBACK_INSTANCE pci,
__in HANDLE evt
);
WINBASEAPI
VOID
WINAPI
ReleaseSemaphoreWhenCallbackReturns(
__inout PTP_CALLBACK_INSTANCE pci,
__in HANDLE sem,
__in DWORD crel
);
WINBASEAPI
VOID
WINAPI
ReleaseMutexWhenCallbackReturns(
__inout PTP_CALLBACK_INSTANCE pci,
__in HANDLE mut
);
WINBASEAPI
VOID
WINAPI
LeaveCriticalSectionWhenCallbackReturns(
__inout PTP_CALLBACK_INSTANCE pci,
__inout PCRITICAL_SECTION pcs
);
WINBASEAPI
VOID
WINAPI
FreeLibraryWhenCallbackReturns(
__inout PTP_CALLBACK_INSTANCE pci,
__in HMODULE mod
);
WINBASEAPI
BOOL
WINAPI
CallbackMayRunLong(
__inout PTP_CALLBACK_INSTANCE pci
);
WINBASEAPI
VOID
WINAPI
DisassociateCurrentThreadFromCallback(
__inout PTP_CALLBACK_INSTANCE pci
);
WINBASEAPI
__checkReturn
BOOL
WINAPI
TrySubmitThreadpoolCallback(
__in PTP_SIMPLE_CALLBACK pfns,
__inout_opt PVOID pv,
__in_opt PTP_CALLBACK_ENVIRON pcbe
);
WINBASEAPI
__checkReturn
__out
PTP_WORK
WINAPI
CreateThreadpoolWork(
__in PTP_WORK_CALLBACK pfnwk,
__inout_opt PVOID pv,
__in_opt PTP_CALLBACK_ENVIRON pcbe
);
WINBASEAPI
VOID
WINAPI
SubmitThreadpoolWork(
__inout PTP_WORK pwk
);
WINBASEAPI
VOID
WINAPI
WaitForThreadpoolWorkCallbacks(
__inout PTP_WORK pwk,
__in BOOL fCancelPendingCallbacks
);
WINBASEAPI
VOID
WINAPI
CloseThreadpoolWork(
__inout PTP_WORK pwk
);
WINBASEAPI
__checkReturn
__out
PTP_TIMER
WINAPI
CreateThreadpoolTimer(
__in PTP_TIMER_CALLBACK pfnti,
__inout_opt PVOID pv,
__in_opt PTP_CALLBACK_ENVIRON pcbe
);
WINBASEAPI
VOID
WINAPI
SetThreadpoolTimer(
__inout PTP_TIMER pti,
__in_opt PFILETIME pftDueTime,
__in DWORD msPeriod,
__in_opt DWORD msWindowLength
);
WINBASEAPI
BOOL
WINAPI
IsThreadpoolTimerSet(
__inout PTP_TIMER pti
);
WINBASEAPI
VOID
WINAPI
WaitForThreadpoolTimerCallbacks(
__inout PTP_TIMER pti,
__in BOOL fCancelPendingCallbacks
);
WINBASEAPI
VOID
WINAPI
CloseThreadpoolTimer(
__inout PTP_TIMER pti
);
WINBASEAPI
__checkReturn
__out
PTP_WAIT
WINAPI
CreateThreadpoolWait(
__in PTP_WAIT_CALLBACK pfnwa,
__inout_opt PVOID pv,
__in_opt PTP_CALLBACK_ENVIRON pcbe
);
WINBASEAPI
VOID
WINAPI
SetThreadpoolWait(
__inout PTP_WAIT pwa,
__in_opt HANDLE h,
__in_opt PFILETIME pftTimeout
);
WINBASEAPI
VOID
WINAPI
WaitForThreadpoolWaitCallbacks(
__inout PTP_WAIT pwa,
__in BOOL fCancelPendingCallbacks
);
WINBASEAPI
VOID
WINAPI
CloseThreadpoolWait(
__inout PTP_WAIT pwa
);
WINBASEAPI
__checkReturn
__out
PTP_IO
WINAPI
CreateThreadpoolIo(
__in HANDLE fl,
__in PTP_WIN32_IO_CALLBACK pfnio,
__inout_opt PVOID pv,
__in_opt PTP_CALLBACK_ENVIRON pcbe
);
WINBASEAPI
VOID
WINAPI
StartThreadpoolIo(
__inout PTP_IO pio
);
WINBASEAPI
VOID
WINAPI
CancelThreadpoolIo(
__inout PTP_IO pio
);
WINBASEAPI
VOID
WINAPI
WaitForThreadpoolIoCallbacks(
__inout PTP_IO pio,
__in BOOL fCancelPendingCallbacks
);
WINBASEAPI
VOID
WINAPI
CloseThreadpoolIo(
__inout PTP_IO pio
);
// //
// Private Namespaces support // Private Namespaces support
// //
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
CreatePrivateNamespaceA( CreatePrivateNamespaceA(
__in_opt LPSECURITY_ATTRIBUTES lpPrivateNamespaceAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpPrivateNamespaceAttributes,
__in LPVOID lpBoundaryDescriptor, _In_ LPVOID lpBoundaryDescriptor,
__in LPCSTR lpAliasPrefix _In_ LPCSTR lpAliasPrefix
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
CreatePrivateNamespaceW(
__in_opt LPSECURITY_ATTRIBUTES lpPrivateNamespaceAttributes,
__in LPVOID lpBoundaryDescriptor,
__in LPCWSTR lpAliasPrefix
); );
#ifdef UNICODE
#define CreatePrivateNamespace CreatePrivateNamespaceW #ifndef UNICODE
#define CreatePrivateNamespace CreatePrivateNamespaceA
#else #else
#define CreatePrivateNamespace CreatePrivateNamespaceA #define CreatePrivateNamespace CreatePrivateNamespaceW
#endif // !UNICODE #endif
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
OpenPrivateNamespaceA( OpenPrivateNamespaceA(
__in LPVOID lpBoundaryDescriptor, _In_ LPVOID lpBoundaryDescriptor,
__in LPCSTR lpAliasPrefix _In_ LPCSTR lpAliasPrefix
);
WINBASEAPI
__out_opt
HANDLE
WINAPI
OpenPrivateNamespaceW(
__in LPVOID lpBoundaryDescriptor,
__in LPCWSTR lpAliasPrefix
); );
#ifdef UNICODE
#define OpenPrivateNamespace OpenPrivateNamespaceW
#else
#define OpenPrivateNamespace OpenPrivateNamespaceA
#endif // !UNICODE
#define PRIVATE_NAMESPACE_FLAG_DESTROY 0x00000001
WINBASEAPI #ifndef UNICODE
BOOLEAN #define OpenPrivateNamespace OpenPrivateNamespaceA
WINAPI #else
ClosePrivateNamespace( #define OpenPrivateNamespace OpenPrivateNamespaceW
__in HANDLE Handle, #endif
__in ULONG Flags
);
// //
// Boundary descriptors support // Boundary descriptors support
// //
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
APIENTRY APIENTRY
CreateBoundaryDescriptorA( CreateBoundaryDescriptorA(
__in LPCSTR Name, _In_ LPCSTR Name,
__in ULONG Flags _In_ ULONG Flags
);
WINBASEAPI
__out_opt
HANDLE
APIENTRY
CreateBoundaryDescriptorW(
__in LPCWSTR Name,
__in ULONG Flags
); );
#ifdef UNICODE
#define CreateBoundaryDescriptor CreateBoundaryDescriptorW
#else
#define CreateBoundaryDescriptor CreateBoundaryDescriptorA
#endif // !UNICODE
WINBASEAPI #ifndef UNICODE
BOOL #define CreateBoundaryDescriptor CreateBoundaryDescriptorA
WINAPI #else
AddSIDToBoundaryDescriptor( #define CreateBoundaryDescriptor CreateBoundaryDescriptorW
__inout HANDLE * BoundaryDescriptor, #endif
__in PSID RequiredSid
);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
AddIntegrityLabelToBoundaryDescriptor( AddIntegrityLabelToBoundaryDescriptor(
__inout HANDLE * BoundaryDescriptor, _Inout_ HANDLE * BoundaryDescriptor,
__in PSID IntegrityLabel _In_ PSID IntegrityLabel
);
WINBASEAPI
VOID
WINAPI
DeleteBoundaryDescriptor(
__in HANDLE BoundaryDescriptor
); );
#endif // _WIN32_WINNT >= 0x0600 #endif // _WIN32_WINNT >= 0x0600
#endif // _WIN32_WINNT >= 0x0500 #endif // _WIN32_WINNT >= 0x0500
#if(_WIN32_WINNT >= 0x0400) #if(_WIN32_WINNT >= 0x0400)
// //
// Plug-and-Play API's // Plug-and-Play API's
// //
skipping to change at line 13487 skipping to change at line 7265
typedef LPHW_PROFILE_INFOW LPHW_PROFILE_INFO; typedef LPHW_PROFILE_INFOW LPHW_PROFILE_INFO;
#else #else
typedef HW_PROFILE_INFOA HW_PROFILE_INFO; typedef HW_PROFILE_INFOA HW_PROFILE_INFO;
typedef LPHW_PROFILE_INFOA LPHW_PROFILE_INFO; typedef LPHW_PROFILE_INFOA LPHW_PROFILE_INFO;
#endif // UNICODE #endif // UNICODE
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
GetCurrentHwProfileA ( GetCurrentHwProfileA (
__out LPHW_PROFILE_INFOA lpHwProfileInfo _Out_ LPHW_PROFILE_INFOA lpHwProfileInfo
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
GetCurrentHwProfileW ( GetCurrentHwProfileW (
__out LPHW_PROFILE_INFOW lpHwProfileInfo _Out_ LPHW_PROFILE_INFOW lpHwProfileInfo
); );
#ifdef UNICODE #ifdef UNICODE
#define GetCurrentHwProfile GetCurrentHwProfileW #define GetCurrentHwProfile GetCurrentHwProfileW
#else #else
#define GetCurrentHwProfile GetCurrentHwProfileA #define GetCurrentHwProfile GetCurrentHwProfileA
#endif // !UNICODE #endif // !UNICODE
#endif /* _WIN32_WINNT >= 0x0400 */ #endif /* _WIN32_WINNT >= 0x0400 */
//
// Performance counter API's
//
WINBASEAPI
BOOL
WINAPI
QueryPerformanceCounter(
__out LARGE_INTEGER *lpPerformanceCount
);
WINBASEAPI
BOOL
WINAPI
QueryPerformanceFrequency(
__out LARGE_INTEGER *lpFrequency
);
WINBASEAPI
BOOL
WINAPI
GetVersionExA(
__inout LPOSVERSIONINFOA lpVersionInformation
);
WINBASEAPI
BOOL
WINAPI
GetVersionExW(
__inout LPOSVERSIONINFOW lpVersionInformation
);
#ifdef UNICODE
#define GetVersionEx GetVersionExW
#else
#define GetVersionEx GetVersionExA
#endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
VerifyVersionInfoA( VerifyVersionInfoA(
__inout LPOSVERSIONINFOEXA lpVersionInformation, _Inout_ LPOSVERSIONINFOEXA lpVersionInformation,
__in DWORD dwTypeMask, _In_ DWORD dwTypeMask,
__in DWORDLONG dwlConditionMask _In_ DWORDLONG dwlConditionMask
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
VerifyVersionInfoW( VerifyVersionInfoW(
__inout LPOSVERSIONINFOEXW lpVersionInformation, _Inout_ LPOSVERSIONINFOEXW lpVersionInformation,
__in DWORD dwTypeMask, _In_ DWORD dwTypeMask,
__in DWORDLONG dwlConditionMask _In_ DWORDLONG dwlConditionMask
); );
#ifdef UNICODE #ifdef UNICODE
#define VerifyVersionInfo VerifyVersionInfoW #define VerifyVersionInfo VerifyVersionInfoW
#else #else
#define VerifyVersionInfo VerifyVersionInfoA #define VerifyVersionInfo VerifyVersionInfoA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_WINNT >= 0x0600) #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
WINBASEAPI
BOOL
WINAPI
GetProductInfo(
__in DWORD dwOSMajorVersion,
__in DWORD dwOSMinorVersion,
__in DWORD dwSpMajorVersion,
__in DWORD dwSpMinorVersion,
__out PDWORD pdwReturnedProductType
);
#endif
// DOS and OS/2 Compatible Error Code definitions returned by the Win32 Base // DOS and OS/2 Compatible Error Code definitions returned by the Win32 Base
// API functions. // API functions.
// //
#include <winerror.h> #include <winerror.h>
#include <timezoneapi.h>
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
/* Abnormal termination codes */ /* Abnormal termination codes */
#define TC_NORMAL 0 #define TC_NORMAL 0
#define TC_HARDERR 1 #define TC_HARDERR 1
#define TC_GP_TRAP 2 #define TC_GP_TRAP 2
#define TC_SIGNAL 3 #define TC_SIGNAL 3
#if(WINVER >= 0x0400) #if(WINVER >= 0x0400)
// //
skipping to change at line 13622 skipping to change at line 7356
BYTE BatteryLifePercent; BYTE BatteryLifePercent;
BYTE Reserved1; BYTE Reserved1;
DWORD BatteryLifeTime; DWORD BatteryLifeTime;
DWORD BatteryFullLifeTime; DWORD BatteryFullLifeTime;
} SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS; } SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS;
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetSystemPowerStatus( GetSystemPowerStatus(
__out LPSYSTEM_POWER_STATUS lpSystemPowerStatus _Out_ LPSYSTEM_POWER_STATUS lpSystemPowerStatus
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetSystemPowerState( SetSystemPowerState(
__in BOOL fSuspend, _In_ BOOL fSuspend,
__in BOOL fForce _In_ BOOL fForce
); );
#endif /* WINVER >= 0x0400 */ #endif /* WINVER >= 0x0400 */
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
// //
// Very Large Memory API Subset // Very Large Memory API Subset
// //
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
AllocateUserPhysicalPages(
__in HANDLE hProcess,
__inout PULONG_PTR NumberOfPages,
__out_ecount_part(*NumberOfPages, *NumberOfPages) PULONG_PTR PageArray
);
#if _WIN32_WINNT >= 0x0600
WINBASEAPI
BOOL
WINAPI
AllocateUserPhysicalPagesNuma(
__in HANDLE hProcess,
__inout PULONG_PTR NumberOfPages,
__out_ecount_part(*NumberOfPages, *NumberOfPages) PULONG_PTR PageArray,
__in DWORD nndPreferred
);
#endif // _WIN32_WINNT >= 0x0600
WINBASEAPI
BOOL
WINAPI
FreeUserPhysicalPages(
__in HANDLE hProcess,
__inout PULONG_PTR NumberOfPages,
__in_ecount(*NumberOfPages) PULONG_PTR PageArray
);
WINBASEAPI
BOOL
WINAPI
MapUserPhysicalPages(
__in PVOID VirtualAddress,
__in ULONG_PTR NumberOfPages,
__in_ecount_opt(NumberOfPages) PULONG_PTR PageArray
);
WINBASEAPI
BOOL
WINAPI
MapUserPhysicalPagesScatter( MapUserPhysicalPagesScatter(
__in_ecount(NumberOfPages) PVOID *VirtualAddresses, _In_reads_(NumberOfPages) PVOID *VirtualAddresses,
__in ULONG_PTR NumberOfPages, _In_ ULONG_PTR NumberOfPages,
__in_ecount_opt(NumberOfPages) PULONG_PTR PageArray _In_reads_opt_(NumberOfPages) PULONG_PTR PageArray
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
CreateJobObjectA( CreateJobObjectA(
__in_opt LPSECURITY_ATTRIBUTES lpJobAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpJobAttributes,
__in_opt LPCSTR lpName _In_opt_ LPCSTR lpName
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
CreateJobObjectW( CreateJobObjectW(
__in_opt LPSECURITY_ATTRIBUTES lpJobAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpJobAttributes,
__in_opt LPCWSTR lpName _In_opt_ LPCWSTR lpName
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateJobObject CreateJobObjectW #define CreateJobObject CreateJobObjectW
#else #else
#define CreateJobObject CreateJobObjectA #define CreateJobObject CreateJobObjectA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
OpenJobObjectA( OpenJobObjectA(
__in DWORD dwDesiredAccess, _In_ DWORD dwDesiredAccess,
__in BOOL bInheritHandle, _In_ BOOL bInheritHandle,
__in LPCSTR lpName _In_ LPCSTR lpName
); );
WINBASEAPI WINBASEAPI
__out_opt _Ret_maybenull_
HANDLE HANDLE
WINAPI WINAPI
OpenJobObjectW( OpenJobObjectW(
__in DWORD dwDesiredAccess, _In_ DWORD dwDesiredAccess,
__in BOOL bInheritHandle, _In_ BOOL bInheritHandle,
__in LPCWSTR lpName _In_ LPCWSTR lpName
); );
#ifdef UNICODE #ifdef UNICODE
#define OpenJobObject OpenJobObjectW #define OpenJobObject OpenJobObjectW
#else #else
#define OpenJobObject OpenJobObjectA #define OpenJobObject OpenJobObjectA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
AssignProcessToJobObject( AssignProcessToJobObject(
__in HANDLE hJob, _In_ HANDLE hJob,
__in HANDLE hProcess _In_ HANDLE hProcess
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
TerminateJobObject( TerminateJobObject(
__in HANDLE hJob, _In_ HANDLE hJob,
__in UINT uExitCode _In_ UINT uExitCode
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
QueryInformationJobObject( QueryInformationJobObject(
__in_opt HANDLE hJob, _In_opt_ HANDLE hJob,
__in JOBOBJECTINFOCLASS JobObjectInformationClass, _In_ JOBOBJECTINFOCLASS JobObjectInformationClass,
__out_bcount_part(cbJobObjectInformationLength, *lpReturnLength) LPVOID lpJo _Out_writes_bytes_to_(cbJobObjectInformationLength, *lpReturnLength) LPVOID
bObjectInformation, lpJobObjectInformation,
__in DWORD cbJobObjectInformationLength, _In_ DWORD cbJobObjectInformationLength,
__out_opt LPDWORD lpReturnLength _Out_opt_ LPDWORD lpReturnLength
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetInformationJobObject( SetInformationJobObject(
__in HANDLE hJob, _In_ HANDLE hJob,
__in JOBOBJECTINFOCLASS JobObjectInformationClass, _In_ JOBOBJECTINFOCLASS JobObjectInformationClass,
__in_bcount(cbJobObjectInformationLength) LPVOID lpJobObjectInformation, _In_reads_bytes_(cbJobObjectInformationLength) LPVOID lpJobObjectInformation
__in DWORD cbJobObjectInformationLength ,
); _In_ DWORD cbJobObjectInformationLength
#if (_WIN32_WINNT >= 0x0501)
WINBASEAPI
BOOL
WINAPI
IsProcessInJob (
__in HANDLE ProcessHandle,
__in_opt HANDLE JobHandle,
__out PBOOL Result
); );
#endif
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateJobSet ( CreateJobSet (
__in ULONG NumJob, _In_ ULONG NumJob,
__in_ecount(NumJob) PJOB_SET_ARRAY UserJobSet, _In_reads_(NumJob) PJOB_SET_ARRAY UserJobSet,
__in ULONG Flags); _In_ ULONG Flags);
WINBASEAPI
__out_opt
PVOID
WINAPI
AddVectoredExceptionHandler (
__in ULONG First,
__in PVECTORED_EXCEPTION_HANDLER Handler
);
WINBASEAPI
ULONG
WINAPI
RemoveVectoredExceptionHandler (
__in PVOID Handle
);
WINBASEAPI
__out_opt
PVOID
WINAPI
AddVectoredContinueHandler (
__in ULONG First,
__in PVECTORED_EXCEPTION_HANDLER Handler
);
WINBASEAPI
ULONG
WINAPI
RemoveVectoredContinueHandler (
__in PVOID Handle
);
//
// New Volume Mount Point API.
//
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
FindFirstVolumeA( FindFirstVolumeA(
__out_ecount(cchBufferLength) LPSTR lpszVolumeName, _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
__in DWORD cchBufferLength _In_ DWORD cchBufferLength
);
WINBASEAPI
__out
HANDLE
WINAPI
FindFirstVolumeW(
__out_ecount(cchBufferLength) LPWSTR lpszVolumeName,
__in DWORD cchBufferLength
); );
#ifdef UNICODE #ifndef UNICODE
#define FindFirstVolume FindFirstVolumeW
#else
#define FindFirstVolume FindFirstVolumeA #define FindFirstVolume FindFirstVolumeA
#endif // !UNICODE #endif
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FindNextVolumeA( FindNextVolumeA(
__inout HANDLE hFindVolume, _Inout_ HANDLE hFindVolume,
__out_ecount(cchBufferLength) LPSTR lpszVolumeName, _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
__in DWORD cchBufferLength _In_ DWORD cchBufferLength
);
WINBASEAPI
BOOL
WINAPI
FindNextVolumeW(
__inout HANDLE hFindVolume,
__out_ecount(cchBufferLength) LPWSTR lpszVolumeName,
__in DWORD cchBufferLength
); );
#ifdef UNICODE #ifndef UNICODE
#define FindNextVolume FindNextVolumeW
#else
#define FindNextVolume FindNextVolumeA #define FindNextVolume FindNextVolumeA
#endif // !UNICODE #endif
WINBASEAPI
BOOL
WINAPI
FindVolumeClose(
__in HANDLE hFindVolume
);
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
FindFirstVolumeMountPointA( FindFirstVolumeMountPointA(
__in LPCSTR lpszRootPathName, _In_ LPCSTR lpszRootPathName,
__out_ecount(cchBufferLength) LPSTR lpszVolumeMountPoint, _Out_writes_(cchBufferLength) LPSTR lpszVolumeMountPoint,
__in DWORD cchBufferLength _In_ DWORD cchBufferLength
); );
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
FindFirstVolumeMountPointW( FindFirstVolumeMountPointW(
__in LPCWSTR lpszRootPathName, _In_ LPCWSTR lpszRootPathName,
__out_ecount(cchBufferLength) LPWSTR lpszVolumeMountPoint, _Out_writes_(cchBufferLength) LPWSTR lpszVolumeMountPoint,
__in DWORD cchBufferLength _In_ DWORD cchBufferLength
); );
#ifdef UNICODE #ifdef UNICODE
#define FindFirstVolumeMountPoint FindFirstVolumeMountPointW #define FindFirstVolumeMountPoint FindFirstVolumeMountPointW
#else #else
#define FindFirstVolumeMountPoint FindFirstVolumeMountPointA #define FindFirstVolumeMountPoint FindFirstVolumeMountPointA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FindNextVolumeMountPointA( FindNextVolumeMountPointA(
__in HANDLE hFindVolumeMountPoint, _In_ HANDLE hFindVolumeMountPoint,
__out_ecount(cchBufferLength) LPSTR lpszVolumeMountPoint, _Out_writes_(cchBufferLength) LPSTR lpszVolumeMountPoint,
__in DWORD cchBufferLength _In_ DWORD cchBufferLength
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FindNextVolumeMountPointW( FindNextVolumeMountPointW(
__in HANDLE hFindVolumeMountPoint, _In_ HANDLE hFindVolumeMountPoint,
__out_ecount(cchBufferLength) LPWSTR lpszVolumeMountPoint, _Out_writes_(cchBufferLength) LPWSTR lpszVolumeMountPoint,
__in DWORD cchBufferLength _In_ DWORD cchBufferLength
); );
#ifdef UNICODE #ifdef UNICODE
#define FindNextVolumeMountPoint FindNextVolumeMountPointW #define FindNextVolumeMountPoint FindNextVolumeMountPointW
#else #else
#define FindNextVolumeMountPoint FindNextVolumeMountPointA #define FindNextVolumeMountPoint FindNextVolumeMountPointA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FindVolumeMountPointClose( FindVolumeMountPointClose(
__in HANDLE hFindVolumeMountPoint _In_ HANDLE hFindVolumeMountPoint
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetVolumeMountPointA( SetVolumeMountPointA(
__in LPCSTR lpszVolumeMountPoint, _In_ LPCSTR lpszVolumeMountPoint,
__in LPCSTR lpszVolumeName _In_ LPCSTR lpszVolumeName
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetVolumeMountPointW( SetVolumeMountPointW(
__in LPCWSTR lpszVolumeMountPoint, _In_ LPCWSTR lpszVolumeMountPoint,
__in LPCWSTR lpszVolumeName _In_ LPCWSTR lpszVolumeName
); );
#ifdef UNICODE #ifdef UNICODE
#define SetVolumeMountPoint SetVolumeMountPointW #define SetVolumeMountPoint SetVolumeMountPointW
#else #else
#define SetVolumeMountPoint SetVolumeMountPointA #define SetVolumeMountPoint SetVolumeMountPointA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DeleteVolumeMountPointA( DeleteVolumeMountPointA(
__in LPCSTR lpszVolumeMountPoint _In_ LPCSTR lpszVolumeMountPoint
);
WINBASEAPI
BOOL
WINAPI
DeleteVolumeMountPointW(
__in LPCWSTR lpszVolumeMountPoint
); );
#ifdef UNICODE #ifndef UNICODE
#define DeleteVolumeMountPoint DeleteVolumeMountPointW
#else
#define DeleteVolumeMountPoint DeleteVolumeMountPointA #define DeleteVolumeMountPoint DeleteVolumeMountPointA
#endif // !UNICODE #endif
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetVolumeNameForVolumeMountPointA( GetVolumeNameForVolumeMountPointA(
__in LPCSTR lpszVolumeMountPoint, _In_ LPCSTR lpszVolumeMountPoint,
__out_ecount(cchBufferLength) LPSTR lpszVolumeName, _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
__in DWORD cchBufferLength _In_ DWORD cchBufferLength
);
WINBASEAPI
BOOL
WINAPI
GetVolumeNameForVolumeMountPointW(
__in LPCWSTR lpszVolumeMountPoint,
__out_ecount(cchBufferLength) LPWSTR lpszVolumeName,
__in DWORD cchBufferLength
); );
#ifdef UNICODE #ifndef UNICODE
#define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointW
#else
#define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointA #define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointA
#endif // !UNICODE #endif
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetVolumePathNameA( GetVolumePathNameA(
__in LPCSTR lpszFileName, _In_ LPCSTR lpszFileName,
__out_ecount(cchBufferLength) LPSTR lpszVolumePathName, _Out_writes_(cchBufferLength) LPSTR lpszVolumePathName,
__in DWORD cchBufferLength _In_ DWORD cchBufferLength
);
WINBASEAPI
BOOL
WINAPI
GetVolumePathNameW(
__in LPCWSTR lpszFileName,
__out_ecount(cchBufferLength) LPWSTR lpszVolumePathName,
__in DWORD cchBufferLength
); );
#ifdef UNICODE #ifndef UNICODE
#define GetVolumePathName GetVolumePathNameW
#else
#define GetVolumePathName GetVolumePathNameA #define GetVolumePathName GetVolumePathNameA
#endif // !UNICODE #endif
#endif #endif
#if(_WIN32_WINNT >= 0x0501) #if(_WIN32_WINNT >= 0x0501)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetVolumePathNamesForVolumeNameA( GetVolumePathNamesForVolumeNameA(
__in LPCSTR lpszVolumeName, _In_ LPCSTR lpszVolumeName,
__out_ecount_part_opt(cchBufferLength, *lpcchReturnLength) __nullnulltermina _Out_writes_to_opt_(cchBufferLength, *lpcchReturnLength) _Post_ _NullNull_te
ted LPCH lpszVolumePathNames, rminated_ LPCH lpszVolumePathNames,
__in DWORD cchBufferLength, _In_ DWORD cchBufferLength,
__out PDWORD lpcchReturnLength _Out_ PDWORD lpcchReturnLength
);
WINBASEAPI
BOOL
WINAPI
GetVolumePathNamesForVolumeNameW(
__in LPCWSTR lpszVolumeName,
__out_ecount_part_opt(cchBufferLength, *lpcchReturnLength) __nullnulltermina
ted LPWCH lpszVolumePathNames,
__in DWORD cchBufferLength,
__out PDWORD lpcchReturnLength
); );
#ifdef UNICODE
#define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameW #ifndef UNICODE
#else
#define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameA #define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameA
#endif // !UNICODE #endif
#endif // (_WIN32_WINNT >= 0x0501) #endif // (_WIN32_WINNT >= 0x0501)
#if (_WIN32_WINNT >= 0x0500) || (_WIN32_FUSION >= 0x0100) || ISOLATION_AWARE_ENA BLED #if (_WIN32_WINNT >= 0x0500) || (_WIN32_FUSION >= 0x0100) || ISOLATION_AWARE_ENA BLED
#define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID (0x00000001) #define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID (0x00000001)
#define ACTCTX_FLAG_LANGID_VALID (0x00000002) #define ACTCTX_FLAG_LANGID_VALID (0x00000002)
#define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID (0x00000004) #define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID (0x00000004)
#define ACTCTX_FLAG_RESOURCE_NAME_VALID (0x00000008) #define ACTCTX_FLAG_RESOURCE_NAME_VALID (0x00000008)
#define ACTCTX_FLAG_SET_PROCESS_DEFAULT (0x00000010) #define ACTCTX_FLAG_SET_PROCESS_DEFAULT (0x00000010)
skipping to change at line 14096 skipping to change at line 7672
typedef const ACTCTXA *PCACTCTXA; typedef const ACTCTXA *PCACTCTXA;
typedef const ACTCTXW *PCACTCTXW; typedef const ACTCTXW *PCACTCTXW;
#ifdef UNICODE #ifdef UNICODE
typedef PCACTCTXW PCACTCTX; typedef PCACTCTXW PCACTCTX;
#else #else
typedef PCACTCTXA PCACTCTX; typedef PCACTCTXA PCACTCTX;
#endif // UNICODE #endif // UNICODE
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
CreateActCtxA( CreateActCtxA(
__in PCACTCTXA pActCtx _In_ PCACTCTXA pActCtx
); );
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
CreateActCtxW( CreateActCtxW(
__in PCACTCTXW pActCtx _In_ PCACTCTXW pActCtx
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateActCtx CreateActCtxW #define CreateActCtx CreateActCtxW
#else #else
#define CreateActCtx CreateActCtxA #define CreateActCtx CreateActCtxA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
AddRefActCtx( AddRefActCtx(
__inout HANDLE hActCtx _Inout_ HANDLE hActCtx
); );
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
ReleaseActCtx( ReleaseActCtx(
__inout HANDLE hActCtx _Inout_ HANDLE hActCtx
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ZombifyActCtx( ZombifyActCtx(
__inout HANDLE hActCtx _Inout_ HANDLE hActCtx
); );
_Success_(return)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ActivateActCtx( ActivateActCtx(
__inout_opt HANDLE hActCtx, _Inout_opt_ HANDLE hActCtx,
__out ULONG_PTR *lpCookie _Out_ ULONG_PTR *lpCookie
); );
#define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION (0x00000001) #define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION (0x00000001)
_Success_(return)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DeactivateActCtx( DeactivateActCtx(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in ULONG_PTR ulCookie _In_ ULONG_PTR ulCookie
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetCurrentActCtx( GetCurrentActCtx(
__deref_out HANDLE *lphActCtx); _Outptr_ HANDLE *lphActCtx);
typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 { typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 {
ULONG cbSize; ULONG cbSize;
ULONG ulDataFormatVersion; ULONG ulDataFormatVersion;
PVOID lpData; PVOID lpData;
ULONG ulLength; ULONG ulLength;
PVOID lpSectionGlobalData; PVOID lpSectionGlobalData;
ULONG ulSectionGlobalDataLength; ULONG ulSectionGlobalDataLength;
PVOID lpSectionBase; PVOID lpSectionBase;
ULONG ulSectionTotalLength; ULONG ulSectionTotalLength;
skipping to change at line 14204 skipping to change at line 7780
// 2600 stops here // 2600 stops here
ULONG ulFlags; ULONG ulFlags;
ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata; ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata;
} ACTCTX_SECTION_KEYED_DATA, *PACTCTX_SECTION_KEYED_DATA; } ACTCTX_SECTION_KEYED_DATA, *PACTCTX_SECTION_KEYED_DATA;
typedef const ACTCTX_SECTION_KEYED_DATA * PCACTCTX_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_HACTCTX (0x00000001)
#define FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS (0x00000002) #define FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS (0x00000002)
#define FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA (0x00000004) #define FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA (0x00000004)
_Success_(return)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FindActCtxSectionStringA( FindActCtxSectionStringA(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__reserved const GUID *lpExtensionGuid, _Reserved_ const GUID *lpExtensionGuid,
__in ULONG ulSectionId, _In_ ULONG ulSectionId,
__in LPCSTR lpStringToFind, _In_ LPCSTR lpStringToFind,
__out PACTCTX_SECTION_KEYED_DATA ReturnedData _Out_ PACTCTX_SECTION_KEYED_DATA ReturnedData
); );
_Success_(return)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FindActCtxSectionStringW( FindActCtxSectionStringW(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__reserved const GUID *lpExtensionGuid, _Reserved_ const GUID *lpExtensionGuid,
__in ULONG ulSectionId, _In_ ULONG ulSectionId,
__in LPCWSTR lpStringToFind, _In_ LPCWSTR lpStringToFind,
__out PACTCTX_SECTION_KEYED_DATA ReturnedData _Out_ PACTCTX_SECTION_KEYED_DATA ReturnedData
); );
#ifdef UNICODE #ifdef UNICODE
#define FindActCtxSectionString FindActCtxSectionStringW #define FindActCtxSectionString FindActCtxSectionStringW
#else #else
#define FindActCtxSectionString FindActCtxSectionStringA #define FindActCtxSectionString FindActCtxSectionStringA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FindActCtxSectionGuid( FindActCtxSectionGuid(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__reserved const GUID *lpExtensionGuid, _Reserved_ const GUID *lpExtensionGuid,
__in ULONG ulSectionId, _In_ ULONG ulSectionId,
__in_opt const GUID *lpGuidToFind, _In_opt_ const GUID *lpGuidToFind,
__out PACTCTX_SECTION_KEYED_DATA ReturnedData _Out_ PACTCTX_SECTION_KEYED_DATA ReturnedData
); );
#if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */ #if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
#if !defined(ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED) #if !defined(ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED)
typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION { typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION {
HANDLE hActCtx; HANDLE hActCtx;
DWORD dwFlags; DWORD dwFlags;
} ACTIVATION_CONTEXT_BASIC_INFORMATION, *PACTIVATION_CONTEXT_BASIC_INFORMATION; } ACTIVATION_CONTEXT_BASIC_INFORMATION, *PACTIVATION_CONTEXT_BASIC_INFORMATION;
skipping to change at line 14289 skipping to change at line 7867
// pvSubInstance->ulAssemblyIndex < ACTIVATION_CONTEXT_DETAILED_INFORMATION ::ulAssemblyCount // pvSubInstance->ulAssemblyIndex < ACTIVATION_CONTEXT_DETAILED_INFORMATION ::ulAssemblyCount
// pvSubInstance->ulFileIndexInAssembly < ACTIVATION_CONTEXT_ASSEMBLY_DETAI LED_INFORMATION::ulFileCount // pvSubInstance->ulFileIndexInAssembly < ACTIVATION_CONTEXT_ASSEMBLY_DETAI LED_INFORMATION::ulFileCount
// pvBuffer is of type PASSEMBLY_FILE_DETAILED_INFORMATION // pvBuffer is of type PASSEMBLY_FILE_DETAILED_INFORMATION
// //
// case RunlevelInformationInActivationContext : // case RunlevelInformationInActivationContext :
// pvSubInstance == NULL // pvSubInstance == NULL
// pvBuffer is of type PACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION // pvBuffer is of type PACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION
// //
// String are placed after the structs. // String are placed after the structs.
// //
_Success_(return)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
QueryActCtxW( QueryActCtxW(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in HANDLE hActCtx, _In_ HANDLE hActCtx,
__in_opt PVOID pvSubInstance, _In_opt_ PVOID pvSubInstance,
__in ULONG ulInfoClass, _In_ ULONG ulInfoClass,
__out_bcount_part_opt(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer, _Out_writes_bytes_to_opt_(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
__in SIZE_T cbBuffer, _In_ SIZE_T cbBuffer,
__out_opt SIZE_T *pcbWrittenOrRequired _Out_opt_ SIZE_T *pcbWrittenOrRequired
); );
typedef BOOL (WINAPI * PQUERYACTCTXW_FUNC)( typedef _Success_(return) BOOL (WINAPI * PQUERYACTCTXW_FUNC)(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in HANDLE hActCtx, _In_ HANDLE hActCtx,
__in_opt PVOID pvSubInstance, _In_opt_ PVOID pvSubInstance,
__in ULONG ulInfoClass, _In_ ULONG ulInfoClass,
__out_bcount_part_opt(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer, _Out_writes_bytes_to_opt_(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
__in SIZE_T cbBuffer, _In_ SIZE_T cbBuffer,
__out_opt SIZE_T *pcbWrittenOrRequired _Out_opt_ SIZE_T *pcbWrittenOrRequired
); );
#endif // (_WIN32_WINNT > 0x0500) || (_WIN32_FUSION >= 0x0100) || ISOLATION_AWAR E_ENABLED #endif // (_WIN32_WINNT > 0x0500) || (_WIN32_FUSION >= 0x0100) || ISOLATION_AWAR E_ENABLED
WINBASEAPI
BOOL
WINAPI
ProcessIdToSessionId(
__in DWORD dwProcessId,
__out DWORD *pSessionId
);
#if _WIN32_WINNT >= 0x0501 #if _WIN32_WINNT >= 0x0501
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
WTSGetActiveConsoleSessionId( WTSGetActiveConsoleSessionId(
VOID VOID
); );
WINBASEAPI
BOOL
WINAPI
IsWow64Process(
__in HANDLE hProcess,
__out PBOOL Wow64Process
);
#endif // (_WIN32_WINNT >= 0x0501) #endif // (_WIN32_WINNT >= 0x0501)
WINBASEAPI
BOOL
WINAPI
GetLogicalProcessorInformation(
__out_bcount_part_opt(*ReturnedLength, *ReturnedLength) PSYSTEM_LOGICAL_PROC
ESSOR_INFORMATION Buffer,
__inout PDWORD ReturnedLength
);
#if _WIN32_WINNT >= 0x0601 #if _WIN32_WINNT >= 0x0601
WINBASEAPI WINBASEAPI
BOOL
WINAPI
GetLogicalProcessorInformationEx(
__in LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType,
__out_bcount_part_opt(*ReturnedLength, *ReturnedLength) PSYSTEM_LOGICAL_PROC
ESSOR_INFORMATION_EX Buffer,
__inout PDWORD ReturnedLength
);
WINBASEAPI
WORD WORD
WINAPI WINAPI
GetActiveProcessorGroupCount( GetActiveProcessorGroupCount(
VOID VOID
); );
WINBASEAPI WINBASEAPI
WORD WORD
WINAPI WINAPI
GetMaximumProcessorGroupCount( GetMaximumProcessorGroupCount(
VOID VOID
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetActiveProcessorCount( GetActiveProcessorCount(
__in WORD GroupNumber _In_ WORD GroupNumber
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetMaximumProcessorCount( GetMaximumProcessorCount(
__in WORD GroupNumber _In_ WORD GroupNumber
); );
#endif // (_WIN32_WINNT >=0x0601) #endif // (_WIN32_WINNT >=0x0601)
// //
// NUMA Information routines. // NUMA Information routines.
// //
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaHighestNodeNumber(
__out PULONG HighestNodeNumber
);
WINBASEAPI
BOOL
WINAPI
GetNumaProcessorNode( GetNumaProcessorNode(
__in UCHAR Processor, _In_ UCHAR Processor,
__out PUCHAR NodeNumber _Out_ PUCHAR NodeNumber
); );
#if _WIN32_WINNT >= 0x0601 #if _WIN32_WINNT >= 0x0601
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaNodeNumberFromHandle( GetNumaNodeNumberFromHandle(
__in HANDLE hFile, _In_ HANDLE hFile,
__out PUSHORT NodeNumber _Out_ PUSHORT NodeNumber
); );
#endif // (_WIN32_WINNT >=0x0601) #endif // (_WIN32_WINNT >=0x0601)
#if _WIN32_WINNT >= 0x0601 #if _WIN32_WINNT >= 0x0601
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaProcessorNodeEx( GetNumaProcessorNodeEx(
__in PPROCESSOR_NUMBER Processor, _In_ PPROCESSOR_NUMBER Processor,
__out PUSHORT NodeNumber _Out_ PUSHORT NodeNumber
); );
#endif // (_WIN32_WINNT >=0x0601) #endif // (_WIN32_WINNT >=0x0601)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaNodeProcessorMask( GetNumaNodeProcessorMask(
__in UCHAR Node, _In_ UCHAR Node,
__out PULONGLONG ProcessorMask _Out_ PULONGLONG ProcessorMask
);
#if _WIN32_WINNT >= 0x0601
WINBASEAPI
BOOL
WINAPI
GetNumaNodeProcessorMaskEx(
__in USHORT Node,
__out PGROUP_AFFINITY ProcessorMask
); );
#endif // (_WIN32_WINNT >=0x0601)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaAvailableMemoryNode( GetNumaAvailableMemoryNode(
__in UCHAR Node, _In_ UCHAR Node,
__out PULONGLONG AvailableBytes _Out_ PULONGLONG AvailableBytes
); );
#if _WIN32_WINNT >= 0x0601 #if _WIN32_WINNT >= 0x0601
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaAvailableMemoryNodeEx( GetNumaAvailableMemoryNodeEx(
__in USHORT Node, _In_ USHORT Node,
__out PULONGLONG AvailableBytes _Out_ PULONGLONG AvailableBytes
); );
#endif // (_WIN32_WINNT >=0x0601) #endif // (_WIN32_WINNT >=0x0601)
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaProximityNode( GetNumaProximityNode(
__in ULONG ProximityId, _In_ ULONG ProximityId,
__out PUCHAR NodeNumber _Out_ PUCHAR NodeNumber
); );
#endif #endif
#if _WIN32_WINNT >= 0x0601 #if _WIN32_WINNT >= 0x0601
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaProximityNodeEx( GetNumaProximityNodeEx(
__in ULONG ProximityId, _In_ ULONG ProximityId,
__out PUSHORT NodeNumber _Out_ PUSHORT NodeNumber
); );
#endif // (_WIN32_WINNT >=0x0601) #endif // (_WIN32_WINNT >=0x0601)
// //
// Application restart and data recovery callback // Application restart and data recovery callback
// //
typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID pvParameter); typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID pvParameter);
// //
skipping to change at line 14527 skipping to change at line 8054
// //
// Do not restart the process for termination due to patch installations // Do not restart the process for termination due to patch installations
// //
#define RESTART_NO_PATCH 4 #define RESTART_NO_PATCH 4
// //
// Do not restart the process when the system is rebooted due to patch installat ions // Do not restart the process when the system is rebooted due to patch installat ions
// //
#define RESTART_NO_REBOOT 8 #define RESTART_NO_REBOOT 8
#define RECOVERY_DEFAULT_PING_INTERVAL 5000
#define RECOVERY_MAX_PING_INTERVAL (5 * 60 * 1000)
#if (_WIN32_WINNT >= 0x0600)
WINBASEAPI WINBASEAPI
HRESULT HRESULT
WINAPI WINAPI
RegisterApplicationRecoveryCallback( RegisterApplicationRecoveryCallback(
__in APPLICATION_RECOVERY_CALLBACK pRecoveyCallback, _In_ APPLICATION_RECOVERY_CALLBACK pRecoveyCallback,
__in_opt PVOID pvParameter, _In_opt_ PVOID pvParameter,
__in DWORD dwPingInterval, _In_ DWORD dwPingInterval,
__in DWORD dwFlags _In_ DWORD dwFlags
); );
WINBASEAPI WINBASEAPI
HRESULT HRESULT
WINAPI WINAPI
UnregisterApplicationRecoveryCallback(void); UnregisterApplicationRecoveryCallback(void);
WINBASEAPI WINBASEAPI
HRESULT HRESULT
WINAPI WINAPI
RegisterApplicationRestart( RegisterApplicationRestart(
__in_opt PCWSTR pwzCommandline, _In_opt_ PCWSTR pwzCommandline,
__in DWORD dwFlags _In_ DWORD dwFlags
); );
WINBASEAPI WINBASEAPI
HRESULT HRESULT
WINAPI WINAPI
UnregisterApplicationRestart(void); UnregisterApplicationRestart(void);
#define RECOVERY_DEFAULT_PING_INTERVAL 5000
#define RECOVERY_MAX_PING_INTERVAL (5 * 60 * 1000)
WINBASEAPI WINBASEAPI
HRESULT HRESULT
WINAPI WINAPI
GetApplicationRecoveryCallback( GetApplicationRecoveryCallback(
__in HANDLE hProcess, _In_ HANDLE hProcess,
__out APPLICATION_RECOVERY_CALLBACK* pRecoveryCallback, _Out_ APPLICATION_RECOVERY_CALLBACK* pRecoveryCallback,
__deref_opt_out_opt PVOID* ppvParameter, _Outptr_opt_result_maybenull_ PVOID* ppvParameter,
__out_opt PDWORD pdwPingInterval, _Out_opt_ PDWORD pdwPingInterval,
__out_opt PDWORD pdwFlags _Out_opt_ PDWORD pdwFlags
); );
WINBASEAPI WINBASEAPI
HRESULT HRESULT
WINAPI WINAPI
GetApplicationRestartSettings( GetApplicationRestartSettings(
__in HANDLE hProcess, _In_ HANDLE hProcess,
__out_ecount_opt(*pcchSize) PWSTR pwzCommandline, _Out_writes_opt_(*pcchSize) PWSTR pwzCommandline,
__inout PDWORD pcchSize, _Inout_ PDWORD pcchSize,
__out_opt PDWORD pdwFlags _Out_opt_ PDWORD pdwFlags
); );
WINBASEAPI WINBASEAPI
HRESULT HRESULT
WINAPI WINAPI
ApplicationRecoveryInProgress( ApplicationRecoveryInProgress(
__out PBOOL pbCancelled _Out_ PBOOL pbCancelled
); );
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
ApplicationRecoveryFinished( ApplicationRecoveryFinished(
__in BOOL bSuccess _In_ BOOL bSuccess
); );
#endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
typedef enum _FILE_INFO_BY_HANDLE_CLASS {
FileBasicInfo, #pragma region Application Family
FileStandardInfo, #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
FileNameInfo,
FileRenameInfo,
FileDispositionInfo,
FileAllocationInfo,
FileEndOfFileInfo,
FileStreamInfo,
FileCompressionInfo,
FileAttributeTagInfo,
FileIdBothDirectoryInfo,
FileIdBothDirectoryRestartInfo,
FileIoPriorityHintInfo,
FileRemoteProtocolInfo,
MaximumFileInfoByHandleClass
} FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;
typedef struct _FILE_BASIC_INFO { typedef struct _FILE_BASIC_INFO {
LARGE_INTEGER CreationTime; LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime; LARGE_INTEGER LastAccessTime;
LARGE_INTEGER LastWriteTime; LARGE_INTEGER LastWriteTime;
LARGE_INTEGER ChangeTime; LARGE_INTEGER ChangeTime;
DWORD FileAttributes; DWORD FileAttributes;
} FILE_BASIC_INFO, *PFILE_BASIC_INFO; } FILE_BASIC_INFO, *PFILE_BASIC_INFO;
typedef struct _FILE_STANDARD_INFO { typedef struct _FILE_STANDARD_INFO {
skipping to change at line 14692 skipping to change at line 8212
LARGE_INTEGER AllocationSize; LARGE_INTEGER AllocationSize;
DWORD FileAttributes; DWORD FileAttributes;
DWORD FileNameLength; DWORD FileNameLength;
DWORD EaSize; DWORD EaSize;
CCHAR ShortNameLength; CCHAR ShortNameLength;
WCHAR ShortName[12]; WCHAR ShortName[12];
LARGE_INTEGER FileId; LARGE_INTEGER FileId;
WCHAR FileName[1]; WCHAR FileName[1];
} FILE_ID_BOTH_DIR_INFO, *PFILE_ID_BOTH_DIR_INFO; } FILE_ID_BOTH_DIR_INFO, *PFILE_ID_BOTH_DIR_INFO;
typedef struct _FILE_FULL_DIR_INFO {
ULONG NextEntryOffset;
ULONG FileIndex;
LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime;
LARGE_INTEGER LastWriteTime;
LARGE_INTEGER ChangeTime;
LARGE_INTEGER EndOfFile;
LARGE_INTEGER AllocationSize;
ULONG FileAttributes;
ULONG FileNameLength;
ULONG EaSize;
WCHAR FileName[1];
} FILE_FULL_DIR_INFO, *PFILE_FULL_DIR_INFO;
typedef enum _PRIORITY_HINT { typedef enum _PRIORITY_HINT {
IoPriorityHintVeryLow = 0, IoPriorityHintVeryLow = 0,
IoPriorityHintLow, IoPriorityHintLow,
IoPriorityHintNormal, IoPriorityHintNormal,
MaximumIoPriorityHintType MaximumIoPriorityHintType
} PRIORITY_HINT; } PRIORITY_HINT;
typedef struct _FILE_IO_PRIORITY_HINT_INFO { typedef struct _FILE_IO_PRIORITY_HINT_INFO {
PRIORITY_HINT PriorityHint; PRIORITY_HINT PriorityHint;
} FILE_IO_PRIORITY_HINT_INFO, *PFILE_IO_PRIORITY_HINT_INFO; } FILE_IO_PRIORITY_HINT_INFO, *PFILE_IO_PRIORITY_HINT_INFO;
// Structure and constants must match those in ntioapi_x.w // Structure and constants must match those in ntioapi_x.w
#define REMOTE_PROTOCOL_INFO_FLAG_LOOPBACK 0x00000001 #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#define REMOTE_PROTOCOL_INFO_FLAG_OFFLINE 0x00000002
typedef struct _FILE_ALIGNMENT_INFO {
ULONG AlignmentRequirement;
} FILE_ALIGNMENT_INFO, *PFILE_ALIGNMENT_INFO;
//
// Flag definitions for FILE_STORAGE_INFO structure
//
//
// If this flag is set then the partition is correctly aligned with the
// physical sector size of the device for optimial performance.
//
#define STORAGE_INFO_FLAGS_ALIGNED_DEVICE 0x00000001
#define STORAGE_INFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE 0x00000002
//
// If this value is set for the Sector and Parition alignment
// fields then it means the alignment is not known and the
// alignment flags have no meaning
//
#define STORAGE_INFO_OFFSET_UNKNOWN (0xffffffff)
typedef struct _FILE_STORAGE_INFO {
ULONG LogicalBytesPerSector;
ULONG PhysicalBytesPerSectorForAtomicity;
ULONG PhysicalBytesPerSectorForPerformance;
ULONG FileSystemEffectivePhysicalBytesPerSectorForAtomicity;
ULONG Flags;
ULONG ByteOffsetForSectorAlignment;
ULONG ByteOffsetForPartitionAlignment;
} FILE_STORAGE_INFO, *PFILE_STORAGE_INFO;
//
// Structure definition for FileIdInfo
//
typedef struct _FILE_ID_INFO {
ULONGLONG VolumeSerialNumber;
FILE_ID_128 FileId;
} FILE_ID_INFO, *PFILE_ID_INFO;
//
// Structure definition for FileIdExtdDirectoryInfo
//
typedef struct _FILE_ID_EXTD_DIR_INFO {
ULONG NextEntryOffset;
ULONG FileIndex;
LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime;
LARGE_INTEGER LastWriteTime;
LARGE_INTEGER ChangeTime;
LARGE_INTEGER EndOfFile;
LARGE_INTEGER AllocationSize;
ULONG FileAttributes;
ULONG FileNameLength;
ULONG EaSize;
ULONG ReparsePointTag;
FILE_ID_128 FileId;
WCHAR FileName[1];
} FILE_ID_EXTD_DIR_INFO, *PFILE_ID_EXTD_DIR_INFO;
#endif
//
// File Remote protocol info (FileRemoteProtocolInfo)
//
// Protocol generic flags.
#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
// Protocol specific SMB2 share capability flags.
#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
// Protocol specific SMB2 server capability flags.
#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 typedef struct _FILE_REMOTE_PROTOCOL_INFO
{ {
// Structure Version // Structure Version
USHORT StructureVersion; // 1 USHORT StructureVersion; // 1
USHORT StructureSize; // sizeof(FILE_REMOTE_PROTOCOL_INFO) USHORT StructureSize; // sizeof(FILE_REMOTE_PROTOCOL_INFO)
DWORD Protocol; // Protocol (WNNC_NET_*) defined in wnnc.h or n tifs.h. ULONG Protocol; // Protocol (WNNC_NET_*) defined in winnetwk.h or ntifs.h.
// Protocol Version & Type // Protocol Version & Type
USHORT ProtocolMajorVersion; USHORT ProtocolMajorVersion;
USHORT ProtocolMinorVersion; USHORT ProtocolMinorVersion;
USHORT ProtocolRevision; USHORT ProtocolRevision;
USHORT Reserved; USHORT Reserved;
// Protocol-Generic Information // Protocol-Generic Information
DWORD Flags; ULONG Flags;
struct { struct {
DWORD Reserved[8]; ULONG Reserved[8];
} GenericReserved; } GenericReserved;
// Protocol specific information // Protocol specific information
#if (_WIN32_WINNT < _WIN32_WINNT_WIN8)
struct { struct {
DWORD Reserved[16]; ULONG Reserved[16];
} ProtocolSpecificReserved; } ProtocolSpecificReserved;
#else
union {
} FILE_REMOTE_PROTOCOL_INFO, *PFILE_REMOTE_PROTOCOL_INFO; struct {
WINBASEAPI struct {
BOOL ULONG Capabilities;
WINAPI } Server;
SetFileInformationByHandle(
__in HANDLE hFile, struct {
__in FILE_INFO_BY_HANDLE_CLASS FileInformationClass, ULONG Capabilities;
__in_bcount(dwBufferSize) LPVOID lpFileInformation, ULONG CachingFlags;
__in DWORD dwBufferSize } Share;
);
} Smb2;
ULONG Reserved[16];
} ProtocolSpecific;
#endif
} FILE_REMOTE_PROTOCOL_INFO, *PFILE_REMOTE_PROTOCOL_INFO;
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetFileInformationByHandleEx( GetFileInformationByHandleEx(
__in HANDLE hFile, _In_ HANDLE hFile,
__in FILE_INFO_BY_HANDLE_CLASS FileInformationClass, _In_ FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
__out_bcount(dwBufferSize) LPVOID lpFileInformation, _Out_writes_bytes_(dwBufferSize) LPVOID lpFileInformation,
__in DWORD dwBufferSize _In_ DWORD dwBufferSize
); );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
typedef enum _FILE_ID_TYPE { typedef enum _FILE_ID_TYPE {
FileIdType, FileIdType,
ObjectIdType, ObjectIdType,
ExtendedFileIdType,
MaximumFileIdType MaximumFileIdType
} FILE_ID_TYPE, *PFILE_ID_TYPE; } FILE_ID_TYPE, *PFILE_ID_TYPE;
typedef struct FILE_ID_DESCRIPTOR { typedef struct FILE_ID_DESCRIPTOR {
DWORD dwSize; // Size of the struct DWORD dwSize; // Size of the struct
FILE_ID_TYPE Type; // Describes the type of identifier passed in. FILE_ID_TYPE Type; // Describes the type of identifier passed in.
union { union {
LARGE_INTEGER FileId; LARGE_INTEGER FileId;
GUID ObjectId; GUID ObjectId;
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
FILE_ID_128 ExtendedFileId;
#endif
} DUMMYUNIONNAME; } DUMMYUNIONNAME;
} FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR; } FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR;
WINBASEAPI WINBASEAPI
__out
HANDLE HANDLE
WINAPI WINAPI
OpenFileById ( OpenFileById (
__in HANDLE hVolumeHint, _In_ HANDLE hVolumeHint,
__in LPFILE_ID_DESCRIPTOR lpFileId, _In_ LPFILE_ID_DESCRIPTOR lpFileId,
__in DWORD dwDesiredAccess, _In_ DWORD dwDesiredAccess,
__in DWORD dwShareMode, _In_ DWORD dwShareMode,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in DWORD dwFlagsAndAttributes _In_ DWORD dwFlagsAndAttributes
); );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif #endif
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
// //
// Flags to be passed into CREATE_SYMBOLIC_LINK // Flags to be passed into CREATE_SYMBOLIC_LINK
// //
#define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) #define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1)
#define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever ot her flags we think of! #define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever ot her flags we think of!
WINBASEAPI WINBASEAPI
BOOLEAN BOOLEAN
APIENTRY APIENTRY
CreateSymbolicLinkA ( CreateSymbolicLinkA (
__in LPCSTR lpSymlinkFileName, _In_ LPCSTR lpSymlinkFileName,
__in LPCSTR lpTargetFileName, _In_ LPCSTR lpTargetFileName,
__in DWORD dwFlags _In_ DWORD dwFlags
); );
WINBASEAPI WINBASEAPI
BOOLEAN BOOLEAN
APIENTRY APIENTRY
CreateSymbolicLinkW ( CreateSymbolicLinkW (
__in LPCWSTR lpSymlinkFileName, _In_ LPCWSTR lpSymlinkFileName,
__in LPCWSTR lpTargetFileName, _In_ LPCWSTR lpTargetFileName,
__in DWORD dwFlags _In_ DWORD dwFlags
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateSymbolicLink CreateSymbolicLinkW #define CreateSymbolicLink CreateSymbolicLinkW
#else #else
#define CreateSymbolicLink CreateSymbolicLinkA #define CreateSymbolicLink CreateSymbolicLinkA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOLEAN BOOLEAN
APIENTRY APIENTRY
CreateSymbolicLinkTransactedA ( CreateSymbolicLinkTransactedA (
__in LPCSTR lpSymlinkFileName, _In_ LPCSTR lpSymlinkFileName,
__in LPCSTR lpTargetFileName, _In_ LPCSTR lpTargetFileName,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
BOOLEAN BOOLEAN
APIENTRY APIENTRY
CreateSymbolicLinkTransactedW ( CreateSymbolicLinkTransactedW (
__in LPCWSTR lpSymlinkFileName, _In_ LPCWSTR lpSymlinkFileName,
__in LPCWSTR lpTargetFileName, _In_ LPCWSTR lpTargetFileName,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in HANDLE hTransaction _In_ HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateSymbolicLinkTransacted CreateSymbolicLinkTransactedW #define CreateSymbolicLinkTransacted CreateSymbolicLinkTransactedW
#else #else
#define CreateSymbolicLinkTransacted CreateSymbolicLinkTransactedA #define CreateSymbolicLinkTransacted CreateSymbolicLinkTransactedA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI
DWORD
WINAPI
GetFinalPathNameByHandleA (
__in HANDLE hFile,
__out_ecount(cchFilePath) LPSTR lpszFilePath,
__in DWORD cchFilePath,
__in DWORD dwFlags
);
WINBASEAPI
DWORD
WINAPI
GetFinalPathNameByHandleW (
__in HANDLE hFile,
__out_ecount(cchFilePath) LPWSTR lpszFilePath,
__in DWORD cchFilePath,
__in DWORD dwFlags
);
#ifdef UNICODE
#define GetFinalPathNameByHandle GetFinalPathNameByHandleW
#else
#define GetFinalPathNameByHandle GetFinalPathNameByHandleA
#endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0600) #endif // (_WIN32_WINNT >= 0x0600)
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
QueryActCtxSettingsW( QueryActCtxSettingsW(
__in_opt DWORD dwFlags, _In_opt_ DWORD dwFlags,
__in_opt HANDLE hActCtx, _In_opt_ HANDLE hActCtx,
__in_opt PCWSTR settingsNameSpace, _In_opt_ PCWSTR settingsNameSpace,
__in PCWSTR settingName, _In_ PCWSTR settingName,
__out_bcount_part_opt(dwBuffer, *pdwWrittenOrRequired) PWSTR pvBuffer, _Out_writes_bytes_to_opt_(dwBuffer, *pdwWrittenOrRequired) PWSTR pvBuffer,
__in SIZE_T dwBuffer, _In_ SIZE_T dwBuffer,
__out_opt SIZE_T *pdwWrittenOrRequired _Out_opt_ SIZE_T *pdwWrittenOrRequired
); );
#endif #endif
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReplacePartitionUnit ( ReplacePartitionUnit (
__in PWSTR TargetPartition, _In_ PWSTR TargetPartition,
__in PWSTR SparePartition, _In_ PWSTR SparePartition,
__in ULONG Flags _In_ ULONG Flags
); );
#endif #endif
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
AddSecureMemoryCacheCallback( AddSecureMemoryCacheCallback(
__in __callback PSECURE_MEMORY_CACHE_CALLBACK pfnCallBack _In_ __callback PSECURE_MEMORY_CACHE_CALLBACK pfnCallBack
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
RemoveSecureMemoryCacheCallback( RemoveSecureMemoryCacheCallback(
__in __callback PSECURE_MEMORY_CACHE_CALLBACK pfnCallBack _In_ __callback PSECURE_MEMORY_CACHE_CALLBACK pfnCallBack
); );
#endif #endif
#if (_WIN32_WINNT >= 0x0601) #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
__checkReturn #if (NTDDI_VERSION >= NTDDI_WIN7SP1)
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
_Must_inspect_result_
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CopyExtendedContext( CopyContext(
__out PCONTEXT_EX Destination, _Inout_ PCONTEXT Destination,
__in DWORD ContextFlags, _In_ DWORD ContextFlags,
__in PCONTEXT_EX Source _In_ PCONTEXT Source
); );
__checkReturn #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
_Success_(return != FALSE)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
InitializeExtendedContext( InitializeContext(
__out PVOID Context, _Out_writes_bytes_opt_(*ContextLength) PVOID Buffer,
__in DWORD ContextFlags, _In_ DWORD ContextFlags,
__out PCONTEXT_EX* ContextEx _Out_ PCONTEXT* Context,
_Inout_ PDWORD ContextLength
); );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#if defined(_AMD64_) || defined(_X86_)
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
WINBASEAPI WINBASEAPI
DWORD64 DWORD64
WINAPI WINAPI
GetEnabledExtendedFeatures( GetEnabledXStateFeatures(
__in DWORD64 FeatureMask VOID
); );
_Must_inspect_result_
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetExtendedContextLength( GetXStateFeaturesMask(
__in DWORD ContextFlags, _In_ PCONTEXT Context,
__out PDWORD ContextLength _Out_ PDWORD64 FeatureMask
);
WINBASEAPI
DWORD64
WINAPI
GetExtendedFeaturesMask(
__in PCONTEXT_EX ContextEx
); );
_Success_(return != NULL)
WINBASEAPI WINBASEAPI
PVOID PVOID
WINAPI WINAPI
LocateExtendedFeature( LocateXStateFeature(
__in PCONTEXT_EX ContextEx, _In_ PCONTEXT Context,
__in DWORD FeatureId, _In_ DWORD FeatureId,
__out_opt PDWORD Length _Out_opt_ PDWORD Length
); );
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
PCONTEXT #pragma endregion
WINAPI
LocateLegacyContext( #pragma region Desktop Family
__in PCONTEXT_EX ContextEx, #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
__out_opt PDWORD Length
);
_Must_inspect_result_
WINBASEAPI WINBASEAPI
VOID BOOL
WINAPI WINAPI
SetExtendedFeaturesMask( SetXStateFeaturesMask(
__out PCONTEXT_EX ContextEx, _Inout_ PCONTEXT Context,
__in DWORD64 FeatureMask _In_ DWORD64 FeatureMask
); );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#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)
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
EnableThreadProfiling( EnableThreadProfiling(
__in HANDLE ThreadHandle, _In_ HANDLE ThreadHandle,
__in DWORD Flags, _In_ DWORD Flags,
__in DWORD64 HardwareCounters, _In_ DWORD64 HardwareCounters,
__out HANDLE *PerformanceDataHandle _Out_ HANDLE *PerformanceDataHandle
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
DisableThreadProfiling( DisableThreadProfiling(
__in HANDLE PerformanceDataHandle _In_ HANDLE PerformanceDataHandle
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
QueryThreadProfiling( QueryThreadProfiling(
__in HANDLE ThreadHandle, _In_ HANDLE ThreadHandle,
__out PBOOLEAN Enabled _Out_ PBOOLEAN Enabled
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
ReadThreadProfilingData( ReadThreadProfilingData(
__in HANDLE PerformanceDataHandle, _In_ HANDLE PerformanceDataHandle,
__in DWORD Flags, _In_ DWORD Flags,
__out PPERFORMANCE_DATA PerformanceData _Out_ PPERFORMANCE_DATA PerformanceData
); );
#endif #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif /* (_WIN32_WINNT >= 0x0601) */
#if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */ #if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
#if defined(ISOLATION_AWARE_ENABLED) && (ISOLATION_AWARE_ENABLED != 0) #if defined(ISOLATION_AWARE_ENABLED) && (ISOLATION_AWARE_ENABLED != 0)
#include "winbase.inl" #include "winbase.inl"
#endif /* ISOLATION_AWARE_ENABLED */ #endif /* ISOLATION_AWARE_ENABLED */
#endif /* RC */ #endif /* RC */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #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/un
ion */
#pragma warning(default:4214) /* nonstandard extension used : bit field types ot
her then int */
#endif
#endif
#endif // _WINBASE_ #endif // _WINBASE_
#if !defined(RC_INVOKED) #if !defined(RC_INVOKED)
#if !defined(NOWINBASEINTERLOCK) #if !defined(NOWINBASEINTERLOCK)
#if !defined(_NTOS_) #if !defined(_NTOS_)
/*++ /*++
Copyright (c) Microsoft Corporation. All rights reserved. Copyright (c) Microsoft Corporation. All rights reserved.
Module Name: Module Name:
skipping to change at line 15084 skipping to change at line 8757
#if MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS /* { */ #if MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS /* { */
#if defined(__cplusplus) /* { */ #if defined(__cplusplus) /* { */
extern "C++" { extern "C++" {
FORCEINLINE FORCEINLINE
unsigned unsigned
InterlockedIncrement( InterlockedIncrement(
__inout __drv_interlocked unsigned volatile *Addend _Inout_ _Interlocked_operand_ unsigned volatile *Addend
) )
{ {
return (unsigned) InterlockedIncrement((volatile long*) Addend); return (unsigned) _InterlockedIncrement((volatile long*) Addend);
} }
FORCEINLINE FORCEINLINE
unsigned long unsigned long
InterlockedIncrement( InterlockedIncrement(
__inout __drv_interlocked unsigned long volatile *Addend _Inout_ _Interlocked_operand_ unsigned long volatile *Addend
) )
{ {
return (unsigned long) InterlockedIncrement((volatile long*) Addend); return (unsigned long) _InterlockedIncrement((volatile long*) Addend);
} }
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_)) #if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_) && !defin ed(_MANAGED))
FORCEINLINE FORCEINLINE
unsigned __int64 unsigned __int64
InterlockedIncrement( InterlockedIncrement(
__inout __drv_interlocked unsigned __int64 volatile *Addend _Inout_ _Interlocked_operand_ unsigned __int64 volatile *Addend
) )
{ {
return (unsigned __int64) InterlockedIncrement64((volatile __int64*) Addend) ; return (unsigned __int64) _InterlockedIncrement64((volatile long long*) Adde nd);
} }
#endif #endif
FORCEINLINE FORCEINLINE
unsigned unsigned
InterlockedDecrement( InterlockedDecrement(
__inout __drv_interlocked unsigned volatile *Addend _Inout_ _Interlocked_operand_ unsigned volatile *Addend
) )
{ {
return (unsigned long) InterlockedDecrement((volatile long*) Addend); return (unsigned long) _InterlockedDecrement((volatile long*) Addend);
} }
FORCEINLINE FORCEINLINE
unsigned long unsigned long
InterlockedDecrement( InterlockedDecrement(
__inout __drv_interlocked unsigned long volatile *Addend _Inout_ _Interlocked_operand_ unsigned long volatile *Addend
) )
{ {
return (unsigned long) InterlockedDecrement((volatile long*) Addend); return (unsigned long) _InterlockedDecrement((volatile long*) Addend);
} }
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_)) #if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_) && !defin ed(_MANAGED))
FORCEINLINE FORCEINLINE
unsigned __int64 unsigned __int64
InterlockedDecrement( InterlockedDecrement(
__inout __drv_interlocked unsigned __int64 volatile *Addend _Inout_ _Interlocked_operand_ unsigned __int64 volatile *Addend
) )
{ {
return (unsigned __int64) InterlockedDecrement64((volatile __int64*) Addend) ; return (unsigned __int64) _InterlockedDecrement64((volatile long long*) Adde nd);
} }
#endif #endif
#if !defined(_M_CEE_PURE)
FORCEINLINE FORCEINLINE
unsigned unsigned
InterlockedExchange( InterlockedExchange(
__inout __drv_interlocked unsigned volatile *Target, _Inout_ _Interlocked_operand_ unsigned volatile *Target,
__in unsigned Value _In_ unsigned Value
) )
{ {
return (unsigned) InterlockedExchange((volatile long*) Target, (long) Value) ; return (unsigned) _InterlockedExchange((volatile long*) Target, (long) Value );
} }
FORCEINLINE FORCEINLINE
unsigned long unsigned long
InterlockedExchange( InterlockedExchange(
__inout __drv_interlocked unsigned long volatile *Target, _Inout_ _Interlocked_operand_ unsigned long volatile *Target,
__in unsigned long Value _In_ unsigned long Value
) )
{ {
return (unsigned long) InterlockedExchange((volatile long*) Target, (long) V alue); return (unsigned long) _InterlockedExchange((volatile long*) Target, (long) Value);
} }
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_)) #if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_) && !defin ed(_MANAGED))
FORCEINLINE FORCEINLINE
unsigned __int64 unsigned __int64
InterlockedExchange( InterlockedExchange(
__inout __drv_interlocked unsigned __int64 volatile *Target, _Inout_ _Interlocked_operand_ unsigned __int64 volatile *Target,
__in unsigned __int64 Value _In_ unsigned __int64 Value
) )
{ {
return (unsigned __int64) InterlockedExchange64((volatile __int64*) Target, (__int64) Value); return (unsigned __int64) _InterlockedExchange64((volatile long long*) Targe t, (long long) Value);
} }
#endif #endif
FORCEINLINE FORCEINLINE
unsigned unsigned
InterlockedExchangeAdd( InterlockedExchangeAdd(
__inout __drv_interlocked unsigned volatile *Addend, _Inout_ _Interlocked_operand_ unsigned volatile *Addend,
__in unsigned Value _In_ unsigned Value
) )
{ {
return (unsigned) InterlockedExchangeAdd((volatile long*) Addend, (long) Val ue); return (unsigned) _InterlockedExchangeAdd((volatile long*) Addend, (long) Va lue);
} }
FORCEINLINE FORCEINLINE
unsigned unsigned
InterlockedExchangeSubtract( InterlockedExchangeSubtract(
__inout __drv_interlocked unsigned volatile *Addend, _Inout_ _Interlocked_operand_ unsigned volatile *Addend,
__in unsigned Value _In_ unsigned Value
) )
{ {
return (unsigned) InterlockedExchangeAdd((volatile long*) Addend, - (long) Value); return (unsigned) _InterlockedExchangeAdd((volatile long*) Addend, - (long) Value);
} }
FORCEINLINE FORCEINLINE
unsigned long unsigned long
InterlockedExchangeAdd( InterlockedExchangeAdd(
__inout __drv_interlocked unsigned long volatile *Addend, _Inout_ _Interlocked_operand_ unsigned long volatile *Addend,
__in unsigned long Value _In_ unsigned long Value
) )
{ {
return (unsigned long) InterlockedExchangeAdd((volatile long*) Addend, (long ) Value); return (unsigned long) _InterlockedExchangeAdd((volatile long*) Addend, (lon g) Value);
} }
FORCEINLINE FORCEINLINE
unsigned long unsigned long
InterlockedExchangeSubtract( InterlockedExchangeSubtract(
__inout __drv_interlocked unsigned long volatile *Addend, _Inout_ _Interlocked_operand_ unsigned long volatile *Addend,
__in unsigned long Value _In_ unsigned long Value
) )
{ {
return (unsigned long) InterlockedExchangeAdd((volatile long*) Addend, - (l ong) Value); return (unsigned long) _InterlockedExchangeAdd((volatile long*) Addend, - ( long) Value);
} }
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_)) #if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_) && !defin ed(_MANAGED))
FORCEINLINE FORCEINLINE
unsigned __int64 unsigned __int64
InterlockedExchangeAdd( InterlockedExchangeAdd(
__inout __drv_interlocked unsigned __int64 volatile *Addend, _Inout_ _Interlocked_operand_ unsigned __int64 volatile *Addend,
__in unsigned __int64 Value _In_ unsigned __int64 Value
) )
{ {
return (unsigned __int64) InterlockedExchangeAdd64((volatile __int64*) Adden d, (__int64) Value); return (unsigned __int64) _InterlockedExchangeAdd64((volatile long long*) Ad dend, (long long) Value);
} }
FORCEINLINE FORCEINLINE
unsigned __int64 unsigned __int64
InterlockedExchangeSubtract( InterlockedExchangeSubtract(
__inout __drv_interlocked unsigned __int64 volatile *Addend, _Inout_ _Interlocked_operand_ unsigned __int64 volatile *Addend,
__in unsigned __int64 Value _In_ unsigned __int64 Value
) )
{ {
return (unsigned __int64) InterlockedExchangeAdd64((volatile __int64*) Adden d, - (__int64) Value); return (unsigned __int64) _InterlockedExchangeAdd64((volatile long long*) Ad dend, - (long long) Value);
} }
#endif #endif
FORCEINLINE FORCEINLINE
unsigned unsigned
InterlockedCompareExchange( InterlockedCompareExchange(
__inout __drv_interlocked unsigned volatile *Destination, _Inout_ _Interlocked_operand_ unsigned volatile *Destination,
__in unsigned Exchange, _In_ unsigned Exchange,
__in unsigned Comperand _In_ unsigned Comperand
) )
{ {
return (unsigned) InterlockedCompareExchange((volatile long*) Destination, ( long) Exchange, (long) Comperand); return (unsigned) _InterlockedCompareExchange((volatile long*) Destination, (long) Exchange, (long) Comperand);
} }
FORCEINLINE FORCEINLINE
unsigned long unsigned long
InterlockedCompareExchange( InterlockedCompareExchange(
__inout __drv_interlocked unsigned long volatile *Destination, _Inout_ _Interlocked_operand_ unsigned long volatile *Destination,
__in unsigned long Exchange, _In_ unsigned long Exchange,
__in unsigned long Comperand _In_ unsigned long Comperand
) )
{ {
return (unsigned long) InterlockedCompareExchange((volatile long*) Destinati on, (long) Exchange, (long) Comperand); return (unsigned long) _InterlockedCompareExchange((volatile long*) Destinat ion, (long) Exchange, (long) Comperand);
} }
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_)) #if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_) && !defin ed(_MANAGED))
FORCEINLINE FORCEINLINE
unsigned __int64 unsigned __int64
InterlockedCompareExchange( InterlockedCompareExchange(
__inout __drv_interlocked unsigned __int64 volatile *Destination, _Inout_ _Interlocked_operand_ unsigned __int64 volatile *Destination,
__in unsigned __int64 Exchange, _In_ unsigned __int64 Exchange,
__in unsigned __int64 Comperand _In_ unsigned __int64 Comperand
) )
{ {
return (unsigned __int64) InterlockedCompareExchange64((volatile __int64*) D estination, (__int64) Exchange, (__int64) Comperand); return (unsigned __int64) _InterlockedCompareExchange64((volatile long long* ) Destination, (long long) Exchange, (long long) Comperand);
} }
FORCEINLINE FORCEINLINE
unsigned __int64 unsigned __int64
InterlockedAnd( InterlockedAnd(
__inout __drv_interlocked unsigned __int64 volatile *Destination, _Inout_ _Interlocked_operand_ unsigned __int64 volatile *Destination,
__in unsigned __int64 Value _In_ unsigned __int64 Value
) )
{ {
return (unsigned __int64) InterlockedAnd64((volatile __int64*) Destination, (__int64) Value); return (unsigned __int64) _InterlockedAnd64((volatile long long*) Destinatio n, (long long) Value);
} }
FORCEINLINE FORCEINLINE
unsigned __int64 unsigned __int64
InterlockedOr( InterlockedOr(
__inout __drv_interlocked unsigned __int64 volatile *Destination, _Inout_ _Interlocked_operand_ unsigned __int64 volatile *Destination,
__in unsigned __int64 Value _In_ unsigned __int64 Value
) )
{ {
return (unsigned __int64) InterlockedOr64((volatile __int64*) Destination, ( __int64) Value); return (unsigned __int64) _InterlockedOr64((volatile long long*) Destination , (long long) Value);
} }
FORCEINLINE FORCEINLINE
unsigned __int64 unsigned __int64
InterlockedXor( InterlockedXor(
__inout __drv_interlocked unsigned __int64 volatile *Destination, _Inout_ _Interlocked_operand_ unsigned __int64 volatile *Destination,
__in unsigned __int64 Value _In_ unsigned __int64 Value
) )
{ {
return (unsigned __int64) InterlockedXor64((volatile __int64*) Destination, (__int64) Value); return (unsigned __int64) _InterlockedXor64((volatile long long*) Destinatio n, (long long) Value);
} }
#endif #endif
#endif /* !defined(_M_CEE_PURE) */
} /* extern "C++" */ } /* extern "C++" */
#endif /* } __cplusplus */ #endif /* } __cplusplus */
#endif /* } MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS */ #endif /* } MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS */
#undef MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS #undef MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS
#define MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS 0 #define MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS 0
#endif /* } MIDL_PASS */ #endif /* } MIDL_PASS */
#endif /* } MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED */ #endif /* } MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED */
 End of changes. 1024 change blocks. 
9319 lines changed or deleted 3014 lines changed or added


 wincon.h (6.1.7601.23418-Windows_7.0)   wincon.h (6.3.9600.17415-Windows_8.1) 
#include <winapifamily.h>
/*++ BUILD Version: 0002 // Increment this if a change has global effects /*++ BUILD Version: 0002 // Increment this if a change has global effects
Copyright (c) Microsoft Corporation. All rights reserved. Copyright (c) Microsoft Corporation. All rights reserved.
Module Name: Module Name:
wincon.h wincon.h
Abstract: Abstract:
skipping to change at line 35 skipping to change at line 37
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifndef NOGDI #ifndef NOGDI
#include <wingdi.h> #include <wingdi.h>
#endif #endif
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
typedef struct _COORD { typedef struct _COORD {
SHORT X; SHORT X;
SHORT Y; SHORT Y;
} COORD, *PCOORD; } COORD, *PCOORD;
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
typedef struct _SMALL_RECT { typedef struct _SMALL_RECT {
SHORT Left; SHORT Left;
SHORT Top; SHORT Top;
SHORT Right; SHORT Right;
SHORT Bottom; SHORT Bottom;
} SMALL_RECT, *PSMALL_RECT; } SMALL_RECT, *PSMALL_RECT;
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
typedef struct _KEY_EVENT_RECORD { typedef struct _KEY_EVENT_RECORD {
BOOL bKeyDown; BOOL bKeyDown;
WORD wRepeatCount; WORD wRepeatCount;
WORD wVirtualKeyCode; WORD wVirtualKeyCode;
WORD wVirtualScanCode; WORD wVirtualScanCode;
union { union {
WCHAR UnicodeChar; WCHAR UnicodeChar;
CHAR AsciiChar; CHAR AsciiChar;
} uChar; } uChar;
DWORD dwControlKeyState; DWORD dwControlKeyState;
skipping to change at line 131 skipping to change at line 148
WORD EventType; WORD EventType;
union { union {
KEY_EVENT_RECORD KeyEvent; KEY_EVENT_RECORD KeyEvent;
MOUSE_EVENT_RECORD MouseEvent; MOUSE_EVENT_RECORD MouseEvent;
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent; WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
MENU_EVENT_RECORD MenuEvent; MENU_EVENT_RECORD MenuEvent;
FOCUS_EVENT_RECORD FocusEvent; FOCUS_EVENT_RECORD FocusEvent;
} Event; } Event;
} INPUT_RECORD, *PINPUT_RECORD; } INPUT_RECORD, *PINPUT_RECORD;
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
// //
// EventType flags: // EventType flags:
// //
#define KEY_EVENT 0x0001 // Event contains key event record #define KEY_EVENT 0x0001 // Event contains key event record
#define MOUSE_EVENT 0x0002 // Event contains mouse event record #define MOUSE_EVENT 0x0002 // Event contains mouse event record
#define WINDOW_BUFFER_SIZE_EVENT 0x0004 // Event contains window change event re cord #define WINDOW_BUFFER_SIZE_EVENT 0x0004 // Event contains window change event re cord
#define MENU_EVENT 0x0008 // Event contains menu event record #define MENU_EVENT 0x0008 // Event contains menu event record
#define FOCUS_EVENT 0x0010 // event contains focus change #define FOCUS_EVENT 0x0010 // event contains focus change
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
typedef struct _CHAR_INFO { typedef struct _CHAR_INFO {
union { union {
WCHAR UnicodeChar; WCHAR UnicodeChar;
CHAR AsciiChar; CHAR AsciiChar;
} Char; } Char;
WORD Attributes; WORD Attributes;
} CHAR_INFO, *PCHAR_INFO; } CHAR_INFO, *PCHAR_INFO;
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
// //
// Attributes flags: // Attributes flags:
// //
#define FOREGROUND_BLUE 0x0001 // text color contains blue. #define FOREGROUND_BLUE 0x0001 // text color contains blue.
#define FOREGROUND_GREEN 0x0002 // text color contains green. #define FOREGROUND_GREEN 0x0002 // text color contains green.
#define FOREGROUND_RED 0x0004 // text color contains red. #define FOREGROUND_RED 0x0004 // text color contains red.
#define FOREGROUND_INTENSITY 0x0008 // text color is intensified. #define FOREGROUND_INTENSITY 0x0008 // text color is intensified.
#define BACKGROUND_BLUE 0x0010 // background color contains blue. #define BACKGROUND_BLUE 0x0010 // background color contains blue.
#define BACKGROUND_GREEN 0x0020 // background color contains green. #define BACKGROUND_GREEN 0x0020 // background color contains green.
skipping to change at line 171 skipping to change at line 197
#define COMMON_LVB_LEADING_BYTE 0x0100 // Leading Byte of DBCS #define COMMON_LVB_LEADING_BYTE 0x0100 // Leading Byte of DBCS
#define COMMON_LVB_TRAILING_BYTE 0x0200 // Trailing Byte of DBCS #define COMMON_LVB_TRAILING_BYTE 0x0200 // Trailing Byte of DBCS
#define COMMON_LVB_GRID_HORIZONTAL 0x0400 // DBCS: Grid attribute: top horizonta l. #define COMMON_LVB_GRID_HORIZONTAL 0x0400 // DBCS: Grid attribute: top horizonta l.
#define COMMON_LVB_GRID_LVERTICAL 0x0800 // DBCS: Grid attribute: left vertical . #define COMMON_LVB_GRID_LVERTICAL 0x0800 // DBCS: Grid attribute: left vertical .
#define COMMON_LVB_GRID_RVERTICAL 0x1000 // DBCS: Grid attribute: right vertica l. #define COMMON_LVB_GRID_RVERTICAL 0x1000 // DBCS: Grid attribute: right vertica l.
#define COMMON_LVB_REVERSE_VIDEO 0x4000 // DBCS: Reverse fore/back ground attr ibute. #define COMMON_LVB_REVERSE_VIDEO 0x4000 // DBCS: Reverse fore/back ground attr ibute.
#define COMMON_LVB_UNDERSCORE 0x8000 // DBCS: Underscore. #define COMMON_LVB_UNDERSCORE 0x8000 // DBCS: Underscore.
#define COMMON_LVB_SBCSDBCS 0x0300 // SBCS or DBCS flag. #define COMMON_LVB_SBCSDBCS 0x0300 // SBCS or DBCS flag.
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
typedef struct _CONSOLE_SCREEN_BUFFER_INFO { typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
COORD dwSize; COORD dwSize;
COORD dwCursorPosition; COORD dwCursorPosition;
WORD wAttributes; WORD wAttributes;
SMALL_RECT srWindow; SMALL_RECT srWindow;
COORD dwMaximumWindowSize; COORD dwMaximumWindowSize;
} CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO; } CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO;
typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX { typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX {
ULONG cbSize; ULONG cbSize;
skipping to change at line 221 skipping to change at line 250
#define HISTORY_NO_DUP_FLAG 0x1 #define HISTORY_NO_DUP_FLAG 0x1
typedef struct _CONSOLE_HISTORY_INFO { typedef struct _CONSOLE_HISTORY_INFO {
UINT cbSize; UINT cbSize;
UINT HistoryBufferSize; UINT HistoryBufferSize;
UINT NumberOfHistoryBuffers; UINT NumberOfHistoryBuffers;
DWORD dwFlags; DWORD dwFlags;
} CONSOLE_HISTORY_INFO, *PCONSOLE_HISTORY_INFO; } CONSOLE_HISTORY_INFO, *PCONSOLE_HISTORY_INFO;
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#if(_WIN32_WINNT >= 0x0500) #if(_WIN32_WINNT >= 0x0500)
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
typedef struct _CONSOLE_SELECTION_INFO { typedef struct _CONSOLE_SELECTION_INFO {
DWORD dwFlags; DWORD dwFlags;
COORD dwSelectionAnchor; COORD dwSelectionAnchor;
SMALL_RECT srSelection; SMALL_RECT srSelection;
} CONSOLE_SELECTION_INFO, *PCONSOLE_SELECTION_INFO; } CONSOLE_SELECTION_INFO, *PCONSOLE_SELECTION_INFO;
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
// //
// Selection flags // Selection flags
// //
#define CONSOLE_NO_SELECTION 0x0000 #define CONSOLE_NO_SELECTION 0x0000
#define CONSOLE_SELECTION_IN_PROGRESS 0x0001 // selection has begun #define CONSOLE_SELECTION_IN_PROGRESS 0x0001 // selection has begun
#define CONSOLE_SELECTION_NOT_EMPTY 0x0002 // non-null select rectangle #define CONSOLE_SELECTION_NOT_EMPTY 0x0002 // non-null select rectangle
#define CONSOLE_MOUSE_SELECTION 0x0004 // selecting with mouse #define CONSOLE_MOUSE_SELECTION 0x0004 // selecting with mouse
#define CONSOLE_MOUSE_DOWN 0x0008 // mouse is down #define CONSOLE_MOUSE_DOWN 0x0008 // mouse is down
#endif /* _WIN32_WINNT >= 0x0500 */ #endif /* _WIN32_WINNT >= 0x0500 */
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
// //
// typedef for ctrl-c handler routines // typedef for ctrl-c handler routines
// //
typedef typedef
BOOL BOOL
(WINAPI *PHANDLER_ROUTINE)( (WINAPI *PHANDLER_ROUTINE)(
__in DWORD CtrlType _In_ DWORD CtrlType
); );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#define CTRL_C_EVENT 0 #define CTRL_C_EVENT 0
#define CTRL_BREAK_EVENT 1 #define CTRL_BREAK_EVENT 1
#define CTRL_CLOSE_EVENT 2 #define CTRL_CLOSE_EVENT 2
// 3 is reserved! // 3 is reserved!
// 4 is reserved! // 4 is reserved!
#define CTRL_LOGOFF_EVENT 5 #define CTRL_LOGOFF_EVENT 5
#define CTRL_SHUTDOWN_EVENT 6 #define CTRL_SHUTDOWN_EVENT 6
// //
// Input Mode flags: // Input Mode flags:
skipping to change at line 278 skipping to change at line 323
#define ENABLE_EXTENDED_FLAGS 0x0080 #define ENABLE_EXTENDED_FLAGS 0x0080
#define ENABLE_AUTO_POSITION 0x0100 #define ENABLE_AUTO_POSITION 0x0100
// //
// Output Mode flags: // Output Mode flags:
// //
#define ENABLE_PROCESSED_OUTPUT 0x0001 #define ENABLE_PROCESSED_OUTPUT 0x0001
#define ENABLE_WRAP_AT_EOL_OUTPUT 0x0002 #define ENABLE_WRAP_AT_EOL_OUTPUT 0x0002
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
// //
// direct API definitions. // direct API definitions.
// //
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
PeekConsoleInputA(
__in HANDLE hConsoleInput,
__out_ecount(nLength) PINPUT_RECORD lpBuffer,
__in DWORD nLength,
__out LPDWORD lpNumberOfEventsRead
);
WINBASEAPI
BOOL
WINAPI
PeekConsoleInputW( PeekConsoleInputW(
__in HANDLE hConsoleInput, _In_ HANDLE hConsoleInput,
__out_ecount(nLength) PINPUT_RECORD lpBuffer, _Out_writes_(nLength) PINPUT_RECORD lpBuffer,
__in DWORD nLength, _In_ DWORD nLength,
__out LPDWORD lpNumberOfEventsRead _Out_ LPDWORD lpNumberOfEventsRead
); );
#ifdef UNICODE #ifdef UNICODE
#define PeekConsoleInput PeekConsoleInputW #define PeekConsoleInput PeekConsoleInputW
#else #endif
#define PeekConsoleInput PeekConsoleInputA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
ReadConsoleInputA(
__in HANDLE hConsoleInput,
__out_ecount(nLength) PINPUT_RECORD lpBuffer,
__in DWORD nLength,
__out LPDWORD lpNumberOfEventsRead
);
WINBASEAPI
BOOL
WINAPI
ReadConsoleInputW(
__in HANDLE hConsoleInput,
__out_ecount(nLength) PINPUT_RECORD lpBuffer,
__in DWORD nLength,
__out LPDWORD lpNumberOfEventsRead
);
#ifdef UNICODE
#define ReadConsoleInput ReadConsoleInputW
#else
#define ReadConsoleInput ReadConsoleInputA
#endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteConsoleInputA( WriteConsoleInputA(
__in HANDLE hConsoleInput, _In_ HANDLE hConsoleInput,
__in_ecount(nLength) CONST INPUT_RECORD *lpBuffer, _In_reads_(nLength) CONST INPUT_RECORD *lpBuffer,
__in DWORD nLength, _In_ DWORD nLength,
__out LPDWORD lpNumberOfEventsWritten _Out_ LPDWORD lpNumberOfEventsWritten
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteConsoleInputW( WriteConsoleInputW(
__in HANDLE hConsoleInput, _In_ HANDLE hConsoleInput,
__in_ecount(nLength) CONST INPUT_RECORD *lpBuffer, _In_reads_(nLength) CONST INPUT_RECORD *lpBuffer,
__in DWORD nLength, _In_ DWORD nLength,
__out LPDWORD lpNumberOfEventsWritten _Out_ LPDWORD lpNumberOfEventsWritten
); );
#ifdef UNICODE #ifdef UNICODE
#define WriteConsoleInput WriteConsoleInputW #define WriteConsoleInput WriteConsoleInputW
#else #else
#define WriteConsoleInput WriteConsoleInputA #define WriteConsoleInput WriteConsoleInputA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadConsoleOutputA( ReadConsoleOutputA(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__out_ecount(dwBufferSize.X * dwBufferSize.Y) PCHAR_INFO lpBuffer, _Out_writes_(dwBufferSize.X * dwBufferSize.Y) PCHAR_INFO lpBuffer,
__in COORD dwBufferSize, _In_ COORD dwBufferSize,
__in COORD dwBufferCoord, _In_ COORD dwBufferCoord,
__inout PSMALL_RECT lpReadRegion _Inout_ PSMALL_RECT lpReadRegion
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadConsoleOutputW( ReadConsoleOutputW(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__out_ecount(dwBufferSize.X * dwBufferSize.Y) PCHAR_INFO lpBuffer, _Out_writes_(dwBufferSize.X * dwBufferSize.Y) PCHAR_INFO lpBuffer,
__in COORD dwBufferSize, _In_ COORD dwBufferSize,
__in COORD dwBufferCoord, _In_ COORD dwBufferCoord,
__inout PSMALL_RECT lpReadRegion _Inout_ PSMALL_RECT lpReadRegion
); );
#ifdef UNICODE #ifdef UNICODE
#define ReadConsoleOutput ReadConsoleOutputW #define ReadConsoleOutput ReadConsoleOutputW
#else #else
#define ReadConsoleOutput ReadConsoleOutputA #define ReadConsoleOutput ReadConsoleOutputA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteConsoleOutputA( WriteConsoleOutputA(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in_ecount(dwBufferSize.X * dwBufferSize.Y) CONST CHAR_INFO *lpBuffer, _In_reads_(dwBufferSize.X * dwBufferSize.Y) CONST CHAR_INFO *lpBuffer,
__in COORD dwBufferSize, _In_ COORD dwBufferSize,
__in COORD dwBufferCoord, _In_ COORD dwBufferCoord,
__inout PSMALL_RECT lpWriteRegion _Inout_ PSMALL_RECT lpWriteRegion
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteConsoleOutputW( WriteConsoleOutputW(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in_ecount(dwBufferSize.X * dwBufferSize.Y) CONST CHAR_INFO *lpBuffer, _In_reads_(dwBufferSize.X * dwBufferSize.Y) CONST CHAR_INFO *lpBuffer,
__in COORD dwBufferSize, _In_ COORD dwBufferSize,
__in COORD dwBufferCoord, _In_ COORD dwBufferCoord,
__inout PSMALL_RECT lpWriteRegion _Inout_ PSMALL_RECT lpWriteRegion
); );
#ifdef UNICODE #ifdef UNICODE
#define WriteConsoleOutput WriteConsoleOutputW #define WriteConsoleOutput WriteConsoleOutputW
#else #else
#define WriteConsoleOutput WriteConsoleOutputA #define WriteConsoleOutput WriteConsoleOutputA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadConsoleOutputCharacterA( ReadConsoleOutputCharacterA(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__out_ecount(nLength) LPSTR lpCharacter, _Out_writes_(nLength) LPSTR lpCharacter,
__in DWORD nLength, _In_ DWORD nLength,
__in COORD dwReadCoord, _In_ COORD dwReadCoord,
__out LPDWORD lpNumberOfCharsRead _Out_ LPDWORD lpNumberOfCharsRead
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadConsoleOutputCharacterW( ReadConsoleOutputCharacterW(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__out_ecount(nLength) LPWSTR lpCharacter, _Out_writes_(nLength) LPWSTR lpCharacter,
__in DWORD nLength, _In_ DWORD nLength,
__in COORD dwReadCoord, _In_ COORD dwReadCoord,
__out LPDWORD lpNumberOfCharsRead _Out_ LPDWORD lpNumberOfCharsRead
); );
#ifdef UNICODE #ifdef UNICODE
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW #define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
#else #else
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA #define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadConsoleOutputAttribute( ReadConsoleOutputAttribute(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__out_ecount(nLength) LPWORD lpAttribute, _Out_writes_(nLength) LPWORD lpAttribute,
__in DWORD nLength, _In_ DWORD nLength,
__in COORD dwReadCoord, _In_ COORD dwReadCoord,
__out LPDWORD lpNumberOfAttrsRead _Out_ LPDWORD lpNumberOfAttrsRead
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteConsoleOutputCharacterA( WriteConsoleOutputCharacterA(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in_ecount(nLength) LPCSTR lpCharacter, _In_reads_(nLength) LPCSTR lpCharacter,
__in DWORD nLength, _In_ DWORD nLength,
__in COORD dwWriteCoord, _In_ COORD dwWriteCoord,
__out LPDWORD lpNumberOfCharsWritten _Out_ LPDWORD lpNumberOfCharsWritten
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteConsoleOutputCharacterW( WriteConsoleOutputCharacterW(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in_ecount(nLength) LPCWSTR lpCharacter, _In_reads_(nLength) LPCWSTR lpCharacter,
__in DWORD nLength, _In_ DWORD nLength,
__in COORD dwWriteCoord, _In_ COORD dwWriteCoord,
__out LPDWORD lpNumberOfCharsWritten _Out_ LPDWORD lpNumberOfCharsWritten
); );
#ifdef UNICODE #ifdef UNICODE
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW #define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW
#else #else
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA #define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteConsoleOutputAttribute( WriteConsoleOutputAttribute(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in_ecount(nLength) CONST WORD *lpAttribute, _In_reads_(nLength) CONST WORD *lpAttribute,
__in DWORD nLength, _In_ DWORD nLength,
__in COORD dwWriteCoord, _In_ COORD dwWriteCoord,
__out LPDWORD lpNumberOfAttrsWritten _Out_ LPDWORD lpNumberOfAttrsWritten
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FillConsoleOutputCharacterA( FillConsoleOutputCharacterA(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in CHAR cCharacter, _In_ CHAR cCharacter,
__in DWORD nLength, _In_ DWORD nLength,
__in COORD dwWriteCoord, _In_ COORD dwWriteCoord,
__out LPDWORD lpNumberOfCharsWritten _Out_ LPDWORD lpNumberOfCharsWritten
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FillConsoleOutputCharacterW( FillConsoleOutputCharacterW(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in WCHAR cCharacter, _In_ WCHAR cCharacter,
__in DWORD nLength, _In_ DWORD nLength,
__in COORD dwWriteCoord, _In_ COORD dwWriteCoord,
__out LPDWORD lpNumberOfCharsWritten _Out_ LPDWORD lpNumberOfCharsWritten
); );
#ifdef UNICODE #ifdef UNICODE
#define FillConsoleOutputCharacter FillConsoleOutputCharacterW #define FillConsoleOutputCharacter FillConsoleOutputCharacterW
#else #else
#define FillConsoleOutputCharacter FillConsoleOutputCharacterA #define FillConsoleOutputCharacter FillConsoleOutputCharacterA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FillConsoleOutputAttribute( FillConsoleOutputAttribute(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in WORD wAttribute, _In_ WORD wAttribute,
__in DWORD nLength, _In_ DWORD nLength,
__in COORD dwWriteCoord, _In_ COORD dwWriteCoord,
__out LPDWORD lpNumberOfAttrsWritten _Out_ LPDWORD lpNumberOfAttrsWritten
);
WINBASEAPI
BOOL
WINAPI
GetConsoleMode(
__in HANDLE hConsoleHandle,
__out LPDWORD lpMode
);
WINBASEAPI
BOOL
WINAPI
GetNumberOfConsoleInputEvents(
__in HANDLE hConsoleInput,
__out LPDWORD lpNumberOfEvents
); );
#define CONSOLE_REAL_OUTPUT_HANDLE (LongToHandle(-2)) #define CONSOLE_REAL_OUTPUT_HANDLE (LongToHandle(-2))
#define CONSOLE_REAL_INPUT_HANDLE (LongToHandle(-3)) #define CONSOLE_REAL_INPUT_HANDLE (LongToHandle(-3))
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetConsoleScreenBufferInfo( GetConsoleScreenBufferInfo(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__out PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo _Out_ PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetConsoleScreenBufferInfoEx( GetConsoleScreenBufferInfoEx(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__inout_bcount_part(sizeof(ULONG), sizeof(CONSOLE_SCREEN_BUFFER_INFOEX) - si _Inout_ PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx);
zeof(ULONG)) PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleScreenBufferInfoEx( SetConsoleScreenBufferInfoEx(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx); _In_ PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx);
WINBASEAPI WINBASEAPI
COORD COORD
WINAPI WINAPI
GetLargestConsoleWindowSize( GetLargestConsoleWindowSize(
__in HANDLE hConsoleOutput _In_ HANDLE hConsoleOutput
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetConsoleCursorInfo( GetConsoleCursorInfo(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__out PCONSOLE_CURSOR_INFO lpConsoleCursorInfo _Out_ PCONSOLE_CURSOR_INFO lpConsoleCursorInfo
); );
#if(_WIN32_WINNT >= 0x0500) #if(_WIN32_WINNT >= 0x0500)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetCurrentConsoleFont( GetCurrentConsoleFont(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in BOOL bMaximumWindow, _In_ BOOL bMaximumWindow,
__out PCONSOLE_FONT_INFO lpConsoleCurrentFont _Out_ PCONSOLE_FONT_INFO lpConsoleCurrentFont
); );
#ifndef NOGDI #ifndef NOGDI
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetCurrentConsoleFontEx( GetCurrentConsoleFontEx(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in BOOL bMaximumWindow, _In_ BOOL bMaximumWindow,
__out PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx); _Out_ PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetCurrentConsoleFontEx( SetCurrentConsoleFontEx(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in BOOL bMaximumWindow, _In_ BOOL bMaximumWindow,
__in PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx); _In_ PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx);
#endif #endif
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetConsoleHistoryInfo( GetConsoleHistoryInfo(
__out PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo); _Out_ PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleHistoryInfo( SetConsoleHistoryInfo(
__in PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo); _In_ PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo);
WINBASEAPI WINBASEAPI
COORD COORD
WINAPI WINAPI
GetConsoleFontSize( GetConsoleFontSize(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in DWORD nFont _In_ DWORD nFont
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetConsoleSelectionInfo( GetConsoleSelectionInfo(
__out PCONSOLE_SELECTION_INFO lpConsoleSelectionInfo _Out_ PCONSOLE_SELECTION_INFO lpConsoleSelectionInfo
); );
#endif /* _WIN32_WINNT >= 0x0500 */ #endif /* _WIN32_WINNT >= 0x0500 */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumberOfConsoleMouseButtons( GetNumberOfConsoleMouseButtons(
__out LPDWORD lpNumberOfMouseButtons _Out_ LPDWORD lpNumberOfMouseButtons
);
WINBASEAPI
BOOL
WINAPI
SetConsoleMode(
__in HANDLE hConsoleHandle,
__in DWORD dwMode
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleActiveScreenBuffer( SetConsoleActiveScreenBuffer(
__in HANDLE hConsoleOutput _In_ HANDLE hConsoleOutput
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FlushConsoleInputBuffer( FlushConsoleInputBuffer(
__in HANDLE hConsoleInput _In_ HANDLE hConsoleInput
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleScreenBufferSize( SetConsoleScreenBufferSize(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in COORD dwSize _In_ COORD dwSize
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleCursorPosition( SetConsoleCursorPosition(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in COORD dwCursorPosition _In_ COORD dwCursorPosition
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleCursorInfo( SetConsoleCursorInfo(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in CONST CONSOLE_CURSOR_INFO *lpConsoleCursorInfo _In_ CONST CONSOLE_CURSOR_INFO *lpConsoleCursorInfo
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ScrollConsoleScreenBufferA( ScrollConsoleScreenBufferA(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in CONST SMALL_RECT *lpScrollRectangle, _In_ CONST SMALL_RECT *lpScrollRectangle,
__in_opt CONST SMALL_RECT *lpClipRectangle, _In_opt_ CONST SMALL_RECT *lpClipRectangle,
__in COORD dwDestinationOrigin, _In_ COORD dwDestinationOrigin,
__in CONST CHAR_INFO *lpFill _In_ CONST CHAR_INFO *lpFill
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ScrollConsoleScreenBufferW( ScrollConsoleScreenBufferW(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in CONST SMALL_RECT *lpScrollRectangle, _In_ CONST SMALL_RECT *lpScrollRectangle,
__in_opt CONST SMALL_RECT *lpClipRectangle, _In_opt_ CONST SMALL_RECT *lpClipRectangle,
__in COORD dwDestinationOrigin, _In_ COORD dwDestinationOrigin,
__in CONST CHAR_INFO *lpFill _In_ CONST CHAR_INFO *lpFill
); );
#ifdef UNICODE #ifdef UNICODE
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW #define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
#else #else
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA #define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleWindowInfo( SetConsoleWindowInfo(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in BOOL bAbsolute, _In_ BOOL bAbsolute,
__in CONST SMALL_RECT *lpConsoleWindow _In_ CONST SMALL_RECT *lpConsoleWindow
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleTextAttribute( SetConsoleTextAttribute(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in WORD wAttributes _In_ WORD wAttributes
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleCtrlHandler(
__in_opt PHANDLER_ROUTINE HandlerRoutine,
__in BOOL Add);
WINBASEAPI
BOOL
WINAPI
GenerateConsoleCtrlEvent( GenerateConsoleCtrlEvent(
__in DWORD dwCtrlEvent, _In_ DWORD dwCtrlEvent,
__in DWORD dwProcessGroupId); _In_ DWORD dwProcessGroupId);
WINBASEAPI
BOOL
WINAPI
AllocConsole(
VOID);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FreeConsole( FreeConsole(
VOID); VOID);
#if(_WIN32_WINNT >= 0x0500) #if(_WIN32_WINNT >= 0x0500)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
AttachConsole( AttachConsole(
__in DWORD dwProcessId); _In_ DWORD dwProcessId);
#define ATTACH_PARENT_PROCESS ((DWORD)-1) #define ATTACH_PARENT_PROCESS ((DWORD)-1)
#endif /* _WIN32_WINNT >= 0x0500 */ #endif /* _WIN32_WINNT >= 0x0500 */
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetConsoleTitleA( GetConsoleTitleA(
__out_ecount(nSize) LPSTR lpConsoleTitle, _Out_writes_(nSize) LPSTR lpConsoleTitle,
__in DWORD nSize _In_ DWORD nSize
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetConsoleTitleW( GetConsoleTitleW(
__out_ecount(nSize) LPWSTR lpConsoleTitle, _Out_writes_(nSize) LPWSTR lpConsoleTitle,
__in DWORD nSize _In_ DWORD nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define GetConsoleTitle GetConsoleTitleW #define GetConsoleTitle GetConsoleTitleW
#else #else
#define GetConsoleTitle GetConsoleTitleA #define GetConsoleTitle GetConsoleTitleA
#endif // !UNICODE #endif // !UNICODE
#if(_WIN32_WINNT >= 0x0600) #if(_WIN32_WINNT >= 0x0600)
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetConsoleOriginalTitleA( GetConsoleOriginalTitleA(
__out_ecount(nSize) LPSTR lpConsoleTitle, _Out_writes_(nSize) LPSTR lpConsoleTitle,
__in DWORD nSize); _In_ DWORD nSize);
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetConsoleOriginalTitleW( GetConsoleOriginalTitleW(
__out_ecount(nSize) LPWSTR lpConsoleTitle, _Out_writes_(nSize) LPWSTR lpConsoleTitle,
__in DWORD nSize); _In_ DWORD nSize);
#ifdef UNICODE #ifdef UNICODE
#define GetConsoleOriginalTitle GetConsoleOriginalTitleW #define GetConsoleOriginalTitle GetConsoleOriginalTitleW
#else #else
#define GetConsoleOriginalTitle GetConsoleOriginalTitleA #define GetConsoleOriginalTitle GetConsoleOriginalTitleA
#endif // !UNICODE #endif // !UNICODE
#endif /* _WIN32_WINNT >= 0x0600 */ #endif /* _WIN32_WINNT >= 0x0600 */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleTitleA( SetConsoleTitleA(
__in LPCSTR lpConsoleTitle _In_ LPCSTR lpConsoleTitle
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleTitleW( SetConsoleTitleW(
__in LPCWSTR lpConsoleTitle _In_ LPCWSTR lpConsoleTitle
); );
#ifdef UNICODE #ifdef UNICODE
#define SetConsoleTitle SetConsoleTitleW #define SetConsoleTitle SetConsoleTitleW
#else #else
#define SetConsoleTitle SetConsoleTitleA #define SetConsoleTitle SetConsoleTitleA
#endif // !UNICODE #endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
typedef struct _CONSOLE_READCONSOLE_CONTROL { typedef struct _CONSOLE_READCONSOLE_CONTROL {
ULONG nLength; ULONG nLength;
ULONG nInitialChars; ULONG nInitialChars;
ULONG dwCtrlWakeupMask; ULONG dwCtrlWakeupMask;
ULONG dwControlKeyState; ULONG dwControlKeyState;
} CONSOLE_READCONSOLE_CONTROL, *PCONSOLE_READCONSOLE_CONTROL; } CONSOLE_READCONSOLE_CONTROL, *PCONSOLE_READCONSOLE_CONTROL;
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
BOOL #pragma endregion
WINAPI
ReadConsoleA(
__in HANDLE hConsoleInput,
__out_ecount_part(nNumberOfCharsToRead, *lpNumberOfCharsRead)
LPVOID lpBuffer,
__in DWORD nNumberOfCharsToRead,
__out LPDWORD lpNumberOfCharsRead,
__in_opt PCONSOLE_READCONSOLE_CONTROL pInputControl
);
WINBASEAPI
BOOL
WINAPI
ReadConsoleW(
__in HANDLE hConsoleInput,
__out_ecount_part(nNumberOfCharsToRead, *lpNumberOfCharsRead)
LPVOID lpBuffer,
__in DWORD nNumberOfCharsToRead,
__out LPDWORD lpNumberOfCharsRead,
__in_opt PCONSOLE_READCONSOLE_CONTROL pInputControl
);
#ifdef UNICODE
#define ReadConsole ReadConsoleW
#else
#define ReadConsole ReadConsoleA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
WriteConsoleA(
__in HANDLE hConsoleOutput,
__in_ecount(nNumberOfCharsToWrite) CONST VOID *lpBuffer,
__in DWORD nNumberOfCharsToWrite,
__out_opt LPDWORD lpNumberOfCharsWritten,
__reserved LPVOID lpReserved);
WINBASEAPI
BOOL
WINAPI
WriteConsoleW(
__in HANDLE hConsoleOutput,
__in_ecount(nNumberOfCharsToWrite) CONST VOID *lpBuffer,
__in DWORD nNumberOfCharsToWrite,
__out_opt LPDWORD lpNumberOfCharsWritten,
__reserved LPVOID lpReserved);
#ifdef UNICODE
#define WriteConsole WriteConsoleW
#else
#define WriteConsole WriteConsoleA
#endif // !UNICODE
#define CONSOLE_TEXTMODE_BUFFER 1 #define CONSOLE_TEXTMODE_BUFFER 1
__allocator #ifndef NOAPISET
#include <consoleapi.h>
#endif
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINBASEAPI WINBASEAPI
HANDLE HANDLE
WINAPI WINAPI
CreateConsoleScreenBuffer( CreateConsoleScreenBuffer(
__in DWORD dwDesiredAccess, _In_ DWORD dwDesiredAccess,
__in DWORD dwShareMode, _In_ DWORD dwShareMode,
__in_opt CONST SECURITY_ATTRIBUTES *lpSecurityAttributes, _In_opt_ CONST SECURITY_ATTRIBUTES *lpSecurityAttributes,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__reserved LPVOID lpScreenBufferData _Reserved_ LPVOID lpScreenBufferData
); );
WINBASEAPI WINBASEAPI
UINT
WINAPI
GetConsoleCP(
VOID);
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleCP( SetConsoleCP(
__in UINT wCodePageID _In_ UINT wCodePageID
); );
WINBASEAPI WINBASEAPI
UINT
WINAPI
GetConsoleOutputCP(
VOID);
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleOutputCP( SetConsoleOutputCP(
__in UINT wCodePageID _In_ UINT wCodePageID
); );
#if(_WIN32_WINNT >= 0x0500) #if(_WIN32_WINNT >= 0x0500)
#define CONSOLE_FULLSCREEN 1 // fullscreen console #define CONSOLE_FULLSCREEN 1 // fullscreen console
#define CONSOLE_FULLSCREEN_HARDWARE 2 // console owns the hardware #define CONSOLE_FULLSCREEN_HARDWARE 2 // console owns the hardware
WINBASEAPI WINBASEAPI
BOOL BOOL
APIENTRY APIENTRY
GetConsoleDisplayMode( GetConsoleDisplayMode(
__out LPDWORD lpModeFlags); _Out_ LPDWORD lpModeFlags);
#define CONSOLE_FULLSCREEN_MODE 1 #define CONSOLE_FULLSCREEN_MODE 1
#define CONSOLE_WINDOWED_MODE 2 #define CONSOLE_WINDOWED_MODE 2
BOOL BOOL
APIENTRY APIENTRY
SetConsoleDisplayMode( SetConsoleDisplayMode(
__in HANDLE hConsoleOutput, _In_ HANDLE hConsoleOutput,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__out_opt PCOORD lpNewScreenBufferDimensions); _Out_opt_ PCOORD lpNewScreenBufferDimensions);
WINBASEAPI WINBASEAPI
HWND HWND
APIENTRY APIENTRY
GetConsoleWindow( GetConsoleWindow(
VOID VOID
); );
#endif /* _WIN32_WINNT >= 0x0500 */ #endif /* _WIN32_WINNT >= 0x0500 */
#if(_WIN32_WINNT >= 0x0501) #if(_WIN32_WINNT >= 0x0501)
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
GetConsoleProcessList( GetConsoleProcessList(
__out_ecount(dwProcessCount) LPDWORD lpdwProcessList, _Out_writes_(dwProcessCount) LPDWORD lpdwProcessList,
__in DWORD dwProcessCount); _In_ DWORD dwProcessCount);
// //
// Aliasing apis. // Aliasing apis.
// //
WINBASEAPI WINBASEAPI
BOOL BOOL
APIENTRY APIENTRY
AddConsoleAliasA( AddConsoleAliasA(
__in LPSTR Source, _In_ LPSTR Source,
__in LPSTR Target, _In_ LPSTR Target,
__in LPSTR ExeName); _In_ LPSTR ExeName);
WINBASEAPI WINBASEAPI
BOOL BOOL
APIENTRY APIENTRY
AddConsoleAliasW( AddConsoleAliasW(
__in LPWSTR Source, _In_ LPWSTR Source,
__in LPWSTR Target, _In_ LPWSTR Target,
__in LPWSTR ExeName); _In_ LPWSTR ExeName);
#ifdef UNICODE #ifdef UNICODE
#define AddConsoleAlias AddConsoleAliasW #define AddConsoleAlias AddConsoleAliasW
#else #else
#define AddConsoleAlias AddConsoleAliasA #define AddConsoleAlias AddConsoleAliasA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
GetConsoleAliasA( GetConsoleAliasA(
__in LPSTR Source, _In_ LPSTR Source,
__out_ecount(TargetBufferLength) LPSTR TargetBuffer, _Out_writes_(TargetBufferLength) LPSTR TargetBuffer,
__in DWORD TargetBufferLength, _In_ DWORD TargetBufferLength,
__in LPSTR ExeName); _In_ LPSTR ExeName);
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
GetConsoleAliasW( GetConsoleAliasW(
__in LPWSTR Source, _In_ LPWSTR Source,
__out_ecount(TargetBufferLength) LPWSTR TargetBuffer, _Out_writes_(TargetBufferLength) LPWSTR TargetBuffer,
__in DWORD TargetBufferLength, _In_ DWORD TargetBufferLength,
__in LPWSTR ExeName); _In_ LPWSTR ExeName);
#ifdef UNICODE #ifdef UNICODE
#define GetConsoleAlias GetConsoleAliasW #define GetConsoleAlias GetConsoleAliasW
#else #else
#define GetConsoleAlias GetConsoleAliasA #define GetConsoleAlias GetConsoleAliasA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
GetConsoleAliasesLengthA( GetConsoleAliasesLengthA(
__in LPSTR ExeName); _In_ LPSTR ExeName);
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
GetConsoleAliasesLengthW( GetConsoleAliasesLengthW(
__in LPWSTR ExeName); _In_ LPWSTR ExeName);
#ifdef UNICODE #ifdef UNICODE
#define GetConsoleAliasesLength GetConsoleAliasesLengthW #define GetConsoleAliasesLength GetConsoleAliasesLengthW
#else #else
#define GetConsoleAliasesLength GetConsoleAliasesLengthA #define GetConsoleAliasesLength GetConsoleAliasesLengthA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
GetConsoleAliasExesLengthA( GetConsoleAliasExesLengthA(
skipping to change at line 1042 skipping to change at line 969
#ifdef UNICODE #ifdef UNICODE
#define GetConsoleAliasExesLength GetConsoleAliasExesLengthW #define GetConsoleAliasExesLength GetConsoleAliasExesLengthW
#else #else
#define GetConsoleAliasExesLength GetConsoleAliasExesLengthA #define GetConsoleAliasExesLength GetConsoleAliasExesLengthA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
GetConsoleAliasesA( GetConsoleAliasesA(
__out_ecount(AliasBufferLength) LPSTR AliasBuffer, _Out_writes_(AliasBufferLength) LPSTR AliasBuffer,
__in DWORD AliasBufferLength, _In_ DWORD AliasBufferLength,
__in LPSTR ExeName); _In_ LPSTR ExeName);
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
GetConsoleAliasesW( GetConsoleAliasesW(
__out_ecount(AliasBufferLength) LPWSTR AliasBuffer, _Out_writes_(AliasBufferLength) LPWSTR AliasBuffer,
__in DWORD AliasBufferLength, _In_ DWORD AliasBufferLength,
__in LPWSTR ExeName); _In_ LPWSTR ExeName);
#ifdef UNICODE #ifdef UNICODE
#define GetConsoleAliases GetConsoleAliasesW #define GetConsoleAliases GetConsoleAliasesW
#else #else
#define GetConsoleAliases GetConsoleAliasesA #define GetConsoleAliases GetConsoleAliasesA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
GetConsoleAliasExesA( GetConsoleAliasExesA(
__out_ecount(ExeNameBufferLength) LPSTR ExeNameBuffer, _Out_writes_(ExeNameBufferLength) LPSTR ExeNameBuffer,
__in DWORD ExeNameBufferLength); _In_ DWORD ExeNameBufferLength);
WINBASEAPI WINBASEAPI
DWORD DWORD
APIENTRY APIENTRY
GetConsoleAliasExesW( GetConsoleAliasExesW(
__out_ecount(ExeNameBufferLength) LPWSTR ExeNameBuffer, _Out_writes_(ExeNameBufferLength) LPWSTR ExeNameBuffer,
__in DWORD ExeNameBufferLength); _In_ DWORD ExeNameBufferLength);
#ifdef UNICODE #ifdef UNICODE
#define GetConsoleAliasExes GetConsoleAliasExesW #define GetConsoleAliasExes GetConsoleAliasExesW
#else #else
#define GetConsoleAliasExes GetConsoleAliasExesA #define GetConsoleAliasExes GetConsoleAliasExesA
#endif // !UNICODE #endif // !UNICODE
#endif /* _WIN32_WINNT >= 0x0501 */ #endif /* _WIN32_WINNT >= 0x0501 */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // _WINCON_ #endif // _WINCON_
 End of changes. 86 change blocks. 
315 lines changed or deleted 244 lines changed or added


 winnls.h (6.1.7601.23418-Windows_7.0)   winnls.h (6.3.9600.17415-Windows_8.1) 
skipping to change at line 19 skipping to change at line 19
Abstract: Abstract:
Procedure declarations, constant definitions, and macros for the Procedure declarations, constant definitions, and macros for the
NLS component. NLS component.
--*/ --*/
#ifndef _WINNLS_ #ifndef _WINNLS_
#define _WINNLS_ #define _WINNLS_
#include <winapifamily.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifndef NOAPISET
#include <datetimeapi.h> // Datetime APISET dependencies
#include <libloaderapi.h> // LibLoader Apiset dependencies
#endif
#ifndef NONLS #ifndef NONLS
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#ifdef _MAC #ifdef _MAC
#include <macwin32.h> #include <macwin32.h>
#endif #endif
#if !defined(_NORMALIZE_) #if !defined(_NORMALIZE_)
#define WINNORMALIZEAPI DECLSPEC_IMPORT #define WINNORMALIZEAPI DECLSPEC_IMPORT
#else #else
#define WINNORMALIZEAPI #define WINNORMALIZEAPI
#endif #endif
skipping to change at line 211 skipping to change at line 221
#define LCMAP_HIRAGANA 0x00100000 // map katakana to hiragana #define LCMAP_HIRAGANA 0x00100000 // map katakana to hiragana
#define LCMAP_KATAKANA 0x00200000 // map hiragana to katakana #define LCMAP_KATAKANA 0x00200000 // map hiragana to katakana
#define LCMAP_HALFWIDTH 0x00400000 // map double byte to single byte #define LCMAP_HALFWIDTH 0x00400000 // map double byte to single byte
#define LCMAP_FULLWIDTH 0x00800000 // map single byte to double byte #define LCMAP_FULLWIDTH 0x00800000 // map single byte to double byte
#define LCMAP_LINGUISTIC_CASING 0x01000000 // use linguistic rules for casing #define LCMAP_LINGUISTIC_CASING 0x01000000 // use linguistic rules for casing
#define LCMAP_SIMPLIFIED_CHINESE 0x02000000 // map traditional chinese to simp lified chinese #define LCMAP_SIMPLIFIED_CHINESE 0x02000000 // map traditional chinese to simp lified chinese
#define LCMAP_TRADITIONAL_CHINESE 0x04000000 // map simplified chinese to tradi tional chinese #define LCMAP_TRADITIONAL_CHINESE 0x04000000 // map simplified chinese to tradi tional chinese
#if (WINVER >= _WIN32_WINNT_WIN8)
#define LCMAP_SORTHANDLE 0x20000000
#define LCMAP_HASH 0x00040000
#endif // (WINVER >= _WIN32_WINNT_WIN7)
// //
// Search Flags // Search Flags
// //
#define FIND_STARTSWITH 0x00100000 // see if value is at the beginnin g of source #define FIND_STARTSWITH 0x00100000 // see if value is at the beginnin g of source
#define FIND_ENDSWITH 0x00200000 // see if value is at the end of s ource #define FIND_ENDSWITH 0x00200000 // see if value is at the end of s ource
#define FIND_FROMSTART 0x00400000 // look for value in source, start ing at the beginning #define FIND_FROMSTART 0x00400000 // look for value in source, start ing at the beginning
#define FIND_FROMEND 0x00800000 // look for value in source, start ing at the end #define FIND_FROMEND 0x00800000 // look for value in source, start ing at the end
// //
// Language Group Enumeration Flags. // Language Group Enumeration Flags.
skipping to change at line 373 skipping to change at line 388
#define CTRY_KAZAKSTAN 7 // Kazakstan #define CTRY_KAZAKSTAN 7 // Kazakstan
#define CTRY_KENYA 254 // Kenya #define CTRY_KENYA 254 // Kenya
#define CTRY_KUWAIT 965 // Kuwait #define CTRY_KUWAIT 965 // Kuwait
#define CTRY_KYRGYZSTAN 996 // Kyrgyzstan #define CTRY_KYRGYZSTAN 996 // Kyrgyzstan
#define CTRY_LATVIA 371 // Latvia #define CTRY_LATVIA 371 // Latvia
#define CTRY_LEBANON 961 // Lebanon #define CTRY_LEBANON 961 // Lebanon
#define CTRY_LIBYA 218 // Libya #define CTRY_LIBYA 218 // Libya
#define CTRY_LIECHTENSTEIN 41 // Liechtenstein #define CTRY_LIECHTENSTEIN 41 // Liechtenstein
#define CTRY_LITHUANIA 370 // Lithuania #define CTRY_LITHUANIA 370 // Lithuania
#define CTRY_LUXEMBOURG 352 // Luxembourg #define CTRY_LUXEMBOURG 352 // Luxembourg
#define CTRY_MACAU 853 // Macau S.A.R., PRC #define CTRY_MACAU 853 // Macao SAR, PRC
#define CTRY_MACEDONIA 389 // Former Yugoslav Republic of Mac edonia #define CTRY_MACEDONIA 389 // Former Yugoslav Republic of Mac edonia
#define CTRY_MALAYSIA 60 // Malaysia #define CTRY_MALAYSIA 60 // Malaysia
#define CTRY_MALDIVES 960 // Maldives #define CTRY_MALDIVES 960 // Maldives
#define CTRY_MEXICO 52 // Mexico #define CTRY_MEXICO 52 // Mexico
#define CTRY_MONACO 33 // Principality of Monaco #define CTRY_MONACO 33 // Principality of Monaco
#define CTRY_MONGOLIA 976 // Mongolia #define CTRY_MONGOLIA 976 // Mongolia
#define CTRY_MOROCCO 212 // Morocco #define CTRY_MOROCCO 212 // Morocco
#define CTRY_NETHERLANDS 31 // Netherlands #define CTRY_NETHERLANDS 31 // Netherlands
#define CTRY_NEW_ZEALAND 64 // New Zealand #define CTRY_NEW_ZEALAND 64 // New Zealand
#define CTRY_NICARAGUA 505 // Nicaragua #define CTRY_NICARAGUA 505 // Nicaragua
skipping to change at line 468 skipping to change at line 483
// //
// The following LCTypes are mutually exclusive in that they may NOT // The following LCTypes are mutually exclusive in that they may NOT
// be used in combination with each other. // be used in combination with each other.
// //
// //
// These are the various forms of the name of the locale: // These are the various forms of the name of the locale:
// //
#define LOCALE_SLOCALIZEDDISPLAYNAME 0x00000002 // localized name of locale, eg "German (Germany)" in UI language #define LOCALE_SLOCALIZEDDISPLAYNAME 0x00000002 // localized name of locale, eg "German (Germany)" in UI language
#if (WINVER >= _WIN32_WINNT_WIN7) #if (WINVER >= _WIN32_WINNT_WIN7)
#define LOCALE_SENGLISHDISPLAYNAME 0x00000072 // Display name (language + c ountry usually) in English, eg "German (Germany)" #define LOCALE_SENGLISHDISPLAYNAME 0x00000072 // Display name (language + c ountry/region usually) in English, eg "German (Germany)"
#define LOCALE_SNATIVEDISPLAYNAME 0x00000073 // Display name in native loc ale language, eg "Deutsch (Deutschland) #define LOCALE_SNATIVEDISPLAYNAME 0x00000073 // Display name in native loc ale language, eg "Deutsch (Deutschland)
#endif //(WINVER >= _WIN32_WINNT_WIN7) #endif //(WINVER >= _WIN32_WINNT_WIN7)
#if (WINVER >= _WIN32_WINNT_VISTA) #if (WINVER >= _WIN32_WINNT_VISTA)
#define LOCALE_SLOCALIZEDLANGUAGENAME 0x0000006f // Language Display Name for a language, eg "German" in UI language #define LOCALE_SLOCALIZEDLANGUAGENAME 0x0000006f // Language Display Name for a language, eg "German" in UI language
#endif //(WINVER >= _WIN32_WINNT_VISTA) #endif //(WINVER >= _WIN32_WINNT_VISTA)
#define LOCALE_SENGLISHLANGUAGENAME 0x00001001 // English name of language, eg "German" #define LOCALE_SENGLISHLANGUAGENAME 0x00001001 // English name of language, eg "German"
#define LOCALE_SNATIVELANGUAGENAME 0x00000004 // native name of language, e g "Deutsch" #define LOCALE_SNATIVELANGUAGENAME 0x00000004 // native name of language, e g "Deutsch"
#define LOCALE_SLOCALIZEDCOUNTRYNAME 0x00000006 // localized name of country, #define LOCALE_SLOCALIZEDCOUNTRYNAME 0x00000006 // localized name of country/
eg "Germany" in UI language region, eg "Germany" in UI language
#define LOCALE_SENGLISHCOUNTRYNAME 0x00001002 // English name of country, e #define LOCALE_SENGLISHCOUNTRYNAME 0x00001002 // English name of country/re
g "Germany" gion, eg "Germany"
#define LOCALE_SNATIVECOUNTRYNAME 0x00000008 // native name of country, eg #define LOCALE_SNATIVECOUNTRYNAME 0x00000008 // native name of country/reg
"Deutschland" ion, eg "Deutschland"
// //
// Legacy labels for the locale name values // Legacy labels for the locale name values
// //
#define LOCALE_SLANGUAGE 0x00000002 // localized name of locale, eg "German (Germany)" in UI language #define LOCALE_SLANGUAGE 0x00000002 // localized name of locale, eg "German (Germany)" in UI language
#if (WINVER >= _WIN32_WINNT_VISTA) #if (WINVER >= _WIN32_WINNT_VISTA)
#define LOCALE_SLANGDISPLAYNAME 0x0000006f // Language Display Name for a language, eg "German" in UI language #define LOCALE_SLANGDISPLAYNAME 0x0000006f // Language Display Name for a language, eg "German" in UI language
#endif //(WINVER >= _WIN32_WINNT_VISTA) #endif //(WINVER >= _WIN32_WINNT_VISTA)
#define LOCALE_SENGLANGUAGE 0x00001001 // English name of language, eg "German" #define LOCALE_SENGLANGUAGE 0x00001001 // English name of language, eg "German"
#define LOCALE_SNATIVELANGNAME 0x00000004 // native name of language, e g "Deutsch" #define LOCALE_SNATIVELANGNAME 0x00000004 // native name of language, e g "Deutsch"
#define LOCALE_SCOUNTRY 0x00000006 // localized name of country, #define LOCALE_SCOUNTRY 0x00000006 // localized name of country/
eg "Germany" in UI language region, eg "Germany" in UI language
#define LOCALE_SENGCOUNTRY 0x00001002 // English name of country, e #define LOCALE_SENGCOUNTRY 0x00001002 // English name of country/re
g "Germany" gion, eg "Germany"
#define LOCALE_SNATIVECTRYNAME 0x00000008 // native name of country, eg #define LOCALE_SNATIVECTRYNAME 0x00000008 // native name of country/reg
"Deutschland" ion, eg "Deutschland"
// Additional LCTypes // Additional LCTypes
#define LOCALE_ILANGUAGE 0x00000001 // language id, LOCALE_SNAME preferred #define LOCALE_ILANGUAGE 0x00000001 // language id, LOCALE_SNAME preferred
#define LOCALE_SABBREVLANGNAME 0x00000003 // arbitrary abbreviated lang uage name, LOCALE_SISO639LANGNAME preferred #define LOCALE_SABBREVLANGNAME 0x00000003 // arbitrary abbreviated lang uage name, LOCALE_SISO639LANGNAME preferred
#define LOCALE_ICOUNTRY 0x00000005 // country code, eg 1, LOCALE #define LOCALE_ICOUNTRY 0x00000005 // country/region code, eg 1,
_SISO3166CTRYNAME may be more useful. LOCALE_SISO3166CTRYNAME may be more useful.
#define LOCALE_SABBREVCTRYNAME 0x00000007 // arbitrary abbreviated coun #define LOCALE_SABBREVCTRYNAME 0x00000007 // arbitrary abbreviated coun
try name, LOCALE_SISO3166CTRYNAME preferred try/region name, LOCALE_SISO3166CTRYNAME preferred
#define LOCALE_IGEOID 0x0000005B // geographical location id, eg "244" #define LOCALE_IGEOID 0x0000005B // geographical location id, eg "244"
#define LOCALE_IDEFAULTLANGUAGE 0x00000009 // default language id, depre cated #define LOCALE_IDEFAULTLANGUAGE 0x00000009 // default language id, depre cated
#define LOCALE_IDEFAULTCOUNTRY 0x0000000A // default country code, depr ecated #define LOCALE_IDEFAULTCOUNTRY 0x0000000A // default country/region cod e, deprecated
#define LOCALE_IDEFAULTCODEPAGE 0x0000000B // default oem code page (use of Unicode is recommended instead) #define LOCALE_IDEFAULTCODEPAGE 0x0000000B // default oem code page (use of Unicode is recommended instead)
#define LOCALE_IDEFAULTANSICODEPAGE 0x00001004 // default ansi code page (us e of Unicode is recommended instead) #define LOCALE_IDEFAULTANSICODEPAGE 0x00001004 // default ansi code page (us e of Unicode is recommended instead)
#define LOCALE_IDEFAULTMACCODEPAGE 0x00001011 // default mac code page (use of Unicode is recommended instead) #define LOCALE_IDEFAULTMACCODEPAGE 0x00001011 // default mac code page (use of Unicode is recommended instead)
#define LOCALE_SLIST 0x0000000C // list item separator, eg ", " for "1,2,3,4" #define LOCALE_SLIST 0x0000000C // list item separator, eg ", " for "1,2,3,4"
#define LOCALE_IMEASURE 0x0000000D // 0 = metric, 1 = US measure ment system #define LOCALE_IMEASURE 0x0000000D // 0 = metric, 1 = US measure ment system
#define LOCALE_SDECIMAL 0x0000000E // decimal separator, eg "." for 1,234.00 #define LOCALE_SDECIMAL 0x0000000E // decimal separator, eg "." for 1,234.00
#define LOCALE_STHOUSAND 0x0000000F // thousand separator, eg "," for 1,234.00 #define LOCALE_STHOUSAND 0x0000000F // thousand separator, eg "," for 1,234.00
#define LOCALE_SGROUPING 0x00000010 // digit grouping, eg "3;0" f or 1,000,000 #define LOCALE_SGROUPING 0x00000010 // digit grouping, eg "3;0" f or 1,000,000
skipping to change at line 605 skipping to change at line 620
#define LOCALE_IPOSSIGNPOSN 0x00000052 // positive sign position (de rived from INEGCURR) #define LOCALE_IPOSSIGNPOSN 0x00000052 // positive sign position (de rived from INEGCURR)
#define LOCALE_INEGSIGNPOSN 0x00000053 // negative sign position (de rived from INEGCURR) #define LOCALE_INEGSIGNPOSN 0x00000053 // negative sign position (de rived from INEGCURR)
#define LOCALE_IPOSSYMPRECEDES 0x00000054 // mon sym precedes pos amt ( derived from ICURRENCY) #define LOCALE_IPOSSYMPRECEDES 0x00000054 // mon sym precedes pos amt ( derived from ICURRENCY)
#define LOCALE_IPOSSEPBYSPACE 0x00000055 // mon sym sep by space from pos amt (derived from ICURRENCY) #define LOCALE_IPOSSEPBYSPACE 0x00000055 // mon sym sep by space from pos amt (derived from ICURRENCY)
#define LOCALE_INEGSYMPRECEDES 0x00000056 // mon sym precedes neg amt ( derived from INEGCURR) #define LOCALE_INEGSYMPRECEDES 0x00000056 // mon sym precedes neg amt ( derived from INEGCURR)
#define LOCALE_INEGSEPBYSPACE 0x00000057 // mon sym sep by space from neg amt (derived from INEGCURR) #define LOCALE_INEGSEPBYSPACE 0x00000057 // mon sym sep by space from neg amt (derived from INEGCURR)
#if(WINVER >= 0x0400) #if(WINVER >= 0x0400)
#define LOCALE_FONTSIGNATURE 0x00000058 // font signature #define LOCALE_FONTSIGNATURE 0x00000058 // font signature
#define LOCALE_SISO639LANGNAME 0x00000059 // ISO abbreviated language n ame, eg "en" #define LOCALE_SISO639LANGNAME 0x00000059 // ISO abbreviated language n ame, eg "en"
#define LOCALE_SISO3166CTRYNAME 0x0000005A // ISO abbreviated country na me, eg "US" #define LOCALE_SISO3166CTRYNAME 0x0000005A // ISO abbreviated country/re gion name, eg "US"
#endif /* WINVER >= 0x0400 */ #endif /* WINVER >= 0x0400 */
#if(WINVER >= 0x0500) #if(WINVER >= 0x0500)
#define LOCALE_IDEFAULTEBCDICCODEPAGE 0x00001012 // default ebcdic code page ( use of Unicode is recommended instead) #define LOCALE_IDEFAULTEBCDICCODEPAGE 0x00001012 // default ebcdic code page ( use of Unicode is recommended instead)
#define LOCALE_IPAPERSIZE 0x0000100A // 1 = letter, 5 = legal, 8 = a3, 9 = a4 #define LOCALE_IPAPERSIZE 0x0000100A // 1 = letter, 5 = legal, 8 = a3, 9 = a4
#define LOCALE_SENGCURRNAME 0x00001007 // english name of currency, eg "Euro" #define LOCALE_SENGCURRNAME 0x00001007 // english name of currency, eg "Euro"
#define LOCALE_SNATIVECURRNAME 0x00001008 // native name of currency, e g "euro" #define LOCALE_SNATIVECURRNAME 0x00001008 // native name of currency, e g "euro"
#define LOCALE_SYEARMONTH 0x00001006 // year month format string, eg "MM/yyyy" #define LOCALE_SYEARMONTH 0x00001006 // year month format string, eg "MM/yyyy"
#define LOCALE_SSORTNAME 0x00001013 // sort name, usually "", eg "Dictionary" in UI Language #define LOCALE_SSORTNAME 0x00001013 // sort name, usually "", eg "Dictionary" in UI Language
#define LOCALE_IDIGITSUBSTITUTION 0x00001014 // 0 = context, 1 = none, 2 = national #define LOCALE_IDIGITSUBSTITUTION 0x00001014 // 0 = context, 1 = none, 2 = national
skipping to change at line 631 skipping to change at line 646
#define LOCALE_SDURATION 0x0000005d // time duration format, eg " hh:mm:ss" #define LOCALE_SDURATION 0x0000005d // time duration format, eg " hh:mm:ss"
#define LOCALE_SKEYBOARDSTOINSTALL 0x0000005e // Used internally, see GetKe yboardLayoutName() function #define LOCALE_SKEYBOARDSTOINSTALL 0x0000005e // Used internally, see GetKe yboardLayoutName() function
#define LOCALE_SSHORTESTDAYNAME1 0x00000060 // Shortest day name for Mond ay #define LOCALE_SSHORTESTDAYNAME1 0x00000060 // Shortest day name for Mond ay
#define LOCALE_SSHORTESTDAYNAME2 0x00000061 // Shortest day name for Tues day #define LOCALE_SSHORTESTDAYNAME2 0x00000061 // Shortest day name for Tues day
#define LOCALE_SSHORTESTDAYNAME3 0x00000062 // Shortest day name for Wedn esday #define LOCALE_SSHORTESTDAYNAME3 0x00000062 // Shortest day name for Wedn esday
#define LOCALE_SSHORTESTDAYNAME4 0x00000063 // Shortest day name for Thur sday #define LOCALE_SSHORTESTDAYNAME4 0x00000063 // Shortest day name for Thur sday
#define LOCALE_SSHORTESTDAYNAME5 0x00000064 // Shortest day name for Frid ay #define LOCALE_SSHORTESTDAYNAME5 0x00000064 // Shortest day name for Frid ay
#define LOCALE_SSHORTESTDAYNAME6 0x00000065 // Shortest day name for Satu rday #define LOCALE_SSHORTESTDAYNAME6 0x00000065 // Shortest day name for Satu rday
#define LOCALE_SSHORTESTDAYNAME7 0x00000066 // Shortest day name for Sund ay #define LOCALE_SSHORTESTDAYNAME7 0x00000066 // Shortest day name for Sund ay
#define LOCALE_SISO639LANGNAME2 0x00000067 // 3 character ISO abbreviate d language name, eg "eng" #define LOCALE_SISO639LANGNAME2 0x00000067 // 3 character ISO abbreviate d language name, eg "eng"
#define LOCALE_SISO3166CTRYNAME2 0x00000068 // 3 character ISO country na me, eg "USA" #define LOCALE_SISO3166CTRYNAME2 0x00000068 // 3 character ISO country/re gion name, eg "USA"
#define LOCALE_SNAN 0x00000069 // Not a Number, eg "NaN" #define LOCALE_SNAN 0x00000069 // Not a Number, eg "NaN"
#define LOCALE_SPOSINFINITY 0x0000006a // + Infinity, eg "infinity" #define LOCALE_SPOSINFINITY 0x0000006a // + Infinity, eg "infinity"
#define LOCALE_SNEGINFINITY 0x0000006b // - Infinity, eg "-infinity" #define LOCALE_SNEGINFINITY 0x0000006b // - Infinity, eg "-infinity"
#define LOCALE_SSCRIPTS 0x0000006c // Typical scripts in the loc ale: ; delimited script codes, eg "Latn;" #define LOCALE_SSCRIPTS 0x0000006c // Typical scripts in the loc ale: ; delimited script codes, eg "Latn;"
#define LOCALE_SPARENT 0x0000006d // Fallback name for resource s, eg "en" for "en-US" #define LOCALE_SPARENT 0x0000006d // Fallback name for resource s, eg "en" for "en-US"
#define LOCALE_SCONSOLEFALLBACKNAME 0x0000006e // Fallback name for within t he console for Unicode Only locales, eg "en" for bn-IN #define LOCALE_SCONSOLEFALLBACKNAME 0x0000006e // Fallback name for within t he console for Unicode Only locales, eg "en" for bn-IN
#endif //(WINVER >= 0x0600) #endif //(WINVER >= 0x0600)
#if (WINVER >= _WIN32_WINNT_WIN7) #if (WINVER >= _WIN32_WINNT_WIN7)
#define LOCALE_IREADINGLAYOUT 0x00000070 // Returns one of the followi ng 4 reading layout values: #define LOCALE_IREADINGLAYOUT 0x00000070 // Returns one of the followi ng 4 reading layout values:
skipping to change at line 657 skipping to change at line 672
#define LOCALE_INEGATIVEPERCENT 0x00000074 // Returns 0-11 for the negat ive percent format #define LOCALE_INEGATIVEPERCENT 0x00000074 // Returns 0-11 for the negat ive percent format
#define LOCALE_IPOSITIVEPERCENT 0x00000075 // Returns 0-3 for the positi ve percent formatIPOSITIVEPERCENT #define LOCALE_IPOSITIVEPERCENT 0x00000075 // Returns 0-3 for the positi ve percent formatIPOSITIVEPERCENT
#define LOCALE_SPERCENT 0x00000076 // Returns the percent symbol #define LOCALE_SPERCENT 0x00000076 // Returns the percent symbol
#define LOCALE_SPERMILLE 0x00000077 // Returns the permille (U+20 30) symbol #define LOCALE_SPERMILLE 0x00000077 // Returns the permille (U+20 30) symbol
#define LOCALE_SMONTHDAY 0x00000078 // Returns the preferred mont h/day format #define LOCALE_SMONTHDAY 0x00000078 // Returns the preferred mont h/day format
#define LOCALE_SSHORTTIME 0x00000079 // Returns the preferred shor t time format (ie: no seconds, just h:mm) #define LOCALE_SSHORTTIME 0x00000079 // Returns the preferred shor t time format (ie: no seconds, just h:mm)
#define LOCALE_SOPENTYPELANGUAGETAG 0x0000007a // Open type language tag, eg : "latn" or "dflt" #define LOCALE_SOPENTYPELANGUAGETAG 0x0000007a // Open type language tag, eg : "latn" or "dflt"
#define LOCALE_SSORTLOCALE 0x0000007b // Name of locale to use for sorting/collation/casing behavior. #define LOCALE_SSORTLOCALE 0x0000007b // Name of locale to use for sorting/collation/casing behavior.
#endif //(WINVER >= _WIN32_WINNT_WIN7) #endif //(WINVER >= _WIN32_WINNT_WIN7)
#if (WINVER >= _WIN32_WINNT_WIN8)
#endif
#if (WINVER >= _WIN32_WINNT_WINBLUE)
#endif
// //
// Time Flags for GetTimeFormat. // Time Flags for GetTimeFormat.
// //
#define TIME_NOMINUTESORSECONDS 0x00000001 // do not use minutes or seconds #define TIME_NOMINUTESORSECONDS 0x00000001 // do not use minutes or seconds
#define TIME_NOSECONDS 0x00000002 // do not use seconds #define TIME_NOSECONDS 0x00000002 // do not use seconds
#define TIME_NOTIMEMARKER 0x00000004 // do not use time marker #define TIME_NOTIMEMARKER 0x00000004 // do not use time marker
#define TIME_FORCE24HOURFORMAT 0x00000008 // always use 24 hour format #define TIME_FORCE24HOURFORMAT 0x00000008 // always use 24 hour format
// //
// Date Flags for GetDateFormat. // Date Flags for GetDateFormat.
skipping to change at line 785 skipping to change at line 805
#define CAL_SSHORTESTDAYNAME5 0x00000035 // Shortest day name for Fr #define CAL_SSHORTESTDAYNAME5 0x00000035 // Shortest day name for Fr
#define CAL_SSHORTESTDAYNAME6 0x00000036 // Shortest day name for Sa #define CAL_SSHORTESTDAYNAME6 0x00000036 // Shortest day name for Sa
#define CAL_SSHORTESTDAYNAME7 0x00000037 // Shortest day name for Su #define CAL_SSHORTESTDAYNAME7 0x00000037 // Shortest day name for Su
#endif //(WINVER >= 0x0600) #endif //(WINVER >= 0x0600)
#if (WINVER >= _WIN32_WINNT_WIN7) #if (WINVER >= _WIN32_WINNT_WIN7)
#define CAL_SMONTHDAY 0x00000038 // Month/day format #define CAL_SMONTHDAY 0x00000038 // Month/day format
#define CAL_SABBREVERASTRING 0x00000039 // Abbreviated era string (eg: AD) #define CAL_SABBREVERASTRING 0x00000039 // Abbreviated era string (eg: AD)
#endif // winver >= windows 7 #endif // winver >= windows 7
#if (WINVER >= _WIN32_WINNT_WIN8)
#endif
// //
// Calendar Enumeration Value. // Calendar Enumeration Value.
// //
#define ENUM_ALL_CALENDARS 0xffffffff // enumerate all calendars #define ENUM_ALL_CALENDARS 0xffffffff // enumerate all calendars
// //
// Calendar ID Values. // Calendar ID Values.
// //
#define CAL_GREGORIAN 1 // Gregorian (localized) calendar #define CAL_GREGORIAN 1 // Gregorian (localized) calendar
#define CAL_GREGORIAN_US 2 // Gregorian (U.S.) calendar #define CAL_GREGORIAN_US 2 // Gregorian (U.S.) calendar
skipping to change at line 1010 skipping to change at line 1033
enum SYSNLS_FUNCTION{ enum SYSNLS_FUNCTION{
COMPARE_STRING = 0x0001, COMPARE_STRING = 0x0001,
}; };
typedef DWORD NLS_FUNCTION; typedef DWORD NLS_FUNCTION;
// //
// NLS version structure. // NLS version structure.
// //
#if (WINVER >= _WIN32_WINNT_WIN8)
//
// New structures are the same
//
// The combination of dwNLSVersion, and guidCustomVersion
// identify specific sort behavior, persist those to ensure identical
// behavior in the future.
typedef struct _nlsversioninfo{ typedef struct _nlsversioninfo{
DWORD dwNLSVersionInfoSize; // sizeof(NLSVERSIONINFO) == 32 bytes
DWORD dwNLSVersion;
DWORD dwDefinedVersion; // Deprecated, use dwNLSVersion instead
DWORD dwEffectiveId; // Deprecated, use guidCustomVerison instead
GUID guidCustomVersion; // Explicit sort version
} NLSVERSIONINFO, *LPNLSVERSIONINFO;
#else
//
// Windows 7 and below had different sizes
//
// This is to be deprecated, please use the NLSVERSIONINFOEX
// structure below in the future. The difference is that
// guidCustomversion is required to uniquely identify a sort
typedef struct _nlsversioninfo{ // Use NLSVERSIONINFOEX instead
DWORD dwNLSVersionInfoSize; // 12 bytes DWORD dwNLSVersionInfoSize; // 12 bytes
DWORD dwNLSVersion; DWORD dwNLSVersion;
DWORD dwDefinedVersion; DWORD dwDefinedVersion; // Deprecated, use dwNLSVersion instead
} NLSVERSIONINFO, *LPNLSVERSIONINFO; } NLSVERSIONINFO, *LPNLSVERSIONINFO;
#endif
// This is to be deprecated, please use the NLSVERSIONINFO // The combination of dwNLSVersion, and guidCustomVersion
// structure above in the future. The difference is that // identify specific sort behavior, persist those to ensure identical
// the effective ID is more robust. // behavior in the future.
typedef struct _nlsversioninfoex{ typedef struct _nlsversioninfoex{
DWORD dwNLSVersionInfoSize; // sizeof(NLSVERSIONINFOEX) == 32 bytes DWORD dwNLSVersionInfoSize; // sizeof(NLSVERSIONINFOEX) == 32 bytes
DWORD dwNLSVersion; DWORD dwNLSVersion;
DWORD dwDefinedVersion; DWORD dwDefinedVersion; // Deprecated, use dwNLSVersion instead
DWORD dwEffectiveId; // Use NLSVERSIONINFO instead DWORD dwEffectiveId; // Deprecated, use guidCustomVerison instead
GUID guidCustomVersion; GUID guidCustomVersion; // Explicit sort version
} NLSVERSIONINFOEX, *LPNLSVERSIONINFOEX; } NLSVERSIONINFOEX, *LPNLSVERSIONINFOEX;
// //
// GEO defines // GEO defines
// //
typedef LONG GEOID; typedef LONG GEOID;
typedef DWORD GEOTYPE; typedef DWORD GEOTYPE;
typedef DWORD GEOCLASS; typedef DWORD GEOCLASS;
skipping to change at line 1053 skipping to change at line 1100
GEO_LATITUDE = 0x0002, GEO_LATITUDE = 0x0002,
GEO_LONGITUDE = 0x0003, GEO_LONGITUDE = 0x0003,
GEO_ISO2 = 0x0004, GEO_ISO2 = 0x0004,
GEO_ISO3 = 0x0005, GEO_ISO3 = 0x0005,
GEO_RFC1766 = 0x0006, GEO_RFC1766 = 0x0006,
GEO_LCID = 0x0007, GEO_LCID = 0x0007,
GEO_FRIENDLYNAME= 0x0008, GEO_FRIENDLYNAME= 0x0008,
GEO_OFFICIALNAME= 0x0009, GEO_OFFICIALNAME= 0x0009,
GEO_TIMEZONES = 0x000A, GEO_TIMEZONES = 0x000A,
GEO_OFFICIALLANGUAGES = 0x000B, GEO_OFFICIALLANGUAGES = 0x000B,
GEO_ISO_UN_NUMBER = 0x000C,
GEO_PARENT = 0x000D
}; };
// //
// More GEOCLASS defines will be listed here // More GEOCLASS defines will be listed here
// //
enum SYSGEOCLASS { enum SYSGEOCLASS {
GEOCLASS_NATION = 16, GEOCLASS_NATION = 16,
GEOCLASS_REGION = 14, GEOCLASS_REGION = 14,
GEOCLASS_ALL = 0
}; };
#if (WINVER >= 0x0600) #if (WINVER >= 0x0600)
// //
// Normalization forms // Normalization forms
// //
typedef enum _NORM_FORM { typedef enum _NORM_FORM {
NormalizationOther = 0, // Not supported NormalizationOther = 0, // Not supported
NormalizationC = 0x1, // Each base plus combining characters to the canonical precomposed equivalent. NormalizationC = 0x1, // Each base plus combining characters to the canonical precomposed equivalent.
skipping to change at line 1084 skipping to change at line 1134
// equivalents and all compatibility charac ters to their equivalents. // equivalents and all compatibility charac ters to their equivalents.
NormalizationKD = 0x6 // Each precomposed character to its canonica l decomposed equivalent NormalizationKD = 0x6 // Each precomposed character to its canonica l decomposed equivalent
// and all compatibility characters to thei r equivalents. // and all compatibility characters to thei r equivalents.
} NORM_FORM; } NORM_FORM;
// //
// IDN (International Domain Name) Flags // IDN (International Domain Name) Flags
// //
#define IDN_ALLOW_UNASSIGNED 0x01 // Allow unassigned "query" behavior p er RFC 3454 #define IDN_ALLOW_UNASSIGNED 0x01 // Allow unassigned "query" behavior p er RFC 3454
#define IDN_USE_STD3_ASCII_RULES 0x02 // Enforce STD3 ASCII restrictions for legal characters #define IDN_USE_STD3_ASCII_RULES 0x02 // Enforce STD3 ASCII restrictions for legal characters
#define IDN_EMAIL_ADDRESS 0x04 // Enable EAI algorithmic fallback for
email local parts behavior
#define IDN_RAW_PUNYCODE 0x08 // Disable validation and mapping of p
unycode.
#define VS_ALLOW_LATIN 0x0001 // Allow Latin in test script even i f not present in locale script #define VS_ALLOW_LATIN 0x0001 // Allow Latin in test script even i f not present in locale script
#define GSS_ALLOW_INHERITED_COMMON 0x0001 // Output script ids for inherited a nd common character types if present #define GSS_ALLOW_INHERITED_COMMON 0x0001 // Output script ids for inherited a nd common character types if present
#endif //(WINVER >= 0x0600) #endif //(WINVER >= 0x0600)
// //
// Enumeration function constants. // Enumeration function constants.
// //
#ifdef STRICT #ifdef STRICT
typedef BOOL (CALLBACK* LANGUAGEGROUP_ENUMPROCA)(LGRPID, LPSTR, LPSTR, DWORD, LO NG_PTR); typedef BOOL (CALLBACK* LANGUAGEGROUP_ENUMPROCA)(LGRPID, LPSTR, LPSTR, DWORD, LO NG_PTR);
typedef BOOL (CALLBACK* LANGGROUPLOCALE_ENUMPROCA)(LGRPID, LCID, LPSTR, LONG_PTR ); typedef BOOL (CALLBACK* LANGGROUPLOCALE_ENUMPROCA)(LGRPID, LCID, LPSTR, LONG_PTR );
typedef BOOL (CALLBACK* UILANGUAGE_ENUMPROCA)(LPSTR, LONG_PTR); typedef BOOL (CALLBACK* UILANGUAGE_ENUMPROCA)(LPSTR, LONG_PTR);
typedef BOOL (CALLBACK* LOCALE_ENUMPROCA)(LPSTR);
typedef BOOL (CALLBACK* CODEPAGE_ENUMPROCA)(LPSTR); typedef BOOL (CALLBACK* CODEPAGE_ENUMPROCA)(LPSTR);
typedef BOOL (CALLBACK* DATEFMT_ENUMPROCA)(LPSTR); typedef BOOL (CALLBACK* DATEFMT_ENUMPROCA)(LPSTR);
typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXA)(LPSTR, CALID); typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXA)(LPSTR, CALID);
typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCA)(LPSTR); typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCA)(LPSTR);
typedef BOOL (CALLBACK* CALINFO_ENUMPROCA)(LPSTR); typedef BOOL (CALLBACK* CALINFO_ENUMPROCA)(LPSTR);
typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXA)(LPSTR, CALID); typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXA)(LPSTR, CALID);
typedef BOOL (CALLBACK* LOCALE_ENUMPROCA)(LPSTR);
typedef BOOL (CALLBACK* LOCALE_ENUMPROCW)(LPWSTR);
typedef BOOL (CALLBACK* LANGUAGEGROUP_ENUMPROCW)(LGRPID, LPWSTR, LPWSTR, DWORD, LONG_PTR); typedef BOOL (CALLBACK* LANGUAGEGROUP_ENUMPROCW)(LGRPID, LPWSTR, LPWSTR, DWORD, LONG_PTR);
typedef BOOL (CALLBACK* LANGGROUPLOCALE_ENUMPROCW)(LGRPID, LCID, LPWSTR, LONG_PT R); typedef BOOL (CALLBACK* LANGGROUPLOCALE_ENUMPROCW)(LGRPID, LCID, LPWSTR, LONG_PT R);
typedef BOOL (CALLBACK* UILANGUAGE_ENUMPROCW)(LPWSTR, LONG_PTR); typedef BOOL (CALLBACK* UILANGUAGE_ENUMPROCW)(LPWSTR, LONG_PTR);
typedef BOOL (CALLBACK* LOCALE_ENUMPROCW)(LPWSTR);
typedef BOOL (CALLBACK* CODEPAGE_ENUMPROCW)(LPWSTR); typedef BOOL (CALLBACK* CODEPAGE_ENUMPROCW)(LPWSTR);
typedef BOOL (CALLBACK* DATEFMT_ENUMPROCW)(LPWSTR); typedef BOOL (CALLBACK* DATEFMT_ENUMPROCW)(LPWSTR);
typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXW)(LPWSTR, CALID); typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXW)(LPWSTR, CALID);
typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCW)(LPWSTR); typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCW)(LPWSTR);
typedef BOOL (CALLBACK* CALINFO_ENUMPROCW)(LPWSTR); typedef BOOL (CALLBACK* CALINFO_ENUMPROCW)(LPWSTR);
typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXW)(LPWSTR, CALID); typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXW)(LPWSTR, CALID);
typedef BOOL (CALLBACK* GEO_ENUMPROC)(GEOID); typedef BOOL (CALLBACK* GEO_ENUMPROC)(GEOID);
#else // !STRICT #else // !STRICT
typedef FARPROC LANGUAGEGROUP_ENUMPROCA; typedef FARPROC LANGUAGEGROUP_ENUMPROCA;
typedef FARPROC LANGGROUPLOCALE_ENUMPROCA; typedef FARPROC LANGGROUPLOCALE_ENUMPROCA;
typedef FARPROC UILANGUAGE_ENUMPROCA; typedef FARPROC UILANGUAGE_ENUMPROCA;
typedef FARPROC LOCALE_ENUMPROCA;
typedef FARPROC CODEPAGE_ENUMPROCA; typedef FARPROC CODEPAGE_ENUMPROCA;
typedef FARPROC DATEFMT_ENUMPROCA; typedef FARPROC DATEFMT_ENUMPROCA;
typedef FARPROC DATEFMT_ENUMPROCEXA; typedef FARPROC DATEFMT_ENUMPROCEXA;
typedef FARPROC TIMEFMT_ENUMPROCA; typedef FARPROC TIMEFMT_ENUMPROCA;
typedef FARPROC CALINFO_ENUMPROCA; typedef FARPROC CALINFO_ENUMPROCA;
typedef FARPROC CALINFO_ENUMPROCEXA; typedef FARPROC CALINFO_ENUMPROCEXA;
typedef FARPROC GEO_ENUMPROC; typedef FARPROC GEO_ENUMPROC;
typedef FARPROC LOCALE_ENUMPROCA;
typedef FARPROC LOCALE_ENUMPROCW;
typedef FARPROC LANGUAGEGROUP_ENUMPROCW; typedef FARPROC LANGUAGEGROUP_ENUMPROCW;
typedef FARPROC LANGGROUPLOCALE_ENUMPROCW; typedef FARPROC LANGGROUPLOCALE_ENUMPROCW;
typedef FARPROC UILANGUAGE_ENUMPROCW; typedef FARPROC UILANGUAGE_ENUMPROCW;
typedef FARPROC LOCALE_ENUMPROCW;
typedef FARPROC CODEPAGE_ENUMPROCW; typedef FARPROC CODEPAGE_ENUMPROCW;
typedef FARPROC DATEFMT_ENUMPROCW; typedef FARPROC DATEFMT_ENUMPROCW;
typedef FARPROC DATEFMT_ENUMPROCEXW; typedef FARPROC DATEFMT_ENUMPROCEXW;
typedef FARPROC TIMEFMT_ENUMPROCW; typedef FARPROC TIMEFMT_ENUMPROCW;
typedef FARPROC CALINFO_ENUMPROCW; typedef FARPROC CALINFO_ENUMPROCW;
typedef FARPROC CALINFO_ENUMPROCEXW; typedef FARPROC CALINFO_ENUMPROCEXW;
#endif // !STRICT #endif // !STRICT
#ifdef UNICODE #ifdef UNICODE
#define LANGUAGEGROUP_ENUMPROC LANGUAGEGROUP_ENUMPROCW #define LANGUAGEGROUP_ENUMPROC LANGUAGEGROUP_ENUMPROCW
#define LANGGROUPLOCALE_ENUMPROC LANGGROUPLOCALE_ENUMPROCW #define LANGGROUPLOCALE_ENUMPROC LANGGROUPLOCALE_ENUMPROCW
#define UILANGUAGE_ENUMPROC UILANGUAGE_ENUMPROCW #define UILANGUAGE_ENUMPROC UILANGUAGE_ENUMPROCW
#define LOCALE_ENUMPROC LOCALE_ENUMPROCW
#define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCW #define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCW
#define DATEFMT_ENUMPROC DATEFMT_ENUMPROCW #define DATEFMT_ENUMPROC DATEFMT_ENUMPROCW
#define DATEFMT_ENUMPROCEX DATEFMT_ENUMPROCEXW #define DATEFMT_ENUMPROCEX DATEFMT_ENUMPROCEXW
#define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCW #define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCW
#define CALINFO_ENUMPROC CALINFO_ENUMPROCW #define CALINFO_ENUMPROC CALINFO_ENUMPROCW
#define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXW #define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXW
#define LOCALE_ENUMPROC LOCALE_ENUMPROCW
#else #else
#define LANGUAGEGROUP_ENUMPROC LANGUAGEGROUP_ENUMPROCA #define LANGUAGEGROUP_ENUMPROC LANGUAGEGROUP_ENUMPROCA
#define LANGGROUPLOCALE_ENUMPROC LANGGROUPLOCALE_ENUMPROCA #define LANGGROUPLOCALE_ENUMPROC LANGGROUPLOCALE_ENUMPROCA
#define UILANGUAGE_ENUMPROC UILANGUAGE_ENUMPROCA #define UILANGUAGE_ENUMPROC UILANGUAGE_ENUMPROCA
#define LOCALE_ENUMPROC LOCALE_ENUMPROCA
#define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCA #define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCA
#define DATEFMT_ENUMPROC DATEFMT_ENUMPROCA #define DATEFMT_ENUMPROC DATEFMT_ENUMPROCA
#define DATEFMT_ENUMPROCEX DATEFMT_ENUMPROCEXA #define DATEFMT_ENUMPROCEX DATEFMT_ENUMPROCEXA
#define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCA #define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCA
#define CALINFO_ENUMPROC CALINFO_ENUMPROCA #define CALINFO_ENUMPROC CALINFO_ENUMPROCA
#define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXA #define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXA
#define LOCALE_ENUMPROC LOCALE_ENUMPROCA
#endif // !UNICODE #endif // !UNICODE
// //
// Information about a MUI file, used as input/output in GetFileMUIInfo // Information about a MUI file, used as input/output in GetFileMUIInfo
// All offsets are relative to start of the structure. Offsets with value 0 mean empty field. // All offsets are relative to start of the structure. Offsets with value 0 mean empty field.
// //
typedef struct _FILEMUIINFO { typedef struct _FILEMUIINFO {
DWORD dwSize; // Size of the structure including buffe r size [in] DWORD dwSize; // Size of the structure including buffe r size [in]
skipping to change at line 1195 skipping to change at line 1247
DWORD dwLanguageNameOffset; // Language name of the file [out] DWORD dwLanguageNameOffset; // Language name of the file [out]
DWORD dwTypeIDMainSize; // Number of TypeIDs in main module [out ] DWORD dwTypeIDMainSize; // Number of TypeIDs in main module [out ]
DWORD dwTypeIDMainOffset; // Array of TypeIDs (DWORD) in main modu le [out] DWORD dwTypeIDMainOffset; // Array of TypeIDs (DWORD) in main modu le [out]
DWORD dwTypeNameMainOffset; // Multistring array of TypeNames in mai n module [out] DWORD dwTypeNameMainOffset; // Multistring array of TypeNames in mai n module [out]
DWORD dwTypeIDMUISize; // Number of TypeIDs in MUI module [out] DWORD dwTypeIDMUISize; // Number of TypeIDs in MUI module [out]
DWORD dwTypeIDMUIOffset; // Array of TypeIDs (DWORD) in MUI modul e [out] DWORD dwTypeIDMUIOffset; // Array of TypeIDs (DWORD) in MUI modul e [out]
DWORD dwTypeNameMUIOffset; // Multistring array of TypeNames in MUI module [out] DWORD dwTypeNameMUIOffset; // Multistring array of TypeNames in MUI module [out]
BYTE abBuffer[8]; // Buffer for extra data [in] (Size 4 i s for padding) BYTE abBuffer[8]; // Buffer for extra data [in] (Size 4 i s for padding)
} FILEMUIINFO, *PFILEMUIINFO; } FILEMUIINFO, *PFILEMUIINFO;
#ifndef NOAPISET
#include <stringapiset.h> // String APISET dependencies
#endif
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
// //
// Macros // Macros
// //
// Define all macros for the NLS component here. // Define all macros for the NLS component here.
// //
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
// //
// Macros to determine whether a character is a high or low surrogate, // Macros to determine whether a character is a high or low surrogate,
skipping to change at line 1260 skipping to change at line 1316
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
// //
// Code Page Dependent APIs. // Code Page Dependent APIs.
// //
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
IsValidCodePage( IsValidCodePage(
__in UINT CodePage); _In_ UINT CodePage);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
GetACP(void); GetACP(void);
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
GetOEMCP(void); GetOEMCP(void);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetCPInfo( GetCPInfo(
__in UINT CodePage, _In_ UINT CodePage,
__out LPCPINFO lpCPInfo); _Out_ LPCPINFO lpCPInfo);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetCPInfoExA( GetCPInfoExA(
__in UINT CodePage, _In_ UINT CodePage,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__out LPCPINFOEXA lpCPInfoEx); _Out_ LPCPINFOEXA lpCPInfoEx);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetCPInfoExW( GetCPInfoExW(
__in UINT CodePage, _In_ UINT CodePage,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__out LPCPINFOEXW lpCPInfoEx); _Out_ LPCPINFOEXW lpCPInfoEx);
#ifdef UNICODE #ifdef UNICODE
#define GetCPInfoEx GetCPInfoExW #define GetCPInfoEx GetCPInfoExW
#else #else
#define GetCPInfoEx GetCPInfoExA #define GetCPInfoEx GetCPInfoExA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
BOOL #pragma endregion
WINAPI
IsDBCSLeadByte(
__in BYTE TestChar);
WINBASEAPI
BOOL
WINAPI
IsDBCSLeadByteEx(
__in UINT CodePage,
__in BYTE TestChar);
WINBASEAPI
int
WINAPI
MultiByteToWideChar(
__in UINT CodePage,
__in DWORD dwFlags,
__in_bcount(cbMultiByte) LPCSTR lpMultiByteStr,
__in int cbMultiByte,
__out_ecount_opt(cchWideChar) __transfer(lpMultiByteStr) LPWSTR lpWideCharS
tr,
__in int cchWideChar);
WINBASEAPI #pragma region Desktop Family
int #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINAPI
WideCharToMultiByte(
__in UINT CodePage,
__in DWORD dwFlags,
__in_ecount(cchWideChar) LPCWSTR lpWideCharStr,
__in int cchWideChar,
__out_bcount_opt(cbMultiByte) __transfer(lpWideCharStr) LPSTR lpMultiByteS
tr,
__in int cbMultiByte,
__in_opt LPCSTR lpDefaultChar,
__out_opt LPBOOL lpUsedDefaultChar);
// //
// Locale Dependent APIs. // Locale Dependent APIs.
// //
// For Windows Vista and above CompareStringEx is preferred // For Windows Vista and above CompareStringEx is preferred
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
CompareStringA( CompareStringA(
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwCmpFlags, _In_ DWORD dwCmpFlags,
__in_ecount(cchCount1) PCNZCH lpString1, _In_reads_(cchCount1) PCNZCH lpString1,
__in int cchCount1, _In_ int cchCount1,
__in_ecount(cchCount2) PCNZCH lpString2, _In_reads_(cchCount2) PCNZCH lpString2,
__in int cchCount2); _In_ int cchCount2);
WINBASEAPI
int
WINAPI
CompareStringW(
__in LCID Locale,
__in DWORD dwCmpFlags,
__in_ecount(cchCount1) PCNZWCH lpString1,
__in int cchCount1,
__in_ecount(cchCount2) PCNZWCH lpString2,
__in int cchCount2);
#ifdef UNICODE #ifndef UNICODE
#define CompareString CompareStringW
#else
#define CompareString CompareStringA #define CompareString CompareStringA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE) #if defined(_M_CEE)
#undef CompareString #undef CompareString
__inline __inline
int int
CompareString( CompareString(
LCID Locale, LCID Locale,
DWORD dwCmpFlags, DWORD dwCmpFlags,
skipping to change at line 1404 skipping to change at line 1428
} }
#endif /* _M_CEE */ #endif /* _M_CEE */
#if (WINVER >= 0x0600) #if (WINVER >= 0x0600)
// For Windows Vista and above FindNLSStringEx is preferred // For Windows Vista and above FindNLSStringEx is preferred
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
FindNLSString( FindNLSString(
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFindNLSStringFlags, _In_ DWORD dwFindNLSStringFlags,
__in_ecount(cchSource) LPCWSTR lpStringSource, _In_reads_(cchSource) LPCWSTR lpStringSource,
__in int cchSource, _In_ int cchSource,
__in_ecount(cchValue) LPCWSTR lpStringValue, _In_reads_(cchValue) LPCWSTR lpStringValue,
__in int cchValue, _In_ int cchValue,
__out_opt LPINT pcchFound); _Out_opt_ LPINT pcchFound);
#endif //(WINVER >= 0x0600) #endif //(WINVER >= 0x0600)
#if (WINVER >= _WIN32_WINNT_WIN7)
WINBASEAPI
int
WINAPI
FindStringOrdinal(
__in DWORD dwFindStringOrdinalFlags,
__in_ecount(cchSource) LPCWSTR lpStringSource,
__in int cchSource,
__in_ecount(cchValue) LPCWSTR lpStringValue,
__in int cchValue,
__in BOOL bIgnoreCase);
#endif //(WINVER >= _WIN32_WINNT_WIN7)
// For Windows Vista and above LCMapStringEx is preferred
WINBASEAPI
int
WINAPI
LCMapStringA(
__in LCID Locale,
__in DWORD dwMapFlags,
__in_ecount(cchSrc) LPCSTR lpSrcStr,
__in int cchSrc,
__out_xcount_opt(cchDest) LPSTR lpDestStr,
__in int cchDest);
// For Windows Vista and above LCMapStringEx is preferred // For Windows Vista and above LCMapStringEx is preferred
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
LCMapStringW( LCMapStringW(
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwMapFlags, _In_ DWORD dwMapFlags,
__in_ecount(cchSrc) LPCWSTR lpSrcStr, _In_reads_(cchSrc) LPCWSTR lpSrcStr,
__in int cchSrc, _In_ int cchSrc,
__out_xcount_opt(cchDest) LPWSTR lpDestStr, _Out_writes_opt_(_Inexpressible_(cchDest)) LPWSTR lpDestStr,
__in int cchDest); _In_ int cchDest);
#ifdef UNICODE #ifdef UNICODE
#define LCMapString LCMapStringW #define LCMapString LCMapStringW
#else #endif
#define LCMapString LCMapStringA
#endif // !UNICODE
// For Windows Vista and above GetLocaleInfoEx is preferred
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetLocaleInfoA( LCMapStringA(
__in LCID Locale, _In_ LCID Locale,
__in LCTYPE LCType, _In_ DWORD dwMapFlags,
__out_ecount_opt(cchData) LPSTR lpLCData, _In_reads_(cchSrc) LPCSTR lpSrcStr,
__in int cchData); _In_ int cchSrc,
_Out_writes_opt_(_Inexpressible_(cchDest)) LPSTR lpDestStr,
_In_ int cchDest);
#ifndef UNICODE
#define LCMapString LCMapStringA
#endif
// For Windows Vista and above GetLocaleInfoEx is preferred // For Windows Vista and above GetLocaleInfoEx is preferred
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetLocaleInfoW( GetLocaleInfoW(
__in LCID Locale, _In_ LCID Locale,
__in LCTYPE LCType, _In_ LCTYPE LCType,
__out_ecount_opt(cchData) LPWSTR lpLCData, _Out_writes_opt_(cchData) LPWSTR lpLCData,
__in int cchData); _In_ int cchData);
#ifdef UNICODE #ifdef UNICODE
#define GetLocaleInfo GetLocaleInfoW #define GetLocaleInfo GetLocaleInfoW
#else #endif
#define GetLocaleInfo GetLocaleInfoA
#endif // !UNICODE WINBASEAPI
int
WINAPI
GetLocaleInfoA(
_In_ LCID Locale,
_In_ LCTYPE LCType,
_Out_writes_opt_(cchData) LPSTR lpLCData,
_In_ int cchData
);
#ifndef UNICODE
#define GetLocaleInfo GetLocaleInfoA
#endif
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetLocaleInfoA( SetLocaleInfoA(
__in LCID Locale, _In_ LCID Locale,
__in LCTYPE LCType, _In_ LCTYPE LCType,
__in LPCSTR lpLCData); _In_ LPCSTR lpLCData);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetLocaleInfoW( SetLocaleInfoW(
__in LCID Locale, _In_ LCID Locale,
__in LCTYPE LCType, _In_ LCTYPE LCType,
__in LPCWSTR lpLCData); _In_ LPCWSTR lpLCData);
#ifdef UNICODE #ifdef UNICODE
#define SetLocaleInfo SetLocaleInfoW #define SetLocaleInfo SetLocaleInfoW
#else #else
#define SetLocaleInfo SetLocaleInfoA #define SetLocaleInfo SetLocaleInfoA
#endif // !UNICODE #endif // !UNICODE
#if (WINVER >= 0x040A) #if (WINVER >= 0x040A)
// For Windows Vista and above GetCalendarInfoEx is preferred // For Windows Vista and above GetCalendarInfoEx is preferred
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetCalendarInfoA( GetCalendarInfoA(
__in LCID Locale, _In_ LCID Locale,
__in CALID Calendar, _In_ CALID Calendar,
__in CALTYPE CalType, _In_ CALTYPE CalType,
__out_ecount_opt(cchData) LPSTR lpCalData, _Out_writes_opt_(cchData) LPSTR lpCalData,
__in int cchData, _In_ int cchData,
__out_opt LPDWORD lpValue); _Out_opt_ LPDWORD lpValue);
// For Windows Vista and above GetCalendarInfoEx is preferred // For Windows Vista and above GetCalendarInfoEx is preferred
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetCalendarInfoW( GetCalendarInfoW(
__in LCID Locale, _In_ LCID Locale,
__in CALID Calendar, _In_ CALID Calendar,
__in CALTYPE CalType, _In_ CALTYPE CalType,
__out_ecount_opt(cchData) LPWSTR lpCalData, _Out_writes_opt_(cchData) LPWSTR lpCalData,
__in int cchData, _In_ int cchData,
__out_opt LPDWORD lpValue); _Out_opt_ LPDWORD lpValue);
#ifdef UNICODE #ifdef UNICODE
#define GetCalendarInfo GetCalendarInfoW #define GetCalendarInfo GetCalendarInfoW
#else #else
#define GetCalendarInfo GetCalendarInfoA #define GetCalendarInfo GetCalendarInfoA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetCalendarInfoA( SetCalendarInfoA(
__in LCID Locale, _In_ LCID Locale,
__in CALID Calendar, _In_ CALID Calendar,
__in CALTYPE CalType, _In_ CALTYPE CalType,
__in LPCSTR lpCalData); _In_ LPCSTR lpCalData);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetCalendarInfoW( SetCalendarInfoW(
__in LCID Locale, _In_ LCID Locale,
__in CALID Calendar, _In_ CALID Calendar,
__in CALTYPE CalType, _In_ CALTYPE CalType,
__in LPCWSTR lpCalData); _In_ LPCWSTR lpCalData);
#ifdef UNICODE #ifdef UNICODE
#define SetCalendarInfo SetCalendarInfoW #define SetCalendarInfo SetCalendarInfoW
#else #else
#define SetCalendarInfo SetCalendarInfoA #define SetCalendarInfo SetCalendarInfoA
#endif // !UNICODE #endif // !UNICODE
#endif #endif
#if (WINVER >= _WIN32_WINNT_WIN7)
//
// Flags used by LoadStringByReference
//
#define MUI_FORMAT_REG_COMPAT 0x0001
#define MUI_FORMAT_INF_COMPAT 0x0002
#define MUI_VERIFY_FILE_EXISTS 0x0004
#define MUI_SKIP_STRING_CACHE 0x0008
#define MUI_IMMUTABLE_LOOKUP 0x0010
WINBASEAPI
BOOL
WINAPI
LoadStringByReference(
_In_ DWORD Flags,
_In_opt_ PCWSTR Language,
_In_ PCWSTR SourceString,
_Out_writes_opt_(cchBuffer) PWSTR Buffer,
_In_ ULONG cchBuffer,
_In_opt_ PCWSTR Directory,
_Out_opt_ PULONG pcchBufferOut
);
#endif // (WINVER >= _WIN32_WINNT_WIN7)
WINBASEAPI
BOOL
WINAPI
IsDBCSLeadByte(
_In_ BYTE TestChar
);
WINBASEAPI
BOOL
WINAPI
IsDBCSLeadByteEx(
_In_ UINT CodePage,
_In_ BYTE TestChar
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if (WINVER >= 0x0600) #if (WINVER >= 0x0600)
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
LCIDToLocaleName( LCIDToLocaleName(
__in LCID Locale, _In_ LCID Locale,
__out_ecount_opt(cchName) LPWSTR lpName, _Out_writes_opt_(cchName) LPWSTR lpName,
__in int cchName, _In_ int cchName,
__in DWORD dwFlags); _In_ DWORD dwFlags);
WINBASEAPI WINBASEAPI
LCID LCID
WINAPI WINAPI
LocaleNameToLCID( LocaleNameToLCID(
__in LPCWSTR lpName, _In_ LPCWSTR lpName,
__in DWORD dwFlags); _In_ DWORD dwFlags);
#endif // (WINVER >= 0x0600) #endif // (WINVER >= 0x0600)
// For Windows Vista and above GetTimeFormatEx is preferred #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
WINBASEAPI #pragma endregion
int
WINAPI #pragma region Desktop Family
GetTimeFormatA( #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
__in LCID Locale,
__in DWORD dwFlags,
__in_opt CONST SYSTEMTIME *lpTime,
__in_opt LPCSTR lpFormat,
__out_ecount_opt(cchTime) LPSTR lpTimeStr,
__in int cchTime);
// For Windows Vista and above GetTimeFormatEx is preferred
WINBASEAPI
int
WINAPI
GetTimeFormatW(
__in LCID Locale,
__in DWORD dwFlags,
__in_opt CONST SYSTEMTIME *lpTime,
__in_opt LPCWSTR lpFormat,
__out_ecount_opt(cchTime) LPWSTR lpTimeStr,
__in int cchTime);
#ifdef UNICODE
#define GetTimeFormat GetTimeFormatW
#else
#define GetTimeFormat GetTimeFormatA
#endif // !UNICODE
// For Windows Vista and above GetDurationFormatEx is preferred // For Windows Vista and above GetDurationFormatEx is preferred
#if (WINVER >= 0x0600) #if (WINVER >= 0x0600)
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetDurationFormat( GetDurationFormat(
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in_opt CONST SYSTEMTIME *lpDuration, _In_opt_ CONST SYSTEMTIME *lpDuration,
__in ULONGLONG ullDuration, _In_ ULONGLONG ullDuration,
__in_opt LPCWSTR lpFormat, _In_opt_ LPCWSTR lpFormat,
__out_ecount_opt(cchDuration) LPWSTR lpDurationStr, _Out_writes_opt_(cchDuration) LPWSTR lpDurationStr,
__in int cchDuration); _In_ int cchDuration);
#endif //(WINVER >= 0x0600) #endif //(WINVER >= 0x0600)
// For Windows Vista and above GetDateFormatEx is preferred
WINBASEAPI
int
WINAPI
GetDateFormatA(
__in LCID Locale,
__in DWORD dwFlags,
__in_opt CONST SYSTEMTIME *lpDate,
__in_opt LPCSTR lpFormat,
__out_ecount_opt(cchDate) LPSTR lpDateStr,
__in int cchDate);
// For Windows Vista and above GetDateFormatEx is preferred
WINBASEAPI
int
WINAPI
GetDateFormatW(
__in LCID Locale,
__in DWORD dwFlags,
__in_opt CONST SYSTEMTIME *lpDate,
__in_opt LPCWSTR lpFormat,
__out_ecount_opt(cchDate) LPWSTR lpDateStr,
__in int cchDate);
#ifdef UNICODE
#define GetDateFormat GetDateFormatW
#else
#define GetDateFormat GetDateFormatA
#endif // !UNICODE
// For Windows Vista and above GetNumberFormatEx is preferred // For Windows Vista and above GetNumberFormatEx is preferred
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetNumberFormatA( GetNumberFormatA(
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LPCSTR lpValue, _In_ LPCSTR lpValue,
__in_opt CONST NUMBERFMTA *lpFormat, _In_opt_ CONST NUMBERFMTA *lpFormat,
__out_ecount_opt(cchNumber) LPSTR lpNumberStr, _Out_writes_opt_(cchNumber) LPSTR lpNumberStr,
__in int cchNumber); _In_ int cchNumber);
// For Windows Vista and above GetNumberFormatEx is preferred // For Windows Vista and above GetNumberFormatEx is preferred
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetNumberFormatW( GetNumberFormatW(
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LPCWSTR lpValue, _In_ LPCWSTR lpValue,
__in_opt CONST NUMBERFMTW *lpFormat, _In_opt_ CONST NUMBERFMTW *lpFormat,
__out_ecount_opt(cchNumber) LPWSTR lpNumberStr, _Out_writes_opt_(cchNumber) LPWSTR lpNumberStr,
__in int cchNumber); _In_ int cchNumber);
#ifdef UNICODE #ifdef UNICODE
#define GetNumberFormat GetNumberFormatW #define GetNumberFormat GetNumberFormatW
#else #else
#define GetNumberFormat GetNumberFormatA #define GetNumberFormat GetNumberFormatA
#endif // !UNICODE #endif // !UNICODE
// For Windows Vista and above GetCurrencyFormatEx is preferred // For Windows Vista and above GetCurrencyFormatEx is preferred
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetCurrencyFormatA( GetCurrencyFormatA(
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LPCSTR lpValue, _In_ LPCSTR lpValue,
__in_opt CONST CURRENCYFMTA *lpFormat, _In_opt_ CONST CURRENCYFMTA *lpFormat,
__out_ecount_opt(cchCurrency) LPSTR lpCurrencyStr, _Out_writes_opt_(cchCurrency) LPSTR lpCurrencyStr,
__in int cchCurrency); _In_ int cchCurrency);
// For Windows Vista and above GetCurrencyFormatEx is preferred // For Windows Vista and above GetCurrencyFormatEx is preferred
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetCurrencyFormatW( GetCurrencyFormatW(
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LPCWSTR lpValue, _In_ LPCWSTR lpValue,
__in_opt CONST CURRENCYFMTW *lpFormat, _In_opt_ CONST CURRENCYFMTW *lpFormat,
__out_ecount_opt(cchCurrency) LPWSTR lpCurrencyStr, _Out_writes_opt_(cchCurrency) LPWSTR lpCurrencyStr,
__in int cchCurrency); _In_ int cchCurrency);
#ifdef UNICODE #ifdef UNICODE
#define GetCurrencyFormat GetCurrencyFormatW #define GetCurrencyFormat GetCurrencyFormatW
#else #else
#define GetCurrencyFormat GetCurrencyFormatA #define GetCurrencyFormat GetCurrencyFormatA
#endif // !UNICODE #endif // !UNICODE
// For Windows Vista and above EnumCalendarInfoExEx is preferred // For Windows Vista and above EnumCalendarInfoExEx is preferred
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumCalendarInfoA( EnumCalendarInfoA(
__in CALINFO_ENUMPROCA lpCalInfoEnumProc, _In_ CALINFO_ENUMPROCA lpCalInfoEnumProc,
__in LCID Locale, _In_ LCID Locale,
__in CALID Calendar, _In_ CALID Calendar,
__in CALTYPE CalType); _In_ CALTYPE CalType);
// For Windows Vista and above EnumCalendarInfoExEx is preferred // For Windows Vista and above EnumCalendarInfoExEx is preferred
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumCalendarInfoW( EnumCalendarInfoW(
__in CALINFO_ENUMPROCW lpCalInfoEnumProc, _In_ CALINFO_ENUMPROCW lpCalInfoEnumProc,
__in LCID Locale, _In_ LCID Locale,
__in CALID Calendar, _In_ CALID Calendar,
__in CALTYPE CalType); _In_ CALTYPE CalType);
#ifdef UNICODE #ifdef UNICODE
#define EnumCalendarInfo EnumCalendarInfoW #define EnumCalendarInfo EnumCalendarInfoW
#else #else
#define EnumCalendarInfo EnumCalendarInfoA #define EnumCalendarInfo EnumCalendarInfoA
#endif // !UNICODE #endif // !UNICODE
#if(WINVER >= 0x0500) #if(WINVER >= 0x0500)
// For Windows Vista and above EnumCalendarInfoExEx is preferred // For Windows Vista and above EnumCalendarInfoExEx is preferred
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumCalendarInfoExA( EnumCalendarInfoExA(
__in CALINFO_ENUMPROCEXA lpCalInfoEnumProcEx, _In_ CALINFO_ENUMPROCEXA lpCalInfoEnumProcEx,
__in LCID Locale, _In_ LCID Locale,
__in CALID Calendar, _In_ CALID Calendar,
__in CALTYPE CalType); _In_ CALTYPE CalType);
// For Windows Vista and above EnumCalendarInfoExEx is preferred // For Windows Vista and above EnumCalendarInfoExEx is preferred
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumCalendarInfoExW( EnumCalendarInfoExW(
__in CALINFO_ENUMPROCEXW lpCalInfoEnumProcEx, _In_ CALINFO_ENUMPROCEXW lpCalInfoEnumProcEx,
__in LCID Locale, _In_ LCID Locale,
__in CALID Calendar, _In_ CALID Calendar,
__in CALTYPE CalType); _In_ CALTYPE CalType);
#ifdef UNICODE #ifdef UNICODE
#define EnumCalendarInfoEx EnumCalendarInfoExW #define EnumCalendarInfoEx EnumCalendarInfoExW
#else #else
#define EnumCalendarInfoEx EnumCalendarInfoExA #define EnumCalendarInfoEx EnumCalendarInfoExA
#endif // !UNICODE #endif // !UNICODE
#endif /* WINVER >= 0x0500 */ #endif /* WINVER >= 0x0500 */
// For Windows Vista and above EnumTimeFormatsEx is preferred // For Windows Vista and above EnumTimeFormatsEx is preferred
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumTimeFormatsA( EnumTimeFormatsA(
__in TIMEFMT_ENUMPROCA lpTimeFmtEnumProc, _In_ TIMEFMT_ENUMPROCA lpTimeFmtEnumProc,
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFlags); _In_ DWORD dwFlags);
// For Windows Vista and above EnumTimeFormatsEx is preferred // For Windows Vista and above EnumTimeFormatsEx is preferred
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumTimeFormatsW( EnumTimeFormatsW(
__in TIMEFMT_ENUMPROCW lpTimeFmtEnumProc, _In_ TIMEFMT_ENUMPROCW lpTimeFmtEnumProc,
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFlags); _In_ DWORD dwFlags);
#ifdef UNICODE #ifdef UNICODE
#define EnumTimeFormats EnumTimeFormatsW #define EnumTimeFormats EnumTimeFormatsW
#else #else
#define EnumTimeFormats EnumTimeFormatsA #define EnumTimeFormats EnumTimeFormatsA
#endif // !UNICODE #endif // !UNICODE
// For Windows Vista and above EnumDateFormatsExEx is preferred // For Windows Vista and above EnumDateFormatsExEx is preferred
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumDateFormatsA( EnumDateFormatsA(
__in DATEFMT_ENUMPROCA lpDateFmtEnumProc, _In_ DATEFMT_ENUMPROCA lpDateFmtEnumProc,
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFlags); _In_ DWORD dwFlags);
// For Windows Vista and above EnumDateFormatsExEx is preferred // For Windows Vista and above EnumDateFormatsExEx is preferred
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumDateFormatsW( EnumDateFormatsW(
__in DATEFMT_ENUMPROCW lpDateFmtEnumProc, _In_ DATEFMT_ENUMPROCW lpDateFmtEnumProc,
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFlags); _In_ DWORD dwFlags);
#ifdef UNICODE #ifdef UNICODE
#define EnumDateFormats EnumDateFormatsW #define EnumDateFormats EnumDateFormatsW
#else #else
#define EnumDateFormats EnumDateFormatsA #define EnumDateFormats EnumDateFormatsA
#endif // !UNICODE #endif // !UNICODE
#if(WINVER >= 0x0500) #if(WINVER >= 0x0500)
// For Windows Vista and above EnumDateFormatsExEx is preferred // For Windows Vista and above EnumDateFormatsExEx is preferred
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumDateFormatsExA( EnumDateFormatsExA(
__in DATEFMT_ENUMPROCEXA lpDateFmtEnumProcEx, _In_ DATEFMT_ENUMPROCEXA lpDateFmtEnumProcEx,
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFlags); _In_ DWORD dwFlags);
// For Windows Vista and above EnumDateFormatsExEx is preferred // For Windows Vista and above EnumDateFormatsExEx is preferred
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumDateFormatsExW( EnumDateFormatsExW(
__in DATEFMT_ENUMPROCEXW lpDateFmtEnumProcEx, _In_ DATEFMT_ENUMPROCEXW lpDateFmtEnumProcEx,
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFlags); _In_ DWORD dwFlags);
#ifdef UNICODE #ifdef UNICODE
#define EnumDateFormatsEx EnumDateFormatsExW #define EnumDateFormatsEx EnumDateFormatsExW
#else #else
#define EnumDateFormatsEx EnumDateFormatsExA #define EnumDateFormatsEx EnumDateFormatsExA
#endif // !UNICODE #endif // !UNICODE
#endif /* WINVER >= 0x0500 */ #endif /* WINVER >= 0x0500 */
#if(WINVER >= 0x0500) #if(WINVER >= 0x0500)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
IsValidLanguageGroup( IsValidLanguageGroup(
__in LGRPID LanguageGroup, _In_ LGRPID LanguageGroup,
__in DWORD dwFlags); _In_ DWORD dwFlags);
#endif /* WINVER >= 0x0500 */ #endif /* WINVER >= 0x0500 */
// For Windows Vista and above GetNLSVersionEx is preferred // For Windows Vista and above GetNLSVersionEx is preferred
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNLSVersion( GetNLSVersion(
__in NLS_FUNCTION Function, _In_ NLS_FUNCTION Function,
__in LCID Locale, _In_ LCID Locale,
__inout LPNLSVERSIONINFO lpVersionInformation); _Inout_ LPNLSVERSIONINFO lpVersionInformation);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
IsNLSDefinedString( IsNLSDefinedString(
__in NLS_FUNCTION Function, _In_ NLS_FUNCTION Function,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LPNLSVERSIONINFO lpVersionInformation, _In_ LPNLSVERSIONINFO lpVersionInformation,
__in_ecount(cchStr) LPCWSTR lpString, _In_reads_(cchStr) LPCWSTR lpString,
__in INT cchStr); _In_ INT cchStr);
// For Windows Vista and above IsValidLocaleName is preferred // For Windows Vista and above IsValidLocaleName is preferred
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
IsValidLocale( IsValidLocale(
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwFlags); _In_ DWORD dwFlags);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetGeoInfoA( GetGeoInfoA(
__in GEOID Location, _In_ GEOID Location,
__in GEOTYPE GeoType, _In_ GEOTYPE GeoType,
__out_ecount_opt(cchData) LPSTR lpGeoData, _Out_writes_opt_(cchData) LPSTR lpGeoData,
__in int cchData, _In_ int cchData,
__in LANGID LangId); _In_ LANGID LangId);
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetGeoInfoW( GetGeoInfoW(
__in GEOID Location, _In_ GEOID Location,
__in GEOTYPE GeoType, _In_ GEOTYPE GeoType,
__out_ecount_opt(cchData) LPWSTR lpGeoData, _Out_writes_opt_(cchData) LPWSTR lpGeoData,
__in int cchData, _In_ int cchData,
__in LANGID LangId); _In_ LANGID LangId);
#ifdef UNICODE #ifdef UNICODE
#define GetGeoInfo GetGeoInfoW #define GetGeoInfo GetGeoInfoW
#else #else
#define GetGeoInfo GetGeoInfoA #define GetGeoInfo GetGeoInfoA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumSystemGeoID( EnumSystemGeoID(
__in GEOCLASS GeoClass, _In_ GEOCLASS GeoClass,
__in GEOID ParentGeoId, _In_ GEOID ParentGeoId,
__in GEO_ENUMPROC lpGeoEnumProc); _In_ GEO_ENUMPROC lpGeoEnumProc);
WINBASEAPI WINBASEAPI
GEOID GEOID
WINAPI WINAPI
GetUserGeoID( GetUserGeoID(
__in GEOCLASS GeoClass); _In_ GEOCLASS GeoClass);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetUserGeoID( SetUserGeoID(
__in GEOID GeoId); _In_ GEOID GeoId);
WINBASEAPI WINBASEAPI
LCID LCID
WINAPI WINAPI
ConvertDefaultLocale( ConvertDefaultLocale(
__in LCID Locale); _In_ LCID Locale);
WINBASEAPI WINBASEAPI
LCID LCID
WINAPI WINAPI
GetThreadLocale(void); GetThreadLocale(void);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetThreadLocale( SetThreadLocale(
__in LCID Locale _In_ LCID Locale
); );
#if(WINVER >= 0x0500) #if(WINVER >= 0x0500)
WINBASEAPI WINBASEAPI
LANGID LANGID
WINAPI WINAPI
GetSystemDefaultUILanguage(void); GetSystemDefaultUILanguage(void);
WINBASEAPI WINBASEAPI
LANGID LANGID
skipping to change at line 1950 skipping to change at line 1972
GetSystemDefaultLCID(void); GetSystemDefaultLCID(void);
WINBASEAPI WINBASEAPI
LCID LCID
WINAPI WINAPI
GetUserDefaultLCID(void); GetUserDefaultLCID(void);
WINBASEAPI WINBASEAPI
LANGID LANGID
WINAPI WINAPI
SetThreadUILanguage(__in LANGID LangId); SetThreadUILanguage(_In_ LANGID LangId);
#if (WINVER >= 0x0600) #if (WINVER >= 0x0600)
WINBASEAPI WINBASEAPI
LANGID LANGID
WINAPI WINAPI
GetThreadUILanguage(void); GetThreadUILanguage(void);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetProcessPreferredUILanguages( GetProcessPreferredUILanguages(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__out PULONG pulNumLanguages, _Out_ PULONG pulNumLanguages,
__out_ecount_opt(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer, _Out_writes_opt_(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer,
__inout PULONG pcchLanguagesBuffer _Inout_ PULONG pcchLanguagesBuffer
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetProcessPreferredUILanguages( SetProcessPreferredUILanguages(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in_opt PCZZWSTR pwszLanguagesBuffer, _In_opt_ PCZZWSTR pwszLanguagesBuffer,
__out_opt PULONG pulNumLanguages _Out_opt_ PULONG pulNumLanguages
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetUserPreferredUILanguages ( GetUserPreferredUILanguages (
__in DWORD dwFlags, _In_ DWORD dwFlags,
__out PULONG pulNumLanguages, _Out_ PULONG pulNumLanguages,
__out_ecount_opt(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer, _Out_writes_opt_(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer,
__inout PULONG pcchLanguagesBuffer _Inout_ PULONG pcchLanguagesBuffer
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetSystemPreferredUILanguages ( GetSystemPreferredUILanguages (
__in DWORD dwFlags, _In_ DWORD dwFlags,
__out PULONG pulNumLanguages, _Out_ PULONG pulNumLanguages,
__out_ecount_opt(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer, _Out_writes_opt_(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer,
__inout PULONG pcchLanguagesBuffer _Inout_ PULONG pcchLanguagesBuffer
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetThreadPreferredUILanguages( GetThreadPreferredUILanguages(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__out PULONG pulNumLanguages, _Out_ PULONG pulNumLanguages,
__out_ecount_opt(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer, _Out_writes_opt_(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer,
__inout PULONG pcchLanguagesBuffer _Inout_ PULONG pcchLanguagesBuffer
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetThreadPreferredUILanguages( SetThreadPreferredUILanguages(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in_opt PCZZWSTR pwszLanguagesBuffer, _In_opt_ PCZZWSTR pwszLanguagesBuffer,
__out_opt PULONG pulNumLanguages _Out_opt_ PULONG pulNumLanguages
); );
WINBASEAPI WINBASEAPI
__success(return==1) _Success_(return!=FALSE)
BOOL BOOL
WINAPI WINAPI
GetFileMUIInfo( GetFileMUIInfo(
DWORD dwFlags, DWORD dwFlags,
__in PCWSTR pcwszFilePath, _In_ PCWSTR pcwszFilePath,
__inout_bcount_part_opt(*pcbFileMUIInfo,*pcbFileMUIInfo) PFILEMUIINFO pFi _Inout_updates_bytes_to_opt_(*pcbFileMUIInfo,*pcbFileMUIInfo) PFILEMUIINFO
leMUIInfo, pFileMUIInfo,
__inout DWORD* pcbFileMUIInfo); _Inout_ DWORD* pcbFileMUIInfo);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetFileMUIPath( GetFileMUIPath(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in PCWSTR pcwszFilePath , _In_ PCWSTR pcwszFilePath ,
__inout_ecount_opt (*pcchLanguage) PWSTR pwszLanguage, _Inout_updates_opt_ (*pcchLanguage) PWSTR pwszLanguage,
__inout PULONG pcchLanguage, _Inout_ PULONG pcchLanguage,
__out_ecount_opt (*pcchFileMUIPath) PWSTR pwszFileMUIPath, _Out_writes_opt_ (*pcchFileMUIPath) PWSTR pwszFileMUIPath,
__inout PULONG pcchFileMUIPath, _Inout_ PULONG pcchFileMUIPath,
__inout PULONGLONG pululEnumerator _Inout_ PULONGLONG pululEnumerator
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetUILanguageInfo( GetUILanguageInfo(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in PCZZWSTR pwmszLanguage, _In_ PCZZWSTR pwmszLanguage,
__out_ecount_opt(*pcchFallbackLanguages) PZZWSTR pwszFallbackLanguages, _Out_writes_opt_(*pcchFallbackLanguages) PZZWSTR pwszFallbackLanguages,
__inout_opt PDWORD pcchFallbackLanguages, _Inout_opt_ PDWORD pcchFallbackLanguages,
__out PDWORD pAttributes _Out_ PDWORD pAttributes
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
NotifyUILanguageChange( NotifyUILanguageChange(
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in_opt PCWSTR pcwstrNewLanguage, _In_opt_ PCWSTR pcwstrNewLanguage,
__in_opt PCWSTR pcwstrPreviousLanguage, _In_opt_ PCWSTR pcwstrPreviousLanguage,
__in DWORD dwReserved, _In_ DWORD dwReserved,
__out_opt PDWORD pdwStatusRtrn _Out_opt_ PDWORD pdwStatusRtrn
); );
#endif #endif
// //
// Locale Independent APIs. // Locale Independent APIs.
// //
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetStringTypeExA( GetStringTypeExA(
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwInfoType, _In_ DWORD dwInfoType,
__in_ecount(cchSrc) LPCSTR lpSrcStr, _In_reads_(cchSrc) LPCSTR lpSrcStr,
__in int cchSrc, _In_ int cchSrc,
__out_ecount(cchSrc) LPWORD lpCharType); _Out_writes_(cchSrc) LPWORD lpCharType);
WINBASEAPI #ifndef UNICODE
BOOL
WINAPI
GetStringTypeExW(
__in LCID Locale,
__in DWORD dwInfoType,
__in_ecount(cchSrc) LPCWSTR lpSrcStr,
__in int cchSrc,
__out_ecount(cchSrc) LPWORD lpCharType);
#ifdef UNICODE
#define GetStringTypeEx GetStringTypeExW
#else
#define GetStringTypeEx GetStringTypeExA #define GetStringTypeEx GetStringTypeExA
#endif // !UNICODE #endif
// //
// NOTE: The parameters for GetStringTypeA and GetStringTypeW are // NOTE: The parameters for GetStringTypeA and GetStringTypeW are
// NOT the same. The W version was shipped in NT 3.1. The // NOT the same. The W version was shipped in NT 3.1. The
// A version was then shipped in 16-bit OLE with the wrong // A version was then shipped in 16-bit OLE with the wrong
// parameters (ported from Win95). To be compatible, we // parameters (ported from Win95). To be compatible, we
// must break the relationship between the A and W versions // must break the relationship between the A and W versions
// of GetStringType. There will be NO function call for the // of GetStringType. There will be NO function call for the
// generic GetStringType. // generic GetStringType.
// //
// GetStringTypeEx (above) should be used instead. // GetStringTypeEx (above) should be used instead.
// //
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetStringTypeA( GetStringTypeA(
__in LCID Locale, _In_ LCID Locale,
__in DWORD dwInfoType, _In_ DWORD dwInfoType,
__in_ecount(cchSrc) LPCSTR lpSrcStr, _In_reads_(cchSrc) LPCSTR lpSrcStr,
__in int cchSrc, _In_ int cchSrc,
__out LPWORD lpCharType); _Out_ LPWORD lpCharType);
WINBASEAPI WINBASEAPI
BOOL int
WINAPI WINAPI
GetStringTypeW( FoldStringA(
__in DWORD dwInfoType, _In_ DWORD dwMapFlags,
__in_ecount(cchSrc) LPCWSTR lpSrcStr, _In_reads_(cchSrc) LPCSTR lpSrcStr,
__in int cchSrc, _In_ int cchSrc,
__out LPWORD lpCharType); _Out_writes_opt_(cchDest) LPSTR lpDestStr,
_In_ int cchDest);
#ifndef UNICODE
#define FoldString FoldStringA
#endif
#if(WINVER >= 0x0500)
WINBASEAPI WINBASEAPI
int BOOL
WINAPI WINAPI
FoldStringA( EnumSystemLocalesA(
__in DWORD dwMapFlags, _In_ LOCALE_ENUMPROCA lpLocaleEnumProc,
__in_ecount(cchSrc) LPCSTR lpSrcStr, _In_ DWORD dwFlags);
__in int cchSrc,
__out_ecount_opt(cchDest) LPSTR lpDestStr,
__in int cchDest);
WINBASEAPI WINBASEAPI
int BOOL
WINAPI WINAPI
FoldStringW( EnumSystemLocalesW(
__in DWORD dwMapFlags, _In_ LOCALE_ENUMPROCW lpLocaleEnumProc,
__in_ecount(cchSrc) LPCWSTR lpSrcStr, _In_ DWORD dwFlags);
__in int cchSrc,
__out_ecount_opt(cchDest) LPWSTR lpDestStr,
__in int cchDest);
#ifdef UNICODE #ifdef UNICODE
#define FoldString FoldStringW #define EnumSystemLocales EnumSystemLocalesW
#else #else
#define FoldString FoldStringA #define EnumSystemLocales EnumSystemLocalesA
#endif // !UNICODE #endif // !UNICODE
#if(WINVER >= 0x0500)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumSystemLanguageGroupsA( EnumSystemLanguageGroupsA(
__in LANGUAGEGROUP_ENUMPROCA lpLanguageGroupEnumProc, _In_ LANGUAGEGROUP_ENUMPROCA lpLanguageGroupEnumProc,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LONG_PTR lParam); _In_ LONG_PTR lParam);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumSystemLanguageGroupsW( EnumSystemLanguageGroupsW(
__in LANGUAGEGROUP_ENUMPROCW lpLanguageGroupEnumProc, _In_ LANGUAGEGROUP_ENUMPROCW lpLanguageGroupEnumProc,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LONG_PTR lParam); _In_ LONG_PTR lParam);
#ifdef UNICODE #ifdef UNICODE
#define EnumSystemLanguageGroups EnumSystemLanguageGroupsW #define EnumSystemLanguageGroups EnumSystemLanguageGroupsW
#else #else
#define EnumSystemLanguageGroups EnumSystemLanguageGroupsA #define EnumSystemLanguageGroups EnumSystemLanguageGroupsA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumLanguageGroupLocalesA( EnumLanguageGroupLocalesA(
__in LANGGROUPLOCALE_ENUMPROCA lpLangGroupLocaleEnumProc, _In_ LANGGROUPLOCALE_ENUMPROCA lpLangGroupLocaleEnumProc,
__in LGRPID LanguageGroup, _In_ LGRPID LanguageGroup,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LONG_PTR lParam); _In_ LONG_PTR lParam);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumLanguageGroupLocalesW( EnumLanguageGroupLocalesW(
__in LANGGROUPLOCALE_ENUMPROCW lpLangGroupLocaleEnumProc, _In_ LANGGROUPLOCALE_ENUMPROCW lpLangGroupLocaleEnumProc,
__in LGRPID LanguageGroup, _In_ LGRPID LanguageGroup,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LONG_PTR lParam); _In_ LONG_PTR lParam);
#ifdef UNICODE #ifdef UNICODE
#define EnumLanguageGroupLocales EnumLanguageGroupLocalesW #define EnumLanguageGroupLocales EnumLanguageGroupLocalesW
#else #else
#define EnumLanguageGroupLocales EnumLanguageGroupLocalesA #define EnumLanguageGroupLocales EnumLanguageGroupLocalesA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumUILanguagesA( EnumUILanguagesA(
__in UILANGUAGE_ENUMPROCA lpUILanguageEnumProc, _In_ UILANGUAGE_ENUMPROCA lpUILanguageEnumProc,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LONG_PTR lParam); _In_ LONG_PTR lParam);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumUILanguagesW( EnumUILanguagesW(
__in UILANGUAGE_ENUMPROCW lpUILanguageEnumProc, _In_ UILANGUAGE_ENUMPROCW lpUILanguageEnumProc,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LONG_PTR lParam); _In_ LONG_PTR lParam);
#ifdef UNICODE #ifdef UNICODE
#define EnumUILanguages EnumUILanguagesW #define EnumUILanguages EnumUILanguagesW
#else #else
#define EnumUILanguages EnumUILanguagesA #define EnumUILanguages EnumUILanguagesA
#endif // !UNICODE #endif // !UNICODE
#endif /* WINVER >= 0x0500 */ #endif /* WINVER >= 0x0500 */
WINBASEAPI #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
BOOL #pragma endregion
WINAPI
EnumSystemLocalesA( #pragma region Application Family
__in LOCALE_ENUMPROCA lpLocaleEnumProc, #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
__in DWORD dwFlags);
WINBASEAPI
BOOL
WINAPI
EnumSystemLocalesW(
__in LOCALE_ENUMPROCW lpLocaleEnumProc,
__in DWORD dwFlags);
#ifdef UNICODE
#define EnumSystemLocales EnumSystemLocalesW
#else
#define EnumSystemLocales EnumSystemLocalesA
#endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumSystemCodePagesA( EnumSystemCodePagesA(
__in CODEPAGE_ENUMPROCA lpCodePageEnumProc, _In_ CODEPAGE_ENUMPROCA lpCodePageEnumProc,
__in DWORD dwFlags); _In_ DWORD dwFlags);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumSystemCodePagesW( EnumSystemCodePagesW(
__in CODEPAGE_ENUMPROCW lpCodePageEnumProc, _In_ CODEPAGE_ENUMPROCW lpCodePageEnumProc,
__in DWORD dwFlags); _In_ DWORD dwFlags);
#ifdef UNICODE #ifdef UNICODE
#define EnumSystemCodePages EnumSystemCodePagesW #define EnumSystemCodePages EnumSystemCodePagesW
#else #else
#define EnumSystemCodePages EnumSystemCodePagesA #define EnumSystemCodePages EnumSystemCodePagesA
#endif // !UNICODE #endif // !UNICODE
#if (WINVER >= 0x0600) #if (WINVER >= 0x0600)
// //
// Windows API Normalization Functions // Windows API Normalization Functions
// //
WINNORMALIZEAPI WINNORMALIZEAPI
int int
WINAPI NormalizeString( __in NORM_FORM NormForm, WINAPI NormalizeString( _In_ NORM_FORM NormForm,
__in_ecount(cwSrcLength) LPCWSTR lpSrcString, _In_reads_(cwSrcLength) LPCWSTR lpSrcString,
__in int cwSrcLength, _In_ int cwSrcLength,
__out_ecount_opt(cwDstLength) LPWSTR lpDstString, _Out_writes_opt_(cwDstLength) LPWSTR lpDstString,
__in int cwDstLength ); _In_ int cwDstLength );
WINNORMALIZEAPI WINNORMALIZEAPI
BOOL BOOL
WINAPI IsNormalizedString( __in NORM_FORM NormForm, WINAPI IsNormalizedString( _In_ NORM_FORM NormForm,
__in_ecount(cwLength) LPCWSTR lpString, _In_reads_(cwLength) LPCWSTR lpString,
__in int cwLength ); _In_ int cwLength );
// //
// IDN (International Domain Name) Functions // IDN (International Domain Name) Functions
// //
WINNORMALIZEAPI WINNORMALIZEAPI
int int
WINAPI IdnToAscii(__in DWORD dwFlags, WINAPI IdnToAscii(_In_ DWORD dwFlags,
__in_ecount(cchUnicodeChar) LPCWSTR lpUnicodeCharStr, _In_reads_(cchUnicodeChar) LPCWSTR lpUnicodeCharStr,
__in int cchUnicodeChar, _In_ int cchUnicodeChar,
__out_ecount_opt(cchASCIIChar) LPWSTR lpASCIICharStr, _Out_writes_opt_(cchASCIIChar) LPWSTR lpASCIICharStr,
__in int cchASCIIChar); _In_ int cchASCIIChar);
WINNORMALIZEAPI WINNORMALIZEAPI
int int
WINAPI IdnToNameprepUnicode(__in DWORD dwFlags, WINAPI IdnToNameprepUnicode(_In_ DWORD dwFlags,
__in_ecount(cchUnicodeChar) LPCWSTR lpUnicode _In_reads_(cchUnicodeChar) LPCWSTR lpUnicode
CharStr, CharStr,
__in int cchUnicod _In_ int cchUnicod
eChar, eChar,
__out_ecount_opt(cchNameprepChar) LPWSTR lpNamepr _Out_writes_opt_(cchNameprepChar) LPWSTR lpNamepr
epCharStr, epCharStr,
__in int cchNamepr _In_ int cchNamepr
epChar); epChar);
WINNORMALIZEAPI WINNORMALIZEAPI
int int
WINAPI IdnToUnicode(__in DWORD dwFlags, WINAPI IdnToUnicode(_In_ DWORD dwFlags,
__in_ecount(cchASCIIChar) LPCWSTR lpASCIICharStr, _In_reads_(cchASCIIChar) LPCWSTR lpASCIICharStr,
__in int cchASCIIChar, _In_ int cchASCIIChar,
__out_ecount_opt(cchUnicodeChar) LPWSTR lpUnicodeCharStr, _Out_writes_opt_(cchUnicodeChar) LPWSTR lpUnicodeCharStr,
__in int cchUnicodeChar); _In_ int cchUnicodeChar);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI VerifyScripts( WINAPI VerifyScripts(
__in DWORD dwFlags, // optional behavior flags _In_ DWORD dwFlags, // optional behavior flags
__in LPCWSTR lpLocaleScripts, // Locale list of scripts string _In_ LPCWSTR lpLocaleScripts, // Locale list of scripts string
__in int cchLocaleScripts, // size of locale script list string _In_ int cchLocaleScripts, // size of locale script list string
__in LPCWSTR lpTestScripts, // test scripts string _In_ LPCWSTR lpTestScripts, // test scripts string
__in int cchTestScripts); // size of test list string _In_ int cchTestScripts); // size of test list string
WINBASEAPI WINBASEAPI
int int
WINAPI GetStringScripts( WINAPI GetStringScripts(
__in DWORD dwFlags, // optional behavio _In_ DWORD dwFlags, // optional behavio
r flags r flags
__in LPCWSTR lpString, // Unicode characte _In_ LPCWSTR lpString, // Unicode characte
r input string r input string
__in int cchString, // size of input st _In_ int cchString, // size of input st
ring ring
__out_ecount_opt(cchScripts) LPWSTR lpScripts, // Script list outp _Out_writes_opt_(cchScripts) LPWSTR lpScripts, // Script list outp
ut string ut string
__in int cchScripts); // size of output s _In_ int cchScripts); // size of output s
tring tring
#endif //(WINVER >= 0x0600) #endif //(WINVER >= 0x0600)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#if (WINVER >= 0x0600) #if (WINVER >= 0x0600)
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
// //
// String based NLS APIs // String based NLS APIs
// //
#define LOCALE_NAME_USER_DEFAULT NULL #define LOCALE_NAME_USER_DEFAULT NULL
#define LOCALE_NAME_INVARIANT L"" #define LOCALE_NAME_INVARIANT L""
#define LOCALE_NAME_SYSTEM_DEFAULT L"!x-sys-default-locale" #define LOCALE_NAME_SYSTEM_DEFAULT L"!x-sys-default-locale"
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetLocaleInfoEx( GetLocaleInfoEx(
__in_opt LPCWSTR lpLocaleName, _In_opt_ LPCWSTR lpLocaleName,
__in LCTYPE LCType, _In_ LCTYPE LCType,
__out_ecount_opt(cchData) LPWSTR lpLCData, _Out_writes_opt_(cchData) LPWSTR lpLCData,
__in int cchData _In_ int cchData
); );
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetCalendarInfoEx( GetCalendarInfoEx(
__in_opt LPCWSTR lpLocaleName, _In_opt_ LPCWSTR lpLocaleName,
__in CALID Calendar, _In_ CALID Calendar,
__in_opt LPCWSTR lpReserved, _In_opt_ LPCWSTR lpReserved,
__in CALTYPE CalType, _In_ CALTYPE CalType,
__out_ecount_opt(cchData) LPWSTR lpCalData, _Out_writes_opt_(cchData) LPWSTR lpCalData,
__in int cchData, _In_ int cchData,
__out_opt LPDWORD lpValue _Out_opt_ LPDWORD lpValue
);
WINBASEAPI
int
WINAPI
GetTimeFormatEx(
__in_opt LPCWSTR lpLocaleName,
__in DWORD dwFlags,
__in_opt CONST SYSTEMTIME *lpTime,
__in_opt LPCWSTR lpFormat,
__out_ecount_opt(cchTime) LPWSTR lpTimeStr,
__in int cchTime
);
WINBASEAPI
int
WINAPI
GetDateFormatEx(
__in_opt LPCWSTR lpLocaleName,
__in DWORD dwFlags,
__in_opt CONST SYSTEMTIME *lpDate,
__in_opt LPCWSTR lpFormat,
__out_ecount_opt(cchDate) LPWSTR lpDateStr,
__in int cchDate,
__in_opt LPCWSTR lpCalendar
); );
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetDurationFormatEx( GetDurationFormatEx(
__in_opt LPCWSTR lpLocaleName, _In_opt_ LPCWSTR lpLocaleName,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in_opt CONST SYSTEMTIME *lpDuration, _In_opt_ CONST SYSTEMTIME *lpDuration,
__in ULONGLONG ullDuration, _In_ ULONGLONG ullDuration,
__in_opt LPCWSTR lpFormat, _In_opt_ LPCWSTR lpFormat,
__out_ecount_opt(cchDuration) LPWSTR lpDurationStr, _Out_writes_opt_(cchDuration) LPWSTR lpDurationStr,
__in int cchDuration _In_ int cchDuration
); );
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetNumberFormatEx( GetNumberFormatEx(
__in_opt LPCWSTR lpLocaleName, _In_opt_ LPCWSTR lpLocaleName,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LPCWSTR lpValue, _In_ LPCWSTR lpValue,
__in_opt CONST NUMBERFMTW *lpFormat, _In_opt_ CONST NUMBERFMTW *lpFormat,
__out_ecount_opt(cchNumber) LPWSTR lpNumberStr, _Out_writes_opt_(cchNumber) LPWSTR lpNumberStr,
__in int cchNumber _In_ int cchNumber
); );
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetCurrencyFormatEx( GetCurrencyFormatEx(
__in_opt LPCWSTR lpLocaleName, _In_opt_ LPCWSTR lpLocaleName,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LPCWSTR lpValue, _In_ LPCWSTR lpValue,
__in_opt CONST CURRENCYFMTW *lpFormat, _In_opt_ CONST CURRENCYFMTW *lpFormat,
__out_ecount_opt(cchCurrency) LPWSTR lpCurrencyStr, _Out_writes_opt_(cchCurrency) LPWSTR lpCurrencyStr,
__in int cchCurrency _In_ int cchCurrency
); );
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetUserDefaultLocaleName( GetUserDefaultLocaleName(
__out_ecount(cchLocaleName) LPWSTR lpLocaleName, _Out_writes_(cchLocaleName) LPWSTR lpLocaleName,
__in int cchLocaleName _In_ int cchLocaleName
); );
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
GetSystemDefaultLocaleName( GetSystemDefaultLocaleName(
__out_ecount(cchLocaleName) LPWSTR lpLocaleName, _Out_writes_(cchLocaleName) LPWSTR lpLocaleName,
__in int cchLocaleName _In_ int cchLocaleName
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNLSVersionEx( GetNLSVersionEx(
__in NLS_FUNCTION function, _In_ NLS_FUNCTION function,
__in_opt LPCWSTR lpLocaleName, _In_opt_ LPCWSTR lpLocaleName,
__inout LPNLSVERSIONINFOEX lpVersionInformation _Inout_ LPNLSVERSIONINFOEX lpVersionInformation
); );
#if (WINVER >= _WIN32_WINNT_WIN8)
WINBASEAPI WINBASEAPI
int DWORD
WINAPI WINAPI
CompareStringEx( IsValidNLSVersion(
__in_opt LPCWSTR lpLocaleName, _In_ NLS_FUNCTION function,
__in DWORD dwCmpFlags, _In_opt_ LPCWSTR lpLocaleName,
__in_ecount(cchCount1) LPCWSTR lpString1, _In_ LPNLSVERSIONINFOEX lpVersionInformation
__in int cchCount1,
__in_ecount(cchCount2) LPCWSTR lpString2,
__in int cchCount2,
__in_opt LPNLSVERSIONINFO lpVersionInformation,
__in_opt LPVOID lpReserved,
__in_opt LPARAM lParam
); );
#endif
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
FindNLSStringEx( FindNLSStringEx(
__in_opt LPCWSTR lpLocaleName, _In_opt_ LPCWSTR lpLocaleName,
__in DWORD dwFindNLSStringFlags, _In_ DWORD dwFindNLSStringFlags,
__in_ecount(cchSource) LPCWSTR lpStringSource, _In_reads_(cchSource) LPCWSTR lpStringSource,
__in int cchSource, _In_ int cchSource,
__in_ecount(cchValue) LPCWSTR lpStringValue, _In_reads_(cchValue) LPCWSTR lpStringValue,
__in int cchValue, _In_ int cchValue,
__out_opt LPINT pcchFound, _Out_opt_ LPINT pcchFound,
__in_opt LPNLSVERSIONINFO lpVersionInformation, _In_opt_ LPNLSVERSIONINFO lpVersionInformation,
__in_opt LPVOID lpReserved, _In_opt_ LPVOID lpReserved,
__in_opt LPARAM lParam _In_opt_ LPARAM sortHandle
); );
#if (WINVER >= _WIN32_WINNT_WIN8)
_When_((dwMapFlags & (LCMAP_SORTKEY | LCMAP_BYTEREV | LCMAP_HASH | LCMAP_SORTHAN
DLE)) != 0, _At_((LPBYTE) lpDestStr, _Out_writes_bytes_opt_(cchDest)))
#else
_When_((dwMapFlags & (LCMAP_SORTKEY | LCMAP_BYTEREV)) != 0, _At_((LPBYTE) lpDest
Str, _Out_writes_bytes_opt_(cchDest)))
#endif
_When_(cchSrc != -1, _At_((WCHAR *) lpSrcStr, _Out_writes_opt_(cchSrc)))
_When_(cchDest != -1, _At_((WCHAR *) lpDestStr, _Out_writes_opt_(cchDest)))
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
LCMapStringEx( LCMapStringEx(
__in_opt LPCWSTR lpLocaleName, _In_opt_ LPCWSTR lpLocaleName,
__in DWORD dwMapFlags, _In_ DWORD dwMapFlags,
__in_ecount(cchSrc) LPCWSTR lpSrcStr, _In_reads_(cchSrc) LPCWSTR lpSrcStr,
__in int cchSrc, _In_ int cchSrc,
__out_xcount_opt(cchDest) LPWSTR lpDestStr, _Out_writes_opt_(cchDest) LPWSTR lpDestStr,
__in int cchDest, _In_ int cchDest,
__in_opt LPNLSVERSIONINFO lpVersionInformation, _In_opt_ LPNLSVERSIONINFO lpVersionInformation,
__in_opt LPVOID lpReserved, _In_opt_ LPVOID lpReserved,
__in_opt LPARAM lParam _In_opt_ LPARAM sortHandle
);
WINBASEAPI
int
WINAPI
CompareStringOrdinal(
__in LPCWSTR lpString1,
__in int cchCount1,
__in LPCWSTR lpString2,
__in int cchCount2,
__in BOOL bIgnoreCase
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
IsValidLocaleName( IsValidLocaleName(
__in LPCWSTR lpLocaleName _In_ LPCWSTR lpLocaleName
); );
typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXEX)(LPWSTR, CALID, LPWSTR, LPARAM); typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXEX)(LPWSTR, CALID, LPWSTR, LPARAM);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumCalendarInfoExEx( EnumCalendarInfoExEx(
__in CALINFO_ENUMPROCEXEX pCalInfoEnumProcExEx, _In_ CALINFO_ENUMPROCEXEX pCalInfoEnumProcExEx,
__in_opt LPCWSTR lpLocaleName, _In_opt_ LPCWSTR lpLocaleName,
__in CALID Calendar, _In_ CALID Calendar,
__in_opt LPCWSTR lpReserved, _In_opt_ LPCWSTR lpReserved,
__in CALTYPE CalType, _In_ CALTYPE CalType,
__in LPARAM lParam _In_ LPARAM lParam
); );
typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXEX)(LPWSTR, CALID, LPARAM); typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXEX)(LPWSTR, CALID, LPARAM);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumDateFormatsExEx( EnumDateFormatsExEx(
__in DATEFMT_ENUMPROCEXEX lpDateFmtEnumProcExEx, _In_ DATEFMT_ENUMPROCEXEX lpDateFmtEnumProcExEx,
__in_opt LPCWSTR lpLocaleName, _In_opt_ LPCWSTR lpLocaleName,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LPARAM lParam _In_ LPARAM lParam
); );
typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCEX)(LPWSTR, LPARAM); typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCEX)(LPWSTR, LPARAM);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumTimeFormatsEx( EnumTimeFormatsEx(
__in TIMEFMT_ENUMPROCEX lpTimeFmtEnumProcEx, _In_ TIMEFMT_ENUMPROCEX lpTimeFmtEnumProcEx,
__in_opt LPCWSTR lpLocaleName, _In_opt_ LPCWSTR lpLocaleName,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LPARAM lParam _In_ LPARAM lParam
); );
typedef BOOL (CALLBACK* LOCALE_ENUMPROCEX)(LPWSTR, DWORD, LPARAM); typedef BOOL (CALLBACK* LOCALE_ENUMPROCEX)(LPWSTR, DWORD, LPARAM);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumSystemLocalesEx( EnumSystemLocalesEx(
__in LOCALE_ENUMPROCEX lpLocaleEnumProcEx, _In_ LOCALE_ENUMPROCEX lpLocaleEnumProcEx,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__in LPARAM lParam, _In_ LPARAM lParam,
__in_opt LPVOID lpReserved _In_opt_ LPVOID lpReserved
); );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#endif //(WINVER >= 0x0600) #endif //(WINVER >= 0x0600)
#if (WINVER >= _WIN32_WINNT_WIN7) #if (WINVER >= _WIN32_WINNT_WIN7)
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
WINBASEAPI WINBASEAPI
int int
WINAPI WINAPI
ResolveLocaleName( ResolveLocaleName(
__in_opt LPCWSTR lpNameToResolve, _In_opt_ LPCWSTR lpNameToResolve,
__out_ecount_opt(cchLocaleName) LPWSTR lpLocaleName, _Out_writes_opt_(cchLocaleName) LPWSTR lpLocaleName,
__in int cchLocaleName _In_ int cchLocaleName
); );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#endif // (WINVER >= _WIN32_WINNT_WIN7) #endif // (WINVER >= _WIN32_WINNT_WIN7)
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif // NONLS #endif // NONLS
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // _WINNLS_ #endif // _WINNLS_
 End of changes. 156 change blocks. 
635 lines changed or deleted 626 lines changed or added

This html diff was produced by rfcdiff 1.41.