From 420c0360acd3743120ec89e97a92f49b8fae53b2 Mon Sep 17 00:00:00 2001 From: Denis Malikov Date: Sun, 4 Feb 2018 18:29:23 +0700 Subject: [PATCH] [SDK] Fix NT6 building issues and improve SDK NT6 headers. CORE-12596 --- sdk/include/asm/ks386.template.h | 2 +- sdk/include/asm/ksx.template.h | 6 ++++-- sdk/include/ddk/fcb.h | 1 + sdk/include/ndk/i386/asm.h | 9 +++++++++ sdk/include/ndk/peb_teb.h | 2 +- sdk/include/psdk/winddi.h | 2 +- sdk/include/psdk/winuser.h | 8 ++++++++ sdk/include/psdk/ws2spi.h | 2 +- 8 files changed, 26 insertions(+), 6 deletions(-) diff --git a/sdk/include/asm/ks386.template.h b/sdk/include/asm/ks386.template.h index e5f672cb1b2..ac94afdc0fd 100644 --- a/sdk/include/asm/ks386.template.h +++ b/sdk/include/asm/ks386.template.h @@ -556,7 +556,7 @@ HEADER("Data access macros"), RAW("#define USERDATA ds:[HEX(0FFDF0000)]"), RAW("#define PCR fs:"), -#if (NTDDI_VERSION >= NTDDI_VISTA) +#if (NTDDI_VERSION >= NTDDI_WIN8) HEADER("KNODE offsets"), OFFSET(NdIdleCpuSet, KNODE, IdleCpuSet), #endif diff --git a/sdk/include/asm/ksx.template.h b/sdk/include/asm/ksx.template.h index 1daf46f4149..96d64c3d47c 100644 --- a/sdk/include/asm/ksx.template.h +++ b/sdk/include/asm/ksx.template.h @@ -125,7 +125,7 @@ RAW("#else"), {TYPE_CONSTANT, "SYNCH_LEVEL", (IPI_LEVEL - 2)}, RAW("#endif"), -#if (NTDDI_VERSION >= NTDDI_VISTA) +#if (NTDDI_VERSION >= NTDDI_WIN8) HEADER("Entropy Timing Constants"), CONSTANT(KENTROPY_TIMING_INTERRUPTS_PER_BUFFER), CONSTANT(KENTROPY_TIMING_BUFFER_MASK), @@ -797,7 +797,9 @@ SIZE(KernelThreadObjectLength, KTHREAD), HEADER("KTIMER"), OFFSET(TiType, KTIMER, Header.Type), OFFSET(TiSize, KTIMER, Header.Size), -OFFSET(TiInserted, KTIMER, Header.Inserted), // not in win 10 +#if (NTDDI_VERSION < NTDDI_WIN7) +OFFSET(TiInserted, KTIMER, Header.Inserted), +#endif OFFSET(TiSignalState, KTIMER, Header.SignalState), OFFSET(TiDueTime, KTIMER, DueTime), OFFSET(TiTimerListEntry, KTIMER, TimerListEntry), diff --git a/sdk/include/ddk/fcb.h b/sdk/include/ddk/fcb.h index 417b610c785..ba16a86719c 100644 --- a/sdk/include/ddk/fcb.h +++ b/sdk/include/ddk/fcb.h @@ -525,6 +525,7 @@ RxGetFileSizeWithLock( _Out_ PLONGLONG FileSize); #if (_WIN32_WINNT >= 0x0600) +PFCB RxCreateNetFcb( _In_ PRX_CONTEXT RxContext, _In_ PIRP Irp, diff --git a/sdk/include/ndk/i386/asm.h b/sdk/include/ndk/i386/asm.h index 3c203e58904..242cc74e1d9 100644 --- a/sdk/include/ndk/i386/asm.h +++ b/sdk/include/ndk/i386/asm.h @@ -627,6 +627,15 @@ Author: #define EXCEPTION_NPX_ERROR 0x010 #define EXCEPTION_ALIGNMENT_CHECK 0x011 +// +// Hypervisor Enlightenment Definitions +// +#define HV_MMU_USE_HYPERCALL_FOR_ADDRESS_SWITCH 0x01 +#define HV_MMU_USE_HYPERCALL_FOR_LOCAL_FLUSH 0x02 +#define HV_MMU_USE_HYPERCALL_FOR_REMOTE_FLUSH 0x04 +#define HV_APIC_ENLIGHTENED 0x10 +#define HV_KE_USE_HYPERCALL_FOR_LONG_SPIN_WAIT 0x40 + // // VDM State Pointer // diff --git a/sdk/include/ndk/peb_teb.h b/sdk/include/ndk/peb_teb.h index c52b161dc70..89a022853fb 100644 --- a/sdk/include/ndk/peb_teb.h +++ b/sdk/include/ndk/peb_teb.h @@ -344,7 +344,7 @@ typedef struct STRUCT(_TEB) #endif PTR(PVOID) WinSockData; ULONG GdiBatchCount; -#if (NTDDI_VERSION >= NTDDI_WIN10) +#if (NTDDI_VERSION >= NTDDI_WIN7) union { PROCESSOR_NUMBER CurrentIdealProcessor; diff --git a/sdk/include/psdk/winddi.h b/sdk/include/psdk/winddi.h index 1d1019ae0db..892604da1e1 100644 --- a/sdk/include/psdk/winddi.h +++ b/sdk/include/psdk/winddi.h @@ -4352,7 +4352,7 @@ typedef HBITMAP #endif /* (NTDDI_VERSION >= NTDDI_WIN8) */ _Out_ HANDLE* phSharedSurface); typedef FN_DrvCreateDeviceBitmapEx *PFN_DrvCreateDeviceBitmapEx; -extern DrvCreateDeviceBitmapEx DrvCreateDeviceBitmapEx +extern FN_DrvCreateDeviceBitmapEx DrvCreateDeviceBitmapEx; typedef VOID (APIENTRY FN_DrvDeleteDeviceBitmapEx)( diff --git a/sdk/include/psdk/winuser.h b/sdk/include/psdk/winuser.h index 7fe3a14fe0a..4f77a9c9733 100644 --- a/sdk/include/psdk/winuser.h +++ b/sdk/include/psdk/winuser.h @@ -3446,6 +3446,14 @@ typedef struct tagSOUNDSENTRYW { DWORD iWindowsEffectOrdinal; } SOUNDSENTRYW,*LPSOUNDSENTRYW; +#if (_WIN32_WINNT >= 0x0600) +typedef struct tagAUDIODESCRIPTION { + UINT cbSize; + BOOL Enabled; + LCID Locale; +} AUDIODESCRIPTION, *LPAUDIODESCRIPTION; +#endif + typedef struct tagSTICKYKEYS { DWORD cbSize; DWORD dwFlags; diff --git a/sdk/include/psdk/ws2spi.h b/sdk/include/psdk/ws2spi.h index 6fb353dde45..99276e0106f 100644 --- a/sdk/include/psdk/ws2spi.h +++ b/sdk/include/psdk/ws2spi.h @@ -880,7 +880,7 @@ WSCGetProviderInfo( _In_ LPGUID lpProviderId, _In_ WSC_PROVIDER_INFO_TYPE InfoType, _Out_writes_bytes_to_(*InfoSize, *InfoSize) PBYTE Info, - _Inout_ *InfoSize, + _Inout_ size_t *InfoSize, _In_ DWORD Flags, _Out_ LPINT lpErrno);