Commit c2ebe1ff authored by Alexandre Julliard's avatar Alexandre Julliard

Removed uses of the non standard ICOM_VTBL macro.

parent f00c46f0
...@@ -115,7 +115,7 @@ HRESULT AVIFILE_CreateACMStream(REFIID riid, LPVOID *ppv) ...@@ -115,7 +115,7 @@ HRESULT AVIFILE_CreateACMStream(REFIID riid, LPVOID *ppv)
if (pstream == NULL) if (pstream == NULL)
return AVIERR_MEMORY; return AVIERR_MEMORY;
ICOM_VTBL(pstream) = &iacmst; pstream->lpVtbl = &iacmst;
hr = IUnknown_QueryInterface((IUnknown*)pstream, riid, ppv); hr = IUnknown_QueryInterface((IUnknown*)pstream, riid, ppv);
if (FAILED(hr)) if (FAILED(hr))
......
...@@ -235,9 +235,9 @@ HRESULT AVIFILE_CreateAVIFile(REFIID riid, LPVOID *ppv) ...@@ -235,9 +235,9 @@ HRESULT AVIFILE_CreateAVIFile(REFIID riid, LPVOID *ppv)
if (pfile == NULL) if (pfile == NULL)
return AVIERR_MEMORY; return AVIERR_MEMORY;
ICOM_VTBL(pfile) = &iavift; pfile->lpVtbl = &iavift;
ICOM_VTBL(&pfile->iPersistFile) = &ipersistft;
pfile->ref = 0; pfile->ref = 0;
pfile->iPersistFile.lpVtbl = &ipersistft;
pfile->iPersistFile.paf = pfile; pfile->iPersistFile.paf = pfile;
hr = IUnknown_QueryInterface((IUnknown*)pfile, riid, ppv); hr = IUnknown_QueryInterface((IUnknown*)pfile, riid, ppv);
...@@ -1423,7 +1423,7 @@ static void AVIFILE_ConstructAVIStream(IAVIFileImpl *paf, DWORD nr, LPAVISTRE ...@@ -1423,7 +1423,7 @@ static void AVIFILE_ConstructAVIStream(IAVIFileImpl *paf, DWORD nr, LPAVISTRE
pstream = paf->ppStreams[nr]; pstream = paf->ppStreams[nr];
ICOM_VTBL(pstream) = &iavist; pstream->lpVtbl = &iavist;
pstream->ref = 0; pstream->ref = 0;
pstream->paf = paf; pstream->paf = paf;
pstream->nStream = nr; pstream->nStream = nr;
......
...@@ -74,7 +74,7 @@ static HRESULT AVIFILE_CreateClassFactory(const CLSID *pclsid, const IID *riid, ...@@ -74,7 +74,7 @@ static HRESULT AVIFILE_CreateClassFactory(const CLSID *pclsid, const IID *riid,
if (pClassFactory == NULL) if (pClassFactory == NULL)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
ICOM_VTBL(pClassFactory) = &iclassfact; pClassFactory->lpVtbl = &iclassfact;
pClassFactory->dwRef = 0; pClassFactory->dwRef = 0;
memcpy(&pClassFactory->clsid, pclsid, sizeof(pClassFactory->clsid)); memcpy(&pClassFactory->clsid, pclsid, sizeof(pClassFactory->clsid));
......
...@@ -123,7 +123,7 @@ PGETFRAME AVIFILE_CreateGetFrame(PAVISTREAM pStream) ...@@ -123,7 +123,7 @@ PGETFRAME AVIFILE_CreateGetFrame(PAVISTREAM pStream)
pg = (IGetFrameImpl*)LocalAlloc(LPTR, sizeof(IGetFrameImpl)); pg = (IGetFrameImpl*)LocalAlloc(LPTR, sizeof(IGetFrameImpl));
if (pg != NULL) { if (pg != NULL) {
ICOM_VTBL(pg) = &igetframeVtbl; pg->lpVtbl = &igetframeVtbl;
pg->ref = 1; pg->ref = 1;
pg->lCurrentFrame = -1; pg->lCurrentFrame = -1;
pg->pStream = pStream; pg->pStream = pStream;
......
...@@ -130,7 +130,7 @@ HRESULT AVIFILE_CreateICMStream(REFIID riid, LPVOID *ppv) ...@@ -130,7 +130,7 @@ HRESULT AVIFILE_CreateICMStream(REFIID riid, LPVOID *ppv)
if (pstream == NULL) if (pstream == NULL)
return AVIERR_MEMORY; return AVIERR_MEMORY;
ICOM_VTBL(pstream) = &iicmst; pstream->lpVtbl = &iicmst;
AVIFILE_Reset(pstream); AVIFILE_Reset(pstream);
hr = IUnknown_QueryInterface((IUnknown*)pstream, riid, ppv); hr = IUnknown_QueryInterface((IUnknown*)pstream, riid, ppv);
......
...@@ -188,9 +188,9 @@ HRESULT AVIFILE_CreateWAVFile(REFIID riid, LPVOID *ppv) ...@@ -188,9 +188,9 @@ HRESULT AVIFILE_CreateWAVFile(REFIID riid, LPVOID *ppv)
if (pfile == NULL) if (pfile == NULL)
return AVIERR_MEMORY; return AVIERR_MEMORY;
ICOM_VTBL(pfile) = &iwavft; pfile->lpVtbl = &iwavft;
ICOM_VTBL(&pfile->iPersistFile) = &iwavpft; pfile->iPersistFile.lpVtbl = &iwavpft;
ICOM_VTBL(&pfile->iAVIStream) = &iwavst; pfile->iAVIStream.lpVtbl = &iwavst;
pfile->ref = 0; pfile->ref = 0;
pfile->iPersistFile.paf = pfile; pfile->iPersistFile.paf = pfile;
pfile->iAVIStream.paf = pfile; pfile->iAVIStream.paf = pfile;
......
...@@ -438,7 +438,7 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Clone( ...@@ -438,7 +438,7 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Clone(
GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumCATEGORYINFOImpl)); GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumCATEGORYINFOImpl));
if (new_this == NULL) return E_OUTOFMEMORY; if (new_this == NULL) return E_OUTOFMEMORY;
ICOM_VTBL(new_this) = ICOM_VTBL(This); new_this->lpVtbl = This->lpVtbl;
new_this->ref = 1; new_this->ref = 1;
new_this->lcid = This->lcid; new_this->lcid = This->lcid;
/* FIXME: could we more efficiently use DuplicateHandle? */ /* FIXME: could we more efficiently use DuplicateHandle? */
...@@ -472,7 +472,7 @@ static LPENUMCATEGORYINFO COMCAT_IEnumCATEGORYINFO_Construct(LCID lcid) ...@@ -472,7 +472,7 @@ static LPENUMCATEGORYINFO COMCAT_IEnumCATEGORYINFO_Construct(LCID lcid)
't', ' ', 'C', 'a', 't', 'e', 'g', 'o', 't', ' ', 'C', 'a', 't', 'e', 'g', 'o',
'r', 'i', 'e', 's', 0 }; 'r', 'i', 'e', 's', 0 };
ICOM_VTBL(This) = &COMCAT_IEnumCATEGORYINFO_Vtbl; This->lpVtbl = &COMCAT_IEnumCATEGORYINFO_Vtbl;
This->lcid = lcid; This->lcid = lcid;
RegOpenKeyExW(HKEY_CLASSES_ROOT, keyname, 0, KEY_READ, &This->key); RegOpenKeyExW(HKEY_CLASSES_ROOT, keyname, 0, KEY_READ, &This->key);
} }
...@@ -739,7 +739,7 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Clone( ...@@ -739,7 +739,7 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Clone(
GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CLSID_IEnumGUIDImpl)); GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CLSID_IEnumGUIDImpl));
if (new_this == NULL) return E_OUTOFMEMORY; if (new_this == NULL) return E_OUTOFMEMORY;
ICOM_VTBL(new_this) = ICOM_VTBL(This); new_this->lpVtbl = This->lpVtbl;
new_this->ref = 1; new_this->ref = 1;
size = HeapSize(GetProcessHeap(), 0, (LPVOID)This->categories); size = HeapSize(GetProcessHeap(), 0, (LPVOID)This->categories);
new_this->categories = (struct class_categories *) new_this->categories = (struct class_categories *)
...@@ -779,7 +779,7 @@ static LPENUMGUID COMCAT_CLSID_IEnumGUID_Construct( ...@@ -779,7 +779,7 @@ static LPENUMGUID COMCAT_CLSID_IEnumGUID_Construct(
if (This) { if (This) {
WCHAR keyname[6] = { 'C', 'L', 'S', 'I', 'D', 0 }; WCHAR keyname[6] = { 'C', 'L', 'S', 'I', 'D', 0 };
ICOM_VTBL(This) = &COMCAT_CLSID_IEnumGUID_Vtbl; This->lpVtbl = &COMCAT_CLSID_IEnumGUID_Vtbl;
This->categories = categories; This->categories = categories;
RegOpenKeyExW(HKEY_CLASSES_ROOT, keyname, 0, KEY_READ, &This->key); RegOpenKeyExW(HKEY_CLASSES_ROOT, keyname, 0, KEY_READ, &This->key);
} }
...@@ -921,7 +921,7 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Clone( ...@@ -921,7 +921,7 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Clone(
GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CATID_IEnumGUIDImpl)); GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CATID_IEnumGUIDImpl));
if (new_this == NULL) return E_OUTOFMEMORY; if (new_this == NULL) return E_OUTOFMEMORY;
ICOM_VTBL(new_this) = ICOM_VTBL(This); new_this->lpVtbl = This->lpVtbl;
new_this->ref = 1; new_this->ref = 1;
lstrcpyW(new_this->keyname, This->keyname); lstrcpyW(new_this->keyname, This->keyname);
/* FIXME: could we more efficiently use DuplicateHandle? */ /* FIXME: could we more efficiently use DuplicateHandle? */
...@@ -954,7 +954,7 @@ static LPENUMGUID COMCAT_CATID_IEnumGUID_Construct( ...@@ -954,7 +954,7 @@ static LPENUMGUID COMCAT_CATID_IEnumGUID_Construct(
if (This) { if (This) {
WCHAR prefix[6] = { 'C', 'L', 'S', 'I', 'D', '\\' }; WCHAR prefix[6] = { 'C', 'L', 'S', 'I', 'D', '\\' };
ICOM_VTBL(This) = &COMCAT_CATID_IEnumGUID_Vtbl; This->lpVtbl = &COMCAT_CATID_IEnumGUID_Vtbl;
memcpy(This->keyname, prefix, sizeof prefix); memcpy(This->keyname, prefix, sizeof prefix);
StringFromGUID2(rclsid, This->keyname + 6, 39); StringFromGUID2(rclsid, This->keyname + 6, 39);
lstrcpyW(This->keyname + 44, postfix); lstrcpyW(This->keyname + 44, postfix);
......
...@@ -482,32 +482,32 @@ HRESULT DP_CreateInterface ...@@ -482,32 +482,32 @@ HRESULT DP_CreateInterface
if( IsEqualGUID( &IID_IDirectPlay2, riid ) ) if( IsEqualGUID( &IID_IDirectPlay2, riid ) )
{ {
ICOM_THIS(IDirectPlay2Impl,*ppvObj); ICOM_THIS(IDirectPlay2Impl,*ppvObj);
ICOM_VTBL(This) = &directPlay2WVT; This->lpVtbl = &directPlay2WVT;
} }
else if( IsEqualGUID( &IID_IDirectPlay2A, riid ) ) else if( IsEqualGUID( &IID_IDirectPlay2A, riid ) )
{ {
ICOM_THIS(IDirectPlay2AImpl,*ppvObj); ICOM_THIS(IDirectPlay2AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlay2AVT; This->lpVtbl = &directPlay2AVT;
} }
else if( IsEqualGUID( &IID_IDirectPlay3, riid ) ) else if( IsEqualGUID( &IID_IDirectPlay3, riid ) )
{ {
ICOM_THIS(IDirectPlay3Impl,*ppvObj); ICOM_THIS(IDirectPlay3Impl,*ppvObj);
ICOM_VTBL(This) = &directPlay3WVT; This->lpVtbl = &directPlay3WVT;
} }
else if( IsEqualGUID( &IID_IDirectPlay3A, riid ) ) else if( IsEqualGUID( &IID_IDirectPlay3A, riid ) )
{ {
ICOM_THIS(IDirectPlay3AImpl,*ppvObj); ICOM_THIS(IDirectPlay3AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlay3AVT; This->lpVtbl = &directPlay3AVT;
} }
else if( IsEqualGUID( &IID_IDirectPlay4, riid ) ) else if( IsEqualGUID( &IID_IDirectPlay4, riid ) )
{ {
ICOM_THIS(IDirectPlay4Impl,*ppvObj); ICOM_THIS(IDirectPlay4Impl,*ppvObj);
ICOM_VTBL(This) = &directPlay4WVT; This->lpVtbl = &directPlay4WVT;
} }
else if( IsEqualGUID( &IID_IDirectPlay4A, riid ) ) else if( IsEqualGUID( &IID_IDirectPlay4A, riid ) )
{ {
ICOM_THIS(IDirectPlay4AImpl,*ppvObj); ICOM_THIS(IDirectPlay4AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlay4AVT; This->lpVtbl = &directPlay4AVT;
} }
else else
{ {
...@@ -566,32 +566,32 @@ static HRESULT WINAPI DP_QueryInterface ...@@ -566,32 +566,32 @@ static HRESULT WINAPI DP_QueryInterface
if( IsEqualGUID( &IID_IDirectPlay2, riid ) ) if( IsEqualGUID( &IID_IDirectPlay2, riid ) )
{ {
ICOM_THIS(IDirectPlay2Impl,*ppvObj); ICOM_THIS(IDirectPlay2Impl,*ppvObj);
ICOM_VTBL(This) = &directPlay2WVT; This->lpVtbl = &directPlay2WVT;
} }
else if( IsEqualGUID( &IID_IDirectPlay2A, riid ) ) else if( IsEqualGUID( &IID_IDirectPlay2A, riid ) )
{ {
ICOM_THIS(IDirectPlay2AImpl,*ppvObj); ICOM_THIS(IDirectPlay2AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlay2AVT; This->lpVtbl = &directPlay2AVT;
} }
else if( IsEqualGUID( &IID_IDirectPlay3, riid ) ) else if( IsEqualGUID( &IID_IDirectPlay3, riid ) )
{ {
ICOM_THIS(IDirectPlay3Impl,*ppvObj); ICOM_THIS(IDirectPlay3Impl,*ppvObj);
ICOM_VTBL(This) = &directPlay3WVT; This->lpVtbl = &directPlay3WVT;
} }
else if( IsEqualGUID( &IID_IDirectPlay3A, riid ) ) else if( IsEqualGUID( &IID_IDirectPlay3A, riid ) )
{ {
ICOM_THIS(IDirectPlay3AImpl,*ppvObj); ICOM_THIS(IDirectPlay3AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlay3AVT; This->lpVtbl = &directPlay3AVT;
} }
else if( IsEqualGUID( &IID_IDirectPlay4, riid ) ) else if( IsEqualGUID( &IID_IDirectPlay4, riid ) )
{ {
ICOM_THIS(IDirectPlay4Impl,*ppvObj); ICOM_THIS(IDirectPlay4Impl,*ppvObj);
ICOM_VTBL(This) = &directPlay4WVT; This->lpVtbl = &directPlay4WVT;
} }
else if( IsEqualGUID( &IID_IDirectPlay4A, riid ) ) else if( IsEqualGUID( &IID_IDirectPlay4A, riid ) )
{ {
ICOM_THIS(IDirectPlay4AImpl,*ppvObj); ICOM_THIS(IDirectPlay4AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlay4AVT; This->lpVtbl = &directPlay4AVT;
} }
else else
{ {
......
...@@ -102,7 +102,7 @@ HRESULT DPSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp ...@@ -102,7 +102,7 @@ HRESULT DPSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp
if( IsEqualGUID( &IID_IDirectPlaySP, riid ) ) if( IsEqualGUID( &IID_IDirectPlaySP, riid ) )
{ {
ICOM_THIS(IDirectPlaySPImpl,*ppvObj); ICOM_THIS(IDirectPlaySPImpl,*ppvObj);
ICOM_VTBL(This) = &directPlaySPVT; This->lpVtbl = &directPlaySPVT;
} }
else else
{ {
...@@ -239,7 +239,7 @@ static HRESULT WINAPI DPSP_QueryInterface ...@@ -239,7 +239,7 @@ static HRESULT WINAPI DPSP_QueryInterface
if( IsEqualGUID( &IID_IDirectPlaySP, riid ) ) if( IsEqualGUID( &IID_IDirectPlaySP, riid ) )
{ {
ICOM_THIS(IDirectPlaySPImpl,*ppvObj); ICOM_THIS(IDirectPlaySPImpl,*ppvObj);
ICOM_VTBL(This) = &directPlaySPVT; This->lpVtbl = &directPlaySPVT;
} }
else else
{ {
......
...@@ -293,32 +293,32 @@ HRESULT DPL_CreateInterface ...@@ -293,32 +293,32 @@ HRESULT DPL_CreateInterface
if( IsEqualGUID( &IID_IDirectPlayLobby, riid ) ) if( IsEqualGUID( &IID_IDirectPlayLobby, riid ) )
{ {
ICOM_THIS(IDirectPlayLobbyWImpl,*ppvObj); ICOM_THIS(IDirectPlayLobbyWImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobbyWVT; This->lpVtbl = &directPlayLobbyWVT;
} }
else if( IsEqualGUID( &IID_IDirectPlayLobbyA, riid ) ) else if( IsEqualGUID( &IID_IDirectPlayLobbyA, riid ) )
{ {
ICOM_THIS(IDirectPlayLobbyAImpl,*ppvObj); ICOM_THIS(IDirectPlayLobbyAImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobbyAVT; This->lpVtbl = &directPlayLobbyAVT;
} }
else if( IsEqualGUID( &IID_IDirectPlayLobby2, riid ) ) else if( IsEqualGUID( &IID_IDirectPlayLobby2, riid ) )
{ {
ICOM_THIS(IDirectPlayLobby2WImpl,*ppvObj); ICOM_THIS(IDirectPlayLobby2WImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby2WVT; This->lpVtbl = &directPlayLobby2WVT;
} }
else if( IsEqualGUID( &IID_IDirectPlayLobby2A, riid ) ) else if( IsEqualGUID( &IID_IDirectPlayLobby2A, riid ) )
{ {
ICOM_THIS(IDirectPlayLobby2AImpl,*ppvObj); ICOM_THIS(IDirectPlayLobby2AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby2AVT; This->lpVtbl = &directPlayLobby2AVT;
} }
else if( IsEqualGUID( &IID_IDirectPlayLobby3, riid ) ) else if( IsEqualGUID( &IID_IDirectPlayLobby3, riid ) )
{ {
ICOM_THIS(IDirectPlayLobby3WImpl,*ppvObj); ICOM_THIS(IDirectPlayLobby3WImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby3WVT; This->lpVtbl = &directPlayLobby3WVT;
} }
else if( IsEqualGUID( &IID_IDirectPlayLobby3A, riid ) ) else if( IsEqualGUID( &IID_IDirectPlayLobby3A, riid ) )
{ {
ICOM_THIS(IDirectPlayLobby3AImpl,*ppvObj); ICOM_THIS(IDirectPlayLobby3AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby3AVT; This->lpVtbl = &directPlayLobby3AVT;
} }
else else
{ {
...@@ -373,32 +373,32 @@ static HRESULT WINAPI DPL_QueryInterface ...@@ -373,32 +373,32 @@ static HRESULT WINAPI DPL_QueryInterface
if( IsEqualGUID( &IID_IDirectPlayLobby, riid ) ) if( IsEqualGUID( &IID_IDirectPlayLobby, riid ) )
{ {
ICOM_THIS(IDirectPlayLobbyWImpl,*ppvObj); ICOM_THIS(IDirectPlayLobbyWImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobbyWVT; This->lpVtbl = &directPlayLobbyWVT;
} }
else if( IsEqualGUID( &IID_IDirectPlayLobbyA, riid ) ) else if( IsEqualGUID( &IID_IDirectPlayLobbyA, riid ) )
{ {
ICOM_THIS(IDirectPlayLobbyAImpl,*ppvObj); ICOM_THIS(IDirectPlayLobbyAImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobbyAVT; This->lpVtbl = &directPlayLobbyAVT;
} }
else if( IsEqualGUID( &IID_IDirectPlayLobby2, riid ) ) else if( IsEqualGUID( &IID_IDirectPlayLobby2, riid ) )
{ {
ICOM_THIS(IDirectPlayLobby2WImpl,*ppvObj); ICOM_THIS(IDirectPlayLobby2WImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby2WVT; This->lpVtbl = &directPlayLobby2WVT;
} }
else if( IsEqualGUID( &IID_IDirectPlayLobby2A, riid ) ) else if( IsEqualGUID( &IID_IDirectPlayLobby2A, riid ) )
{ {
ICOM_THIS(IDirectPlayLobby2AImpl,*ppvObj); ICOM_THIS(IDirectPlayLobby2AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby2AVT; This->lpVtbl = &directPlayLobby2AVT;
} }
else if( IsEqualGUID( &IID_IDirectPlayLobby3, riid ) ) else if( IsEqualGUID( &IID_IDirectPlayLobby3, riid ) )
{ {
ICOM_THIS(IDirectPlayLobby3WImpl,*ppvObj); ICOM_THIS(IDirectPlayLobby3WImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby3WVT; This->lpVtbl = &directPlayLobby3WVT;
} }
else if( IsEqualGUID( &IID_IDirectPlayLobby3A, riid ) ) else if( IsEqualGUID( &IID_IDirectPlayLobby3A, riid ) )
{ {
ICOM_THIS(IDirectPlayLobby3AImpl,*ppvObj); ICOM_THIS(IDirectPlayLobby3AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby3AVT; This->lpVtbl = &directPlayLobby3AVT;
} }
else else
{ {
......
...@@ -78,7 +78,7 @@ HRESULT DPLSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp ...@@ -78,7 +78,7 @@ HRESULT DPLSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp
if( IsEqualGUID( &IID_IDPLobbySP, riid ) ) if( IsEqualGUID( &IID_IDPLobbySP, riid ) )
{ {
ICOM_THIS(IDPLobbySPImpl,*ppvObj); ICOM_THIS(IDPLobbySPImpl,*ppvObj);
ICOM_VTBL(This) = &dpLobbySPVT; This->lpVtbl = &dpLobbySPVT;
} }
else else
{ {
...@@ -203,7 +203,7 @@ HRESULT WINAPI DPLSP_QueryInterface ...@@ -203,7 +203,7 @@ HRESULT WINAPI DPLSP_QueryInterface
if( IsEqualGUID( &IID_IDPLobbySP, riid ) ) if( IsEqualGUID( &IID_IDPLobbySP, riid ) )
{ {
ICOM_THIS(IDPLobbySPImpl,*ppvObj); ICOM_THIS(IDPLobbySPImpl,*ppvObj);
ICOM_VTBL(This) = &dpLobbySPVT; This->lpVtbl = &dpLobbySPVT;
} }
else else
{ {
......
...@@ -824,7 +824,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface( ...@@ -824,7 +824,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface(
dsn->dsb = This; dsn->dsb = This;
dsn->dscb = 0; dsn->dscb = 0;
IDirectSoundBuffer8_AddRef(iface); IDirectSoundBuffer8_AddRef(iface);
ICOM_VTBL(dsn) = &dsnvt; dsn->lpVtbl = &dsnvt;
*ppobj = (LPVOID)dsn; *ppobj = (LPVOID)dsn;
return S_OK; return S_OK;
} }
...@@ -919,7 +919,7 @@ HRESULT WINAPI SecondaryBuffer_Create( ...@@ -919,7 +919,7 @@ HRESULT WINAPI SecondaryBuffer_Create(
dsb->ref = 1; dsb->ref = 1;
dsb->dsound = This; dsb->dsound = This;
dsb->parent = NULL; dsb->parent = NULL;
ICOM_VTBL(dsb) = &dsbvt; dsb->lpVtbl = &dsbvt;
memcpy(&dsb->dsbd, dsbd, sizeof(*dsbd)); memcpy(&dsb->dsbd, dsbd, sizeof(*dsbd));
if (wfex) if (wfex)
......
...@@ -128,7 +128,7 @@ DirectSoundCaptureCreate8( ...@@ -128,7 +128,7 @@ DirectSoundCaptureCreate8(
InitializeCriticalSection( &(This->lock) ); InitializeCriticalSection( &(This->lock) );
ICOM_VTBL(This) = &dscvt; This->lpVtbl = &dscvt;
dsound_capture = This; dsound_capture = This;
if (GetDeviceID(lpcGUID, &This->guid) == DS_OK) if (GetDeviceID(lpcGUID, &This->guid) == DS_OK)
...@@ -641,7 +641,7 @@ DSOUND_CreateDirectSoundCaptureBuffer( ...@@ -641,7 +641,7 @@ DSOUND_CreateDirectSoundCaptureBuffer(
return DSERR_OUTOFMEMORY; return DSERR_OUTOFMEMORY;
} }
ICOM_VTBL(This) = &dscbvt; This->lpVtbl = &dscbvt;
if (ipDSC->driver) { if (ipDSC->driver) {
err = IDsCaptureDriver_CreateCaptureBuffer(ipDSC->driver, err = IDsCaptureDriver_CreateCaptureBuffer(ipDSC->driver,
...@@ -704,7 +704,7 @@ IDirectSoundCaptureBufferImpl_QueryInterface( ...@@ -704,7 +704,7 @@ IDirectSoundCaptureBufferImpl_QueryInterface(
dsn->dscb = This; dsn->dscb = This;
/* FIXME: get this right someday */ /* FIXME: get this right someday */
IDirectSoundCaptureBuffer8_AddRef(iface); IDirectSoundCaptureBuffer8_AddRef(iface);
ICOM_VTBL(dsn) = &dsnvt; dsn->lpVtbl = &dsnvt;
*ppobj = (LPVOID)dsn; *ppobj = (LPVOID)dsn;
return DS_OK; return DS_OK;
} }
...@@ -1296,11 +1296,10 @@ DirectSoundFullDuplexCreate8( ...@@ -1296,11 +1296,10 @@ DirectSoundFullDuplexCreate8(
ICOM_THIS(IDirectSoundFullDuplexImpl, *ippDSFD); ICOM_THIS(IDirectSoundFullDuplexImpl, *ippDSFD);
This->ref = 1; This->ref = 1;
This->lpVtbl = &dsfdvt;
InitializeCriticalSection( &(This->lock) ); InitializeCriticalSection( &(This->lock) );
ICOM_VTBL(This) = &dsfdvt;
return IDirectSoundFullDuplexImpl_Initialize( (LPDIRECTSOUNDFULLDUPLEX)This, return IDirectSoundFullDuplexImpl_Initialize( (LPDIRECTSOUNDFULLDUPLEX)This,
pcGuidCaptureDevice, pcGuidRenderDevice, pcGuidCaptureDevice, pcGuidRenderDevice,
pcDSCBufferDesc, pcDSBufferDesc, pcDSCBufferDesc, pcDSBufferDesc,
......
...@@ -780,7 +780,7 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown ...@@ -780,7 +780,7 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
if (*ippDS == NULL) if (*ippDS == NULL)
return DSERR_OUTOFMEMORY; return DSERR_OUTOFMEMORY;
ICOM_VTBL(*ippDS) = &dsvt; (*ippDS)->lpVtbl = &dsvt;
(*ippDS)->ref = 1; (*ippDS)->ref = 1;
(*ippDS)->driver = drv; (*ippDS)->driver = drv;
......
...@@ -691,7 +691,7 @@ static DWORD DSOUND_MixToPrimary(DWORD playpos, DWORD writepos, DWORD mixlen, BO ...@@ -691,7 +691,7 @@ static DWORD DSOUND_MixToPrimary(DWORD playpos, DWORD writepos, DWORD mixlen, BO
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 || !(ICOM_VTBL(dsb))) if (!dsb || !dsb->lpVtbl)
continue; continue;
if (dsb->buflen && dsb->state && !dsb->hwbuf) { if (dsb->buflen && dsb->state && !dsb->hwbuf) {
TRACE("Checking %p, mixlen=%ld\n", dsb, mixlen); TRACE("Checking %p, mixlen=%ld\n", dsb, mixlen);
...@@ -738,7 +738,7 @@ static void DSOUND_MixReset(DWORD writepos) ...@@ -738,7 +738,7 @@ static void DSOUND_MixReset(DWORD writepos)
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 || !(ICOM_VTBL(dsb))) if (!dsb || !dsb->lpVtbl)
continue; continue;
if (dsb->buflen && dsb->state && !dsb->hwbuf) { if (dsb->buflen && dsb->state && !dsb->hwbuf) {
TRACE("Resetting %p\n", dsb); TRACE("Resetting %p\n", dsb);
......
...@@ -880,7 +880,7 @@ HRESULT WINAPI PrimaryBuffer_Create( ...@@ -880,7 +880,7 @@ HRESULT WINAPI PrimaryBuffer_Create(
dsb = (PrimaryBufferImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(*dsb)); dsb = (PrimaryBufferImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(*dsb));
dsb->ref = 1; dsb->ref = 1;
dsb->dsound = This; dsb->dsound = This;
ICOM_VTBL(dsb) = &dspbvt; dsb->lpVtbl = &dspbvt;
memcpy(&dsb->dsbd, dsbd, sizeof(*dsbd)); memcpy(&dsb->dsbd, dsbd, sizeof(*dsbd));
......
...@@ -134,7 +134,7 @@ HRESULT WINAPI IKsPropertySetImpl_Create( ...@@ -134,7 +134,7 @@ HRESULT WINAPI IKsPropertySetImpl_Create(
iks = (IKsPropertySetImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(*iks)); iks = (IKsPropertySetImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(*iks));
iks->ref = 0; iks->ref = 0;
iks->dsb = This; iks->dsb = This;
ICOM_VTBL(iks) = &iksvt; iks->lpVtbl = &iksvt;
*piks = iks; *piks = iks;
return S_OK; return S_OK;
......
...@@ -691,7 +691,7 @@ HRESULT WINAPI IDirectSound3DBufferImpl_Create( ...@@ -691,7 +691,7 @@ HRESULT WINAPI IDirectSound3DBufferImpl_Create(
ds3db = (IDirectSound3DBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(*ds3db)); ds3db = (IDirectSound3DBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(*ds3db));
ds3db->ref = 0; ds3db->ref = 0;
ds3db->dsb = This; ds3db->dsb = This;
ICOM_VTBL(ds3db) = &ds3dbvt; ds3db->lpVtbl = &ds3dbvt;
InitializeCriticalSection(&ds3db->lock); InitializeCriticalSection(&ds3db->lock);
ds3db->ds3db.dwSize = sizeof(DS3DBUFFER); ds3db->ds3db.dwSize = sizeof(DS3DBUFFER);
...@@ -1003,7 +1003,7 @@ HRESULT WINAPI IDirectSound3DListenerImpl_Create( ...@@ -1003,7 +1003,7 @@ HRESULT WINAPI IDirectSound3DListenerImpl_Create(
dsl = (IDirectSound3DListenerImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(*dsl)); dsl = (IDirectSound3DListenerImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(*dsl));
dsl->ref = 1; dsl->ref = 1;
ICOM_VTBL(dsl) = &ds3dlvt; dsl->lpVtbl = &ds3dlvt;
dsl->ds3dl.dwSize = sizeof(DS3DLISTENER); dsl->ds3dl.dwSize = sizeof(DS3DLISTENER);
dsl->ds3dl.vPosition.u1.x = 0.0; dsl->ds3dl.vPosition.u1.x = 0.0;
......
...@@ -176,7 +176,7 @@ HRESULT WINAPI BindCtxImpl_Construct(BindCtxImpl* This) ...@@ -176,7 +176,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.*/
ICOM_VTBL(This) = &VT_BindCtxImpl; This->lpVtbl = &VT_BindCtxImpl;
This->ref = 0; This->ref = 0;
/* Initialize the BIND_OPTS2 structure */ /* Initialize the BIND_OPTS2 structure */
......
...@@ -1576,7 +1576,7 @@ LPENUMFORMATETC OLEClipbrd_IEnumFORMATETC_Construct(UINT cfmt, const FORMATETC a ...@@ -1576,7 +1576,7 @@ LPENUMFORMATETC OLEClipbrd_IEnumFORMATETC_Construct(UINT cfmt, const FORMATETC a
return NULL; return NULL;
ef->ref = 0; ef->ref = 0;
ICOM_VTBL(ef) = &efvt; ef->lpVtbl = &efvt;
ef->pUnkDataObj = pUnkDataObj; ef->pUnkDataObj = pUnkDataObj;
ef->posFmt = 0; ef->posFmt = 0;
......
...@@ -1638,7 +1638,7 @@ HRESULT WINAPI EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker, ...@@ -1638,7 +1638,7 @@ HRESULT WINAPI EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker,
return E_INVALIDARG; return E_INVALIDARG;
/* Initialize the virtual function table. */ /* Initialize the virtual function table. */
ICOM_VTBL(newEnumMoniker) = &VT_EnumMonikerImpl; newEnumMoniker->lpVtbl = &VT_EnumMonikerImpl;
newEnumMoniker->ref = 0; newEnumMoniker->ref = 0;
newEnumMoniker->tabSize=tabSize; newEnumMoniker->tabSize=tabSize;
......
...@@ -228,7 +228,7 @@ HRESULT WINAPI CoCreateFreeThreadedMarshaler (LPUNKNOWN punkOuter, LPUNKNOWN * p ...@@ -228,7 +228,7 @@ HRESULT WINAPI CoCreateFreeThreadedMarshaler (LPUNKNOWN punkOuter, LPUNKNOWN * p
if (!ftm) if (!ftm)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
ICOM_VTBL (ftm) = &iunkvt; ftm->lpVtbl = &iunkvt;
ftm->lpvtblFTM = &ftmvtbl; ftm->lpvtblFTM = &ftmvtbl;
ftm->ref = 1; ftm->ref = 1;
ftm->pUnkOuter = punkOuter; ftm->pUnkOuter = punkOuter;
......
...@@ -108,8 +108,7 @@ void* StdGlobalInterfaceTable_Construct() { ...@@ -108,8 +108,7 @@ void* StdGlobalInterfaceTable_Construct() {
newGIT = HeapAlloc(GetProcessHeap(), 0, sizeof(StdGlobalInterfaceTableImpl)); newGIT = HeapAlloc(GetProcessHeap(), 0, sizeof(StdGlobalInterfaceTableImpl));
if (newGIT == 0) return newGIT; if (newGIT == 0) return newGIT;
ICOM_VTBL(newGIT) = &StdGlobalInterfaceTableImpl_Vtbl; newGIT->lpVtbl = &StdGlobalInterfaceTableImpl_Vtbl;
newGIT->ref = 0; /* Initialise the reference count */ newGIT->ref = 0; /* Initialise the reference count */
newGIT->firstEntry = NULL; /* we start with an empty table */ newGIT->firstEntry = NULL; /* we start with an empty table */
newGIT->lastEntry = NULL; newGIT->lastEntry = NULL;
......
...@@ -223,7 +223,7 @@ HRESULT WINAPI GetHGlobalFromStream(IStream* pstm, HGLOBAL* phglobal) ...@@ -223,7 +223,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 (ICOM_VTBL(pStream) == &HGLOBALStreamImpl_Vtbl) if (pStream->lpVtbl == &HGLOBALStreamImpl_Vtbl)
*phglobal = pStream->supportHandle; *phglobal = pStream->supportHandle;
else else
{ {
...@@ -259,7 +259,7 @@ HGLOBALStreamImpl* HGLOBALStreamImpl_Construct( ...@@ -259,7 +259,7 @@ HGLOBALStreamImpl* HGLOBALStreamImpl_Construct(
/* /*
* Set-up the virtual function table and reference count. * Set-up the virtual function table and reference count.
*/ */
ICOM_VTBL(newStream) = &HGLOBALStreamImpl_Vtbl; newStream->lpVtbl = &HGLOBALStreamImpl_Vtbl;
newStream->ref = 0; newStream->ref = 0;
/* /*
......
...@@ -605,8 +605,8 @@ BOOL WINAPI IsValidInterface( ...@@ -605,8 +605,8 @@ BOOL WINAPI IsValidInterface(
) { ) {
return !( return !(
IsBadReadPtr(punk,4) || IsBadReadPtr(punk,4) ||
IsBadReadPtr(ICOM_VTBL(punk),4) || IsBadReadPtr(punk->lpVtbl,4) ||
IsBadReadPtr(ICOM_VTBL(punk)->QueryInterface,9) || IsBadReadPtr(punk->lpVtbl->QueryInterface,9) ||
IsBadCodePtr((FARPROC)ICOM_VTBL(punk)->QueryInterface) IsBadCodePtr((FARPROC)punk->lpVtbl->QueryInterface)
); );
} }
...@@ -186,7 +186,7 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* plkbyt, HGLOBAL* phglobal) ...@@ -186,7 +186,7 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* plkbyt, HGLOBAL* phglobal)
ULONG xread; ULONG xread;
*phglobal = 0; *phglobal = 0;
if (ICOM_VTBL(pMemLockBytes) == &HGLOBALLockBytesImpl_Vtbl) { if (pMemLockBytes->lpVtbl == &HGLOBALLockBytesImpl_Vtbl) {
*phglobal = pMemLockBytes->supportHandle; *phglobal = pMemLockBytes->supportHandle;
if (*phglobal == 0) if (*phglobal == 0)
return E_INVALIDARG; return E_INVALIDARG;
...@@ -240,7 +240,7 @@ HGLOBALLockBytesImpl* HGLOBALLockBytesImpl_Construct(HGLOBAL hGlobal, ...@@ -240,7 +240,7 @@ HGLOBALLockBytesImpl* HGLOBALLockBytesImpl_Construct(HGLOBAL hGlobal,
/* /*
* Set up the virtual function table and reference count. * Set up the virtual function table and reference count.
*/ */
ICOM_VTBL(newLockBytes) = &HGLOBALLockBytesImpl_Vtbl; newLockBytes->lpVtbl = &HGLOBALLockBytesImpl_Vtbl;
newLockBytes->ref = 0; newLockBytes->ref = 0;
/* /*
...@@ -760,8 +760,8 @@ HGLOBALLockBytesImpl16_Construct(HGLOBAL16 hGlobal, ...@@ -760,8 +760,8 @@ HGLOBALLockBytesImpl16_Construct(HGLOBAL16 hGlobal,
#undef VTENT #undef VTENT
msegvt16 = MapLS( &vt16 ); msegvt16 = MapLS( &vt16 );
} }
ICOM_VTBL(newLockBytes) = (ICOM_VTABLE(ILockBytes16)*)msegvt16; newLockBytes->lpVtbl = (ICOM_VTABLE(ILockBytes16)*)msegvt16;
newLockBytes->ref = 0; newLockBytes->ref = 0;
/* /*
* Initialize the support. * Initialize the support.
*/ */
......
...@@ -208,7 +208,7 @@ HRESULT WINAPI RunningObjectTableImpl_Initialize() ...@@ -208,7 +208,7 @@ HRESULT WINAPI RunningObjectTableImpl_Initialize()
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
/* initialize the virtual table function */ /* initialize the virtual table function */
ICOM_VTBL(runningObjectTableInstance) = &VT_RunningObjectTableImpl; runningObjectTableInstance->lpVtbl = &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 */
......
...@@ -189,7 +189,7 @@ IMalloc16_Constructor() ...@@ -189,7 +189,7 @@ IMalloc16_Constructor()
#undef VTENT #undef VTENT
msegvt16 = MapLS( &vt16 ); msegvt16 = MapLS( &vt16 );
} }
ICOM_VTBL(This) = (ICOM_VTABLE(IMalloc16)*)msegvt16; This->lpVtbl = (ICOM_VTABLE(IMalloc16)*)msegvt16;
This->ref = 1; This->ref = 1;
return (LPMALLOC16)MapLS( This ); return (LPMALLOC16)MapLS( This );
} }
...@@ -304,7 +304,7 @@ _xmalloc16(DWORD size, SEGPTR *ptr) { ...@@ -304,7 +304,7 @@ _xmalloc16(DWORD size, SEGPTR *ptr) {
*/ */
if (!K32WOWCallback16Ex( if (!K32WOWCallback16Ex(
(DWORD)((ICOM_VTABLE(IMalloc16)*)MapSL( (DWORD)((ICOM_VTABLE(IMalloc16)*)MapSL(
(SEGPTR)ICOM_VTBL(((LPMALLOC16)MapSL((SEGPTR)mllc)))) (SEGPTR)((LPMALLOC16)MapSL((SEGPTR)mllc))->lpVtbl )
)->Alloc, )->Alloc,
WCB16_CDECL, WCB16_CDECL,
2*sizeof(DWORD), 2*sizeof(DWORD),
......
...@@ -87,7 +87,7 @@ static LPOLEADVISEHOLDER OleAdviseHolderImpl_Constructor() ...@@ -87,7 +87,7 @@ static LPOLEADVISEHOLDER OleAdviseHolderImpl_Constructor()
0, 0,
sizeof(OleAdviseHolderImpl)); sizeof(OleAdviseHolderImpl));
ICOM_VTBL(lpoah) = &oahvt; lpoah->lpVtbl = &oahvt;
lpoah->ref = 1; lpoah->ref = 1;
lpoah->maxSinks = INITIAL_SINKS; lpoah->maxSinks = INITIAL_SINKS;
lpoah->arrayOfSinks = HeapAlloc(GetProcessHeap(), lpoah->arrayOfSinks = HeapAlloc(GetProcessHeap(),
...@@ -431,7 +431,7 @@ static IDataAdviseHolder* DataAdviseHolder_Constructor() ...@@ -431,7 +431,7 @@ static IDataAdviseHolder* DataAdviseHolder_Constructor()
0, 0,
sizeof(DataAdviseHolder)); sizeof(DataAdviseHolder));
ICOM_VTBL(newHolder) = &DataAdviseHolderImpl_VTable; newHolder->lpVtbl = &DataAdviseHolderImpl_VTable;
newHolder->ref = 1; newHolder->ref = 1;
newHolder->maxCons = INITIAL_SINKS; newHolder->maxCons = INITIAL_SINKS;
newHolder->Connections = HeapAlloc(GetProcessHeap(), newHolder->Connections = HeapAlloc(GetProcessHeap(),
......
...@@ -87,7 +87,7 @@ StgStreamImpl* StgStreamImpl_Construct( ...@@ -87,7 +87,7 @@ StgStreamImpl* StgStreamImpl_Construct(
/* /*
* Set-up the virtual function table and reference count. * Set-up the virtual function table and reference count.
*/ */
ICOM_VTBL(newStream) = &StgStreamImpl_Vtbl; newStream->lpVtbl = &StgStreamImpl_Vtbl;
newStream->ref = 0; newStream->ref = 0;
/* /*
......
...@@ -1177,7 +1177,7 @@ static void _create_istream16(LPSTREAM16 *str) { ...@@ -1177,7 +1177,7 @@ static void _create_istream16(LPSTREAM16 *str) {
} }
} }
lpst = HeapAlloc( GetProcessHeap(), 0, sizeof(*lpst) ); lpst = HeapAlloc( GetProcessHeap(), 0, sizeof(*lpst) );
ICOM_VTBL(lpst) = segstrvt16; lpst->lpVtbl = segstrvt16;
lpst->ref = 1; lpst->ref = 1;
lpst->thisptr = MapLS( lpst ); lpst->thisptr = MapLS( lpst );
*str = (void*)lpst->thisptr; *str = (void*)lpst->thisptr;
...@@ -1587,7 +1587,7 @@ static void _create_istorage16(LPSTORAGE16 *stg) { ...@@ -1587,7 +1587,7 @@ static void _create_istorage16(LPSTORAGE16 *stg) {
} }
} }
lpst = HeapAlloc( GetProcessHeap(), 0, sizeof(*lpst) ); lpst = HeapAlloc( GetProcessHeap(), 0, sizeof(*lpst) );
ICOM_VTBL(lpst) = segstvt16; lpst->lpVtbl = segstvt16;
lpst->ref = 1; lpst->ref = 1;
lpst->thisptr = MapLS(lpst); lpst->thisptr = MapLS(lpst);
*stg = (void*)lpst->thisptr; *stg = (void*)lpst->thisptr;
...@@ -1716,7 +1716,7 @@ HRESULT WINAPI StgIsStorageILockBytes16(SEGPTR plkbyt) ...@@ -1716,7 +1716,7 @@ HRESULT WINAPI StgIsStorageILockBytes16(SEGPTR plkbyt)
if (!K32WOWCallback16Ex( if (!K32WOWCallback16Ex(
(DWORD)((ICOM_VTABLE(ILockBytes16)*)MapSL( (DWORD)((ICOM_VTABLE(ILockBytes16)*)MapSL(
(SEGPTR)ICOM_VTBL(((LPLOCKBYTES16)MapSL(plkbyt)))) (SEGPTR)((LPLOCKBYTES16)MapSL(plkbyt))->lpVtbl)
)->ReadAt, )->ReadAt,
WCB16_PASCAL, WCB16_PASCAL,
6*sizeof(DWORD), 6*sizeof(DWORD),
......
...@@ -2209,7 +2209,7 @@ HRESULT StorageImpl_Construct( ...@@ -2209,7 +2209,7 @@ HRESULT StorageImpl_Construct(
/* /*
* Initialize the virtual function table. * Initialize the virtual function table.
*/ */
ICOM_VTBL(This) = &Storage32Impl_Vtbl; This->lpVtbl = &Storage32Impl_Vtbl;
This->v_destructor = &StorageImpl_Destroy; This->v_destructor = &StorageImpl_Destroy;
/* /*
...@@ -3481,7 +3481,7 @@ StorageInternalImpl* StorageInternalImpl_Construct( ...@@ -3481,7 +3481,7 @@ StorageInternalImpl* StorageInternalImpl_Construct(
/* /*
* Initialize the virtual function table. * Initialize the virtual function table.
*/ */
ICOM_VTBL(newStorage) = &Storage32InternalImpl_Vtbl; newStorage->lpVtbl = &Storage32InternalImpl_Vtbl;
newStorage->v_destructor = &StorageInternalImpl_Destroy; newStorage->v_destructor = &StorageInternalImpl_Destroy;
/* /*
...@@ -3552,7 +3552,7 @@ IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct( ...@@ -3552,7 +3552,7 @@ IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(
/* /*
* Set-up the virtual function table and reference count. * Set-up the virtual function table and reference count.
*/ */
ICOM_VTBL(newEnumeration) = &IEnumSTATSTGImpl_Vtbl; newEnumeration->lpVtbl = &IEnumSTATSTGImpl_Vtbl;
newEnumeration->ref = 0; newEnumeration->ref = 0;
/* /*
......
...@@ -2076,7 +2076,7 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength) ...@@ -2076,7 +2076,7 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength)
pTypeLibImpl = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ITypeLibImpl)); pTypeLibImpl = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ITypeLibImpl));
if (!pTypeLibImpl) return NULL; if (!pTypeLibImpl) return NULL;
ICOM_VTBL(pTypeLibImpl) = &tlbvt; pTypeLibImpl->lpVtbl = &tlbvt;
pTypeLibImpl->ref = 1; pTypeLibImpl->ref = 1;
/* get pointer to beginning of typelib data */ /* get pointer to beginning of typelib data */
...@@ -2890,7 +2890,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) ...@@ -2890,7 +2890,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
pTypeLibImpl = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ITypeLibImpl)); pTypeLibImpl = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ITypeLibImpl));
if (!pTypeLibImpl) return NULL; if (!pTypeLibImpl) return NULL;
ICOM_VTBL(pTypeLibImpl) = &tlbvt; pTypeLibImpl->lpVtbl = &tlbvt;
pTypeLibImpl->ref = 1; pTypeLibImpl->ref = 1;
pHeader = pLib; pHeader = pLib;
...@@ -3759,7 +3759,7 @@ static ITypeInfo2 * WINAPI ITypeInfo_Constructor(void) ...@@ -3759,7 +3759,7 @@ static ITypeInfo2 * WINAPI ITypeInfo_Constructor(void)
pTypeInfoImpl = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ITypeInfoImpl)); pTypeInfoImpl = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ITypeInfoImpl));
if (pTypeInfoImpl) if (pTypeInfoImpl)
{ {
ICOM_VTBL(pTypeInfoImpl) = &tinfvt; pTypeInfoImpl->lpVtbl = &tinfvt;
pTypeInfoImpl->ref=1; pTypeInfoImpl->ref=1;
} }
TRACE("(%p)\n", pTypeInfoImpl); TRACE("(%p)\n", pTypeInfoImpl);
......
...@@ -397,7 +397,7 @@ IQueryAssociations* IQueryAssociations_Constructor(void) ...@@ -397,7 +397,7 @@ IQueryAssociations* IQueryAssociations_Constructor(void)
ei=(IQueryAssociationsImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IQueryAssociationsImpl)); ei=(IQueryAssociationsImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IQueryAssociationsImpl));
ei->ref=1; ei->ref=1;
ICOM_VTBL(ei) = &qavt; ei->lpVtbl = &qavt;
TRACE("(%p)\n",ei); TRACE("(%p)\n",ei);
return (IQueryAssociations *)ei; return (IQueryAssociations *)ei;
......
...@@ -76,7 +76,7 @@ LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[]) ...@@ -76,7 +76,7 @@ LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[])
if(ef) if(ef)
{ {
ef->ref=1; ef->ref=1;
ICOM_VTBL(ef)=&efvt; ef->lpVtbl=&efvt;
ef->countFmt = cfmt; ef->countFmt = cfmt;
ef->pFmt = SHAlloc (size); ef->pFmt = SHAlloc (size);
...@@ -234,7 +234,7 @@ LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPITEMIDLIST pMyPidl, LPITE ...@@ -234,7 +234,7 @@ LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPITEMIDLIST pMyPidl, LPITE
if (dto) if (dto)
{ {
dto->ref = 1; dto->ref = 1;
ICOM_VTBL(dto) = &dtovt; dto->lpVtbl = &dtovt;
dto->pidl = ILClone(pMyPidl); dto->pidl = ILClone(pMyPidl);
dto->apidl = _ILCopyaPidl(apidl, cidl); dto->apidl = _ILCopyaPidl(apidl, cidl);
dto->cidl = cidl; dto->cidl = cidl;
......
...@@ -69,7 +69,7 @@ HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, ...@@ -69,7 +69,7 @@ HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid,
if (!dth) return E_OUTOFMEMORY; if (!dth) return E_OUTOFMEMORY;
dth->ref = 0; dth->ref = 0;
ICOM_VTBL (dth) = &vt_IDropTargetHelper; dth->lpVtbl = &vt_IDropTargetHelper;
if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (dth), riid, ppv))) { if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (dth), riid, ppv))) {
IUnknown_Release (_IUnknown_ (dth)); IUnknown_Release (_IUnknown_ (dth));
......
...@@ -325,7 +325,7 @@ IEnumIDList * IEnumIDList_Constructor( ...@@ -325,7 +325,7 @@ IEnumIDList * IEnumIDList_Constructor(
if (lpeidl) if (lpeidl)
{ {
lpeidl->ref = 1; lpeidl->ref = 1;
ICOM_VTBL(lpeidl) = &eidlvt; lpeidl->lpVtbl = &eidlvt;
switch (dwKind) switch (dwKind)
{ {
......
...@@ -67,7 +67,7 @@ IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl) ...@@ -67,7 +67,7 @@ IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl)
ei = (IExtractIconWImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconWImpl)); ei = (IExtractIconWImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconWImpl));
ei->ref=1; ei->ref=1;
ICOM_VTBL(ei) = &eivt; ei->lpVtbl = &eivt;
ei->lpvtblPersistFile = &pfvt; ei->lpvtblPersistFile = &pfvt;
ei->lpvtblExtractIconA = &eiavt; ei->lpvtblExtractIconA = &eiavt;
ei->pidl=ILClone(pidl); ei->pidl=ILClone(pidl);
......
...@@ -1020,7 +1020,7 @@ HRESULT WINAPI IShellLink_Constructor ( ...@@ -1020,7 +1020,7 @@ HRESULT WINAPI IShellLink_Constructor (
if (!sl) return E_OUTOFMEMORY; if (!sl) return E_OUTOFMEMORY;
sl->ref = 1; sl->ref = 1;
ICOM_VTBL(sl) = &slvt; sl->lpVtbl = &slvt;
sl->lpvtblw = &slvtw; sl->lpvtblw = &slvtw;
sl->lpvtblPersistFile = &pfvt; sl->lpvtblPersistFile = &pfvt;
sl->lpvtblPersistStream = &psvt; sl->lpvtblPersistStream = &psvt;
......
...@@ -536,7 +536,7 @@ IClassFactory * IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, ...@@ -536,7 +536,7 @@ IClassFactory * IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll,
lpclf = (IDefClFImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDefClFImpl)); lpclf = (IDefClFImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDefClFImpl));
lpclf->ref = 1; lpclf->ref = 1;
ICOM_VTBL(lpclf) = &dclfvt; lpclf->lpVtbl = &dclfvt;
lpclf->lpfnCI = lpfnCI; lpclf->lpfnCI = lpfnCI;
lpclf->pcRefDll = pcRefDll; lpclf->pcRefDll = pcRefDll;
......
...@@ -108,7 +108,7 @@ HRESULT WINAPI ISF_Desktop_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOI ...@@ -108,7 +108,7 @@ HRESULT WINAPI ISF_Desktop_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOI
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
sf->ref = 0; sf->ref = 0;
ICOM_VTBL (sf) = &vt_MCFldr_ShellFolder2; sf->lpVtbl = &vt_MCFldr_ShellFolder2;
sf->pidlRoot = _ILCreateDesktop (); /* my qualified pidl */ sf->pidlRoot = _ILCreateDesktop (); /* my qualified pidl */
sf->sPathTarget = SHAlloc (strlen (szMyPath) + 1); sf->sPathTarget = SHAlloc (strlen (szMyPath) + 1);
lstrcpyA (sf->sPathTarget, szMyPath); lstrcpyA (sf->sPathTarget, szMyPath);
......
...@@ -229,7 +229,7 @@ HRESULT WINAPI IFSFolder_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID ...@@ -229,7 +229,7 @@ HRESULT WINAPI IFSFolder_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
sf->ref = 0; sf->ref = 0;
ICOM_VTBL (sf) = &unkvt; sf->lpVtbl = &unkvt;
sf->lpvtblShellFolder = &sfvt; sf->lpvtblShellFolder = &sfvt;
sf->lpvtblPersistFolder3 = &vt_FSFldr_PersistFolder3; sf->lpvtblPersistFolder3 = &vt_FSFldr_PersistFolder3;
sf->lpvtblDropTarget = &dtvt; sf->lpvtblDropTarget = &dtvt;
......
...@@ -112,7 +112,7 @@ HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LP ...@@ -112,7 +112,7 @@ HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LP
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
sf->ref = 0; sf->ref = 0;
ICOM_VTBL (sf) = &vt_ShellFolder2; sf->lpVtbl = &vt_ShellFolder2;
sf->lpVtblPersistFolder2 = &vt_PersistFolder2; sf->lpVtblPersistFolder2 = &vt_PersistFolder2;
sf->pidlRoot = _ILCreateMyComputer (); /* my qualified pidl */ sf->pidlRoot = _ILCreateMyComputer (); /* my qualified pidl */
......
...@@ -161,7 +161,7 @@ IShellView * IShellView_Constructor( IShellFolder * pFolder) ...@@ -161,7 +161,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;
ICOM_VTBL(sv)=&svvt; sv->lpVtbl=&svvt;
sv->lpvtblOleCommandTarget=&ctvt; sv->lpvtblOleCommandTarget=&ctvt;
sv->lpvtblDropTarget=&dtvt; sv->lpvtblDropTarget=&dtvt;
sv->lpvtblDropSource=&dsvt; sv->lpvtblDropSource=&dsvt;
......
...@@ -55,7 +55,7 @@ IContextMenu *ISvBgCm_Constructor(IShellFolder* pSFParent) ...@@ -55,7 +55,7 @@ IContextMenu *ISvBgCm_Constructor(IShellFolder* pSFParent)
BgCmImpl* cm; BgCmImpl* cm;
cm = (BgCmImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(BgCmImpl)); cm = (BgCmImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(BgCmImpl));
ICOM_VTBL(cm)=&cmvt; cm->lpVtbl = &cmvt;
cm->ref = 1; cm->ref = 1;
cm->pSFParent = pSFParent; cm->pSFParent = pSFParent;
if(pSFParent) IShellFolder_AddRef(pSFParent); if(pSFParent) IShellFolder_AddRef(pSFParent);
......
...@@ -79,7 +79,7 @@ IContextMenu *ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, ...@@ -79,7 +79,7 @@ IContextMenu *ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl,
UINT u; UINT u;
cm = (ItemCmImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ItemCmImpl)); cm = (ItemCmImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ItemCmImpl));
ICOM_VTBL(cm)=&cmvt; cm->lpVtbl = &cmvt;
cm->ref = 1; cm->ref = 1;
cm->pidl = ILClone(pidl); cm->pidl = ILClone(pidl);
cm->pSFParent = pSFParent; cm->pSFParent = pSFParent;
......
...@@ -350,7 +350,7 @@ static IStream *IStream_Create(LPCWSTR lpszPath, HANDLE hFile, DWORD dwMode) ...@@ -350,7 +350,7 @@ static IStream *IStream_Create(LPCWSTR lpszPath, HANDLE hFile, DWORD dwMode)
if (fileStream) if (fileStream)
{ {
ICOM_VTBL(fileStream) = &SHLWAPI_fsVTable; fileStream->lpVtbl = &SHLWAPI_fsVTable;
fileStream->ref = 1; fileStream->ref = 1;
fileStream->hFile = hFile; fileStream->hFile = hFile;
fileStream->dwMode = dwMode; fileStream->dwMode = dwMode;
......
...@@ -343,7 +343,7 @@ static IStream *IStream_Create(HKEY hKey, LPBYTE pbBuffer, DWORD dwLength) ...@@ -343,7 +343,7 @@ static IStream *IStream_Create(HKEY hKey, LPBYTE pbBuffer, DWORD dwLength)
if (regStream) if (regStream)
{ {
ICOM_VTBL(regStream) = &rstvt; regStream->lpVtbl = &rstvt;
regStream->ref = 1; regStream->ref = 1;
regStream->hKey = hKey; regStream->hKey = hKey;
regStream->pbBuffer = pbBuffer; regStream->pbBuffer = pbBuffer;
......
...@@ -2034,7 +2034,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface, ...@@ -2034,7 +2034,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
*ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverBufferImpl)); *ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverBufferImpl));
if (*ippdsdb == NULL) if (*ippdsdb == NULL)
return DSERR_OUTOFMEMORY; return DSERR_OUTOFMEMORY;
ICOM_VTBL(*ippdsdb) = &dsdbvt; (*ippdsdb)->lpVtbl = &dsdbvt;
(*ippdsdb)->ref = 1; (*ippdsdb)->ref = 1;
(*ippdsdb)->drv = This; (*ippdsdb)->drv = This;
...@@ -2095,7 +2095,7 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv) ...@@ -2095,7 +2095,7 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
*idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverImpl)); *idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverImpl));
if (!*idrv) if (!*idrv)
return MMSYSERR_NOMEM; return MMSYSERR_NOMEM;
ICOM_VTBL(*idrv) = &dsdvt; (*idrv)->lpVtbl = &dsdvt;
(*idrv)->ref = 1; (*idrv)->ref = 1;
(*idrv)->wDevID = wDevID; (*idrv)->wDevID = wDevID;
......
...@@ -1658,7 +1658,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface, ...@@ -1658,7 +1658,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
*ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverBufferImpl)); *ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverBufferImpl));
if (*ippdsdb == NULL) if (*ippdsdb == NULL)
return DSERR_OUTOFMEMORY; return DSERR_OUTOFMEMORY;
ICOM_VTBL(*ippdsdb) = &dsdbvt; (*ippdsdb)->lpVtbl = &dsdbvt;
(*ippdsdb)->ref = 1; (*ippdsdb)->ref = 1;
(*ippdsdb)->drv = This; (*ippdsdb)->drv = This;
...@@ -1758,7 +1758,7 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv) ...@@ -1758,7 +1758,7 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
*idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverImpl)); *idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverImpl));
if (!*idrv) if (!*idrv)
return MMSYSERR_NOMEM; return MMSYSERR_NOMEM;
ICOM_VTBL(*idrv) = &dsdvt; (*idrv)->lpVtbl = &dsdvt;
(*idrv)->ref = 1; (*idrv)->ref = 1;
(*idrv)->wDevID = wDevID; (*idrv)->wDevID = wDevID;
......
...@@ -1587,7 +1587,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface, ...@@ -1587,7 +1587,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
*ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverBufferImpl)); *ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverBufferImpl));
if (*ippdsdb == NULL) if (*ippdsdb == NULL)
return DSERR_OUTOFMEMORY; return DSERR_OUTOFMEMORY;
ICOM_VTBL(*ippdsdb) = &dsdbvt; (*ippdsdb)->lpVtbl = &dsdbvt;
(*ippdsdb)->ref = 1; (*ippdsdb)->ref = 1;
(*ippdsdb)->drv = This; (*ippdsdb)->drv = This;
...@@ -1668,7 +1668,7 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv) ...@@ -1668,7 +1668,7 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
*idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverImpl)); *idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverImpl));
if (!*idrv) if (!*idrv)
return MMSYSERR_NOMEM; return MMSYSERR_NOMEM;
ICOM_VTBL(*idrv) = &dsdvt; (*idrv)->lpVtbl = &dsdvt;
(*idrv)->ref = 1; (*idrv)->ref = 1;
(*idrv)->wDevID = wDevID; (*idrv)->wDevID = wDevID;
......
...@@ -2320,7 +2320,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface, ...@@ -2320,7 +2320,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
*ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverBufferImpl)); *ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverBufferImpl));
if (*ippdsdb == NULL) if (*ippdsdb == NULL)
return DSERR_OUTOFMEMORY; return DSERR_OUTOFMEMORY;
ICOM_VTBL(*ippdsdb) = &dsdbvt; (*ippdsdb)->lpVtbl = &dsdbvt;
(*ippdsdb)->ref = 1; (*ippdsdb)->ref = 1;
(*ippdsdb)->drv = This; (*ippdsdb)->drv = This;
...@@ -2397,7 +2397,7 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv) ...@@ -2397,7 +2397,7 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
*idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverImpl)); *idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverImpl));
if (!*idrv) if (!*idrv)
return MMSYSERR_NOMEM; return MMSYSERR_NOMEM;
ICOM_VTBL(*idrv) = &dsdvt; (*idrv)->lpVtbl = &dsdvt;
(*idrv)->ref = 1; (*idrv)->ref = 1;
(*idrv)->wDevID = wDevID; (*idrv)->wDevID = wDevID;
...@@ -3395,7 +3395,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer(PIDSCDRIVER iface ...@@ -3395,7 +3395,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer(PIDSCDRIVER iface
return DSERR_OUTOFMEMORY; return DSERR_OUTOFMEMORY;
} }
ICOM_VTBL(*ippdscdb) = &dscdbvt; (*ippdscdb)->lpVtbl = &dscdbvt;
(*ippdscdb)->ref = 1; (*ippdscdb)->ref = 1;
(*ippdscdb)->drv = This; (*ippdscdb)->drv = This;
...@@ -3477,7 +3477,7 @@ static DWORD widDsCreate(UINT wDevID, PIDSCDRIVER* drv) ...@@ -3477,7 +3477,7 @@ static DWORD widDsCreate(UINT wDevID, PIDSCDRIVER* drv)
*idrv = (IDsCaptureDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsCaptureDriverImpl)); *idrv = (IDsCaptureDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsCaptureDriverImpl));
if (!*idrv) if (!*idrv)
return MMSYSERR_NOMEM; return MMSYSERR_NOMEM;
ICOM_VTBL(*idrv) = &dscdvt; (*idrv)->lpVtbl = &dscdvt;
(*idrv)->ref = 1; (*idrv)->ref = 1;
(*idrv)->wDevID = wDevID; (*idrv)->wDevID = wDevID;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment