WeakReference.h 791 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include "il2cpp-object-internals.h"
  3. namespace il2cpp
  4. {
  5. namespace vm
  6. {
  7. struct WeakReference IL2CPP_FINAL : Il2CppIWeakReference
  8. {
  9. static il2cpp_hresult_t Create(Il2CppObject* managedObject, Il2CppIWeakReference** result);
  10. WeakReference(Il2CppObject * managedObject);
  11. virtual il2cpp_hresult_t STDCALL QueryInterface(const Il2CppGuid& iid, void** object) IL2CPP_FINAL IL2CPP_OVERRIDE;
  12. virtual uint32_t STDCALL AddRef() IL2CPP_FINAL IL2CPP_OVERRIDE;
  13. virtual uint32_t STDCALL Release() IL2CPP_FINAL IL2CPP_OVERRIDE;
  14. virtual il2cpp_hresult_t STDCALL Resolve(const Il2CppGuid& iid, Il2CppIInspectable** object) IL2CPP_FINAL IL2CPP_OVERRIDE;
  15. private:
  16. uint32_t m_GCHandle;
  17. uint32_t m_RefCount;
  18. };
  19. }
  20. }