WheapInitializeErrorRecordWrapper
VOID __stdcall WheapInitializeErrorRecordWrapper(
_WHEAP_ERROR_RECORD_WRAPPER *Wrapper,
UINT64 WrapperLength,
_WHEAP_ERROR_SOURCE *ErrorSource){
_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR *SectionDescriptor;
unsigned int v4;
unsigned int SectionCount;
int v6;
Wrapper->ErrorRecord.Header.SignatureEnd = -1;
SectionDescriptor = Wrapper->ErrorRecord.SectionDescriptor;
Wrapper->Length = WrapperLength;
Wrapper->ErrorSource = ErrorSource;
Wrapper->ErrorRecord.Header.Revision.AsUSHORT = 528;
Wrapper->ErrorRecord.Header.CreatorId = WHEA_RECORD_CREATOR_GUID;
Wrapper->ErrorRecord.Header.Signature = 1380274243;
Wrapper->ErrorRecord.Header.SectionCount = ErrorSource->SectionCount;
Wrapper->ErrorRecord.Header.Length = WrapperLength - 40;
v4 = 0;
Wrapper->ErrorRecord.Header.Severity = WheaErrSevInformational;
SectionCount = ErrorSource->SectionCount;
v6 = 72 * SectionCount + 128;
if( SectionCount )
{
do
{
SectionDescriptor->SectionOffset = v6;
++v4;
SectionDescriptor->SectionLength = ErrorSource->SectionLength;
++SectionDescriptor;
SectionDescriptor[-1].Revision.AsUSHORT = 768;
v6 += ErrorSource->SectionLength;
}
while( v4 < ErrorSource->SectionCount );
}
}Referenced by:
WheapAllocErrorRecord
WheapInitializeErrorSource