Reputation: 411
I have write a debugger extension for my VisualStuido2010 to display my class type. I write my code base on the EEAddin sample provided by Microsoft. But I failed on call ReadDebuggeeMemoryEx.
I can't get any reason for this fail. GetLastError() returns 0.
ObjectId objid;
DWORD nGot;
int state = E_FAIL;
if ( pHelper->ReadDebuggeeMemoryEx(pHelper, pHelper->GetRealAddress(pHelper), sizeof(ObjectId), &objid, &nGot) )
{
}else { log("Fail ReadDebuggeeMemoryEx %d\n", GetLastError());}
Upvotes: 0
Views: 334
Reputation: 26
The function ReadDebuggeeMemoryEx(...)
returns a HRESULT
not a BOOL
.
Try something like :
if (pHelper->ReadDebuggeeMemoryEx(...) == S_OK) {
// good
} else {
// bad
}
Upvotes: 1