Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(549)

Unified Diff: sandbox/win/src/win_utils.h

Issue 2323443003: Implement new method to get process base address in Windows sandbox. (Closed)
Patch Set: Fix typo Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/win/src/target_process.cc ('k') | sandbox/win/src/win_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « sandbox/win/src/target_process.cc ('k') | sandbox/win/src/win_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698