handle_snapshot.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. #ifndef CRASHPAD_SNAPSHOT_HANDLE_SNAPSHOT_H_
  15. #define CRASHPAD_SNAPSHOT_HANDLE_SNAPSHOT_H_
  16. #include <stdint.h>
  17. #include <string>
  18. namespace crashpad {
  19. struct HandleSnapshot {
  20. HandleSnapshot();
  21. ~HandleSnapshot();
  22. //! \brief A UTF-8 string representation of the handle's type.
  23. std::string type_name;
  24. //! \brief The handle's value.
  25. uint32_t handle;
  26. //! \brief The attributes for the handle, e.g. `OBJ_INHERIT`,
  27. //! `OBJ_CASE_INSENSITIVE`, etc.
  28. uint32_t attributes;
  29. //! \brief The ACCESS_MASK for the handle in this process.
  30. //!
  31. //! See
  32. //! http://blogs.msdn.com/b/openspecification/archive/2010/04/01/about-the-access-mask-structure.aspx
  33. //! for more information.
  34. uint32_t granted_access;
  35. //! \brief The number of kernel references to the object that this handle
  36. //! refers to.
  37. uint32_t pointer_count;
  38. //! \brief The number of open handles to the object that this handle refers
  39. //! to.
  40. uint32_t handle_count;
  41. };
  42. } // namespace crashpad
  43. #endif // CRASHPAD_SNAPSHOT_HANDLE_SNAPSHOT_H_