Gavin Ray
10/02/2021, 5:23 PMtypedef struct FUnknown_vtbl {
tresult (*queryInterface)(void* this_ptr, const TUID iid, void** obj);
uint32 (*addRef)(void* this_ptr);
uint32 (*release)(void* this_ptr);
} FUnknown_vtbl;
typedef struct FUnknown_def {
FUnknown_vtbl* vtable,
int iid[16]
} FUnknown_def;
/* class ISomething : public FUnknown {
* public:
* virtual int someInt() = 0;
*/
typedef struct ISomething_vtbl {
FUnknown_vtble funknown_vtable;
int (*someInt)(void* this_ptr);
} ISomething_vtbl;
Just curious if someone has already done this or has any tips/knows of a better way?
Thank you 🙏