https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f323778b0b435c4e1f61fb19a77e8dbf1d05d520

commit f323778b0b435c4e1f61fb19a77e8dbf1d05d520
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Thu Aug 29 22:10:49 2019 +0200
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Sat May 23 17:30:52 2020 +0200

    [NTDLL] Rename ExportEntry to ExportDirectory to better represent what it is
---
 dll/ntdll/ldr/ldrpe.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/dll/ntdll/ldr/ldrpe.c b/dll/ntdll/ldr/ldrpe.c
index d632fbd9f56..7a3f4336e71 100644
--- a/dll/ntdll/ldr/ldrpe.c
+++ b/dll/ntdll/ldr/ldrpe.c
@@ -951,7 +951,7 @@ LdrpSnapThunk(IN PVOID ExportBase,
               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)
@@ -982,7 +982,7 @@ LdrpSnapThunk(IN PVOID ExportBase,
     {
         /* 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
     {
@@ -996,15 +996,15 @@ LdrpSnapThunk(IN PVOID ExportBase,
 
         /* 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 */
@@ -1014,7 +1014,7 @@ LdrpSnapThunk(IN PVOID ExportBase,
         {
             /* Well bummer, hint didn't work, do it the long way */
             Ordinal = LdrpNameToOrdinal(ImportName,
-                                        ExportEntry->NumberOfNames,
+                                        ExportDirectory->NumberOfNames,
                                         ExportBase,
                                         NameTable,
                                         OrdinalTable);
@@ -1022,7 +1022,7 @@ LdrpSnapThunk(IN PVOID ExportBase,
     }
 
     /* Check if the ordinal is invalid */
-    if ((ULONG)Ordinal >= ExportEntry->NumberOfFunctions)
+    if ((ULONG)Ordinal >= ExportDirectory->NumberOfFunctions)
     {
 FailurePath:
         /* Is this a static snap? */
@@ -1117,14 +1117,14 @@ FailurePath:
         /* 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;

Reply via email to