Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a2156ead
Commit
a2156ead
authored
Nov 06, 2002
by
Ove Kaaven
Committed by
Alexandre Julliard
Nov 06, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ICOM_DEFINE1 macro to define a COM interface without a base
class. Use it to define IUnknown.
parent
ca6bcdcc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
54 deletions
+26
-54
obj_base.h
include/wine/obj_base.h
+26
-54
No files found.
include/wine/obj_base.h
View file @
a2156ead
...
...
@@ -321,6 +321,12 @@ INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax);
#define ICOM_CINTERFACE 1
#endif
#ifdef ICOM_USE_COM_INTERFACE_ATTRIBUTE
#define ICOM_COM_INTERFACE_ATTRIBUTE __attribute__((com_interface))
#else
#define ICOM_COM_INTERFACE_ATTRIBUTE
#endif
#ifndef ICOM_CINTERFACE
/* C++ interface */
...
...
@@ -436,21 +442,14 @@ INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax);
public: virtual void CALLBACK (xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h,ti i,tj j,tk k,tl l,tm m,tn n,to o,tp p,tq q,tr r,ts s,tt t,tu u,tv v,tw w,tx x,ty y,tz z) = 0;
#ifdef ICOM_USE_COM_INTERFACE_ATTRIBUTE
#define ICOM_DEFINE(iface,ibase) \
struct iface: public ibase { \
iface##_METHODS \
} __attribute__ ((com_interface));
#else
#define ICOM_DEFINE(iface,ibase) \
struct iface: public ibase { \
} ICOM_COM_INTERFACE_ATTRIBUTE;
#define ICOM_DEFINE1(iface) \
struct iface { \
iface##_METHODS \
};
#endif
/* ICOM_USE_COM_INTERFACE_ATTRIBUTE */
} ICOM_COM_INTERFACE_ATTRIBUTE;
#define ICOM_VTBL(iface) (iface)
...
...
@@ -573,32 +572,34 @@ INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax);
#define ICOM_VTBL(iface) (iface)->lpVtbl
#ifdef ICOM_MSVTABLE_COMPAT
#define ICOM_MSVTABLE_COMPAT_FIELDS \
long dummyRTTI1; \
long dummyRTTI2;
#define ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 0,0,
#else
#define ICOM_MSVTABLE_COMPAT_FIELDS
#define ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
#endif
/* ICOM_MSVTABLE_COMPAT */
#define ICOM_DEFINE(iface,ibase) \
typedef struct ICOM_VTABLE(iface) ICOM_VTABLE(iface); \
struct iface { \
const ICOM_VFIELD(iface); \
}; \
struct ICOM_VTABLE(iface) { \
long dummyRTTI1; \
long dummyRTTI2; \
ICOM_MSVTABLE_COMPAT_FIELDS \
ibase##_IMETHODS \
iface##_METHODS \
};
#define ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 0,0,
#else
#define ICOM_DEFINE(iface,ibase) \
#define ICOM_DEFINE1(iface) \
typedef struct ICOM_VTABLE(iface) ICOM_VTABLE(iface); \
struct iface { \
const ICOM_VFIELD(iface); \
}; \
struct ICOM_VTABLE(iface) { \
ibase##_IMETHO
DS \
ICOM_MSVTABLE_COMPAT_FIEL
DS \
iface##_METHODS \
};
#define ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
#endif
/* ICOM_MSVTABLE_COMPAT */
#define ICOM_THIS(impl,iface) impl* const This=(impl*)(iface)
#define ICOM_CTHIS(impl,iface) const impl* const This=(const impl*)(iface)
...
...
@@ -654,42 +655,13 @@ typedef struct IUnknown IUnknown, *LPUNKNOWN;
* IUnknown interface
*/
#define ICOM_INTERFACE IUnknown
#define IUnknown_
I
METHODS \
#define IUnknown_METHODS \
ICOM_METHOD2(HRESULT,QueryInterface,REFIID,riid, LPVOID*,ppvObj) \
ICOM_METHOD (ULONG,AddRef) \
ICOM_METHOD (ULONG,Release)
#ifdef ICOM_CINTERFACE
typedef
struct
ICOM_VTABLE
(
IUnknown
)
ICOM_VTABLE
(
IUnknown
);
struct
IUnknown
{
ICOM_VFIELD
(
IUnknown
);
}
#if defined(ICOM_USE_COM_INTERFACE_ATTRIBUTE)
__attribute__
((
com_interface
));
#else
;
#endif
/* ICOM_US_COM_INTERFACE_ATTRIBUTE */
struct
ICOM_VTABLE
(
IUnknown
)
{
#ifdef ICOM_MSVTABLE_COMPAT
long
dummyRTTI1
;
long
dummyRTTI2
;
#endif
/* ICOM_MSVTABLE_COMPAT */
#else
/* ICOM_CINTERFACE */
struct
IUnknown
{
#endif
/* ICOM_CINTERFACE */
ICOM_METHOD2
(
HRESULT
,
QueryInterface
,
REFIID
,
riid
,
LPVOID
*
,
ppvObj
)
ICOM_METHOD
(
ULONG
,
AddRef
)
ICOM_METHOD
(
ULONG
,
Release
)
}
#if defined(ICOM_USE_COM_INTERFACE_ATTRIBUTE)
__attribute__
((
com_interface
));
#else
;
#endif
/* ICOM_US_COM_INTERFACE_ATTRIBUTE */
#define IUnknown_IMETHODS \
IUnknown_METHODS
ICOM_DEFINE1
(
IUnknown
)
#undef ICOM_INTERFACE
/*** IUnknown methods ***/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment