Unexpected Run-Time stuff
Posted on 2000-04-11
Both these Q's involve VC++ 6.x in WinNT.
Why do I get the following errors (when calling some MAPI function):
First-chance exception in SomeExe.exe (RPCRT4.DLL): 0x000006BA: (no name).
First-chance exception in exSIMUS.exe (RPCRT4.DLL): 0x000006BA: (no name).
Whats wrong with the following code?
int nr_of_propVals = 6;
MAPIAllocateBuffer(nr_of_propVals * sizeof(LPSPropTagArray), (LPVOID*) &tagArray);
tagArray->cValues = nr_of_propVals;
tagArray->aulPropTag = PR_SUBJECT;
tagArray->aulPropTag = PR_MESSAGE_FLAGS;
tagArray->aulPropTag = PR_DISPLAY_TO;
tagArray->aulPropTag = PR_DISPLAY_CC;
tagArray->aulPropTag = PR_DISPLAY_BCC;
tagArray->aulPropTag = PR_SENDER_EMAIL_ADDRESS;
When the last line of the code above is run the following msgs appear in the debug window. What do I do wrong?
HEAP[SomeExe.exe]: Heap block at ae20b0 modified at ae20d8 past requested size of 20
HEAP[SomeExe.exe]: Invalid Address specified to RtlFreeHeap( ae0000, ae20b8 )