Removed uses of the non standard ICOM_VTBL macro.

This commit is contained in:
Alexandre Julliard 2003-04-10 18:17:34 +00:00
parent f00c46f030
commit c2ebe1ff93
52 changed files with 112 additions and 114 deletions

View File

@ -115,7 +115,7 @@ HRESULT AVIFILE_CreateACMStream(REFIID riid, LPVOID *ppv)
if (pstream == NULL)
return AVIERR_MEMORY;
ICOM_VTBL(pstream) = &iacmst;
pstream->lpVtbl = &iacmst;
hr = IUnknown_QueryInterface((IUnknown*)pstream, riid, ppv);
if (FAILED(hr))

View File

@ -235,9 +235,9 @@ HRESULT AVIFILE_CreateAVIFile(REFIID riid, LPVOID *ppv)
if (pfile == NULL)
return AVIERR_MEMORY;
ICOM_VTBL(pfile) = &iavift;
ICOM_VTBL(&pfile->iPersistFile) = &ipersistft;
pfile->lpVtbl = &iavift;
pfile->ref = 0;
pfile->iPersistFile.lpVtbl = &ipersistft;
pfile->iPersistFile.paf = pfile;
hr = IUnknown_QueryInterface((IUnknown*)pfile, riid, ppv);
@ -1423,7 +1423,7 @@ static void AVIFILE_ConstructAVIStream(IAVIFileImpl *paf, DWORD nr, LPAVISTRE
pstream = paf->ppStreams[nr];
ICOM_VTBL(pstream) = &iavist;
pstream->lpVtbl = &iavist;
pstream->ref = 0;
pstream->paf = paf;
pstream->nStream = nr;

View File

@ -74,7 +74,7 @@ static HRESULT AVIFILE_CreateClassFactory(const CLSID *pclsid, const IID *riid,
if (pClassFactory == NULL)
return E_OUTOFMEMORY;
ICOM_VTBL(pClassFactory) = &iclassfact;
pClassFactory->lpVtbl = &iclassfact;
pClassFactory->dwRef = 0;
memcpy(&pClassFactory->clsid, pclsid, sizeof(pClassFactory->clsid));

View File

@ -123,7 +123,7 @@ PGETFRAME AVIFILE_CreateGetFrame(PAVISTREAM pStream)
pg = (IGetFrameImpl*)LocalAlloc(LPTR, sizeof(IGetFrameImpl));
if (pg != NULL) {
ICOM_VTBL(pg) = &igetframeVtbl;
pg->lpVtbl = &igetframeVtbl;
pg->ref = 1;
pg->lCurrentFrame = -1;
pg->pStream = pStream;

View File

@ -130,7 +130,7 @@ HRESULT AVIFILE_CreateICMStream(REFIID riid, LPVOID *ppv)
if (pstream == NULL)
return AVIERR_MEMORY;
ICOM_VTBL(pstream) = &iicmst;
pstream->lpVtbl = &iicmst;
AVIFILE_Reset(pstream);
hr = IUnknown_QueryInterface((IUnknown*)pstream, riid, ppv);

View File

@ -188,9 +188,9 @@ HRESULT AVIFILE_CreateWAVFile(REFIID riid, LPVOID *ppv)
if (pfile == NULL)
return AVIERR_MEMORY;
ICOM_VTBL(pfile) = &iwavft;
ICOM_VTBL(&pfile->iPersistFile) = &iwavpft;
ICOM_VTBL(&pfile->iAVIStream) = &iwavst;
pfile->lpVtbl = &iwavft;
pfile->iPersistFile.lpVtbl = &iwavpft;
pfile->iAVIStream.lpVtbl = &iwavst;
pfile->ref = 0;
pfile->iPersistFile.paf = pfile;
pfile->iAVIStream.paf = pfile;

View File

@ -438,7 +438,7 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Clone(
GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumCATEGORYINFOImpl));
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->lcid = This->lcid;
/* FIXME: could we more efficiently use DuplicateHandle? */
@ -472,7 +472,7 @@ static LPENUMCATEGORYINFO COMCAT_IEnumCATEGORYINFO_Construct(LCID lcid)
't', ' ', 'C', 'a', 't', 'e', 'g', 'o',
'r', 'i', 'e', 's', 0 };
ICOM_VTBL(This) = &COMCAT_IEnumCATEGORYINFO_Vtbl;
This->lpVtbl = &COMCAT_IEnumCATEGORYINFO_Vtbl;
This->lcid = lcid;
RegOpenKeyExW(HKEY_CLASSES_ROOT, keyname, 0, KEY_READ, &This->key);
}
@ -739,7 +739,7 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Clone(
GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CLSID_IEnumGUIDImpl));
if (new_this == NULL) return E_OUTOFMEMORY;
ICOM_VTBL(new_this) = ICOM_VTBL(This);
new_this->lpVtbl = This->lpVtbl;
new_this->ref = 1;
size = HeapSize(GetProcessHeap(), 0, (LPVOID)This->categories);
new_this->categories = (struct class_categories *)
@ -779,7 +779,7 @@ static LPENUMGUID COMCAT_CLSID_IEnumGUID_Construct(
if (This) {
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;
RegOpenKeyExW(HKEY_CLASSES_ROOT, keyname, 0, KEY_READ, &This->key);
}
@ -921,7 +921,7 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Clone(
GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CATID_IEnumGUIDImpl));
if (new_this == NULL) return E_OUTOFMEMORY;
ICOM_VTBL(new_this) = ICOM_VTBL(This);
new_this->lpVtbl = This->lpVtbl;
new_this->ref = 1;
lstrcpyW(new_this->keyname, This->keyname);
/* FIXME: could we more efficiently use DuplicateHandle? */
@ -954,7 +954,7 @@ static LPENUMGUID COMCAT_CATID_IEnumGUID_Construct(
if (This) {
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);
StringFromGUID2(rclsid, This->keyname + 6, 39);
lstrcpyW(This->keyname + 44, postfix);

View File

@ -482,32 +482,32 @@ HRESULT DP_CreateInterface
if( IsEqualGUID( &IID_IDirectPlay2, riid ) )
{
ICOM_THIS(IDirectPlay2Impl,*ppvObj);
ICOM_VTBL(This) = &directPlay2WVT;
This->lpVtbl = &directPlay2WVT;
}
else if( IsEqualGUID( &IID_IDirectPlay2A, riid ) )
{
ICOM_THIS(IDirectPlay2AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlay2AVT;
This->lpVtbl = &directPlay2AVT;
}
else if( IsEqualGUID( &IID_IDirectPlay3, riid ) )
{
ICOM_THIS(IDirectPlay3Impl,*ppvObj);
ICOM_VTBL(This) = &directPlay3WVT;
This->lpVtbl = &directPlay3WVT;
}
else if( IsEqualGUID( &IID_IDirectPlay3A, riid ) )
{
ICOM_THIS(IDirectPlay3AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlay3AVT;
This->lpVtbl = &directPlay3AVT;
}
else if( IsEqualGUID( &IID_IDirectPlay4, riid ) )
{
ICOM_THIS(IDirectPlay4Impl,*ppvObj);
ICOM_VTBL(This) = &directPlay4WVT;
This->lpVtbl = &directPlay4WVT;
}
else if( IsEqualGUID( &IID_IDirectPlay4A, riid ) )
{
ICOM_THIS(IDirectPlay4AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlay4AVT;
This->lpVtbl = &directPlay4AVT;
}
else
{
@ -566,32 +566,32 @@ static HRESULT WINAPI DP_QueryInterface
if( IsEqualGUID( &IID_IDirectPlay2, riid ) )
{
ICOM_THIS(IDirectPlay2Impl,*ppvObj);
ICOM_VTBL(This) = &directPlay2WVT;
This->lpVtbl = &directPlay2WVT;
}
else if( IsEqualGUID( &IID_IDirectPlay2A, riid ) )
{
ICOM_THIS(IDirectPlay2AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlay2AVT;
This->lpVtbl = &directPlay2AVT;
}
else if( IsEqualGUID( &IID_IDirectPlay3, riid ) )
{
ICOM_THIS(IDirectPlay3Impl,*ppvObj);
ICOM_VTBL(This) = &directPlay3WVT;
This->lpVtbl = &directPlay3WVT;
}
else if( IsEqualGUID( &IID_IDirectPlay3A, riid ) )
{
ICOM_THIS(IDirectPlay3AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlay3AVT;
This->lpVtbl = &directPlay3AVT;
}
else if( IsEqualGUID( &IID_IDirectPlay4, riid ) )
{
ICOM_THIS(IDirectPlay4Impl,*ppvObj);
ICOM_VTBL(This) = &directPlay4WVT;
This->lpVtbl = &directPlay4WVT;
}
else if( IsEqualGUID( &IID_IDirectPlay4A, riid ) )
{
ICOM_THIS(IDirectPlay4AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlay4AVT;
This->lpVtbl = &directPlay4AVT;
}
else
{

View File

@ -102,7 +102,7 @@ HRESULT DPSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp
if( IsEqualGUID( &IID_IDirectPlaySP, riid ) )
{
ICOM_THIS(IDirectPlaySPImpl,*ppvObj);
ICOM_VTBL(This) = &directPlaySPVT;
This->lpVtbl = &directPlaySPVT;
}
else
{
@ -239,7 +239,7 @@ static HRESULT WINAPI DPSP_QueryInterface
if( IsEqualGUID( &IID_IDirectPlaySP, riid ) )
{
ICOM_THIS(IDirectPlaySPImpl,*ppvObj);
ICOM_VTBL(This) = &directPlaySPVT;
This->lpVtbl = &directPlaySPVT;
}
else
{

View File

@ -293,32 +293,32 @@ HRESULT DPL_CreateInterface
if( IsEqualGUID( &IID_IDirectPlayLobby, riid ) )
{
ICOM_THIS(IDirectPlayLobbyWImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobbyWVT;
This->lpVtbl = &directPlayLobbyWVT;
}
else if( IsEqualGUID( &IID_IDirectPlayLobbyA, riid ) )
{
ICOM_THIS(IDirectPlayLobbyAImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobbyAVT;
This->lpVtbl = &directPlayLobbyAVT;
}
else if( IsEqualGUID( &IID_IDirectPlayLobby2, riid ) )
{
ICOM_THIS(IDirectPlayLobby2WImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby2WVT;
This->lpVtbl = &directPlayLobby2WVT;
}
else if( IsEqualGUID( &IID_IDirectPlayLobby2A, riid ) )
{
ICOM_THIS(IDirectPlayLobby2AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby2AVT;
This->lpVtbl = &directPlayLobby2AVT;
}
else if( IsEqualGUID( &IID_IDirectPlayLobby3, riid ) )
{
ICOM_THIS(IDirectPlayLobby3WImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby3WVT;
This->lpVtbl = &directPlayLobby3WVT;
}
else if( IsEqualGUID( &IID_IDirectPlayLobby3A, riid ) )
{
ICOM_THIS(IDirectPlayLobby3AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby3AVT;
This->lpVtbl = &directPlayLobby3AVT;
}
else
{
@ -373,32 +373,32 @@ static HRESULT WINAPI DPL_QueryInterface
if( IsEqualGUID( &IID_IDirectPlayLobby, riid ) )
{
ICOM_THIS(IDirectPlayLobbyWImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobbyWVT;
This->lpVtbl = &directPlayLobbyWVT;
}
else if( IsEqualGUID( &IID_IDirectPlayLobbyA, riid ) )
{
ICOM_THIS(IDirectPlayLobbyAImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobbyAVT;
This->lpVtbl = &directPlayLobbyAVT;
}
else if( IsEqualGUID( &IID_IDirectPlayLobby2, riid ) )
{
ICOM_THIS(IDirectPlayLobby2WImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby2WVT;
This->lpVtbl = &directPlayLobby2WVT;
}
else if( IsEqualGUID( &IID_IDirectPlayLobby2A, riid ) )
{
ICOM_THIS(IDirectPlayLobby2AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby2AVT;
This->lpVtbl = &directPlayLobby2AVT;
}
else if( IsEqualGUID( &IID_IDirectPlayLobby3, riid ) )
{
ICOM_THIS(IDirectPlayLobby3WImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby3WVT;
This->lpVtbl = &directPlayLobby3WVT;
}
else if( IsEqualGUID( &IID_IDirectPlayLobby3A, riid ) )
{
ICOM_THIS(IDirectPlayLobby3AImpl,*ppvObj);
ICOM_VTBL(This) = &directPlayLobby3AVT;
This->lpVtbl = &directPlayLobby3AVT;
}
else
{

View File

@ -78,7 +78,7 @@ HRESULT DPLSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp
if( IsEqualGUID( &IID_IDPLobbySP, riid ) )
{
ICOM_THIS(IDPLobbySPImpl,*ppvObj);
ICOM_VTBL(This) = &dpLobbySPVT;
This->lpVtbl = &dpLobbySPVT;
}
else
{
@ -203,7 +203,7 @@ HRESULT WINAPI DPLSP_QueryInterface
if( IsEqualGUID( &IID_IDPLobbySP, riid ) )
{
ICOM_THIS(IDPLobbySPImpl,*ppvObj);
ICOM_VTBL(This) = &dpLobbySPVT;
This->lpVtbl = &dpLobbySPVT;
}
else
{

View File

@ -824,7 +824,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface(
dsn->dsb = This;
dsn->dscb = 0;
IDirectSoundBuffer8_AddRef(iface);
ICOM_VTBL(dsn) = &dsnvt;
dsn->lpVtbl = &dsnvt;
*ppobj = (LPVOID)dsn;
return S_OK;
}
@ -919,7 +919,7 @@ HRESULT WINAPI SecondaryBuffer_Create(
dsb->ref = 1;
dsb->dsound = This;
dsb->parent = NULL;
ICOM_VTBL(dsb) = &dsbvt;
dsb->lpVtbl = &dsbvt;
memcpy(&dsb->dsbd, dsbd, sizeof(*dsbd));
if (wfex)

View File

@ -128,7 +128,7 @@ DirectSoundCaptureCreate8(
InitializeCriticalSection( &(This->lock) );
ICOM_VTBL(This) = &dscvt;
This->lpVtbl = &dscvt;
dsound_capture = This;
if (GetDeviceID(lpcGUID, &This->guid) == DS_OK)
@ -641,7 +641,7 @@ DSOUND_CreateDirectSoundCaptureBuffer(
return DSERR_OUTOFMEMORY;
}
ICOM_VTBL(This) = &dscbvt;
This->lpVtbl = &dscbvt;
if (ipDSC->driver) {
err = IDsCaptureDriver_CreateCaptureBuffer(ipDSC->driver,
@ -704,7 +704,7 @@ IDirectSoundCaptureBufferImpl_QueryInterface(
dsn->dscb = This;
/* FIXME: get this right someday */
IDirectSoundCaptureBuffer8_AddRef(iface);
ICOM_VTBL(dsn) = &dsnvt;
dsn->lpVtbl = &dsnvt;
*ppobj = (LPVOID)dsn;
return DS_OK;
}
@ -1296,11 +1296,10 @@ DirectSoundFullDuplexCreate8(
ICOM_THIS(IDirectSoundFullDuplexImpl, *ippDSFD);
This->ref = 1;
This->lpVtbl = &dsfdvt;
InitializeCriticalSection( &(This->lock) );
ICOM_VTBL(This) = &dsfdvt;
return IDirectSoundFullDuplexImpl_Initialize( (LPDIRECTSOUNDFULLDUPLEX)This,
pcGuidCaptureDevice, pcGuidRenderDevice,
pcDSCBufferDesc, pcDSBufferDesc,

View File

@ -780,7 +780,7 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
if (*ippDS == NULL)
return DSERR_OUTOFMEMORY;
ICOM_VTBL(*ippDS) = &dsvt;
(*ippDS)->lpVtbl = &dsvt;
(*ippDS)->ref = 1;
(*ippDS)->driver = drv;

View File

@ -691,7 +691,7 @@ static DWORD DSOUND_MixToPrimary(DWORD playpos, DWORD writepos, DWORD mixlen, BO
for (i = dsound->nrofbuffers - 1; i >= 0; i--) {
dsb = dsound->buffers[i];
if (!dsb || !(ICOM_VTBL(dsb)))
if (!dsb || !dsb->lpVtbl)
continue;
if (dsb->buflen && dsb->state && !dsb->hwbuf) {
TRACE("Checking %p, mixlen=%ld\n", dsb, mixlen);
@ -738,7 +738,7 @@ static void DSOUND_MixReset(DWORD writepos)
for (i = dsound->nrofbuffers - 1; i >= 0; i--) {
dsb = dsound->buffers[i];
if (!dsb || !(ICOM_VTBL(dsb)))
if (!dsb || !dsb->lpVtbl)
continue;
if (dsb->buflen && dsb->state && !dsb->hwbuf) {
TRACE("Resetting %p\n", dsb);

View File

@ -880,7 +880,7 @@ HRESULT WINAPI PrimaryBuffer_Create(
dsb = (PrimaryBufferImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(*dsb));
dsb->ref = 1;
dsb->dsound = This;
ICOM_VTBL(dsb) = &dspbvt;
dsb->lpVtbl = &dspbvt;
memcpy(&dsb->dsbd, dsbd, sizeof(*dsbd));

View File

@ -134,7 +134,7 @@ HRESULT WINAPI IKsPropertySetImpl_Create(
iks = (IKsPropertySetImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(*iks));
iks->ref = 0;
iks->dsb = This;
ICOM_VTBL(iks) = &iksvt;
iks->lpVtbl = &iksvt;
*piks = iks;
return S_OK;

View File

@ -691,7 +691,7 @@ HRESULT WINAPI IDirectSound3DBufferImpl_Create(
ds3db = (IDirectSound3DBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(*ds3db));
ds3db->ref = 0;
ds3db->dsb = This;
ICOM_VTBL(ds3db) = &ds3dbvt;
ds3db->lpVtbl = &ds3dbvt;
InitializeCriticalSection(&ds3db->lock);
ds3db->ds3db.dwSize = sizeof(DS3DBUFFER);
@ -1003,7 +1003,7 @@ HRESULT WINAPI IDirectSound3DListenerImpl_Create(
dsl = (IDirectSound3DListenerImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(*dsl));
dsl->ref = 1;
ICOM_VTBL(dsl) = &ds3dlvt;
dsl->lpVtbl = &ds3dlvt;
dsl->ds3dl.dwSize = sizeof(DS3DLISTENER);
dsl->ds3dl.vPosition.u1.x = 0.0;

View File

@ -176,7 +176,7 @@ HRESULT WINAPI BindCtxImpl_Construct(BindCtxImpl* This)
TRACE("(%p)\n",This);
/* Initialize the virtual function table.*/
ICOM_VTBL(This) = &VT_BindCtxImpl;
This->lpVtbl = &VT_BindCtxImpl;
This->ref = 0;
/* Initialize the BIND_OPTS2 structure */

View File

@ -1576,7 +1576,7 @@ LPENUMFORMATETC OLEClipbrd_IEnumFORMATETC_Construct(UINT cfmt, const FORMATETC a
return NULL;
ef->ref = 0;
ICOM_VTBL(ef) = &efvt;
ef->lpVtbl = &efvt;
ef->pUnkDataObj = pUnkDataObj;
ef->posFmt = 0;

View File

@ -1638,7 +1638,7 @@ HRESULT WINAPI EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker,
return E_INVALIDARG;
/* Initialize the virtual function table. */
ICOM_VTBL(newEnumMoniker) = &VT_EnumMonikerImpl;
newEnumMoniker->lpVtbl = &VT_EnumMonikerImpl;
newEnumMoniker->ref = 0;
newEnumMoniker->tabSize=tabSize;

View File

@ -228,7 +228,7 @@ HRESULT WINAPI CoCreateFreeThreadedMarshaler (LPUNKNOWN punkOuter, LPUNKNOWN * p
if (!ftm)
return E_OUTOFMEMORY;
ICOM_VTBL (ftm) = &iunkvt;
ftm->lpVtbl = &iunkvt;
ftm->lpvtblFTM = &ftmvtbl;
ftm->ref = 1;
ftm->pUnkOuter = punkOuter;

View File

@ -108,8 +108,7 @@ void* StdGlobalInterfaceTable_Construct() {
newGIT = HeapAlloc(GetProcessHeap(), 0, sizeof(StdGlobalInterfaceTableImpl));
if (newGIT == 0) return newGIT;
ICOM_VTBL(newGIT) = &StdGlobalInterfaceTableImpl_Vtbl;
newGIT->lpVtbl = &StdGlobalInterfaceTableImpl_Vtbl;
newGIT->ref = 0; /* Initialise the reference count */
newGIT->firstEntry = NULL; /* we start with an empty table */
newGIT->lastEntry = NULL;

View File

@ -223,7 +223,7 @@ HRESULT WINAPI GetHGlobalFromStream(IStream* pstm, HGLOBAL* phglobal)
/*
* Verify that the stream object was created with CreateStreamOnHGlobal.
*/
if (ICOM_VTBL(pStream) == &HGLOBALStreamImpl_Vtbl)
if (pStream->lpVtbl == &HGLOBALStreamImpl_Vtbl)
*phglobal = pStream->supportHandle;
else
{
@ -259,7 +259,7 @@ HGLOBALStreamImpl* HGLOBALStreamImpl_Construct(
/*
* Set-up the virtual function table and reference count.
*/
ICOM_VTBL(newStream) = &HGLOBALStreamImpl_Vtbl;
newStream->lpVtbl = &HGLOBALStreamImpl_Vtbl;
newStream->ref = 0;
/*

View File

@ -605,8 +605,8 @@ BOOL WINAPI IsValidInterface(
) {
return !(
IsBadReadPtr(punk,4) ||
IsBadReadPtr(ICOM_VTBL(punk),4) ||
IsBadReadPtr(ICOM_VTBL(punk)->QueryInterface,9) ||
IsBadCodePtr((FARPROC)ICOM_VTBL(punk)->QueryInterface)
IsBadReadPtr(punk->lpVtbl,4) ||
IsBadReadPtr(punk->lpVtbl->QueryInterface,9) ||
IsBadCodePtr((FARPROC)punk->lpVtbl->QueryInterface)
);
}

View File

@ -186,7 +186,7 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* plkbyt, HGLOBAL* phglobal)
ULONG xread;
*phglobal = 0;
if (ICOM_VTBL(pMemLockBytes) == &HGLOBALLockBytesImpl_Vtbl) {
if (pMemLockBytes->lpVtbl == &HGLOBALLockBytesImpl_Vtbl) {
*phglobal = pMemLockBytes->supportHandle;
if (*phglobal == 0)
return E_INVALIDARG;
@ -240,7 +240,7 @@ HGLOBALLockBytesImpl* HGLOBALLockBytesImpl_Construct(HGLOBAL hGlobal,
/*
* Set up the virtual function table and reference count.
*/
ICOM_VTBL(newLockBytes) = &HGLOBALLockBytesImpl_Vtbl;
newLockBytes->lpVtbl = &HGLOBALLockBytesImpl_Vtbl;
newLockBytes->ref = 0;
/*
@ -760,8 +760,8 @@ HGLOBALLockBytesImpl16_Construct(HGLOBAL16 hGlobal,
#undef VTENT
msegvt16 = MapLS( &vt16 );
}
ICOM_VTBL(newLockBytes) = (ICOM_VTABLE(ILockBytes16)*)msegvt16;
newLockBytes->ref = 0;
newLockBytes->lpVtbl = (ICOM_VTABLE(ILockBytes16)*)msegvt16;
newLockBytes->ref = 0;
/*
* Initialize the support.
*/

View File

@ -208,7 +208,7 @@ HRESULT WINAPI RunningObjectTableImpl_Initialize()
return E_OUTOFMEMORY;
/* 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 ROT refered many times not in the same time (all the objects in the ROT will */

View File

@ -189,7 +189,7 @@ IMalloc16_Constructor()
#undef VTENT
msegvt16 = MapLS( &vt16 );
}
ICOM_VTBL(This) = (ICOM_VTABLE(IMalloc16)*)msegvt16;
This->lpVtbl = (ICOM_VTABLE(IMalloc16)*)msegvt16;
This->ref = 1;
return (LPMALLOC16)MapLS( This );
}
@ -304,7 +304,7 @@ _xmalloc16(DWORD size, SEGPTR *ptr) {
*/
if (!K32WOWCallback16Ex(
(DWORD)((ICOM_VTABLE(IMalloc16)*)MapSL(
(SEGPTR)ICOM_VTBL(((LPMALLOC16)MapSL((SEGPTR)mllc))))
(SEGPTR)((LPMALLOC16)MapSL((SEGPTR)mllc))->lpVtbl )
)->Alloc,
WCB16_CDECL,
2*sizeof(DWORD),

View File

@ -87,7 +87,7 @@ static LPOLEADVISEHOLDER OleAdviseHolderImpl_Constructor()
0,
sizeof(OleAdviseHolderImpl));
ICOM_VTBL(lpoah) = &oahvt;
lpoah->lpVtbl = &oahvt;
lpoah->ref = 1;
lpoah->maxSinks = INITIAL_SINKS;
lpoah->arrayOfSinks = HeapAlloc(GetProcessHeap(),
@ -431,7 +431,7 @@ static IDataAdviseHolder* DataAdviseHolder_Constructor()
0,
sizeof(DataAdviseHolder));
ICOM_VTBL(newHolder) = &DataAdviseHolderImpl_VTable;
newHolder->lpVtbl = &DataAdviseHolderImpl_VTable;
newHolder->ref = 1;
newHolder->maxCons = INITIAL_SINKS;
newHolder->Connections = HeapAlloc(GetProcessHeap(),

View File

@ -87,7 +87,7 @@ StgStreamImpl* StgStreamImpl_Construct(
/*
* Set-up the virtual function table and reference count.
*/
ICOM_VTBL(newStream) = &StgStreamImpl_Vtbl;
newStream->lpVtbl = &StgStreamImpl_Vtbl;
newStream->ref = 0;
/*

View File

@ -1177,7 +1177,7 @@ static void _create_istream16(LPSTREAM16 *str) {
}
}
lpst = HeapAlloc( GetProcessHeap(), 0, sizeof(*lpst) );
ICOM_VTBL(lpst) = segstrvt16;
lpst->lpVtbl = segstrvt16;
lpst->ref = 1;
lpst->thisptr = MapLS( lpst );
*str = (void*)lpst->thisptr;
@ -1587,7 +1587,7 @@ static void _create_istorage16(LPSTORAGE16 *stg) {
}
}
lpst = HeapAlloc( GetProcessHeap(), 0, sizeof(*lpst) );
ICOM_VTBL(lpst) = segstvt16;
lpst->lpVtbl = segstvt16;
lpst->ref = 1;
lpst->thisptr = MapLS(lpst);
*stg = (void*)lpst->thisptr;
@ -1716,7 +1716,7 @@ HRESULT WINAPI StgIsStorageILockBytes16(SEGPTR plkbyt)
if (!K32WOWCallback16Ex(
(DWORD)((ICOM_VTABLE(ILockBytes16)*)MapSL(
(SEGPTR)ICOM_VTBL(((LPLOCKBYTES16)MapSL(plkbyt))))
(SEGPTR)((LPLOCKBYTES16)MapSL(plkbyt))->lpVtbl)
)->ReadAt,
WCB16_PASCAL,
6*sizeof(DWORD),

View File

@ -2209,7 +2209,7 @@ HRESULT StorageImpl_Construct(
/*
* Initialize the virtual function table.
*/
ICOM_VTBL(This) = &Storage32Impl_Vtbl;
This->lpVtbl = &Storage32Impl_Vtbl;
This->v_destructor = &StorageImpl_Destroy;
/*
@ -3481,7 +3481,7 @@ StorageInternalImpl* StorageInternalImpl_Construct(
/*
* Initialize the virtual function table.
*/
ICOM_VTBL(newStorage) = &Storage32InternalImpl_Vtbl;
newStorage->lpVtbl = &Storage32InternalImpl_Vtbl;
newStorage->v_destructor = &StorageInternalImpl_Destroy;
/*
@ -3552,7 +3552,7 @@ IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(
/*
* Set-up the virtual function table and reference count.
*/
ICOM_VTBL(newEnumeration) = &IEnumSTATSTGImpl_Vtbl;
newEnumeration->lpVtbl = &IEnumSTATSTGImpl_Vtbl;
newEnumeration->ref = 0;
/*

View File

@ -2076,7 +2076,7 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength)
pTypeLibImpl = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ITypeLibImpl));
if (!pTypeLibImpl) return NULL;
ICOM_VTBL(pTypeLibImpl) = &tlbvt;
pTypeLibImpl->lpVtbl = &tlbvt;
pTypeLibImpl->ref = 1;
/* get pointer to beginning of typelib data */
@ -2890,7 +2890,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
pTypeLibImpl = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ITypeLibImpl));
if (!pTypeLibImpl) return NULL;
ICOM_VTBL(pTypeLibImpl) = &tlbvt;
pTypeLibImpl->lpVtbl = &tlbvt;
pTypeLibImpl->ref = 1;
pHeader = pLib;
@ -3759,7 +3759,7 @@ static ITypeInfo2 * WINAPI ITypeInfo_Constructor(void)
pTypeInfoImpl = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ITypeInfoImpl));
if (pTypeInfoImpl)
{
ICOM_VTBL(pTypeInfoImpl) = &tinfvt;
pTypeInfoImpl->lpVtbl = &tinfvt;
pTypeInfoImpl->ref=1;
}
TRACE("(%p)\n", pTypeInfoImpl);

View File

@ -397,7 +397,7 @@ IQueryAssociations* IQueryAssociations_Constructor(void)
ei=(IQueryAssociationsImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IQueryAssociationsImpl));
ei->ref=1;
ICOM_VTBL(ei) = &qavt;
ei->lpVtbl = &qavt;
TRACE("(%p)\n",ei);
return (IQueryAssociations *)ei;

View File

@ -76,7 +76,7 @@ LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[])
if(ef)
{
ef->ref=1;
ICOM_VTBL(ef)=&efvt;
ef->lpVtbl=&efvt;
ef->countFmt = cfmt;
ef->pFmt = SHAlloc (size);
@ -234,7 +234,7 @@ LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPITEMIDLIST pMyPidl, LPITE
if (dto)
{
dto->ref = 1;
ICOM_VTBL(dto) = &dtovt;
dto->lpVtbl = &dtovt;
dto->pidl = ILClone(pMyPidl);
dto->apidl = _ILCopyaPidl(apidl, cidl);
dto->cidl = cidl;

View File

@ -69,7 +69,7 @@ HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid,
if (!dth) return E_OUTOFMEMORY;
dth->ref = 0;
ICOM_VTBL (dth) = &vt_IDropTargetHelper;
dth->lpVtbl = &vt_IDropTargetHelper;
if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (dth), riid, ppv))) {
IUnknown_Release (_IUnknown_ (dth));

View File

@ -325,7 +325,7 @@ IEnumIDList * IEnumIDList_Constructor(
if (lpeidl)
{
lpeidl->ref = 1;
ICOM_VTBL(lpeidl) = &eidlvt;
lpeidl->lpVtbl = &eidlvt;
switch (dwKind)
{

View File

@ -67,7 +67,7 @@ IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl)
ei = (IExtractIconWImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconWImpl));
ei->ref=1;
ICOM_VTBL(ei) = &eivt;
ei->lpVtbl = &eivt;
ei->lpvtblPersistFile = &pfvt;
ei->lpvtblExtractIconA = &eiavt;
ei->pidl=ILClone(pidl);

View File

@ -1020,7 +1020,7 @@ HRESULT WINAPI IShellLink_Constructor (
if (!sl) return E_OUTOFMEMORY;
sl->ref = 1;
ICOM_VTBL(sl) = &slvt;
sl->lpVtbl = &slvt;
sl->lpvtblw = &slvtw;
sl->lpvtblPersistFile = &pfvt;
sl->lpvtblPersistStream = &psvt;

View File

@ -536,7 +536,7 @@ IClassFactory * IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll,
lpclf = (IDefClFImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDefClFImpl));
lpclf->ref = 1;
ICOM_VTBL(lpclf) = &dclfvt;
lpclf->lpVtbl = &dclfvt;
lpclf->lpfnCI = lpfnCI;
lpclf->pcRefDll = pcRefDll;

View File

@ -108,7 +108,7 @@ HRESULT WINAPI ISF_Desktop_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOI
return E_OUTOFMEMORY;
sf->ref = 0;
ICOM_VTBL (sf) = &vt_MCFldr_ShellFolder2;
sf->lpVtbl = &vt_MCFldr_ShellFolder2;
sf->pidlRoot = _ILCreateDesktop (); /* my qualified pidl */
sf->sPathTarget = SHAlloc (strlen (szMyPath) + 1);
lstrcpyA (sf->sPathTarget, szMyPath);

View File

@ -229,7 +229,7 @@ HRESULT WINAPI IFSFolder_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID
return E_OUTOFMEMORY;
sf->ref = 0;
ICOM_VTBL (sf) = &unkvt;
sf->lpVtbl = &unkvt;
sf->lpvtblShellFolder = &sfvt;
sf->lpvtblPersistFolder3 = &vt_FSFldr_PersistFolder3;
sf->lpvtblDropTarget = &dtvt;

View File

@ -112,7 +112,7 @@ HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LP
return E_OUTOFMEMORY;
sf->ref = 0;
ICOM_VTBL (sf) = &vt_ShellFolder2;
sf->lpVtbl = &vt_ShellFolder2;
sf->lpVtblPersistFolder2 = &vt_PersistFolder2;
sf->pidlRoot = _ILCreateMyComputer (); /* my qualified pidl */

View File

@ -161,7 +161,7 @@ IShellView * IShellView_Constructor( IShellFolder * pFolder)
{ IShellViewImpl * sv;
sv=(IShellViewImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellViewImpl));
sv->ref=1;
ICOM_VTBL(sv)=&svvt;
sv->lpVtbl=&svvt;
sv->lpvtblOleCommandTarget=&ctvt;
sv->lpvtblDropTarget=&dtvt;
sv->lpvtblDropSource=&dsvt;

View File

@ -55,7 +55,7 @@ IContextMenu *ISvBgCm_Constructor(IShellFolder* pSFParent)
BgCmImpl* cm;
cm = (BgCmImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(BgCmImpl));
ICOM_VTBL(cm)=&cmvt;
cm->lpVtbl = &cmvt;
cm->ref = 1;
cm->pSFParent = pSFParent;
if(pSFParent) IShellFolder_AddRef(pSFParent);

View File

@ -79,7 +79,7 @@ IContextMenu *ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl,
UINT u;
cm = (ItemCmImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ItemCmImpl));
ICOM_VTBL(cm)=&cmvt;
cm->lpVtbl = &cmvt;
cm->ref = 1;
cm->pidl = ILClone(pidl);
cm->pSFParent = pSFParent;

View File

@ -350,7 +350,7 @@ static IStream *IStream_Create(LPCWSTR lpszPath, HANDLE hFile, DWORD dwMode)
if (fileStream)
{
ICOM_VTBL(fileStream) = &SHLWAPI_fsVTable;
fileStream->lpVtbl = &SHLWAPI_fsVTable;
fileStream->ref = 1;
fileStream->hFile = hFile;
fileStream->dwMode = dwMode;

View File

@ -343,7 +343,7 @@ static IStream *IStream_Create(HKEY hKey, LPBYTE pbBuffer, DWORD dwLength)
if (regStream)
{
ICOM_VTBL(regStream) = &rstvt;
regStream->lpVtbl = &rstvt;
regStream->ref = 1;
regStream->hKey = hKey;
regStream->pbBuffer = pbBuffer;

View File

@ -2034,7 +2034,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
*ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverBufferImpl));
if (*ippdsdb == NULL)
return DSERR_OUTOFMEMORY;
ICOM_VTBL(*ippdsdb) = &dsdbvt;
(*ippdsdb)->lpVtbl = &dsdbvt;
(*ippdsdb)->ref = 1;
(*ippdsdb)->drv = This;
@ -2095,7 +2095,7 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
*idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverImpl));
if (!*idrv)
return MMSYSERR_NOMEM;
ICOM_VTBL(*idrv) = &dsdvt;
(*idrv)->lpVtbl = &dsdvt;
(*idrv)->ref = 1;
(*idrv)->wDevID = wDevID;

View File

@ -1658,7 +1658,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
*ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverBufferImpl));
if (*ippdsdb == NULL)
return DSERR_OUTOFMEMORY;
ICOM_VTBL(*ippdsdb) = &dsdbvt;
(*ippdsdb)->lpVtbl = &dsdbvt;
(*ippdsdb)->ref = 1;
(*ippdsdb)->drv = This;
@ -1758,7 +1758,7 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
*idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverImpl));
if (!*idrv)
return MMSYSERR_NOMEM;
ICOM_VTBL(*idrv) = &dsdvt;
(*idrv)->lpVtbl = &dsdvt;
(*idrv)->ref = 1;
(*idrv)->wDevID = wDevID;

View File

@ -1587,7 +1587,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
*ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverBufferImpl));
if (*ippdsdb == NULL)
return DSERR_OUTOFMEMORY;
ICOM_VTBL(*ippdsdb) = &dsdbvt;
(*ippdsdb)->lpVtbl = &dsdbvt;
(*ippdsdb)->ref = 1;
(*ippdsdb)->drv = This;
@ -1668,7 +1668,7 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
*idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverImpl));
if (!*idrv)
return MMSYSERR_NOMEM;
ICOM_VTBL(*idrv) = &dsdvt;
(*idrv)->lpVtbl = &dsdvt;
(*idrv)->ref = 1;
(*idrv)->wDevID = wDevID;

View File

@ -2320,7 +2320,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
*ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverBufferImpl));
if (*ippdsdb == NULL)
return DSERR_OUTOFMEMORY;
ICOM_VTBL(*ippdsdb) = &dsdbvt;
(*ippdsdb)->lpVtbl = &dsdbvt;
(*ippdsdb)->ref = 1;
(*ippdsdb)->drv = This;
@ -2397,7 +2397,7 @@ static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
*idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsDriverImpl));
if (!*idrv)
return MMSYSERR_NOMEM;
ICOM_VTBL(*idrv) = &dsdvt;
(*idrv)->lpVtbl = &dsdvt;
(*idrv)->ref = 1;
(*idrv)->wDevID = wDevID;
@ -3395,7 +3395,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer(PIDSCDRIVER iface
return DSERR_OUTOFMEMORY;
}
ICOM_VTBL(*ippdscdb) = &dscdbvt;
(*ippdscdb)->lpVtbl = &dscdbvt;
(*ippdscdb)->ref = 1;
(*ippdscdb)->drv = This;
@ -3477,7 +3477,7 @@ static DWORD widDsCreate(UINT wDevID, PIDSCDRIVER* drv)
*idrv = (IDsCaptureDriverImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDsCaptureDriverImpl));
if (!*idrv)
return MMSYSERR_NOMEM;
ICOM_VTBL(*idrv) = &dscdvt;
(*idrv)->lpVtbl = &dscdvt;
(*idrv)->ref = 1;
(*idrv)->wDevID = wDevID;