COM.cpp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #include "il2cpp-config.h"
  2. #include "os/COM.h"
  3. #if IL2CPP_USE_GENERIC_COM
  4. namespace il2cpp
  5. {
  6. namespace os
  7. {
  8. il2cpp_hresult_t COM::CreateInstance(const Il2CppGuid& clsid, Il2CppIUnknown** object)
  9. {
  10. NO_UNUSED_WARNING(clsid);
  11. IL2CPP_ASSERT(object);
  12. *object = NULL;
  13. return IL2CPP_REGDB_E_CLASSNOTREG;
  14. }
  15. il2cpp_hresult_t COM::CreateFreeThreadedMarshaler(Il2CppIUnknown* outer, Il2CppIUnknown** marshal)
  16. {
  17. NO_UNUSED_WARNING(outer);
  18. IL2CPP_ASSERT(marshal);
  19. *marshal = NULL;
  20. return IL2CPP_COR_E_PLATFORMNOTSUPPORTED;
  21. }
  22. }
  23. }
  24. #endif
  25. #if IL2CPP_USE_GENERIC_COM_SAFEARRAYS
  26. namespace il2cpp
  27. {
  28. namespace os
  29. {
  30. // variant
  31. void COM::VariantInit(Il2CppVariant* variant)
  32. {
  33. NO_UNUSED_WARNING(variant);
  34. }
  35. il2cpp_hresult_t COM::VariantClear(Il2CppVariant* variant)
  36. {
  37. NO_UNUSED_WARNING(variant);
  38. return IL2CPP_COR_E_PLATFORMNOTSUPPORTED;
  39. }
  40. // safe array
  41. Il2CppSafeArray* COM::SafeArrayCreate(uint16_t type, uint32_t dimension_count, Il2CppSafeArrayBound* bounds)
  42. {
  43. NO_UNUSED_WARNING(type);
  44. NO_UNUSED_WARNING(dimension_count);
  45. NO_UNUSED_WARNING(bounds);
  46. return NULL;
  47. }
  48. il2cpp_hresult_t COM::SafeArrayDestroy(Il2CppSafeArray* safeArray)
  49. {
  50. NO_UNUSED_WARNING(safeArray);
  51. return IL2CPP_COR_E_PLATFORMNOTSUPPORTED;
  52. }
  53. il2cpp_hresult_t COM::SafeArrayAccessData(Il2CppSafeArray* safeArray, void** data)
  54. {
  55. NO_UNUSED_WARNING(safeArray);
  56. IL2CPP_ASSERT(data);
  57. *data = NULL;
  58. return IL2CPP_COR_E_PLATFORMNOTSUPPORTED;
  59. }
  60. il2cpp_hresult_t COM::SafeArrayUnaccessData(Il2CppSafeArray* safeArray)
  61. {
  62. NO_UNUSED_WARNING(safeArray);
  63. return IL2CPP_COR_E_PLATFORMNOTSUPPORTED;
  64. }
  65. il2cpp_hresult_t COM::SafeArrayGetVartype(Il2CppSafeArray* safeArray, uint16_t* type)
  66. {
  67. NO_UNUSED_WARNING(safeArray);
  68. IL2CPP_ASSERT(type);
  69. *type = 0;
  70. return IL2CPP_COR_E_PLATFORMNOTSUPPORTED;
  71. }
  72. uint32_t COM::SafeArrayGetDim(Il2CppSafeArray* safeArray)
  73. {
  74. NO_UNUSED_WARNING(safeArray);
  75. return 0;
  76. }
  77. il2cpp_hresult_t COM::SafeArrayGetLBound(Il2CppSafeArray* safeArray, uint32_t dimention, int32_t* bound)
  78. {
  79. NO_UNUSED_WARNING(safeArray);
  80. NO_UNUSED_WARNING(dimention);
  81. IL2CPP_ASSERT(bound);
  82. *bound = 0;
  83. return IL2CPP_COR_E_PLATFORMNOTSUPPORTED;
  84. }
  85. il2cpp_hresult_t COM::SafeArrayGetUBound(Il2CppSafeArray* safeArray, uint32_t dimention, int32_t* bound)
  86. {
  87. NO_UNUSED_WARNING(safeArray);
  88. NO_UNUSED_WARNING(dimention);
  89. IL2CPP_ASSERT(bound);
  90. *bound = 0;
  91. return IL2CPP_COR_E_PLATFORMNOTSUPPORTED;
  92. }
  93. }
  94. }
  95. #endif