Maarten Lankhorst m.b.lankhorst@gmail.com writes:
@@ -48,37 +50,20 @@ typedef struct IDirectSoundFullDuplexImpl
/* IDirectSoundFullDuplexImpl fields */ DirectSoundDevice *renderer_device;
- DirectSoundCaptureDevice *capture_device;
- LPUNKNOWN pUnknown;
- LPDIRECTSOUND pDS;
- LPDIRECTSOUND8 pDS8;
- LPDIRECTSOUNDCAPTURE pDSC;
- IDirectSoundCapture *capture_device;
- const IUnknownVtbl *lpUnkVtbl;
- const IDirectSoundVtbl *lpDSVtbl;
- const IDirectSound8Vtbl *lpDS8Vtbl;
- const IDirectSoundCaptureVtbl *lpDSCVtbl;
- LONG unk_ref;
- LONG ds_ref;
- LONG ds8_ref;
- LONG dsc_ref;
} IDirectSoundFullDuplexImpl;
-typedef struct IDirectSoundFullDuplex_IUnknown {
- const IUnknownVtbl *lpVtbl;
- LONG ref;
- IDirectSoundFullDuplexImpl *pdsfd;
-} IDirectSoundFullDuplex_IUnknown;
-typedef struct IDirectSoundFullDuplex_IDirectSound {
- const IDirectSoundVtbl *lpVtbl;
- LONG ref;
- IDirectSoundFullDuplexImpl *pdsfd;
-} IDirectSoundFullDuplex_IDirectSound;
-typedef struct IDirectSoundFullDuplex_IDirectSound8 {
- const IDirectSound8Vtbl *lpVtbl;
- LONG ref;
- IDirectSoundFullDuplexImpl *pdsfd;
-} IDirectSoundFullDuplex_IDirectSound8;
-typedef struct IDirectSoundFullDuplex_IDirectSoundCapture {
- const IDirectSoundCaptureVtbl *lpVtbl;
- LONG ref;
- IDirectSoundFullDuplexImpl *pdsfd;
-} IDirectSoundFullDuplex_IDirectSoundCapture; +#define ICOM_THIS_MULTI(impl,field,iface) \
- impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
Please define inline functions instead of ICOM_THIS_MULTI. Also the IUnknown vtable is most likely unnecessary.