Generalized the use of the new ICOM_VFIELD and ICOM_VTBL macros.

This commit is contained in:
Francois Gouget 1999-10-31 01:59:23 +00:00 committed by Alexandre Julliard
parent 238b6d7040
commit 01c9ac401f
38 changed files with 181 additions and 179 deletions

View File

@ -78,7 +78,7 @@ struct ICOM_VTABLE(IAVIStream) iavist = {
typedef struct IAVIStreamImpl { typedef struct IAVIStreamImpl {
/* IUnknown stuff */ /* IUnknown stuff */
ICOM_VTABLE(IAVIStream)* lpvtbl; ICOM_VFIELD(IAVIStream);
DWORD ref; DWORD ref;
/* IAVIStream stuff */ /* IAVIStream stuff */
LPVOID lpInputFormat; LPVOID lpInputFormat;
@ -109,7 +109,7 @@ AVIFileInit(void) {
typedef struct IAVIFileImpl { typedef struct IAVIFileImpl {
/* IUnknown stuff */ /* IUnknown stuff */
ICOM_VTABLE(IAVIFile)* lpvtbl; ICOM_VFIELD(IAVIFile);
DWORD ref; DWORD ref;
/* IAVIFile stuff... */ /* IAVIFile stuff... */
} IAVIFileImpl; } IAVIFileImpl;
@ -168,7 +168,7 @@ static HRESULT WINAPI IAVIFile_fnCreateStream(IAVIFile*iface,PAVISTREAM*avis,AVI
FIXME_(avifile)("(%p,%p,%p)\n",This,avis,asi); FIXME_(avifile)("(%p,%p,%p)\n",This,avis,asi);
istream = (IAVIStreamImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIStreamImpl)); istream = (IAVIStreamImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIStreamImpl));
istream->ref = 1; istream->ref = 1;
istream->lpvtbl = &iavist; ICOM_VTBL(istream) = &iavist;
fcc[4]='\0'; fcc[4]='\0';
memcpy(fcc,(char*)&(asi->fccType),4); memcpy(fcc,(char*)&(asi->fccType),4);
FIXME_(avifile)("\tfccType '%s'\n",fcc); FIXME_(avifile)("\tfccType '%s'\n",fcc);
@ -222,7 +222,7 @@ HRESULT WINAPI AVIFileOpenA(
FIXME_(avifile)("(%p,%s,0x%08lx,%s),stub!\n",ppfile,szFile,(DWORD)uMode,buf); FIXME_(avifile)("(%p,%s,0x%08lx,%s),stub!\n",ppfile,szFile,(DWORD)uMode,buf);
iavi = (IAVIFileImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIFileImpl)); iavi = (IAVIFileImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIFileImpl));
iavi->ref = 1; iavi->ref = 1;
iavi->lpvtbl = &iavift; ICOM_VTBL(iavi) = &iavift;
*ppfile = (LPVOID)iavi; *ppfile = (LPVOID)iavi;
return S_OK; return S_OK;
} }

View File

@ -14,7 +14,7 @@ DEFAULT_DEBUG_CHANNEL(dplay)
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IClassFactory)* lpvtbl; ICOM_VFIELD(IClassFactory);
DWORD ref; DWORD ref;
} IClassFactoryImpl; } IClassFactoryImpl;

View File

@ -86,7 +86,7 @@ typedef struct IDirectSound3DBufferImpl IDirectSound3DBufferImpl;
struct IDirectSoundImpl struct IDirectSoundImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectSound)* lpvtbl; ICOM_VFIELD(IDirectSound);
DWORD ref; DWORD ref;
/* IDirectSoundImpl fields */ /* IDirectSoundImpl fields */
DWORD priolevel; DWORD priolevel;
@ -103,7 +103,7 @@ struct IDirectSoundImpl
struct IDirectSoundBufferImpl struct IDirectSoundBufferImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectSoundBuffer)* lpvtbl; ICOM_VFIELD(IDirectSoundBuffer);
DWORD ref; DWORD ref;
/* IDirectSoundBufferImpl fields */ /* IDirectSoundBufferImpl fields */
WAVEFORMATEX wfx; WAVEFORMATEX wfx;
@ -130,7 +130,7 @@ struct IDirectSoundBufferImpl
struct IDirectSoundNotifyImpl struct IDirectSoundNotifyImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectSoundNotify)* lpvtbl; ICOM_VFIELD(IDirectSoundNotify);
DWORD ref; DWORD ref;
/* IDirectSoundNotifyImpl fields */ /* IDirectSoundNotifyImpl fields */
IDirectSoundBufferImpl* dsb; IDirectSoundBufferImpl* dsb;
@ -142,7 +142,7 @@ struct IDirectSoundNotifyImpl
struct IDirectSound3DListenerImpl struct IDirectSound3DListenerImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectSound3DListener)* lpvtbl; ICOM_VFIELD(IDirectSound3DListener);
DWORD ref; DWORD ref;
/* IDirectSound3DListenerImpl fields */ /* IDirectSound3DListenerImpl fields */
IDirectSoundBufferImpl* dsb; IDirectSoundBufferImpl* dsb;
@ -156,7 +156,7 @@ struct IDirectSound3DListenerImpl
struct IDirectSound3DBufferImpl struct IDirectSound3DBufferImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectSound3DBuffer)* lpvtbl; ICOM_VFIELD(IDirectSound3DBuffer);
DWORD ref; DWORD ref;
/* IDirectSound3DBufferImpl fields */ /* IDirectSound3DBufferImpl fields */
IDirectSoundBufferImpl* dsb; IDirectSoundBufferImpl* dsb;
@ -976,7 +976,7 @@ static DWORD WINAPI IDirectSoundBufferImpl_Release(LPDIRECTSOUNDBUFFER iface) {
DeleteCriticalSection(&(This->lock)); DeleteCriticalSection(&(This->lock));
if (This->ds3db && This->ds3db->lpvtbl) if (This->ds3db && ICOM_VTBL(This->ds3db))
IDirectSound3DBuffer_Release((LPDIRECTSOUND3DBUFFER)This->ds3db); IDirectSound3DBuffer_Release((LPDIRECTSOUND3DBUFFER)This->ds3db);
if (This->parent) if (This->parent)
@ -1242,7 +1242,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface(
dsn->ref = 1; dsn->ref = 1;
dsn->dsb = This; dsn->dsb = This;
IDirectSoundBuffer_AddRef(iface); IDirectSoundBuffer_AddRef(iface);
dsn->lpvtbl = &dsnvt; ICOM_VTBL(dsn) = &dsnvt;
*ppobj = (LPVOID)dsn; *ppobj = (LPVOID)dsn;
return S_OK; return S_OK;
} }
@ -1356,7 +1356,7 @@ static HRESULT WINAPI IDirectSoundImpl_CreateSoundBuffer(
(*ippdsb)->playpos = 0; (*ippdsb)->playpos = 0;
(*ippdsb)->writepos = 0; (*ippdsb)->writepos = 0;
(*ippdsb)->parent = NULL; (*ippdsb)->parent = NULL;
(*ippdsb)->lpvtbl = &dsbvt; ICOM_VTBL(*ippdsb) = &dsbvt;
(*ippdsb)->dsound = This; (*ippdsb)->dsound = This;
(*ippdsb)->playing = 0; (*ippdsb)->playing = 0;
(*ippdsb)->lVolAdjust = (1 << 15); (*ippdsb)->lVolAdjust = (1 << 15);
@ -1392,7 +1392,7 @@ static HRESULT WINAPI IDirectSoundImpl_CreateSoundBuffer(
0,sizeof(*ds3db)); 0,sizeof(*ds3db));
ds3db->ref = 1; ds3db->ref = 1;
ds3db->dsb = (*ippdsb); ds3db->dsb = (*ippdsb);
ds3db->lpvtbl = &ds3dbvt; ICOM_VTBL(ds3db) = &ds3dbvt;
(*ippdsb)->ds3db = ds3db; (*ippdsb)->ds3db = ds3db;
ds3db->ds3db.dwSize = sizeof(DS3DBUFFER); ds3db->ds3db.dwSize = sizeof(DS3DBUFFER);
ds3db->ds3db.vPosition.x.x = 0.0; ds3db->ds3db.vPosition.x.x = 0.0;
@ -1543,7 +1543,7 @@ static HRESULT WINAPI IDirectSoundImpl_QueryInterface(
This->listener = (IDirectSound3DListenerImpl*)HeapAlloc( This->listener = (IDirectSound3DListenerImpl*)HeapAlloc(
GetProcessHeap(), 0, sizeof(*(This->listener))); GetProcessHeap(), 0, sizeof(*(This->listener)));
This->listener->ref = 1; This->listener->ref = 1;
This->listener->lpvtbl = &ds3dlvt; ICOM_VTBL(This->listener) = &ds3dlvt;
IDirectSound_AddRef(iface); IDirectSound_AddRef(iface);
This->listener->ds3dl.dwSize = sizeof(DS3DLISTENER); This->listener->ds3dl.dwSize = sizeof(DS3DLISTENER);
This->listener->ds3dl.vPosition.x.x = 0.0; This->listener->ds3dl.vPosition.x.x = 0.0;
@ -2060,7 +2060,7 @@ static DWORD WINAPI DSOUND_MixPrimary(void)
for (i = dsound->nrofbuffers - 1; i >= 0; i--) { for (i = dsound->nrofbuffers - 1; i >= 0; i--) {
dsb = dsound->buffers[i]; dsb = dsound->buffers[i];
if (!dsb || !(dsb->lpvtbl)) if (!dsb || !(ICOM_VTBL(dsb)))
continue; continue;
IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER)dsb); IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER)dsb);
if (dsb->buflen && dsb->playing) { if (dsb->buflen && dsb->playing) {
@ -2294,7 +2294,7 @@ HRESULT WINAPI DirectSoundCreate(REFGUID lpGUID,LPDIRECTSOUND *ppDS,IUnknown *pU
return DSERR_OUTOFMEMORY; return DSERR_OUTOFMEMORY;
(*ippDS)->ref = 1; (*ippDS)->ref = 1;
(*ippDS)->lpvtbl = &dsvt; ICOM_VTBL(*ippDS) = &dsvt;
(*ippDS)->buffers = NULL; (*ippDS)->buffers = NULL;
(*ippDS)->nrofbuffers = 0; (*ippDS)->nrofbuffers = 0;
@ -2339,7 +2339,7 @@ HRESULT WINAPI DirectSoundCreate(REFGUID lpGUID,LPDIRECTSOUND *ppDS,IUnknown *pU
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IClassFactory)* lpvtbl; ICOM_VFIELD(IClassFactory);
DWORD ref; DWORD ref;
} IClassFactoryImpl; } IClassFactoryImpl;

View File

@ -31,7 +31,7 @@ typedef struct BindCtxObject{
/* BindCtx data strucrture */ /* BindCtx data strucrture */
typedef struct BindCtxImpl{ typedef struct BindCtxImpl{
ICOM_VTABLE(IBindCtx)* lpvtbl; /* VTable relative to the IBindCtx interface.*/ ICOM_VFIELD(IBindCtx); /* VTable relative to the IBindCtx interface.*/
ULONG ref; /* reference counter for this object */ ULONG ref; /* reference counter for this object */
@ -161,7 +161,7 @@ HRESULT WINAPI BindCtxImpl_Construct(BindCtxImpl* This)
TRACE("(%p)\n",This); TRACE("(%p)\n",This);
/* Initialize the virtual function table.*/ /* Initialize the virtual function table.*/
This->lpvtbl = &VT_BindCtxImpl; ICOM_VTBL(This) = &VT_BindCtxImpl;
This->ref = 0; This->ref = 0;
/* Initialize the BIND_OPTS2 structure */ /* Initialize the BIND_OPTS2 structure */

View File

@ -109,7 +109,7 @@ typedef struct OLEClipbrd OLEClipbrd;
typedef struct typedef struct
{ {
/* IEnumFORMATETC VTable */ /* IEnumFORMATETC VTable */
ICOM_VTABLE(IEnumFORMATETC)* lpvtbl; ICOM_VFIELD(IEnumFORMATETC);
/* IEnumFORMATETC fields */ /* IEnumFORMATETC fields */
UINT posFmt; /* current enumerator position */ UINT posFmt; /* current enumerator position */
@ -1434,7 +1434,7 @@ LPENUMFORMATETC OLEClipbrd_IEnumFORMATETC_Construct(UINT cfmt, const FORMATETC a
return NULL; return NULL;
ef->ref = 0; ef->ref = 0;
ef->lpvtbl = &efvt; ICOM_VTBL(ef) = &efvt;
ef->pUnkDataObj = pUnkDataObj; ef->pUnkDataObj = pUnkDataObj;
ef->posFmt = 0; ef->posFmt = 0;

View File

@ -38,7 +38,7 @@ typedef struct CompositeMonikerImpl{
/* EnumMoniker data structure */ /* EnumMoniker data structure */
typedef struct EnumMonikerImpl{ typedef struct EnumMonikerImpl{
ICOM_VTABLE(IEnumMoniker)* lpvtbl; /* VTable relative to the IEnumMoniker interface.*/ ICOM_VFIELD(IEnumMoniker); /* VTable relative to the IEnumMoniker interface.*/
ULONG ref; /* reference counter for this object */ ULONG ref; /* reference counter for this object */
@ -1606,7 +1606,7 @@ HRESULT WINAPI EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker,
return E_INVALIDARG; return E_INVALIDARG;
/* Initialize the virtual function table. */ /* Initialize the virtual function table. */
newEnumMoniker->lpvtbl = &VT_EnumMonikerImpl; ICOM_VTBL(newEnumMoniker) = &VT_EnumMonikerImpl;
newEnumMoniker->ref = 0; newEnumMoniker->ref = 0;
newEnumMoniker->tabSize=tabSize; newEnumMoniker->tabSize=tabSize;

View File

@ -27,8 +27,8 @@ DEFAULT_DEBUG_CHANNEL(storage)
*/ */
struct HGLOBALStreamImpl struct HGLOBALStreamImpl
{ {
ICOM_VTABLE(IStream) *lpvtbl; /* Needs to be the first item in the stuct ICOM_VFIELD(IStream); /* Needs to be the first item in the stuct
* since we want to cast this in a IStream pointer */ * since we want to cast this in a IStream pointer */
/* /*
* Reference count * Reference count
@ -201,7 +201,7 @@ HRESULT WINAPI GetHGlobalFromStream(IStream* pstm, HGLOBAL* phglobal)
/* /*
* Verify that the stream object was created with CreateStreamOnHGlobal. * Verify that the stream object was created with CreateStreamOnHGlobal.
*/ */
if (pStream->lpvtbl == &HGLOBALStreamImpl_Vtbl) if (ICOM_VTBL(pStream) == &HGLOBALStreamImpl_Vtbl)
*phglobal = pStream->supportHandle; *phglobal = pStream->supportHandle;
else else
{ {
@ -237,7 +237,7 @@ HGLOBALStreamImpl* HGLOBALStreamImpl_Construct(
/* /*
* Set-up the virtual function table and reference count. * Set-up the virtual function table and reference count.
*/ */
newStream->lpvtbl = &HGLOBALStreamImpl_Vtbl; ICOM_VTBL(newStream) = &HGLOBALStreamImpl_Vtbl;
newStream->ref = 0; newStream->ref = 0;
/* /*

View File

@ -26,7 +26,7 @@ DEFAULT_DEBUG_CHANNEL(relay)
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IUnknown)* lpvtbl; ICOM_VFIELD(IUnknown);
DWORD ref; DWORD ref;
} IUnknownImpl; } IUnknownImpl;
@ -85,7 +85,7 @@ IUnknown_Constructor() {
IUnknownImpl* unk; IUnknownImpl* unk;
unk = (IUnknownImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IUnknownImpl)); unk = (IUnknownImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IUnknownImpl));
unk->lpvtbl = &uvt; ICOM_VTBL(unk) = &uvt;
unk->ref = 1; unk->ref = 1;
return (LPUNKNOWN)unk; return (LPUNKNOWN)unk;
} }
@ -97,7 +97,7 @@ IUnknown_Constructor() {
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IMalloc16)* lpvtbl; ICOM_VFIELD(IMalloc16);
DWORD ref; DWORD ref;
/* IMalloc16 fields */ /* IMalloc16 fields */
/* Gmm, I think one is not enough, we should probably manage a list of /* Gmm, I think one is not enough, we should probably manage a list of
@ -221,7 +221,7 @@ IMalloc16_Constructor() {
VTENT(DidAlloc); VTENT(DidAlloc);
VTENT(HeapMinimize); VTENT(HeapMinimize);
#undef VTENT #undef VTENT
This->lpvtbl = (ICOM_VTABLE(IMalloc16)*)SEGPTR_GET(msegvt16); ICOM_VTBL(This) = (ICOM_VTABLE(IMalloc16)*)SEGPTR_GET(msegvt16);
} }
This->ref = 1; This->ref = 1;
/* FIXME: implement multiple heaps */ /* FIXME: implement multiple heaps */
@ -236,7 +236,7 @@ IMalloc16_Constructor() {
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IMalloc)* lpvtbl; ICOM_VFIELD(IMalloc);
DWORD ref; DWORD ref;
} IMalloc32Impl; } IMalloc32Impl;
@ -352,7 +352,7 @@ IMalloc_Constructor() {
IMalloc32Impl* This; IMalloc32Impl* This;
This = (IMalloc32Impl*)HeapAlloc(GetProcessHeap(),0,sizeof(IMalloc32Impl)); This = (IMalloc32Impl*)HeapAlloc(GetProcessHeap(),0,sizeof(IMalloc32Impl));
This->lpvtbl = &VT_IMalloc32; ICOM_VTBL(This) = &VT_IMalloc32;
This->ref = 1; This->ref = 1;
return (LPMALLOC)This; return (LPMALLOC)This;
} }

View File

@ -27,7 +27,7 @@ struct HGLOBALLockBytesImpl
* Needs to be the first item in the stuct * Needs to be the first item in the stuct
* since we want to cast this in an ILockBytes pointer * since we want to cast this in an ILockBytes pointer
*/ */
ICOM_VTABLE(ILockBytes) *lpvtbl; ICOM_VFIELD(ILockBytes);
/* /*
* Reference count * Reference count
@ -157,7 +157,7 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* plkbyt, HGLOBAL* phglobal)
{ {
HGLOBALLockBytesImpl* const pMemLockBytes = (HGLOBALLockBytesImpl*)plkbyt; HGLOBALLockBytesImpl* const pMemLockBytes = (HGLOBALLockBytesImpl*)plkbyt;
if (pMemLockBytes->lpvtbl == &HGLOBALLockBytesImpl_Vtbl) if (ICOM_VTBL(pMemLockBytes) == &HGLOBALLockBytesImpl_Vtbl)
*phglobal = pMemLockBytes->supportHandle; *phglobal = pMemLockBytes->supportHandle;
else else
*phglobal = 0; *phglobal = 0;
@ -193,7 +193,7 @@ HGLOBALLockBytesImpl* HGLOBALLockBytesImpl_Construct(HGLOBAL hGlobal,
/* /*
* Set up the virtual function table and reference count. * Set up the virtual function table and reference count.
*/ */
newLockBytes->lpvtbl = &HGLOBALLockBytesImpl_Vtbl; ICOM_VTBL(newLockBytes) = &HGLOBALLockBytesImpl_Vtbl;
newLockBytes->ref = 0; newLockBytes->ref = 0;
/* /*

View File

@ -28,7 +28,7 @@ typedef struct RunObject{
/* define de RunningObjectTableImpl structure */ /* define de RunningObjectTableImpl structure */
typedef struct RunningObjectTableImpl{ typedef struct RunningObjectTableImpl{
ICOM_VTABLE(IRunningObjectTable)* lpvtbl; ICOM_VFIELD(IRunningObjectTable);
ULONG ref; ULONG ref;
RunObject* runObjTab; /* pointe to the first object in the table */ RunObject* runObjTab; /* pointe to the first object in the table */
@ -189,7 +189,7 @@ HRESULT WINAPI RunningObjectTableImpl_Initialize()
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
/* initialize the virtual table function */ /* initialize the virtual table function */
runningObjectTableInstance->lpvtbl = &VT_RunningObjectTableImpl; ICOM_VTBL(runningObjectTableInstance) = &VT_RunningObjectTableImpl;
/* the initial reference is set to "1" ! because if set to "0" it will be not practis when */ /* the initial reference is set to "1" ! because if set to "0" it will be not practis when */
/* the ROT refered many times not in the same time (all the objects in the ROT will */ /* the ROT refered many times not in the same time (all the objects in the ROT will */

View File

@ -20,7 +20,7 @@ DEFAULT_DEBUG_CHANNEL(ole)
*/ */
typedef struct OleAdviseHolderImpl typedef struct OleAdviseHolderImpl
{ {
ICOM_VTABLE(IOleAdviseHolder)* lpvtbl; ICOM_VFIELD(IOleAdviseHolder);
DWORD ref; DWORD ref;
@ -71,7 +71,7 @@ static LPOLEADVISEHOLDER OleAdviseHolderImpl_Constructor()
0, 0,
sizeof(OleAdviseHolderImpl)); sizeof(OleAdviseHolderImpl));
lpoah->lpvtbl = &oahvt; ICOM_VTBL(lpoah) = &oahvt;
lpoah->ref = 1; lpoah->ref = 1;
lpoah->maxSinks = 10; lpoah->maxSinks = 10;
lpoah->arrayOfSinks = HeapAlloc(GetProcessHeap(), lpoah->arrayOfSinks = HeapAlloc(GetProcessHeap(),
@ -344,7 +344,7 @@ OleAdviseHolderImpl_SendOnClose (LPOLEADVISEHOLDER iface)
*/ */
typedef struct DataAdviseHolder typedef struct DataAdviseHolder
{ {
ICOM_VTABLE(IDataAdviseHolder)* lpvtbl; ICOM_VFIELD(IDataAdviseHolder);
DWORD ref; DWORD ref;
} DataAdviseHolder; } DataAdviseHolder;
@ -407,7 +407,7 @@ static IDataAdviseHolder* DataAdviseHolder_Constructor()
0, 0,
sizeof(DataAdviseHolder)); sizeof(DataAdviseHolder));
newHolder->lpvtbl = &DataAdviseHolderImpl_VTable; ICOM_VTBL(newHolder) = &DataAdviseHolderImpl_VTable;
newHolder->ref = 1; newHolder->ref = 1;
return (IDataAdviseHolder*)newHolder; return (IDataAdviseHolder*)newHolder;

View File

@ -69,8 +69,8 @@ StgStreamImpl* StgStreamImpl_Construct(
/* /*
* Set-up the virtual function table and reference count. * Set-up the virtual function table and reference count.
*/ */
newStream->lpvtbl = &StgStreamImpl_Vtbl; ICOM_VTBL(newStream) = &StgStreamImpl_Vtbl;
newStream->ref = 0; newStream->ref = 0;
/* /*
* We want to nail-down the reference to the storage in case the * We want to nail-down the reference to the storage in case the

View File

@ -671,7 +671,7 @@ STORAGE_get_free_pps_entry(HFILE hf) {
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IStream16)* lpvtbl; ICOM_VFIELD(IStream16);
DWORD ref; DWORD ref;
/* IStream16 fields */ /* IStream16 fields */
SEGPTR thisptr; /* pointer to this struct as segmented */ SEGPTR thisptr; /* pointer to this struct as segmented */
@ -1144,7 +1144,7 @@ static void _create_istream16(LPSTREAM16 *str) {
} }
} }
lpst = SEGPTR_NEW(IStream16Impl); lpst = SEGPTR_NEW(IStream16Impl);
lpst->lpvtbl = segstrvt16; ICOM_VTBL(lpst) = segstrvt16;
lpst->ref = 1; lpst->ref = 1;
lpst->thisptr = SEGPTR_GET(lpst); lpst->thisptr = SEGPTR_GET(lpst);
*str = (void*)lpst->thisptr; *str = (void*)lpst->thisptr;
@ -1156,7 +1156,7 @@ static void _create_istream16(LPSTREAM16 *str) {
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IStream)* lpvtbl; ICOM_VFIELD(IStream);
DWORD ref; DWORD ref;
/* IStream32 fields */ /* IStream32 fields */
struct storage_pps_entry stde; struct storage_pps_entry stde;
@ -1212,7 +1212,7 @@ ULONG WINAPI IStream_fnRelease(IStream* iface) {
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IStorage16)* lpvtbl; ICOM_VFIELD(IStorage16);
DWORD ref; DWORD ref;
/* IStorage16 fields */ /* IStorage16 fields */
SEGPTR thisptr; /* pointer to this struct as segmented */ SEGPTR thisptr; /* pointer to this struct as segmented */
@ -1559,7 +1559,7 @@ static void _create_istorage16(LPSTORAGE16 *stg) {
} }
} }
lpst = SEGPTR_NEW(IStorage16Impl); lpst = SEGPTR_NEW(IStorage16Impl);
lpst->lpvtbl = segstvt16; ICOM_VTBL(lpst) = segstvt16;
lpst->ref = 1; lpst->ref = 1;
lpst->thisptr = SEGPTR_GET(lpst); lpst->thisptr = SEGPTR_GET(lpst);
*stg = (void*)lpst->thisptr; *stg = (void*)lpst->thisptr;

View File

@ -2037,7 +2037,7 @@ HRESULT StorageImpl_Construct(
/* /*
* Initialize the virtual fgunction table. * Initialize the virtual fgunction table.
*/ */
This->lpvtbl = &Storage32Impl_Vtbl; ICOM_VTBL(This) = &Storage32Impl_Vtbl;
This->v_destructor = &StorageImpl_Destroy; This->v_destructor = &StorageImpl_Destroy;
/* /*
@ -3283,7 +3283,7 @@ StorageInternalImpl* StorageInternalImpl_Construct(
/* /*
* Initialize the virtual function table. * Initialize the virtual function table.
*/ */
newStorage->lpvtbl = &Storage32InternalImpl_Vtbl; ICOM_VTBL(newStorage) = &Storage32InternalImpl_Vtbl;
newStorage->v_destructor = &StorageInternalImpl_Destroy; newStorage->v_destructor = &StorageInternalImpl_Destroy;
/* /*
@ -3354,8 +3354,8 @@ IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(
/* /*
* Set-up the virtual function table and reference count. * Set-up the virtual function table and reference count.
*/ */
newEnumeration->lpvtbl = &IEnumSTATSTGImpl_Vtbl; ICOM_VTBL(newEnumeration) = &IEnumSTATSTGImpl_Vtbl;
newEnumeration->ref = 0; newEnumeration->ref = 0;
/* /*
* We want to nail-down the reference to the storage in case the * We want to nail-down the reference to the storage in case the

View File

@ -179,8 +179,8 @@ ULARGE_INTEGER BIGBLOCKFILE_GetSize(LPBIGBLOCKFILE This);
*/ */
struct StorageBaseImpl struct StorageBaseImpl
{ {
ICOM_VTABLE(IStorage)* lpvtbl; /* Needs to be the first item in the stuct ICOM_VFIELD(IStorage); /* Needs to be the first item in the stuct
* since we want to cast this in a Storage32 pointer */ * since we want to cast this in a Storage32 pointer */
/* /*
* Reference count of this object * Reference count of this object
@ -273,7 +273,7 @@ HRESULT WINAPI StorageBaseImpl_SetClass(
*/ */
struct StorageImpl struct StorageImpl
{ {
ICOM_VTABLE(IStorage) *lpvtbl; /* Needs to be the first item in the stuct ICOM_VFIELD(IStorage); /* Needs to be the first item in the stuct
* since we want to cast this in a Storage32 pointer */ * since we want to cast this in a Storage32 pointer */
/* /*
@ -462,8 +462,8 @@ void Storage32Impl_SetExtDepotBlock(StorageImpl* This,
*/ */
struct StorageInternalImpl struct StorageInternalImpl
{ {
ICOM_VTABLE(IStorage) *lpvtbl; /* Needs to be the first item in the stuct ICOM_VFIELD(IStorage); /* Needs to be the first item in the stuct
* since we want to cast this in a Storage32 pointer */ * since we want to cast this in a Storage32 pointer */
/* /*
* Declare the member of the Storage32BaseImpl class to allow * Declare the member of the Storage32BaseImpl class to allow
@ -506,7 +506,7 @@ HRESULT WINAPI StorageInternalImpl_Revert(
*/ */
struct IEnumSTATSTGImpl struct IEnumSTATSTGImpl
{ {
ICOM_VTABLE(IEnumSTATSTG) *lpvtbl; /* Needs to be the first item in the stuct ICOM_VFIELD(IEnumSTATSTG); /* Needs to be the first item in the stuct
* since we want to cast this in a IEnumSTATSTG pointer */ * since we want to cast this in a IEnumSTATSTG pointer */
ULONG ref; /* Reference count */ ULONG ref; /* Reference count */
@ -591,7 +591,7 @@ INT IEnumSTATSTGImpl_FindParentProperty(
*/ */
struct StgStreamImpl struct StgStreamImpl
{ {
ICOM_VTABLE(IStream) *lpvtbl; /* Needs to be the first item in the stuct ICOM_VFIELD(IStream); /* Needs to be the first item in the stuct
* since we want to cast this in a IStream pointer */ * since we want to cast this in a IStream pointer */
/* /*

View File

@ -49,7 +49,7 @@ static struct ICOM_VTABLE(IContextMenu) cmvt =
* IContextMenu Implementation * IContextMenu Implementation
*/ */
typedef struct typedef struct
{ ICOM_VTABLE(IContextMenu)* lpvtbl; { ICOM_VFIELD(IContextMenu);
DWORD ref; DWORD ref;
IShellFolder* pSFParent; IShellFolder* pSFParent;
LPITEMIDLIST pidl; /* root pidl */ LPITEMIDLIST pidl; /* root pidl */
@ -147,7 +147,7 @@ IContextMenu *IContextMenu_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pi
UINT u; UINT u;
cm = (IContextMenuImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IContextMenuImpl)); cm = (IContextMenuImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IContextMenuImpl));
cm->lpvtbl=&cmvt; ICOM_VTBL(cm)=&cmvt;
cm->ref = 1; cm->ref = 1;
cm->pidl = ILClone(pidl); cm->pidl = ILClone(pidl);

View File

@ -24,7 +24,7 @@ DEFAULT_DEBUG_CHANNEL(shell)
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IEnumFORMATETC)* lpvtbl; ICOM_VFIELD(IEnumFORMATETC);
DWORD ref; DWORD ref;
/* IEnumFORMATETC fields */ /* IEnumFORMATETC fields */
UINT posFmt; UINT posFmt;
@ -62,7 +62,7 @@ LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[])
if(ef) if(ef)
{ {
ef->ref=1; ef->ref=1;
ef->lpvtbl=&efvt; ICOM_VTBL(ef)=&efvt;
ef->countFmt = cfmt; ef->countFmt = cfmt;
ef->pFmt = SHAlloc (size); ef->pFmt = SHAlloc (size);
@ -356,7 +356,7 @@ static void WINAPI IDLList_CleanList(LPIDLLIST this)
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDataObject)* lpvtbl; ICOM_VFIELD(IDataObject);
DWORD ref; DWORD ref;
/* IDataObject fields */ /* IDataObject fields */
@ -384,7 +384,7 @@ LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPITEMIDLIST pMyPidl, LPITE
if (dto) if (dto)
{ {
dto->ref=1; dto->ref=1;
dto->lpvtbl=&dtovt; ICOM_VTBL(dto)=&dtovt;
dto->pidl=ILClone(pMyPidl); dto->pidl=ILClone(pMyPidl);
/* fill the ItemID List List */ /* fill the ItemID List List */

View File

@ -28,7 +28,7 @@ typedef struct tagENUMLIST
typedef struct typedef struct
{ {
ICOM_VTABLE(IEnumIDList)* lpvtbl; ICOM_VFIELD(IEnumIDList);
DWORD ref; DWORD ref;
LPENUMLIST mpFirst; LPENUMLIST mpFirst;
LPENUMLIST mpLast; LPENUMLIST mpLast;
@ -309,7 +309,7 @@ IEnumIDList * IEnumIDList_Constructor(
if (lpeidl) if (lpeidl)
{ {
lpeidl->ref = 1; lpeidl->ref = 1;
lpeidl->lpvtbl = &eidlvt; ICOM_VTBL(lpeidl) = &eidlvt;
switch (dwKind) switch (dwKind)
{ {

View File

@ -25,7 +25,7 @@ DEFAULT_DEBUG_CHANNEL(shell)
*/ */
typedef struct typedef struct
{ ICOM_VTABLE(IExtractIconA)* lpvtbl; { ICOM_VFIELD(IExtractIconA);
DWORD ref; DWORD ref;
ICOM_VTABLE(IPersistFile)* lpvtblPersistFile; ICOM_VTABLE(IPersistFile)* lpvtblPersistFile;
LPITEMIDLIST pidl; LPITEMIDLIST pidl;
@ -46,7 +46,7 @@ IExtractIconA* IExtractIconA_Constructor(LPCITEMIDLIST pidl)
ei=(IExtractIconAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconAImpl)); ei=(IExtractIconAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconAImpl));
ei->ref=1; ei->ref=1;
ei->lpvtbl = &eivt; ICOM_VTBL(ei) = &eivt;
ei->lpvtblPersistFile = &pfvt; ei->lpvtblPersistFile = &pfvt;
ei->pidl=ILClone(pidl); ei->pidl=ILClone(pidl);

View File

@ -3,23 +3,25 @@
#include "shlobj.h" #include "shlobj.h"
#define IShellBrowser_QueryInterface(p,a,b) (p)->lpvtbl->fnQueryInterface(p,a,b) /*** IUnknown methods ***/
#define IShellBrowser_AddRef(p) (p)->lpvtbl->fnAddRef(p) #define IShellBrowser_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IShellBrowser_Release(p) (p)->lpvtbl->fnRelease(p) #define IShellBrowser_AddRef(p) ICOM_CALL (AddRef,p)
#define IShellBrowser_GetWindow(p,a) (p)->lpvtbl->fnGetWindow(p,a) #define IShellBrowser_Release(p) ICOM_CALL (Release,p)
#define IShellBrowser_ContextSensitiveHelp(p,a) (p)->lpvtbl->fnContextSensitiveHelp(p,a) /*** IShellBrowser methods ***/
#define IShellBrowser_InsertMenusSB(p,a,b) (p)->lpvtbl->fnInsertMenusSB(p,a,b) #define IShellBrowser_GetWindow(p,a) ICOM_CALL1(GetWindow,p,a)
#define IShellBrowser_SetMenuSB(p,a,b,c) (p)->lpvtbl->fnSetMenuSB(p,a,b,c) #define IShellBrowser_ContextSensitiveHelp(p,a) ICOM_CALL1(ContextSensitiveHelp,p,a)
#define IShellBrowser_RemoveMenusSB(p,a) (p)->lpvtbl->fnRemoveMenusSB(p,a) #define IShellBrowser_InsertMenusSB(p,a,b) ICOM_CALL2(InsertMenusSB,p,a,b)
#define IShellBrowser_SetStatusTextSB(p,a) (p)->lpvtbl->fnSetStatusTextSB(p,a) #define IShellBrowser_SetMenuSB(p,a,b,c) ICOM_CALL3(SetMenuSB,p,a,b,c)
#define IShellBrowser_EnableModelessSB(p,a) (p)->lpvtbl->fnEnableModelessSB(p,a) #define IShellBrowser_RemoveMenusSB(p,a) ICOM_CALL1(RemoveMenusSB,p,a)
#define IShellBrowser_TranslateAcceleratorSB(p,a,b) (p)->lpvtbl->fnTranslateAcceleratorSB(p,a,b) #define IShellBrowser_SetStatusTextSB(p,a) ICOM_CALL1(SetStatusTextSB,p,a)
#define IShellBrowser_BrowseObject(p,a,b) (p)->lpvtbl->fnBrowseObject(p,a,b) #define IShellBrowser_EnableModelessSB(p,a) ICOM_CALL1(EnableModelessSB,p,a)
#define IShellBrowser_GetViewStateStream(p,a,b) (p)->lpvtbl->fnGetViewStateStream(p,a,b) #define IShellBrowser_TranslateAcceleratorSB(p,a,b) ICOM_CALL2(TranslateAcceleratorSB,p,a,b)
#define IShellBrowser_GetControlWindow(p,a,b) (p)->lpvtbl->fnGetControlWindow(p,a,b) #define IShellBrowser_BrowseObject(p,a,b) ICOM_CALL2(BrowseObject,p,a,b)
#define IShellBrowser_SendControlMsg(p,a,b,c,d,e) (p)->lpvtbl->fnSendControlMsg(p,a,b,c,d,e) #define IShellBrowser_GetViewStateStream(p,a,b) ICOM_CALL2(GetViewStateStream,p,a,b)
#define IShellBrowser_QueryActiveShellView(p,a) (p)->lpvtbl->fnQueryActiveShellView(p,a) #define IShellBrowser_GetControlWindow(p,a,b) ICOM_CALL2(GetControlWindow,p,a,b)
#define IShellBrowser_OnViewWindowActive(p,a) (p)->lpvtbl->fnOnViewWindowActive(p,a) #define IShellBrowser_SendControlMsg(p,a,b,c,d,e) ICOM_CALL5(SendControlMsg,p,a,b,c,d,e)
#define IShellBrowser_SetToolbarItems(p,a,b,c) (p)->lpvtbl->fnSetToolbarItems(p,a,b,c) #define IShellBrowser_QueryActiveShellView(p,a) ICOM_CALL1(QueryActiveShellView,p,a)
#define IShellBrowser_OnViewWindowActive(p,a) ICOM_CALL1(OnViewWindowActive,p,a)
#define IShellBrowser_SetToolbarItems(p,a,b,c) ICOM_CALL3(SetToolbarItems,p,a,b,c)
#endif #endif

View File

@ -15,7 +15,7 @@
DEFAULT_DEBUG_CHANNEL(shell) DEFAULT_DEBUG_CHANNEL(shell)
typedef struct typedef struct
{ ICOM_VTABLE(IStream)* lpvtbl; { ICOM_VFIELD(IStream);
DWORD ref; DWORD ref;
HKEY hKey; HKEY hKey;
LPSTR pszSubKey; LPSTR pszSubKey;
@ -35,7 +35,7 @@ IStream *IStream_Constructor(HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, DWORD
DWORD dwType; DWORD dwType;
rstr = (ISHRegStream*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ISHRegStream)); rstr = (ISHRegStream*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ISHRegStream));
rstr->lpvtbl=&rstvt; ICOM_VTBL(rstr)=&rstvt;
rstr->ref = 1; rstr->ref = 1;
if ( ERROR_SUCCESS == RegOpenKeyExA (hKey, pszSubKey, 0, KEY_READ, &(rstr->hKey))) if ( ERROR_SUCCESS == RegOpenKeyExA (hKey, pszSubKey, 0, KEY_READ, &(rstr->hKey)))

View File

@ -323,7 +323,7 @@ init Shell32LibMain
314 stub StrNCmpW # proper ordinal unknown 314 stub StrNCmpW # proper ordinal unknown
315 stub StrNCpyA # proper ordinal unknown 315 stub StrNCpyA # proper ordinal unknown
316 stub StrNCpyW # proper ordinal unknown 316 stub StrNCpyW # proper ordinal unknown
317 stub StrRChrA # proper ordinal unknown 317 stdcall StrRChrA (str str long) StrRChrA # proper ordinal unknown
318 stub StrRChrIA # proper ordinal unknown 318 stub StrRChrIA # proper ordinal unknown
319 stub StrRChrIW # proper ordinal unknown 319 stub StrRChrIW # proper ordinal unknown
320 stdcall StrRChrW (wstr wstr long) StrRChrW # proper ordinal unknown 320 stdcall StrRChrW (wstr wstr long) StrRChrW # proper ordinal unknown

View File

@ -68,7 +68,7 @@ static ICOM_VTABLE(IPersistStream) psvt;
typedef struct typedef struct
{ {
ICOM_VTABLE(IShellLink)* lpvtbl; ICOM_VFIELD(IShellLink);
DWORD ref; DWORD ref;
ICOM_VTABLE(IShellLinkW)* lpvtblw; ICOM_VTABLE(IShellLinkW)* lpvtblw;
@ -403,7 +403,7 @@ IShellLink * IShellLink_Constructor(BOOL bUnicode)
sl = (IShellLinkImpl *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellLinkImpl)); sl = (IShellLinkImpl *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellLinkImpl));
sl->ref = 1; sl->ref = 1;
sl->lpvtbl = &slvt; ICOM_VTBL(sl) = &slvt;
sl->lpvtblw = &slvtw; sl->lpvtblw = &slvtw;
sl->lpvtblPersistFile = &pfvt; sl->lpvtblPersistFile = &pfvt;
sl->lpvtblPersistStream = &psvt; sl->lpvtblPersistStream = &psvt;

View File

@ -194,7 +194,7 @@ DWORD WINAPI SHGetDesktopFolder(IShellFolder **psf)
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IClassFactory)* lpvtbl; ICOM_VFIELD(IClassFactory);
DWORD ref; DWORD ref;
CLSID *rclsid; CLSID *rclsid;
} IClassFactoryImpl; } IClassFactoryImpl;
@ -211,7 +211,7 @@ LPCLASSFACTORY IClassFactory_Constructor(REFCLSID rclsid)
lpclf= (IClassFactoryImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IClassFactoryImpl)); lpclf= (IClassFactoryImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IClassFactoryImpl));
lpclf->ref = 1; lpclf->ref = 1;
lpclf->lpvtbl = &clfvt; ICOM_VTBL(lpclf) = &clfvt;
lpclf->rclsid = (CLSID*)rclsid; lpclf->rclsid = (CLSID*)rclsid;
TRACE("(%p)->()\n",lpclf); TRACE("(%p)->()\n",lpclf);
@ -354,7 +354,7 @@ typedef HRESULT (CALLBACK * LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid
typedef struct typedef struct
{ {
ICOM_VTABLE(IClassFactory)* lpvtbl; ICOM_VFIELD(IClassFactory);
DWORD ref; DWORD ref;
CLSID *rclsid; CLSID *rclsid;
LPFNCREATEINSTANCE lpfnCI; LPFNCREATEINSTANCE lpfnCI;
@ -377,7 +377,7 @@ IClassFactory * IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, UINT * pcRefDll
lpclf = (IDefClFImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDefClFImpl)); lpclf = (IDefClFImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDefClFImpl));
lpclf->ref = 1; lpclf->ref = 1;
lpclf->lpvtbl = &dclfvt; ICOM_VTBL(lpclf) = &dclfvt;
lpclf->lpfnCI = lpfnCI; lpclf->lpfnCI = lpfnCI;
lpclf->pcRefDll = pcRefDll; lpclf->pcRefDll = pcRefDll;

View File

@ -187,7 +187,7 @@ static HRESULT SHELL32_GetDisplayNameOfChild(
typedef struct typedef struct
{ {
ICOM_VTABLE(IShellFolder)* lpvtbl; ICOM_VFIELD(IShellFolder);
DWORD ref; DWORD ref;
ICOM_VTABLE(IPersistFolder)* lpvtblPersistFolder; ICOM_VTABLE(IPersistFolder)* lpvtblPersistFolder;
@ -246,7 +246,7 @@ static IShellFolder * IShellFolder_Constructor(
sf=(IGenericSFImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IGenericSFImpl)); sf=(IGenericSFImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IGenericSFImpl));
sf->ref=1; sf->ref=1;
sf->lpvtbl=&sfvt; ICOM_VTBL(sf)=&sfvt;
sf->lpvtblPersistFolder=&psfvt; sf->lpvtblPersistFolder=&psfvt;
sf->lpvtblDropTarget=&dtvt; sf->lpvtblDropTarget=&dtvt;
sf->pclsid = (CLSID*)&CLSID_SFFile; sf->pclsid = (CLSID*)&CLSID_SFFile;
@ -1014,7 +1014,7 @@ IShellFolder * ISF_Desktop_Constructor()
sf=(IGenericSFImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IGenericSFImpl)); sf=(IGenericSFImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IGenericSFImpl));
sf->ref=1; sf->ref=1;
sf->lpvtbl=&sfdvt; ICOM_VTBL(sf)=&sfdvt;
sf->absPidl=_ILCreateDesktop(); /* my qualified pidl */ sf->absPidl=_ILCreateDesktop(); /* my qualified pidl */
TRACE("(%p)\n",sf); TRACE("(%p)\n",sf);
@ -1365,7 +1365,7 @@ static IShellFolder * ISF_MyComputer_Constructor(void)
sf=(IGenericSFImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IGenericSFImpl)); sf=(IGenericSFImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IGenericSFImpl));
sf->ref=1; sf->ref=1;
sf->lpvtbl = &sfmcvt; ICOM_VTBL(sf) = &sfmcvt;
sf->lpvtblPersistFolder = &psfvt; sf->lpvtblPersistFolder = &psfvt;
sf->pclsid = (CLSID*)&CLSID_SFMyComp; sf->pclsid = (CLSID*)&CLSID_SFMyComp;
sf->absPidl=_ILCreateMyComputer(); /* my qualified pidl */ sf->absPidl=_ILCreateMyComputer(); /* my qualified pidl */

View File

@ -40,7 +40,7 @@ typedef struct
}LISTVIEW_SORT_INFO, *LPLISTVIEW_SORT_INFO; }LISTVIEW_SORT_INFO, *LPLISTVIEW_SORT_INFO;
typedef struct typedef struct
{ ICOM_VTABLE(IShellView)* lpvtbl; { ICOM_VFIELD(IShellView);
DWORD ref; DWORD ref;
ICOM_VTABLE(IOleCommandTarget)* lpvtblOleCommandTarget; ICOM_VTABLE(IOleCommandTarget)* lpvtblOleCommandTarget;
ICOM_VTABLE(IDropTarget)* lpvtblDropTarget; ICOM_VTABLE(IDropTarget)* lpvtblDropTarget;
@ -132,7 +132,7 @@ IShellView * IShellView_Constructor( IShellFolder * pFolder)
{ IShellViewImpl * sv; { IShellViewImpl * sv;
sv=(IShellViewImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellViewImpl)); sv=(IShellViewImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellViewImpl));
sv->ref=1; sv->ref=1;
sv->lpvtbl=&svvt; ICOM_VTBL(sv)=&svvt;
sv->lpvtblOleCommandTarget=&ctvt; sv->lpvtblOleCommandTarget=&ctvt;
sv->lpvtblDropTarget=&dtvt; sv->lpvtblDropTarget=&dtvt;
sv->lpvtblDropSource=&dsvt; sv->lpvtblDropSource=&dsvt;

View File

@ -23,7 +23,7 @@ DEFAULT_DEBUG_CHANNEL(shell)
* IContextMenu Implementation * IContextMenu Implementation
*/ */
typedef struct typedef struct
{ ICOM_VTABLE(IContextMenu)* lpvtbl; { ICOM_VFIELD(IContextMenu);
DWORD ref; DWORD ref;
} BgCmImpl; } BgCmImpl;
@ -38,7 +38,7 @@ IContextMenu *ISvBgCm_Constructor(void)
BgCmImpl* cm; BgCmImpl* cm;
cm = (BgCmImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(BgCmImpl)); cm = (BgCmImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(BgCmImpl));
cm->lpvtbl=&cmvt; ICOM_VTBL(cm)=&cmvt;
cm->ref = 1; cm->ref = 1;
TRACE("(%p)->()\n",cm); TRACE("(%p)->()\n",cm);

View File

@ -35,7 +35,7 @@ typedef struct IDirect3DDevice2Impl IDirect3DDevice2Impl;
struct IDirect3DImpl struct IDirect3DImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirect3D)* lpvtbl; ICOM_VFIELD(IDirect3D);
DWORD ref; DWORD ref;
/* IDirect3D fields */ /* IDirect3D fields */
IDirectDrawImpl* ddraw; IDirectDrawImpl* ddraw;
@ -47,7 +47,7 @@ struct IDirect3DImpl
struct IDirect3D2Impl struct IDirect3D2Impl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirect3D2)* lpvtbl; ICOM_VFIELD(IDirect3D2);
DWORD ref; DWORD ref;
/* IDirect3D2 fields */ /* IDirect3D2 fields */
IDirectDrawImpl* ddraw; IDirectDrawImpl* ddraw;
@ -59,7 +59,7 @@ struct IDirect3D2Impl
struct IDirect3DLightImpl struct IDirect3DLightImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirect3DLight)* lpvtbl; ICOM_VFIELD(IDirect3DLight);
DWORD ref; DWORD ref;
/* IDirect3DLight fields */ /* IDirect3DLight fields */
union { union {
@ -89,7 +89,7 @@ struct IDirect3DLightImpl
struct IDirect3DMaterial2Impl struct IDirect3DMaterial2Impl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirect3DMaterial2)* lpvtbl; ICOM_VFIELD(IDirect3DMaterial2);
DWORD ref; DWORD ref;
/* IDirect3DMaterial2 fields */ /* IDirect3DMaterial2 fields */
union { union {
@ -113,7 +113,7 @@ struct IDirect3DMaterial2Impl
struct IDirect3DTexture2Impl struct IDirect3DTexture2Impl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirect3DTexture2)* lpvtbl; ICOM_VFIELD(IDirect3DTexture2);
DWORD ref; DWORD ref;
/* IDirect3DTexture2 fields */ /* IDirect3DTexture2 fields */
void* D3Ddevice; /* I put (void *) to use the same pointer for both void* D3Ddevice; /* I put (void *) to use the same pointer for both
@ -130,7 +130,7 @@ struct IDirect3DTexture2Impl
struct IDirect3DViewport2Impl struct IDirect3DViewport2Impl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirect3DViewport2)* lpvtbl; ICOM_VFIELD(IDirect3DViewport2);
DWORD ref; DWORD ref;
/* IDirect3DViewport2 fields */ /* IDirect3DViewport2 fields */
union { union {
@ -171,7 +171,7 @@ struct IDirect3DViewport2Impl
struct IDirect3DExecuteBufferImpl struct IDirect3DExecuteBufferImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirect3DExecuteBuffer)* lpvtbl; ICOM_VFIELD(IDirect3DExecuteBuffer);
DWORD ref; DWORD ref;
/* IDirect3DExecuteBuffer fields */ /* IDirect3DExecuteBuffer fields */
IDirect3DDeviceImpl* d3ddev; IDirect3DDeviceImpl* d3ddev;
@ -198,7 +198,7 @@ struct IDirect3DExecuteBufferImpl
struct IDirect3DDeviceImpl struct IDirect3DDeviceImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirect3DDevice)* lpvtbl; ICOM_VFIELD(IDirect3DDevice);
DWORD ref; DWORD ref;
/* IDirect3DDevice fields */ /* IDirect3DDevice fields */
IDirect3DImpl* d3d; IDirect3DImpl* d3d;
@ -216,7 +216,7 @@ struct IDirect3DDeviceImpl
struct IDirect3DDevice2Impl struct IDirect3DDevice2Impl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirect3DDevice2)* lpvtbl; ICOM_VFIELD(IDirect3DDevice2);
DWORD ref; DWORD ref;
/* IDirect3DDevice fields */ /* IDirect3DDevice fields */
IDirect3D2Impl* d3d; IDirect3D2Impl* d3d;

View File

@ -175,7 +175,7 @@ int is_OpenGL(REFCLSID rguid, IDirectDrawSurfaceImpl* surface, IDirect3DDevice2I
*device = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(OpenGL_IDirect3DDevice2)); *device = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(OpenGL_IDirect3DDevice2));
odev = (OpenGL_IDirect3DDevice2 *) (*device); odev = (OpenGL_IDirect3DDevice2 *) (*device);
(*device)->ref = 1; (*device)->ref = 1;
(*device)->lpvtbl = &OpenGL_vtable; ICOM_VTBL(*device) = &OpenGL_vtable;
(*device)->d3d = d3d; (*device)->d3d = d3d;
(*device)->surface = surface; (*device)->surface = surface;
@ -1239,7 +1239,7 @@ int is_OpenGL_dx3(REFCLSID rguid, IDirectDrawSurfaceImpl* surface, IDirect3DDevi
*device = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(OpenGL_IDirect3DDevice)); *device = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(OpenGL_IDirect3DDevice));
odev = (OpenGL_IDirect3DDevice *) (*device); odev = (OpenGL_IDirect3DDevice *) (*device);
(*device)->ref = 1; (*device)->ref = 1;
(*device)->lpvtbl = &OpenGL_vtable_dx3; ICOM_VTBL(*device) = &OpenGL_vtable_dx3;
(*device)->d3d = NULL; (*device)->d3d = NULL;
(*device)->surface = surface; (*device)->surface = surface;

View File

@ -671,7 +671,7 @@ LPDIRECT3DEXECUTEBUFFER d3dexecutebuffer_create(IDirect3DDeviceImpl* d3ddev, LPD
eb = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DExecuteBufferImpl)); eb = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DExecuteBufferImpl));
eb->ref = 1; eb->ref = 1;
eb->lpvtbl = &executebuffer_vtable; ICOM_VTBL(eb) = &executebuffer_vtable;
eb->d3ddev = d3ddev; eb->d3ddev = d3ddev;
/* Initializes memory */ /* Initializes memory */

View File

@ -104,7 +104,7 @@ LPDIRECT3DLIGHT d3dlight_create(IDirect3D2Impl* d3d2)
light = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DLightImpl)); light = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DLightImpl));
light->ref = 1; light->ref = 1;
light->lpvtbl = &light_vtable; ICOM_VTBL(light) = &light_vtable;
light->d3d.d3d2 = d3d2; light->d3d.d3d2 = d3d2;
light->type = D3D_2; light->type = D3D_2;
@ -122,7 +122,7 @@ LPDIRECT3DLIGHT d3dlight_create_dx3(IDirect3DImpl* d3d1)
light = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DLightImpl)); light = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DLightImpl));
light->ref = 1; light->ref = 1;
light->lpvtbl = &light_vtable; ICOM_VTBL(light) = &light_vtable;
light->d3d.d3d1 = d3d1; light->d3d.d3d1 = d3d1;
light->type = D3D_1; light->type = D3D_1;

View File

@ -70,7 +70,7 @@ LPDIRECT3DMATERIAL2 d3dmaterial2_create(IDirect3D2Impl* d3d2)
mat = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DMaterial2Impl)); mat = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DMaterial2Impl));
mat->ref = 1; mat->ref = 1;
mat->lpvtbl = &material2_vtable; ICOM_VTBL(mat) = &material2_vtable;
mat->use_d3d2 = 1; mat->use_d3d2 = 1;
mat->d3d.d3d2 = d3d2; mat->d3d.d3d2 = d3d2;
@ -86,7 +86,7 @@ LPDIRECT3DMATERIAL d3dmaterial_create(IDirect3DImpl* d3d1)
mat = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DMaterial2Impl)); mat = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DMaterial2Impl));
mat->ref = 1; mat->ref = 1;
mat->lpvtbl = (ICOM_VTABLE(IDirect3DMaterial2)*)&material_vtable; ICOM_VTBL(mat) = (ICOM_VTABLE(IDirect3DMaterial2)*)&material_vtable;
mat->use_d3d2 = 0; mat->use_d3d2 = 0;
mat->d3d.d3d1 = d3d1; mat->d3d.d3d1 = d3d1;

View File

@ -103,7 +103,7 @@ LPDIRECT3DTEXTURE2 d3dtexture2_create(IDirectDrawSurface4Impl* surf)
tex = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DTexture2Impl)); tex = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DTexture2Impl));
tex->ref = 1; tex->ref = 1;
tex->lpvtbl = &texture2_vtable; ICOM_VTBL(tex) = &texture2_vtable;
tex->surface = surf; tex->surface = surf;
return (LPDIRECT3DTEXTURE2)tex; return (LPDIRECT3DTEXTURE2)tex;
@ -118,7 +118,7 @@ LPDIRECT3DTEXTURE d3dtexture_create(IDirectDrawSurface4Impl* surf)
tex = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DTexture2Impl)); tex = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DTexture2Impl));
tex->ref = 1; tex->ref = 1;
tex->lpvtbl = (ICOM_VTABLE(IDirect3DTexture2)*)&texture_vtable; ICOM_VTBL(tex) = (ICOM_VTABLE(IDirect3DTexture2)*)&texture_vtable;
tex->surface = surf; tex->surface = surf;
return (LPDIRECT3DTEXTURE)tex; return (LPDIRECT3DTEXTURE)tex;

View File

@ -45,7 +45,7 @@ LPDIRECT3DVIEWPORT2 d3dviewport2_create(IDirect3D2Impl* d3d2)
vp = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DViewport2Impl)); vp = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DViewport2Impl));
vp->ref = 1; vp->ref = 1;
vp->lpvtbl = &viewport2_vtable; ICOM_VTBL(vp) = &viewport2_vtable;
vp->d3d.d3d2 = d3d2; vp->d3d.d3d2 = d3d2;
vp->use_d3d2 = 1; vp->use_d3d2 = 1;
@ -65,7 +65,7 @@ LPDIRECT3DVIEWPORT d3dviewport_create(IDirect3DImpl* d3d1)
vp = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DViewport2Impl)); vp = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DViewport2Impl));
vp->ref = 1; vp->ref = 1;
vp->lpvtbl = &viewport2_vtable; ICOM_VTBL(vp) = &viewport2_vtable;
vp->d3d.d3d1 = d3d1; vp->d3d.d3d1 = d3d1;
vp->use_d3d2 = 0; vp->use_d3d2 = 0;

View File

@ -2196,7 +2196,7 @@ HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags,
TRACE("(%08lx,%p,%p)\n", dwFlags, ilplpDDClipper, pUnkOuter); TRACE("(%08lx,%p,%p)\n", dwFlags, ilplpDDClipper, pUnkOuter);
*ilplpDDClipper = (IDirectDrawClipperImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawClipperImpl)); *ilplpDDClipper = (IDirectDrawClipperImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawClipperImpl));
(*ilplpDDClipper)->lpvtbl = &ddclipvt; ICOM_VTBL(*ilplpDDClipper) = &ddclipvt;
(*ilplpDDClipper)->ref = 1; (*ilplpDDClipper)->ref = 1;
return DD_OK; return DD_OK;
@ -2518,7 +2518,7 @@ static HRESULT WINAPI IDirect3DImpl_QueryInterface(
d3d->ref = 1; d3d->ref = 1;
d3d->ddraw = This->ddraw; d3d->ddraw = This->ddraw;
IDirect3D_AddRef(iface); IDirect3D_AddRef(iface);
d3d->lpvtbl = &d3d2vt; ICOM_VTBL(d3d) = &d3d2vt;
*obj = d3d; *obj = d3d;
TRACE(" Creating IDirect3D2 interface (%p)\n", *obj); TRACE(" Creating IDirect3D2 interface (%p)\n", *obj);
@ -2676,7 +2676,7 @@ static HRESULT WINAPI IDirect3D2Impl_QueryInterface(
d3d->ref = 1; d3d->ref = 1;
d3d->ddraw = This->ddraw; d3d->ddraw = This->ddraw;
IDirect3D2_AddRef(iface); IDirect3D2_AddRef(iface);
d3d->lpvtbl = &d3dvt; ICOM_VTBL(d3d) = &d3dvt;
*obj = d3d; *obj = d3d;
TRACE(" Creating IDirect3D interface (%p)\n", *obj); TRACE(" Creating IDirect3D interface (%p)\n", *obj);
@ -2865,7 +2865,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_CreateSurface(
IDirectDraw2_AddRef(iface); IDirectDraw2_AddRef(iface);
(*ilpdsf)->ref = 1; (*ilpdsf)->ref = 1;
(*ilpdsf)->lpvtbl = (ICOM_VTABLE(IDirectDrawSurface)*)&dga_dds4vt; ICOM_VTBL(*ilpdsf) = (ICOM_VTABLE(IDirectDrawSurface)*)&dga_dds4vt;
(*ilpdsf)->s.ddraw = This; (*ilpdsf)->s.ddraw = This;
(*ilpdsf)->s.palette = NULL; (*ilpdsf)->s.palette = NULL;
(*ilpdsf)->t.dga.fb_height = -1; /* This is to have non-on screen surfaces freed */ (*ilpdsf)->t.dga.fb_height = -1; /* This is to have non-on screen surfaces freed */
@ -2927,7 +2927,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_CreateSurface(
); );
IDirectDraw2_AddRef(iface); IDirectDraw2_AddRef(iface);
back->ref = 1; back->ref = 1;
back->lpvtbl = (ICOM_VTABLE(IDirectDrawSurface4)*)&dga_dds4vt; ICOM_VTBL(back) = (ICOM_VTABLE(IDirectDrawSurface4)*)&dga_dds4vt;
for (i=0;i<32;i++) for (i=0;i<32;i++)
if (!(This->e.dga.vpmask & (1<<i))) if (!(This->e.dga.vpmask & (1<<i)))
break; break;
@ -3132,7 +3132,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_CreateSurface(
(*ilpdsf)->s.ddraw = This; (*ilpdsf)->s.ddraw = This;
(*ilpdsf)->ref = 1; (*ilpdsf)->ref = 1;
(*ilpdsf)->lpvtbl = (ICOM_VTABLE(IDirectDrawSurface)*)&xlib_dds4vt; ICOM_VTBL(*ilpdsf) = (ICOM_VTABLE(IDirectDrawSurface)*)&xlib_dds4vt;
(*ilpdsf)->s.palette = NULL; (*ilpdsf)->s.palette = NULL;
(*ilpdsf)->t.xlib.image = NULL; /* This is for off-screen buffers */ (*ilpdsf)->t.xlib.image = NULL; /* This is for off-screen buffers */
@ -3182,7 +3182,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_CreateSurface(
back->s.ddraw = This; back->s.ddraw = This;
back->ref = 1; back->ref = 1;
back->lpvtbl = (ICOM_VTABLE(IDirectDrawSurface4)*)&xlib_dds4vt; ICOM_VTBL(back) = (ICOM_VTABLE(IDirectDrawSurface4)*)&xlib_dds4vt;
/* Copy the surface description from the front buffer */ /* Copy the surface description from the front buffer */
back->s.surface_desc = (*ilpdsf)->s.surface_desc; back->s.surface_desc = (*ilpdsf)->s.surface_desc;
@ -3819,7 +3819,7 @@ static HRESULT WINAPI IDirectDraw2Impl_CreateClipper(
); );
*ilpddclip = (IDirectDrawClipperImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawClipperImpl)); *ilpddclip = (IDirectDrawClipperImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawClipperImpl));
(*ilpddclip)->ref = 1; (*ilpddclip)->ref = 1;
(*ilpddclip)->lpvtbl = &ddclipvt; ICOM_VTBL(*ilpddclip) = &ddclipvt;
return DD_OK; return DD_OK;
} }
@ -3876,7 +3876,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_CreatePalette(
TRACE("(%p)->(%08lx,%p,%p,%p)\n",This,dwFlags,palent,ilpddpal,lpunk); TRACE("(%p)->(%08lx,%p,%p,%p)\n",This,dwFlags,palent,ilpddpal,lpunk);
res = common_IDirectDraw2Impl_CreatePalette(This,dwFlags,palent,ilpddpal,lpunk,&xsize); res = common_IDirectDraw2Impl_CreatePalette(This,dwFlags,palent,ilpddpal,lpunk,&xsize);
if (res != 0) return res; if (res != 0) return res;
(*ilpddpal)->lpvtbl = &dga_ddpalvt; ICOM_VTBL(*ilpddpal) = &dga_ddpalvt;
if (This->d.directdraw_pixelformat.u.dwRGBBitCount<=8) { if (This->d.directdraw_pixelformat.u.dwRGBBitCount<=8) {
(*ilpddpal)->cm = TSXCreateColormap(display,DefaultRootWindow(display),DefaultVisualOfScreen(X11DRV_GetXScreen()),AllocAll); (*ilpddpal)->cm = TSXCreateColormap(display,DefaultRootWindow(display),DefaultVisualOfScreen(X11DRV_GetXScreen()),AllocAll);
} else { } else {
@ -3910,7 +3910,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_CreatePalette(
TRACE("(%p)->(%08lx,%p,%p,%p)\n",This,dwFlags,palent,ilpddpal,lpunk); TRACE("(%p)->(%08lx,%p,%p,%p)\n",This,dwFlags,palent,ilpddpal,lpunk);
res = common_IDirectDraw2Impl_CreatePalette(This,dwFlags,palent,ilpddpal,lpunk,&xsize); res = common_IDirectDraw2Impl_CreatePalette(This,dwFlags,palent,ilpddpal,lpunk,&xsize);
if (res != 0) return res; if (res != 0) return res;
(*ilpddpal)->lpvtbl = &xlib_ddpalvt; ICOM_VTBL(*ilpddpal) = &xlib_ddpalvt;
return DD_OK; return DD_OK;
} }
@ -4013,7 +4013,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface(
return S_OK; return S_OK;
} }
if ( IsEqualGUID( &IID_IDirectDraw, refiid ) ) { if ( IsEqualGUID( &IID_IDirectDraw, refiid ) ) {
This->lpvtbl = (ICOM_VTABLE(IDirectDraw2)*)&dga_ddvt; ICOM_VTBL(This) = (ICOM_VTABLE(IDirectDraw2)*)&dga_ddvt;
IDirectDraw2_AddRef(iface); IDirectDraw2_AddRef(iface);
*obj = This; *obj = This;
@ -4022,7 +4022,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface(
return S_OK; return S_OK;
} }
if ( IsEqualGUID( &IID_IDirectDraw2, refiid ) ) { if ( IsEqualGUID( &IID_IDirectDraw2, refiid ) ) {
This->lpvtbl = (ICOM_VTABLE(IDirectDraw2)*)&dga_dd2vt; ICOM_VTBL(This) = (ICOM_VTABLE(IDirectDraw2)*)&dga_dd2vt;
IDirectDraw2_AddRef(iface); IDirectDraw2_AddRef(iface);
*obj = This; *obj = This;
@ -4031,7 +4031,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface(
return S_OK; return S_OK;
} }
if ( IsEqualGUID( &IID_IDirectDraw4, refiid ) ) { if ( IsEqualGUID( &IID_IDirectDraw4, refiid ) ) {
This->lpvtbl = (ICOM_VTABLE(IDirectDraw2)*)&dga_dd4vt; ICOM_VTBL(This) = (ICOM_VTABLE(IDirectDraw2)*)&dga_dd4vt;
IDirectDraw2_AddRef(iface); IDirectDraw2_AddRef(iface);
*obj = This; *obj = This;
@ -4046,7 +4046,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface(
d3d->ref = 1; d3d->ref = 1;
d3d->ddraw = (IDirectDrawImpl*)This; d3d->ddraw = (IDirectDrawImpl*)This;
IDirectDraw2_AddRef(iface); IDirectDraw2_AddRef(iface);
d3d->lpvtbl = &d3dvt; ICOM_VTBL(d3d) = &d3dvt;
*obj = d3d; *obj = d3d;
TRACE(" Creating IDirect3D interface (%p)\n", *obj); TRACE(" Creating IDirect3D interface (%p)\n", *obj);
@ -4060,7 +4060,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface(
d3d->ref = 1; d3d->ref = 1;
d3d->ddraw = (IDirectDrawImpl*)This; d3d->ddraw = (IDirectDrawImpl*)This;
IDirectDraw2_AddRef(iface); IDirectDraw2_AddRef(iface);
d3d->lpvtbl = &d3d2vt; ICOM_VTBL(d3d) = &d3d2vt;
*obj = d3d; *obj = d3d;
TRACE(" Creating IDirect3D2 interface (%p)\n", *obj); TRACE(" Creating IDirect3D2 interface (%p)\n", *obj);
@ -4089,7 +4089,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_QueryInterface(
return S_OK; return S_OK;
} }
if ( IsEqualGUID( &IID_IDirectDraw, refiid ) ) { if ( IsEqualGUID( &IID_IDirectDraw, refiid ) ) {
This->lpvtbl = (ICOM_VTABLE(IDirectDraw2)*)&xlib_ddvt; ICOM_VTBL(This) = (ICOM_VTABLE(IDirectDraw2)*)&xlib_ddvt;
IDirectDraw2_AddRef(iface); IDirectDraw2_AddRef(iface);
*obj = This; *obj = This;
@ -4098,7 +4098,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_QueryInterface(
return S_OK; return S_OK;
} }
if ( IsEqualGUID( &IID_IDirectDraw2, refiid ) ) { if ( IsEqualGUID( &IID_IDirectDraw2, refiid ) ) {
This->lpvtbl = (ICOM_VTABLE(IDirectDraw2)*)&xlib_dd2vt; ICOM_VTBL(This) = (ICOM_VTABLE(IDirectDraw2)*)&xlib_dd2vt;
IDirectDraw2_AddRef(iface); IDirectDraw2_AddRef(iface);
*obj = This; *obj = This;
@ -4107,7 +4107,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_QueryInterface(
return S_OK; return S_OK;
} }
if ( IsEqualGUID( &IID_IDirectDraw4, refiid ) ) { if ( IsEqualGUID( &IID_IDirectDraw4, refiid ) ) {
This->lpvtbl = (ICOM_VTABLE(IDirectDraw2)*)&xlib_dd4vt; ICOM_VTBL(This) = (ICOM_VTABLE(IDirectDraw2)*)&xlib_dd4vt;
IDirectDraw2_AddRef(iface); IDirectDraw2_AddRef(iface);
*obj = This; *obj = This;
@ -4122,7 +4122,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_QueryInterface(
d3d->ref = 1; d3d->ref = 1;
d3d->ddraw = (IDirectDrawImpl*)This; d3d->ddraw = (IDirectDrawImpl*)This;
IDirectDraw2_AddRef(iface); IDirectDraw2_AddRef(iface);
d3d->lpvtbl = &d3dvt; ICOM_VTBL(d3d) = &d3dvt;
*obj = d3d; *obj = d3d;
TRACE(" Creating IDirect3D interface (%p)\n", *obj); TRACE(" Creating IDirect3D interface (%p)\n", *obj);
@ -4136,7 +4136,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_QueryInterface(
d3d->ref = 1; d3d->ref = 1;
d3d->ddraw = (IDirectDrawImpl*)This; d3d->ddraw = (IDirectDrawImpl*)This;
IDirectDraw2_AddRef(iface); IDirectDraw2_AddRef(iface);
d3d->lpvtbl = &d3d2vt; ICOM_VTBL(d3d) = &d3d2vt;
*obj = d3d; *obj = d3d;
TRACE(" Creating IDirect3D2 interface (%p)\n", *obj); TRACE(" Creating IDirect3D2 interface (%p)\n", *obj);
@ -4927,7 +4927,7 @@ static HRESULT WINAPI DGA_DirectDrawCreate( LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnk
return DDERR_GENERIC; return DDERR_GENERIC;
} }
*ilplpDD = (IDirectDrawImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawImpl)); *ilplpDD = (IDirectDrawImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawImpl));
(*ilplpDD)->lpvtbl = &dga_ddvt; ICOM_VTBL(*ilplpDD) = &dga_ddvt;
(*ilplpDD)->ref = 1; (*ilplpDD)->ref = 1;
TSXF86DGAQueryVersion(display,&major,&minor); TSXF86DGAQueryVersion(display,&major,&minor);
TRACE("XF86DGA is version %d.%d\n",major,minor); TRACE("XF86DGA is version %d.%d\n",major,minor);
@ -4997,7 +4997,7 @@ static HRESULT WINAPI Xlib_DirectDrawCreate( LPDIRECTDRAW *lplpDD, LPUNKNOWN pUn
int depth; int depth;
*ilplpDD = (IDirectDrawImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawImpl)); *ilplpDD = (IDirectDrawImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawImpl));
(*ilplpDD)->lpvtbl = &xlib_ddvt; ICOM_VTBL(*ilplpDD) = &xlib_ddvt;
(*ilplpDD)->ref = 1; (*ilplpDD)->ref = 1;
(*ilplpDD)->d.drawable = 0; /* in SetDisplayMode */ (*ilplpDD)->d.drawable = 0; /* in SetDisplayMode */
@ -5097,7 +5097,7 @@ HRESULT WINAPI DirectDrawCreate( LPGUID lpGUID, LPDIRECTDRAW *lplpDD, LPUNKNOWN
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IClassFactory)* lpvtbl; ICOM_VFIELD(IClassFactory);
DWORD ref; DWORD ref;
} IClassFactoryImpl; } IClassFactoryImpl;

View File

@ -26,7 +26,7 @@ typedef struct IDirectDrawColorControlImpl IDirectDrawColorControlImpl;
struct IDirectDrawPaletteImpl struct IDirectDrawPaletteImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectDrawPalette)* lpvtbl; ICOM_VFIELD(IDirectDrawPalette);
DWORD ref; DWORD ref;
/* IDirectDrawPalette fields */ /* IDirectDrawPalette fields */
IDirectDrawImpl* ddraw; IDirectDrawImpl* ddraw;
@ -43,7 +43,7 @@ struct IDirectDrawPaletteImpl
struct IDirectDrawClipperImpl struct IDirectDrawClipperImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectDrawClipper)* lpvtbl; ICOM_VFIELD(IDirectDrawClipper);
DWORD ref; DWORD ref;
/* IDirectDrawClipper fields */ /* IDirectDrawClipper fields */
/* none */ /* none */
@ -92,7 +92,7 @@ struct _xlib_directdrawdata
struct IDirectDrawImpl struct IDirectDrawImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectDraw)* lpvtbl; ICOM_VFIELD(IDirectDraw);
DWORD ref; DWORD ref;
/* IDirectDraw fields */ /* IDirectDraw fields */
struct _common_directdrawdata d; struct _common_directdrawdata d;
@ -108,7 +108,7 @@ struct IDirectDrawImpl
struct IDirectDraw2Impl struct IDirectDraw2Impl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectDraw2)* lpvtbl; ICOM_VFIELD(IDirectDraw2);
DWORD ref; DWORD ref;
/* IDirectDraw2 fields */ /* IDirectDraw2 fields */
struct _common_directdrawdata d; struct _common_directdrawdata d;
@ -124,7 +124,7 @@ struct IDirectDraw2Impl
struct IDirectDraw4Impl struct IDirectDraw4Impl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectDraw4)* lpvtbl; ICOM_VFIELD(IDirectDraw4);
DWORD ref; DWORD ref;
/* IDirectDraw4 fields */ /* IDirectDraw4 fields */
struct _common_directdrawdata d; struct _common_directdrawdata d;
@ -176,7 +176,7 @@ struct _xlib_directdrawsurface
struct IDirectDrawSurfaceImpl struct IDirectDrawSurfaceImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectDrawSurface)* lpvtbl; ICOM_VFIELD(IDirectDrawSurface);
DWORD ref; DWORD ref;
/* IDirectDrawSurface fields */ /* IDirectDrawSurface fields */
struct _common_directdrawsurface s; struct _common_directdrawsurface s;
@ -192,7 +192,7 @@ struct IDirectDrawSurfaceImpl
struct IDirectDrawSurface2Impl struct IDirectDrawSurface2Impl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectDrawSurface2)* lpvtbl; ICOM_VFIELD(IDirectDrawSurface2);
DWORD ref; DWORD ref;
/* IDirectDrawSurface2 fields */ /* IDirectDrawSurface2 fields */
struct _common_directdrawsurface s; struct _common_directdrawsurface s;
@ -208,7 +208,7 @@ struct IDirectDrawSurface2Impl
struct IDirectDrawSurface3Impl struct IDirectDrawSurface3Impl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectDrawSurface3)* lpvtbl; ICOM_VFIELD(IDirectDrawSurface3);
DWORD ref; DWORD ref;
/* IDirectDrawSurface3 fields */ /* IDirectDrawSurface3 fields */
struct _common_directdrawsurface s; struct _common_directdrawsurface s;
@ -224,7 +224,7 @@ struct IDirectDrawSurface3Impl
struct IDirectDrawSurface4Impl struct IDirectDrawSurface4Impl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectDrawSurface4)* lpvtbl; ICOM_VFIELD(IDirectDrawSurface4);
DWORD ref; DWORD ref;
/* IDirectDrawSurface4 fields */ /* IDirectDrawSurface4 fields */
struct _common_directdrawsurface s; struct _common_directdrawsurface s;
@ -245,7 +245,7 @@ struct _surface_chain {
struct IDirectDrawColorControlImpl struct IDirectDrawColorControlImpl
{ {
/* IUnknown fields */ /* IUnknown fields */
ICOM_VTABLE(IDirectDrawColorControl)* lpvtbl; ICOM_VFIELD(IDirectDrawColorControl);
DWORD ref; DWORD ref;
/* IDirectDrawColorControl fields */ /* IDirectDrawColorControl fields */
/* none */ /* none */

View File

@ -166,7 +166,7 @@ HRESULT (WINAPI *fnAVIStreamGetFrameClose)(PGETFRAME pg);
fprintf(stderr,"DirectDrawCreate: 0x%08lx\n",hres); fprintf(stderr,"DirectDrawCreate: 0x%08lx\n",hres);
exit(1); exit(1);
} }
hres = ddraw->lpvtbl->fnSetDisplayMode(ddraw,bmi->biWidth,bmi->biHeight,bmi->biBitCount); hres = IDirectDraw_SetDisplayMode(ddraw,bmi->biWidth,bmi->biHeight,bmi->biBitCount);
if (hres) { if (hres) {
fprintf(stderr,"ddraw.SetDisplayMode: 0x%08lx (change resolution!)\n",hres); fprintf(stderr,"ddraw.SetDisplayMode: 0x%08lx (change resolution!)\n",hres);
exit(1); exit(1);
@ -174,7 +174,7 @@ HRESULT (WINAPI *fnAVIStreamGetFrameClose)(PGETFRAME pg);
dsdesc.dwSize=sizeof(dsdesc); dsdesc.dwSize=sizeof(dsdesc);
dsdesc.dwFlags = DDSD_CAPS; dsdesc.dwFlags = DDSD_CAPS;
dsdesc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; dsdesc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hres = ddraw->lpvtbl->fnCreateSurface(ddraw,&dsdesc,&dsurf,NULL); hres = IDirectDraw_CreateSurface(ddraw,&dsdesc,&dsurf,NULL);
if (hres) { if (hres) {
fprintf(stderr,"ddraw.CreateSurface: 0x%08lx\n",hres); fprintf(stderr,"ddraw.CreateSurface: 0x%08lx\n",hres);
exit(1); exit(1);
@ -183,18 +183,18 @@ HRESULT (WINAPI *fnAVIStreamGetFrameClose)(PGETFRAME pg);
RGBQUAD *rgb = (RGBQUAD*)(bmi+1); RGBQUAD *rgb = (RGBQUAD*)(bmi+1);
int i; int i;
hres = ddraw->lpvtbl->fnCreatePalette(ddraw,DDPCAPS_8BIT,NULL,&dpal,NULL); hres = IDirectDraw_CreatePalette(ddraw,DDPCAPS_8BIT,NULL,&dpal,NULL);
if (hres) { if (hres) {
fprintf(stderr,"ddraw.CreateSurface: 0x%08lx\n",hres); fprintf(stderr,"ddraw.CreateSurface: 0x%08lx\n",hres);
exit(1); exit(1);
} }
dsurf->lpvtbl->fnSetPalette(dsurf,dpal); IDirectDrawSurface_SetPalette(dsurf,dpal);
for (i=0;i<bmi->biClrUsed;i++) { for (i=0;i<bmi->biClrUsed;i++) {
palent[i].peRed = rgb[i].rgbRed; palent[i].peRed = rgb[i].rgbRed;
palent[i].peBlue = rgb[i].rgbBlue; palent[i].peBlue = rgb[i].rgbBlue;
palent[i].peGreen = rgb[i].rgbGreen; palent[i].peGreen = rgb[i].rgbGreen;
} }
dpal->lpvtbl->fnSetEntries(dpal,0,0,bmi->biClrUsed,palent); IDirectDrawPalette_SetEntries(dpal,0,0,bmi->biClrUsed,palent);
} else } else
dpal = NULL; dpal = NULL;
/********************* end display setup *******************************/ /********************* end display setup *******************************/
@ -234,11 +234,11 @@ HRESULT (WINAPI *fnAVIStreamGetFrameClose)(PGETFRAME pg);
palent[i].peBlue = rgb[i].rgbBlue; palent[i].peBlue = rgb[i].rgbBlue;
palent[i].peGreen = rgb[i].rgbGreen; palent[i].peGreen = rgb[i].rgbGreen;
} }
dpal->lpvtbl->fnSetEntries(dpal,0,0,bmi->biClrUsed,palent); IDirectDrawPalette_SetEntries(dpal,0,0,bmi->biClrUsed,palent);
} }
} }
dsdesc.dwSize = sizeof(dsdesc); dsdesc.dwSize = sizeof(dsdesc);
hres = dsurf->lpvtbl->fnLock(dsurf,NULL,&dsdesc,DDLOCK_WRITEONLY,0); hres = IDirectDrawSurface_Lock(dsurf,NULL,&dsdesc,DDLOCK_WRITEONLY,0);
if (hres) { if (hres) {
fprintf(stderr,"dsurf.Lock: 0x%08lx\n",hres); fprintf(stderr,"dsurf.Lock: 0x%08lx\n",hres);
exit(1); exit(1);
@ -250,14 +250,14 @@ HRESULT (WINAPI *fnAVIStreamGetFrameClose)(PGETFRAME pg);
bytesline bytesline
); );
} }
dsurf->lpvtbl->fnUnlock(dsurf,dsdesc.y.lpSurface); IDirectDrawSurface_Unlock(dsurf,dsdesc.y.lpSurface);
} }
tend = time(NULL); tend = time(NULL);
fnAVIStreamGetFrameClose(vidgetframe); fnAVIStreamGetFrameClose(vidgetframe);
((IUnknown*)dsurf)->lpvtbl->fnRelease((IUnknown*)dsurf); IDirectDrawSurface_Release(dsurf);
ddraw->lpvtbl->fnRestoreDisplayMode(ddraw); IDirectDraw_RestoreDisplayMode(ddraw);
((IUnknown*)ddraw)->lpvtbl->fnRelease((IUnknown*)ddraw); IDirectDraw_Release(ddraw);
if (vids) fnAVIStreamRelease(vids); if (vids) fnAVIStreamRelease(vids);
if (auds) fnAVIStreamRelease(auds); if (auds) fnAVIStreamRelease(auds);
fprintf(stderr,"%d frames at %g frames/s\n",pos,pos*1.0/(tend-tstart)); fprintf(stderr,"%d frames at %g frames/s\n",pos,pos*1.0/(tend-tstart));

View File

@ -67,7 +67,7 @@ typedef struct SysMouseAImpl SysMouseAImpl;
struct IDirectInputDevice2AImpl struct IDirectInputDevice2AImpl
{ {
ICOM_VTABLE(IDirectInputDevice2A)* lpvtbl; ICOM_VFIELD(IDirectInputDevice2A);
DWORD ref; DWORD ref;
GUID guid; GUID guid;
}; };
@ -75,7 +75,7 @@ struct IDirectInputDevice2AImpl
struct SysKeyboardAImpl struct SysKeyboardAImpl
{ {
/* IDirectInputDevice2AImpl */ /* IDirectInputDevice2AImpl */
ICOM_VTABLE(IDirectInputDevice2A)* lpvtbl; ICOM_VFIELD(IDirectInputDevice2A);
DWORD ref; DWORD ref;
GUID guid; GUID guid;
/* SysKeyboardAImpl */ /* SysKeyboardAImpl */
@ -88,7 +88,7 @@ static ICOM_VTABLE(IDirectInputDevice2A) JoystickAvt;
struct JoystickAImpl struct JoystickAImpl
{ {
/* IDirectInputDevice2AImpl */ /* IDirectInputDevice2AImpl */
ICOM_VTABLE(IDirectInputDevice2A)* lpvtbl; ICOM_VFIELD(IDirectInputDevice2A);
DWORD ref; DWORD ref;
GUID guid; GUID guid;
@ -106,7 +106,7 @@ struct JoystickAImpl
struct SysMouseAImpl struct SysMouseAImpl
{ {
/* IDirectInputDevice2AImpl */ /* IDirectInputDevice2AImpl */
ICOM_VTABLE(IDirectInputDevice2A)* lpvtbl; ICOM_VFIELD(IDirectInputDevice2A);
DWORD ref; DWORD ref;
GUID guid; GUID guid;
@ -180,7 +180,7 @@ static void _dump_cooperativelevel(DWORD dwFlags) {
struct IDirectInputAImpl struct IDirectInputAImpl
{ {
ICOM_VTABLE(IDirectInputA)* lpvtbl; ICOM_VFIELD(IDirectInputA);
DWORD ref; DWORD ref;
}; };
@ -195,7 +195,7 @@ HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPU
); );
This = (IDirectInputAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInputAImpl)); This = (IDirectInputAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInputAImpl));
This->ref = 1; This->ref = 1;
This->lpvtbl = &ddiavt; ICOM_VTBL(This) = &ddiavt;
*ppDI=(IDirectInputA*)This; *ppDI=(IDirectInputA*)This;
return 0; return 0;
} }
@ -296,7 +296,7 @@ static HRESULT WINAPI IDirectInputAImpl_CreateDevice(
SysKeyboardAImpl* newDevice; SysKeyboardAImpl* newDevice;
newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysKeyboardAImpl)); newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysKeyboardAImpl));
newDevice->ref = 1; newDevice->ref = 1;
newDevice->lpvtbl = &SysKeyboardAvt; ICOM_VTBL(newDevice) = &SysKeyboardAvt;
memcpy(&(newDevice->guid),rguid,sizeof(*rguid)); memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
memset(newDevice->keystate,0,256); memset(newDevice->keystate,0,256);
*pdev=(IDirectInputDeviceA*)newDevice; *pdev=(IDirectInputDeviceA*)newDevice;
@ -307,7 +307,7 @@ static HRESULT WINAPI IDirectInputAImpl_CreateDevice(
SysMouseAImpl* newDevice; SysMouseAImpl* newDevice;
newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysMouseAImpl)); newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysMouseAImpl));
newDevice->ref = 1; newDevice->ref = 1;
newDevice->lpvtbl = &SysMouseAvt; ICOM_VTBL(newDevice) = &SysMouseAvt;
InitializeCriticalSection(&(newDevice->crit)); InitializeCriticalSection(&(newDevice->crit));
MakeCriticalSectionGlobal(&(newDevice->crit)); MakeCriticalSectionGlobal(&(newDevice->crit));
memcpy(&(newDevice->guid),rguid,sizeof(*rguid)); memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
@ -320,7 +320,7 @@ static HRESULT WINAPI IDirectInputAImpl_CreateDevice(
JoystickAImpl* newDevice; JoystickAImpl* newDevice;
newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(JoystickAImpl)); newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(JoystickAImpl));
newDevice->ref = 1; newDevice->ref = 1;
newDevice->lpvtbl = &JoystickAvt; ICOM_VTBL(newDevice) = &JoystickAvt;
newDevice->joyfd = -1; newDevice->joyfd = -1;
memcpy(&(newDevice->guid),rguid,sizeof(*rguid)); memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
*pdev=(IDirectInputDeviceA*)newDevice; *pdev=(IDirectInputDeviceA*)newDevice;