提交 3cdbaeb3 编写于 作者: 饶先宏's avatar 饶先宏

202107081052 修改object.h支持用c++实现LCOM对象

上级 d5ae254c
......@@ -30,7 +30,8 @@
/*
*
修改记录:
202105140816: 根据git的要求增加License
202105140816:rxh 根据git的要求增加License
202107081052:rxh 修改object.h支持用c++实现LCOM对象
*/
......@@ -221,7 +222,7 @@ typedef struct _sObjectHeader {
&& isGUIDEqual(((sObjectHeader *)(objectThis(object)))->__object_clsid, classid) )
#define objectQueryInterface(object, iid, pInterface) \
(objectPtrValid(object)? \
(*(IObject **)(object))->QueryInterface((HOBJECT)(object), (iid), pInterface): \
(*(IObject **)(object))->QueryInterface((HOBJECT)(object), (iid), (const void **)(pInterface)): \
EIID_INVALIDOBJECT)
#define objectAddRef(object) (objectPtrValid(object)? \
(*(IObject **)(object))->AddRef((HOBJECT)(object)): \
......@@ -353,6 +354,12 @@ int str2iid(const char* str, IIDTYPE iid);
#define INTERFACE_INIT(__interface, objptr, _obj, interfacename) \
objptr->INTERFACE_VAR(__interface) = &_obj##_##interfacename##_interface;
#ifdef __cplusplus
#define CFUNC extern "C"
#else
#define CFUNC
#endif
#define OBJECT_FUNCDECLARE(_obj, _clsid)\
static int _obj##QueryInterface(HOBJECT object, IIDTYPE iid, const void **pInterface); \
static int _obj##AddRef(HOBJECT object); \
......@@ -372,7 +379,7 @@ int str2iid(const char* str, IIDTYPE iid);
static int _obj##Register() {\
return objectCreateRegister(_clsid, _obj##Create, _obj##ModuleInfo); \
}\
OFUNCPTR A_u_t_o_registor_##_obj = (OFUNCPTR)_obj##Register;
CFUNC int (*A_u_t_o_registor_##_obj)() = _obj##Register;
#define INTERFACE_HEADER(_obj, __interface, _localstruct) \
(int)&(((const _localstruct*)0)->__##__interface##_ptr), \
......
......@@ -262,7 +262,7 @@ QUERYINTERFACE_END
static const char* dlistheaderModuleInfo()
{
return "1.0.1-20210608.0612 Dual List Header";
return "0.3.0-20210608.0612 Dual List Header";
}
static int dlistheaderCreate(const PARAMITEM* pParams, int paramcount, HOBJECT* pObject)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册