Merge trunk head (r43756)
[reactos.git] / reactos / ntoskrnl / mm / sysldr.c
index f63a7ca..3030199 100644 (file)
@@ -692,7 +692,7 @@ MiSnapThunk(IN PVOID DllBase,
                     ForwardName->Hint = 0;
 
                     /* Set the new address */
-                    *(PULONG)&ForwardThunk.u1.AddressOfData = (ULONG)ForwardName;
+                    ForwardThunk.u1.AddressOfData = (ULONG_PTR)ForwardName;
 
                     /* Snap the forwarder */
                     Status = MiSnapThunk(LdrEntry->DllBase,
@@ -730,7 +730,7 @@ MmUnloadSystemImage(IN PVOID ImageHandle)
     PLDR_DATA_TABLE_ENTRY LdrEntry = ImageHandle;
     PVOID BaseAddress = LdrEntry->DllBase;
     NTSTATUS Status;
-    ANSI_STRING TempName;
+    STRING TempName;
     BOOLEAN HadEntry = FALSE;
 
     /* Acquire the loader lock */
@@ -761,7 +761,9 @@ MmUnloadSystemImage(IN PVOID ImageHandle)
         if (NT_SUCCESS(Status))
         {
             /* Unload the symbols */
-            DbgUnLoadImageSymbols(&TempName, BaseAddress, -1);
+            DbgUnLoadImageSymbols(&TempName,
+                                  BaseAddress,
+                                  (ULONG_PTR)ZwCurrentProcess());
             RtlFreeAnsiString(&TempName);
         }
     }
@@ -1528,7 +1530,7 @@ MmLoadSystemImage(IN PUNICODE_STRING FileName,
     BOOLEAN LockOwned = FALSE;
     PLIST_ENTRY NextEntry;
     IMAGE_INFO ImageInfo;
-    ANSI_STRING AnsiTemp;
+    STRING AnsiTemp;
     PAGED_CODE();
 
     /* Detect session-load */
@@ -1941,7 +1943,9 @@ LoaderScan:
         RtlInitString(&AnsiTemp, Buffer);
 
         /* Notify the debugger */
-        DbgLoadImageSymbols(&AnsiTemp, LdrEntry->DllBase, -1);
+        DbgLoadImageSymbols(&AnsiTemp,
+                            LdrEntry->DllBase,
+                            (ULONG_PTR)ZwCurrentProcess());
         LdrEntry->Flags |= LDRP_DEBUG_SYMBOLS_LOADED;
     }