OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
| 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at |
| 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 // See the License for the specific language governing permissions and |
| 13 // limitations under the License. |
| 14 |
| 15 #include <windows.h> |
| 16 #include <winternl.h> |
| 17 |
| 18 #include "util/win/process_structs.h" |
| 19 |
| 20 namespace crashpad { |
| 21 |
| 22 // Copied from ntstatus.h because um/winnt.h conflicts with general inclusion of |
| 23 // ntstatus.h. |
| 24 #define STATUS_BUFFER_TOO_SMALL ((NTSTATUS)0xC0000023L) |
| 25 #define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L) |
| 26 |
| 27 // winternal.h defines THREADINFOCLASS, but not all members. |
| 28 enum { ThreadBasicInformation = 0 }; |
| 29 |
| 30 NTSTATUS NtQuerySystemInformation( |
| 31 SYSTEM_INFORMATION_CLASS system_information_class, |
| 32 PVOID system_information, |
| 33 ULONG system_information_length, |
| 34 PULONG return_length); |
| 35 |
| 36 NTSTATUS NtQueryInformationThread(HANDLE thread_handle, |
| 37 THREADINFOCLASS thread_information_class, |
| 38 PVOID thread_information, |
| 39 ULONG thread_information_length, |
| 40 PULONG return_length); |
| 41 |
| 42 template <class Traits> |
| 43 NTSTATUS NtOpenThread(PHANDLE thread_handle, |
| 44 ACCESS_MASK desired_access, |
| 45 POBJECT_ATTRIBUTES object_attributes, |
| 46 const process_types::CLIENT_ID<Traits>* client_id); |
| 47 |
| 48 } // namespace crashpad |
OLD | NEW |