27#if !defined(__cplusplus) && !defined(constexpr)
51 return memcmp(
a,
b,
sizeof(
v3_tuid)) == 0;
55# define V3_COM_COMPAT 1
56# define V3_API __stdcall
58# define V3_COM_COMPAT 0
76# define V3_ID(a, b, c, d) { \
78 ((a) & 0x0000FF00) >> 8, \
79 ((a) & 0x00FF0000) >> 16, \
80 ((a) & 0xFF000000) >> 24, \
82 ((b) & 0x00FF0000) >> 16, \
83 ((b) & 0xFF000000) >> 24, \
85 ((b) & 0x0000FF00) >> 8, \
87 ((c) & 0xFF000000) >> 24, \
88 ((c) & 0x00FF0000) >> 16, \
89 ((c) & 0x0000FF00) >> 8, \
92 ((d) & 0xFF000000) >> 24, \
93 ((d) & 0x00FF0000) >> 16, \
94 ((d) & 0x0000FF00) >> 8, \
111# define V3_ID(a, b, c, d) { \
112 ((a) & 0xFF000000) >> 24, \
113 ((a) & 0x00FF0000) >> 16, \
114 ((a) & 0x0000FF00) >> 8, \
115 ((a) & 0x000000FF), \
117 ((b) & 0xFF000000) >> 24, \
118 ((b) & 0x00FF0000) >> 16, \
119 ((b) & 0x0000FF00) >> 8, \
120 ((b) & 0x000000FF), \
122 ((c) & 0xFF000000) >> 24, \
123 ((c) & 0x00FF0000) >> 16, \
124 ((c) & 0x0000FF00) >> 8, \
125 ((c) & 0x000000FF), \
127 ((d) & 0xFF000000) >> 24, \
128 ((d) & 0x00FF0000) >> 16, \
129 ((d) & 0x0000FF00) >> 8, \
130 ((d) & 0x000000FF), \
134#define V3_ID_COPY(iid) \
135 { iid[0], iid[1], iid[ 2], iid[ 3], iid[ 4], iid[ 5], iid[ 6], iid[ 7], \
136 iid[8], iid[9], iid[10], iid[11], iid[12], iid[13], iid[14], iid[15] }
149 V3_ID(0x00000000, 0x00000000, 0xC0000000, 0x00000046);
164 V3_ID(0x22888DDB, 0x156E45AE, 0x8358B348, 0x08190625);
179template<
class T>
static inline
180constexpr T* v3_cpp_obj(T**
obj)
186 return static_cast<T*
>(
static_cast<void*
>(
static_cast<uint8_t*
>(
static_cast<void*
>(*obj)) +
sizeof(
void*)*3));
193template<
class T,
class M>
static inline
196 return static_cast<v3_funknown*
>(
static_cast<void*
>(*obj))->query_interface(
obj,
iid, (
void**)obj2);
199template<
class T>
static inline
202 return static_cast<v3_funknown*
>(
static_cast<void*
>(*obj))->ref(
obj);
205template<
class T>
static inline
208 return static_cast<v3_funknown*
>(
static_cast<void*
>(*obj))->unref(
obj);
211template<
class T>
static inline
215 static_cast<void*
>(
static_cast<uint8_t*
>(
static_cast<void*
>(*obj)) +
sizeof(
void*)*3))->initialize(
obj, context);
218template<
class T>
static inline
222 static_cast<void*
>(
static_cast<uint8_t*
>(
static_cast<void*
>(*obj)) +
sizeof(
void*)*3))->terminate(
obj);
#define V3_ID(a, b, c, d)
Definition base.h:111
uint32_t v3_param_id
Definition base.h:40
#define V3_API
Definition base.h:59
static constexpr const v3_tuid v3_funknown_iid
Definition base.h:148
static constexpr const v3_tuid v3_plugin_base_iid
Definition base.h:163
static bool v3_tuid_match(const v3_tuid a, const v3_tuid b)
Definition base.h:49
int16_t v3_str_128[128]
Definition base.h:37
int32_t v3_result
Definition base.h:35
uint8_t v3_bool
Definition base.h:38
uint8_t v3_tuid[16]
Definition base.h:46
@ V3_NOMEM
Definition base.h:108
@ V3_NO_INTERFACE
Definition base.h:100
@ V3_TRUE
Definition base.h:102
@ V3_NOT_IMPLEMENTED
Definition base.h:105
@ V3_NOT_INITIALIZED
Definition base.h:107
@ V3_FALSE
Definition base.h:103
@ V3_INTERNAL_ERR
Definition base.h:106
@ V3_INVALID_ARG
Definition base.h:104
@ V3_OK
Definition base.h:101
uint8_t a
Definition Spc_Cpu.h:141
int int32_t
Definition mid.cpp:97
unsigned int uint32_t
Definition mid.cpp:100
short int16_t
Definition mid.cpp:96
unsigned char uint8_t
Definition mid.cpp:98
#define M
Definition nseel-cfunc.c:37
const v3_tuid iid
Definition base.h:143
const v3_tuid void ** obj
Definition base.h:143
uint32_t(V3_API *unref)(void *self)
uint32_t(V3_API *ref)(void *self)
struct v3_funknown ** context
Definition base.h:159
v3_result(V3_API *terminate)(void *self)