mono-structs.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #pragma once
  2. #include "utils/dynamic_array.h"
  3. #include "il2cpp-object-internals.h"
  4. struct GPtrArray
  5. {
  6. void *pdata;
  7. unsigned int len;
  8. };
  9. typedef il2cpp::utils::dynamic_array<void*> VoidPtrArray;
  10. GPtrArray* void_ptr_array_to_gptr_array(const VoidPtrArray& array);
  11. GPtrArray* empty_gptr_array();
  12. void free_gptr_array(GPtrArray *pArray);
  13. struct MonoGenericParameterInfo
  14. {
  15. Il2CppClass *pklass; /* The corresponding `MonoClass'. */
  16. const char *name;
  17. // See GenericParameterAttributes
  18. unsigned short flags;
  19. unsigned int token;
  20. // Constraints on type parameters
  21. Il2CppClass** constraints; /* NULL means end of list */
  22. };
  23. struct PublicKeyTokenFixedBuffer
  24. {
  25. union
  26. {
  27. struct
  28. {
  29. // System.Byte Mono.MonoAssemblyName/<public_key_token>__FixedBuffer0::FixedElementField
  30. uint8_t FixedElementField;
  31. };
  32. uint8_t padding[17];
  33. };
  34. };
  35. struct Il2CppMonoAssemblyName
  36. {
  37. // System.IntPtr Mono.MonoAssemblyName::name
  38. const char * name;
  39. // System.IntPtr Mono.MonoAssemblyName::culture
  40. const char * culture;
  41. // System.IntPtr Mono.MonoAssemblyName::hash_value
  42. const char * hash_value;
  43. // System.IntPtr Mono.MonoAssemblyName::public_key
  44. const uint8_t* public_key;
  45. // Mono.MonoAssemblyName/<public_key_token>__FixedBuffer0 Mono.MonoAssemblyName::public_key_token
  46. PublicKeyTokenFixedBuffer public_key_token;
  47. // System.UInt32 Mono.MonoAssemblyName::hash_alg
  48. uint32_t hash_alg;
  49. // System.UInt32 Mono.MonoAssemblyName::hash_len
  50. uint32_t hash_len;
  51. // System.UInt32 Mono.MonoAssemblyName::flags
  52. uint32_t flags;
  53. // System.UInt16 Mono.MonoAssemblyName::major
  54. uint16_t major;
  55. // System.UInt16 Mono.MonoAssemblyName::minor
  56. uint16_t minor;
  57. // System.UInt16 Mono.MonoAssemblyName::build
  58. uint16_t build;
  59. // System.UInt16 Mono.MonoAssemblyName::revision
  60. uint16_t revision;
  61. // System.UInt16 Mono.MonoAssemblyName::arch
  62. uint16_t arch;
  63. };