Not very prof. with C++. The code I've been working on is : https://msdn.microsoft.com/en-us/library/windows/desktop/ee175819(v=vs.85).aspx
My problem resides in this area :
_tprintf(TEXT(" Data portion begins at: %#p\n Size: %d bytes\n") \
TEXT(" Overhead: %d bytes\n Region index: %d\n\n"),
Entry.lpData,
Entry.cbData,
Entry.cbOverhead,
Entry.iRegionIndex);
}
The problem I'm facing is, The Entry.lpData is the address of data portion of heap block. I want to read 8 byte before Entry.lpData address. So when I'm simply subtracting 8 from Entry.lpData and trying to read bytes, I'm getting the error
hexDump(entry.lpData - 8, 8);
heapwalk.cpp(119): error C2036: 'PVOID' : unknown size