enum DLLs in executable
MEMORY_BASIC_INFORMATION mbi = {}; for (unsigned char *pBase = nullptr; VirtualQuery(static_cast<void *>(pBase), &mbi, sizeof(mbi)) == sizeof(mbi); pBase += mbi.RegionSize) { if (mbi.AllocationBase == mbi.BaseAddress && mbi.AllocationBase != nullptr) { char dllName[MAX_PATH] = ""; if (GetModuleFileName(static_cast<HMODULE>(mbi.AllocationBase), dllName, ArrLen(dllName)) != 0) { cout <<dllName <<endl; }//if GetModuleFilename }//if mbi }//for