CCW.h 706 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include "gc/GarbageCollector.h"
  3. struct Il2CppIUnknown;
  4. struct Il2CppObject;
  5. struct Il2CppException;
  6. namespace il2cpp
  7. {
  8. namespace vm
  9. {
  10. class LIBIL2CPP_CODEGEN_API CCW
  11. {
  12. public:
  13. // CreateCCW returns upcasted Il2CppIManagedObjectHolder if the CCW is cachable!
  14. static Il2CppIUnknown* CreateCCW(Il2CppObject* obj);
  15. static inline Il2CppIUnknown* GetOrCreate(Il2CppObject* obj, const Il2CppGuid& iid)
  16. {
  17. return gc::GarbageCollector::GetOrCreateCCW(obj, iid);
  18. }
  19. static Il2CppException* GetIPropertyValueInvalidCast(Il2CppObject* value, const char* from, const char* to);
  20. };
  21. } /* namespace vm */
  22. } /* namespace il2cpp */