Index: sandbox/win/src/win_utils.h |
diff --git a/sandbox/win/src/win_utils.h b/sandbox/win/src/win_utils.h |
index 13dc569c10ac90cefa853ae715f1f5c5bf6f225a..b88b08c63c15ca14c20305e0e7e95e04c6d64dad 100644 |
--- a/sandbox/win/src/win_utils.h |
+++ b/sandbox/win/src/win_utils.h |
@@ -112,6 +112,14 @@ bool IsPipe(const base::string16& path); |
// Converts a NTSTATUS code to a Win32 error code. |
DWORD GetLastErrorFromNtStatus(NTSTATUS status); |
+// Returns the address of the main exe module in memory taking in account |
+// address space layout randomization. While it will work on running processes |
+// it's recommended to only call this for a suspended process. Ideally also |
+// a process which has not been started. There's a slim chance that a process |
+// could map its own executables file multiple times, but this is pretty |
+// unlikely to occur in practice. |
+void* GetProcessBaseAddress(HANDLE process); |
+ |
} // namespace sandbox |
// Resolves a function name in NTDLL to a function pointer. The second parameter |