- ExAllocatePoolWithTag is deprecated in Win10 2004, use
ExAllocatePoolUninitialized instead
Signed-off-by: Owen Smith <owen.smith@citrix.com>
Ported from other drivers.
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
{
PVOID Buffer;
- Buffer = ExAllocatePoolWithTag(NonPagedPool, Length, FDO_POOL_TAG);
+ Buffer = __AllocatePoolWithTag(NonPagedPool, Length, FDO_POOL_TAG);
if (Buffer)
RtlZeroMemory(Buffer, Length);
IN PVOID Buffer
)
{
- ExFreePoolWithTag(Buffer, FDO_POOL_TAG);
+ __FreePoolWithTag(Buffer, FDO_POOL_TAG);
}
static FORCEINLINE VOID
__analysis_assume(PoolType == NonPagedPool ||
PoolType == PagedPool);
+#if (_MSC_VER >= 1928) // VS 16.9 (EWDK 20344 or later)
+ Buffer = ExAllocatePoolUninitialized(PoolType, NumberOfBytes, Tag);
+#else
#pragma warning(suppress:28160) // annotation error
Buffer = ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag);
+#endif
if (Buffer == NULL)
return NULL;