IN PVOID ImportBase,
IN PIMAGE_THUNK_DATA OriginalThunk,
IN OUT PIMAGE_THUNK_DATA Thunk,
- IN PIMAGE_EXPORT_DIRECTORY ExportEntry,
+ IN PIMAGE_EXPORT_DIRECTORY ExportDirectory,
IN ULONG ExportSize,
IN BOOLEAN Static,
IN LPSTR DllName)
{
/* Get the ordinal number, and its normalized version */
OriginalOrdinal = IMAGE_ORDINAL(OriginalThunk->u1.Ordinal);
- Ordinal = (USHORT)(OriginalOrdinal - ExportEntry->Base);
+ Ordinal = (USHORT)(OriginalOrdinal - ExportDirectory->Base);
}
else
{
/* Now get the VA of the Name and Ordinal Tables */
NameTable = (PULONG)((ULONG_PTR)ExportBase +
- (ULONG_PTR)ExportEntry->AddressOfNames);
+ (ULONG_PTR)ExportDirectory->AddressOfNames);
OrdinalTable = (PUSHORT)((ULONG_PTR)ExportBase +
- (ULONG_PTR)ExportEntry->AddressOfNameOrdinals);
+ (ULONG_PTR)ExportDirectory->AddressOfNameOrdinals);
/* Get the hint */
Hint = AddressOfData->Hint;
/* Try to get a match by using the hint */
- if (((ULONG)Hint < ExportEntry->NumberOfNames) &&
+ if (((ULONG)Hint < ExportDirectory->NumberOfNames) &&
(!strcmp(ImportName, ((LPSTR)((ULONG_PTR)ExportBase + NameTable[Hint])))))
{
/* We got a match, get the Ordinal from the hint */
{
/* Well bummer, hint didn't work, do it the long way */
Ordinal = LdrpNameToOrdinal(ImportName,
- ExportEntry->NumberOfNames,
+ ExportDirectory->NumberOfNames,
ExportBase,
NameTable,
OrdinalTable);
}
/* Check if the ordinal is invalid */
- if ((ULONG)Ordinal >= ExportEntry->NumberOfFunctions)
+ if ((ULONG)Ordinal >= ExportDirectory->NumberOfFunctions)
{
FailurePath:
/* Is this a static snap? */
/* The ordinal seems correct, get the AddressOfFunctions VA */
AddressOfFunctions = (PULONG)
((ULONG_PTR)ExportBase +
- (ULONG_PTR)ExportEntry->AddressOfFunctions);
+ (ULONG_PTR)ExportDirectory->AddressOfFunctions);
/* Write the function pointer*/
Thunk->u1.Function = (ULONG_PTR)ExportBase + AddressOfFunctions[Ordinal];
/* Make sure it's within the exports */
- if ((Thunk->u1.Function > (ULONG_PTR)ExportEntry) &&
- (Thunk->u1.Function < ((ULONG_PTR)ExportEntry + ExportSize)))
+ if ((Thunk->u1.Function > (ULONG_PTR)ExportDirectory) &&
+ (Thunk->u1.Function < ((ULONG_PTR)ExportDirectory + ExportSize)))
{
/* Get the Import and Forwarder Names */
ImportName = (LPSTR)Thunk->u1.Function;