Files
vxunderground-VX-API/VX-API/GetNumberOfLinkedDlls.cpp
vxunderground 86ca3658a5 update
2022-09-10 13:20:38 -05:00

20 lines
422 B
C++

#include "Win32Helper.h"
DWORD GetNumberOfLinkedDlls(VOID)
{
PPEB Peb = GetPeb();
PLDR_MODULE Module = NULL;
DWORD dwIndexHash = 0;
DWORD dwCount = 0;
Module = (PLDR_MODULE)((PBYTE)Peb->LoaderData->InMemoryOrderModuleList.Flink - 16);
for (; TRUE; dwCount++)
{
Module = (PLDR_MODULE)((PBYTE)Module->InMemoryOrderModuleList.Flink - 16);
if (Module->BaseDllName.Buffer == NULL)
break;
}
return dwCount;
}