Drop C wrappers and switch to C++ API

This commit is contained in:
2025-09-19 12:56:06 +02:00
parent b2c8fa3e62
commit e7425de523
32 changed files with 441 additions and 492 deletions

View File

@@ -219,13 +219,13 @@ PeCoff::GetSection(IN PVOID ImagePointer,
}
/* Get section name length */
SectionNameLength = RtlStringLength(SectionName, 0);
SectionNameLength = XtLdrProtocol->String.Length(SectionName, 0);
/* Iterate through all image sections */
for(SectionIndex = 0; SectionIndex < Image->PeHeader->FileHeader.NumberOfSections; SectionIndex++)
{
/* Check section name */
if(RtlCompareString((PCHAR)SectionHeader[SectionIndex].Name, SectionName, SectionNameLength) == 0)
if(XtLdrProtocol->String.Compare((PCHAR)SectionHeader[SectionIndex].Name, SectionName, SectionNameLength) == 0)
{
/* Store section address and return */
*RawData = (PULONG)((PUCHAR)Image->Data + SectionHeader[SectionIndex].PointerToRawData);