dennisbabkin/InjectAll

Failed to allocate memory

Closed this issue · 1 comments

//Alloc memory
DLL_STATS* pDStats = (DLL_STATS*)ExAllocatePool2(ALLOC_TYPE_OnLoadImage, sizeof(DLL_STATS), TAG('kDSm'));

Since ExAllocatePoolWithTag is deprecated, i use ExAllocatePool2 now, but it failed to allocate memory.

Correct. ExAllocatePool2 has a different encoding for its flags. You can replace it with:

DLL_STATS* pDStats = (DLL_STATS*)ExAllocatePool2(POOL_FLAG_PAGED, sizeof(DLL_STATS), TAG('kDSm');