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

Unified Diff: util/win/nt_internals.cc

Issue 1400413002: win: Add Handles() to ProcessInfo (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: rebase Created 5 years, 2 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 | « util/win/nt_internals.h ('k') | util/win/process_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/nt_internals.cc
diff --git a/util/win/nt_internals.cc b/util/win/nt_internals.cc
index 01f889b95f492e2017116ff9e7e4429eb3298046..3fb5ef204c0e655db3390278f4f35fa6d022b85c 100644
--- a/util/win/nt_internals.cc
+++ b/util/win/nt_internals.cc
@@ -72,6 +72,22 @@ NTSTATUS NtOpenThread(PHANDLE thread_handle,
static_cast<const void*>(client_id));
}
+NTSTATUS NtQueryObject(HANDLE handle,
+ OBJECT_INFORMATION_CLASS object_information_class,
+ void* object_information,
+ ULONG object_information_length,
+ ULONG* return_length) {
+ static decltype(::NtQueryObject)* nt_query_object =
+ reinterpret_cast<decltype(::NtQueryObject)*>(
+ GetProcAddress(LoadLibrary(L"ntdll.dll"), "NtQueryObject"));
+ DCHECK(nt_query_object);
+ return nt_query_object(handle,
+ object_information_class,
+ object_information,
+ object_information_length,
+ return_length);
+}
+
// Explicit instantiations with the only 2 valid template arguments to avoid
// putting the body of the function in the header.
template NTSTATUS NtOpenThread<process_types::internal::Traits32>(
« no previous file with comments | « util/win/nt_internals.h ('k') | util/win/process_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698