Jan 22, 2011 at 11:58 PM

Hi there,

I'm having some trouble using LhEnumModules from a native application;  The code looks like:


ULONG ulModuleCount = 0;

NTSTATUS result = LhEnumModules(NULL, 0, &ulModuleCount);

Log(L"LhEnumModules() result: 0x%x\r\n", result);

Log(L"Module Count: %d\r\n", ulModuleCount);


LhEnumModules() actually returns STATUS_SUCCESS (though the documentation suggests I should be getting STATUS_BUFFER_TOO_SMALL?)... Either way, the module count comes back as 0.


If it matters, I'm calling this from the NativeInjectionEntryPoint()... User mode hooking.


Am I using this wrong?  Any tips/pointers would be appreciated.