[NTDLL] Rename ExportEntry to ExportDirectory to better represent what it is
[reactos.git] / dll / ntdll / ldr / ldrpe.c
index d632fbd..7a3f433 100644 (file)
@@ -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;