Files
Ben Marsh 0cc6e3dca6 Copying //UE4/Dev-Build to Dev-Main (//UE4/Dev-Main)
#rb none
#rnx

[CL 6631504 by Ben Marsh in Main branch]
2019-05-24 11:51:54 -04:00

29 lines
726 B
C++

// Copyright 2011-2019 Molecular Matters GmbH, all rights reserved.
#include "LC_Hook.h"
#include "LC_Symbols.h"
uint32_t hook::FindFirstInSection(const symbols::ImageSectionDB* imageSectionDb, const ImmutableString& sectionName)
{
const symbols::ImageSection* imageSection = symbols::FindImageSectionByName(imageSectionDb, sectionName);
if (imageSection)
{
return imageSection->rva;
}
return 0u;
}
uint32_t hook::FindLastInSection(const symbols::ImageSectionDB* imageSectionDb, const ImmutableString& sectionName)
{
const symbols::ImageSection* imageSection = symbols::FindImageSectionByName(imageSectionDb, sectionName);
if (imageSection)
{
return imageSection->rva + imageSection->size;
}
return 0u;
}