2 * An implementation of IUnknown.
4 * hidenori@a2.ctktv.ne.jp
7 #ifndef WINE_DSHOW_IUNK_H
8 #define WINE_DSHOW_IUNK_H
11 To avoid implementing IUnknown for all interfaces,
13 1) To give a method to get rel-offset of IUnknown.
14 2) The IUnknown knows all IIDs and offsets of interfaces.
16 So each implementation must have following two members
17 with the following order:
19 typedef struct IDispatchImpl
21 ICOM_VFIELD(IDispatch); <-pointer of the interface.
22 size_t ofsIUnknown; <-ofs<IDispatchImpl> - ofs<QUARTZ_IUnkImpl>
27 typedef struct QUARTZ_IFEntry
29 REFIID piid
; /* interface ID. */
30 size_t ofsVTPtr
; /* offset from IUnknown. */
33 typedef struct QUARTZ_IUnkImpl
35 /* pointer of IUnknown interface. */
36 ICOM_VFIELD(IUnknown
);
38 /* array of supported IIDs and offsets. */
39 const QUARTZ_IFEntry
* pEntries
;
42 /* IUnknown fields. */
47 void QUARTZ_IUnkInit( QUARTZ_IUnkImpl
* pImpl
);
50 #endif /* WINE_DSHOW_IUNK_H */