CommonLibVR
Loading...
Searching...
No Matches
COM.h
Go to the documentation of this file.
1#pragma once
2
3#include "REX/W32/BASE.h"
4
5namespace REX::W32
6{
7 struct __declspec(novtable, uuid("00000000-0000-0000-c000-000000000046"))
8 IUnknown
9 {
10 virtual HRESULT QueryInterface(const IID& a_iid, void** a_object) = 0;
11 virtual std::uint32_t AddRef() = 0;
12 virtual std::uint32_t Release() = 0;
13
14 template <class T>
15 HRESULT QueryInterface(T** a_object)
16 {
17 return QueryInterface(*reinterpret_cast<const IID*>(&__uuidof(T)), static_cast<void**>(a_object));
18 }
19 };
20}
21
22namespace REX::W32
23{
24 inline constexpr IID IID_IUnknown{ 0x00000000, 0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } };
25}
Definition BSDirectInputManager.h:8
struct __declspec(novtable, uuid("00000000-0000-0000-c000-000000000046")) IUnknown
Definition COM.h:7
constexpr IID IID_IUnknown
Definition COM.h:24
std::int32_t HRESULT
Definition BASE.h:28
Definition BASE.h:63