Hi,
I have a list which contains a number of _MEMORY_BASIC_INFORMATION structs nested within mb structs (defs below). What I am having problems with is getting the info from the nested _MEMORY_BASIC_INFORMATION out. I am using an iterator to traverse the list. From below I know the error is g->mbi; but I don't know how I should reference the nested struct... Thanks.
Basically I am trying to write the base address from gMemList[i] to start = (DWORD)g.mbi.BaseAddress; but I am getting the error c2228: left of '.mbi' must have a class/struct/union.
list<struct mb *> gMemList
std::list<mb *>::iterator i = gMemList.begin();
while(i != gMemList.end())
{
struct mb *g = *i;
MEMORY_BASIC_INFORMATION mbi2 = g->mbi;
start = (DWORD)mbi2.BaseAddress;
buf = new wchar_t[255];
while(start < mbi2.RegionSize)
{...
//struct mb
//{
// MEMORY_BASIC_INFORMATION mbi;
// char *p;
//};
/*typedef struct _MEMORY_BASIC_INFORMATION {
PVOID BaseAddress;
PVOID AllocationBase;
DWORD AllocationProtect;
SIZE_T RegionSize;
DWORD State;
DWORD Protect;
DWORD Type;
} MEMORY_BASIC_INFORMATION, *PMEMORY_BASIC_INFORMATION;*/