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

View File

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

View File

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

View File

@ -31,7 +31,7 @@ typedef struct BindCtxObject{
/* BindCtx data strucrture */
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 */
@ -161,7 +161,7 @@ HRESULT WINAPI BindCtxImpl_Construct(BindCtxImpl* This)
TRACE("(%p)\n",This);
/* Initialize the virtual function table.*/
This->lpvtbl = &VT_BindCtxImpl;
ICOM_VTBL(This) = &VT_BindCtxImpl;
This->ref = 0;
/* Initialize the BIND_OPTS2 structure */

View File

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

View File

@ -38,7 +38,7 @@ typedef struct CompositeMonikerImpl{
/* EnumMoniker data structure */
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 */
@ -1606,7 +1606,7 @@ HRESULT WINAPI EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker,
return E_INVALIDARG;
/* Initialize the virtual function table. */
newEnumMoniker->lpvtbl = &VT_EnumMonikerImpl;
ICOM_VTBL(newEnumMoniker) = &VT_EnumMonikerImpl;
newEnumMoniker->ref = 0;
newEnumMoniker->tabSize=tabSize;

View File

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

View File

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

View File

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

View File

@ -28,7 +28,7 @@ typedef struct RunObject{
/* define de RunningObjectTableImpl structure */
typedef struct RunningObjectTableImpl{
ICOM_VTABLE(IRunningObjectTable)* lpvtbl;
ICOM_VFIELD(IRunningObjectTable);
ULONG ref;
RunObject* runObjTab; /* pointe to the first object in the table */
@ -189,7 +189,7 @@ HRESULT WINAPI RunningObjectTableImpl_Initialize()
return E_OUTOFMEMORY;
/* 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 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
{
ICOM_VTABLE(IOleAdviseHolder)* lpvtbl;
ICOM_VFIELD(IOleAdviseHolder);
DWORD ref;
@ -71,7 +71,7 @@ static LPOLEADVISEHOLDER OleAdviseHolderImpl_Constructor()
0,
sizeof(OleAdviseHolderImpl));
lpoah->lpvtbl = &oahvt;
ICOM_VTBL(lpoah) = &oahvt;
lpoah->ref = 1;
lpoah->maxSinks = 10;
lpoah->arrayOfSinks = HeapAlloc(GetProcessHeap(),
@ -344,7 +344,7 @@ OleAdviseHolderImpl_SendOnClose (LPOLEADVISEHOLDER iface)
*/
typedef struct DataAdviseHolder
{
ICOM_VTABLE(IDataAdviseHolder)* lpvtbl;
ICOM_VFIELD(IDataAdviseHolder);
DWORD ref;
} DataAdviseHolder;
@ -407,7 +407,7 @@ static IDataAdviseHolder* DataAdviseHolder_Constructor()
0,
sizeof(DataAdviseHolder));
newHolder->lpvtbl = &DataAdviseHolderImpl_VTable;
ICOM_VTBL(newHolder) = &DataAdviseHolderImpl_VTable;
newHolder->ref = 1;
return (IDataAdviseHolder*)newHolder;

View File

@ -69,8 +69,8 @@ StgStreamImpl* StgStreamImpl_Construct(
/*
* Set-up the virtual function table and reference count.
*/
newStream->lpvtbl = &StgStreamImpl_Vtbl;
newStream->ref = 0;
ICOM_VTBL(newStream) = &StgStreamImpl_Vtbl;
newStream->ref = 0;
/*
* 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
{
/* IUnknown fields */
ICOM_VTABLE(IStream16)* lpvtbl;
ICOM_VFIELD(IStream16);
DWORD ref;
/* IStream16 fields */
SEGPTR thisptr; /* pointer to this struct as segmented */
@ -1144,7 +1144,7 @@ static void _create_istream16(LPSTREAM16 *str) {
}
}
lpst = SEGPTR_NEW(IStream16Impl);
lpst->lpvtbl = segstrvt16;
ICOM_VTBL(lpst) = segstrvt16;
lpst->ref = 1;
lpst->thisptr = SEGPTR_GET(lpst);
*str = (void*)lpst->thisptr;
@ -1156,7 +1156,7 @@ static void _create_istream16(LPSTREAM16 *str) {
typedef struct
{
/* IUnknown fields */
ICOM_VTABLE(IStream)* lpvtbl;
ICOM_VFIELD(IStream);
DWORD ref;
/* IStream32 fields */
struct storage_pps_entry stde;
@ -1212,7 +1212,7 @@ ULONG WINAPI IStream_fnRelease(IStream* iface) {
typedef struct
{
/* IUnknown fields */
ICOM_VTABLE(IStorage16)* lpvtbl;
ICOM_VFIELD(IStorage16);
DWORD ref;
/* IStorage16 fields */
SEGPTR thisptr; /* pointer to this struct as segmented */
@ -1559,7 +1559,7 @@ static void _create_istorage16(LPSTORAGE16 *stg) {
}
}
lpst = SEGPTR_NEW(IStorage16Impl);
lpst->lpvtbl = segstvt16;
ICOM_VTBL(lpst) = segstvt16;
lpst->ref = 1;
lpst->thisptr = SEGPTR_GET(lpst);
*stg = (void*)lpst->thisptr;

View File

@ -2037,7 +2037,7 @@ HRESULT StorageImpl_Construct(
/*
* Initialize the virtual fgunction table.
*/
This->lpvtbl = &Storage32Impl_Vtbl;
ICOM_VTBL(This) = &Storage32Impl_Vtbl;
This->v_destructor = &StorageImpl_Destroy;
/*
@ -3283,7 +3283,7 @@ StorageInternalImpl* StorageInternalImpl_Construct(
/*
* Initialize the virtual function table.
*/
newStorage->lpvtbl = &Storage32InternalImpl_Vtbl;
ICOM_VTBL(newStorage) = &Storage32InternalImpl_Vtbl;
newStorage->v_destructor = &StorageInternalImpl_Destroy;
/*
@ -3354,8 +3354,8 @@ IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(
/*
* Set-up the virtual function table and reference count.
*/
newEnumeration->lpvtbl = &IEnumSTATSTGImpl_Vtbl;
newEnumeration->ref = 0;
ICOM_VTBL(newEnumeration) = &IEnumSTATSTGImpl_Vtbl;
newEnumeration->ref = 0;
/*
* 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
{
ICOM_VTABLE(IStorage)* lpvtbl; /* Needs to be the first item in the stuct
* since we want to cast this in a Storage32 pointer */
ICOM_VFIELD(IStorage); /* Needs to be the first item in the stuct
* since we want to cast this in a Storage32 pointer */
/*
* Reference count of this object
@ -273,7 +273,7 @@ HRESULT WINAPI StorageBaseImpl_SetClass(
*/
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 */
/*
@ -462,8 +462,8 @@ void Storage32Impl_SetExtDepotBlock(StorageImpl* This,
*/
struct StorageInternalImpl
{
ICOM_VTABLE(IStorage) *lpvtbl; /* Needs to be the first item in the stuct
* since we want to cast this in a Storage32 pointer */
ICOM_VFIELD(IStorage); /* Needs to be the first item in the stuct
* since we want to cast this in a Storage32 pointer */
/*
* Declare the member of the Storage32BaseImpl class to allow
@ -506,7 +506,7 @@ HRESULT WINAPI StorageInternalImpl_Revert(
*/
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 */
ULONG ref; /* Reference count */
@ -591,7 +591,7 @@ INT IEnumSTATSTGImpl_FindParentProperty(
*/
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 */
/*

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@
DEFAULT_DEBUG_CHANNEL(shell)
typedef struct
{ ICOM_VTABLE(IStream)* lpvtbl;
{ ICOM_VFIELD(IStream);
DWORD ref;
HKEY hKey;
LPSTR pszSubKey;
@ -35,7 +35,7 @@ IStream *IStream_Constructor(HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, DWORD
DWORD dwType;
rstr = (ISHRegStream*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ISHRegStream));
rstr->lpvtbl=&rstvt;
ICOM_VTBL(rstr)=&rstvt;
rstr->ref = 1;
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
315 stub StrNCpyA # 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
319 stub StrRChrIW # 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
{
ICOM_VTABLE(IShellLink)* lpvtbl;
ICOM_VFIELD(IShellLink);
DWORD ref;
ICOM_VTABLE(IShellLinkW)* lpvtblw;
@ -403,7 +403,7 @@ IShellLink * IShellLink_Constructor(BOOL bUnicode)
sl = (IShellLinkImpl *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellLinkImpl));
sl->ref = 1;
sl->lpvtbl = &slvt;
ICOM_VTBL(sl) = &slvt;
sl->lpvtblw = &slvtw;
sl->lpvtblPersistFile = &pfvt;
sl->lpvtblPersistStream = &psvt;

View File

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

View File

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

View File

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

View File

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

View File

@ -35,7 +35,7 @@ typedef struct IDirect3DDevice2Impl IDirect3DDevice2Impl;
struct IDirect3DImpl
{
/* IUnknown fields */
ICOM_VTABLE(IDirect3D)* lpvtbl;
ICOM_VFIELD(IDirect3D);
DWORD ref;
/* IDirect3D fields */
IDirectDrawImpl* ddraw;
@ -47,7 +47,7 @@ struct IDirect3DImpl
struct IDirect3D2Impl
{
/* IUnknown fields */
ICOM_VTABLE(IDirect3D2)* lpvtbl;
ICOM_VFIELD(IDirect3D2);
DWORD ref;
/* IDirect3D2 fields */
IDirectDrawImpl* ddraw;
@ -59,7 +59,7 @@ struct IDirect3D2Impl
struct IDirect3DLightImpl
{
/* IUnknown fields */
ICOM_VTABLE(IDirect3DLight)* lpvtbl;
ICOM_VFIELD(IDirect3DLight);
DWORD ref;
/* IDirect3DLight fields */
union {
@ -89,7 +89,7 @@ struct IDirect3DLightImpl
struct IDirect3DMaterial2Impl
{
/* IUnknown fields */
ICOM_VTABLE(IDirect3DMaterial2)* lpvtbl;
ICOM_VFIELD(IDirect3DMaterial2);
DWORD ref;
/* IDirect3DMaterial2 fields */
union {
@ -113,7 +113,7 @@ struct IDirect3DMaterial2Impl
struct IDirect3DTexture2Impl
{
/* IUnknown fields */
ICOM_VTABLE(IDirect3DTexture2)* lpvtbl;
ICOM_VFIELD(IDirect3DTexture2);
DWORD ref;
/* IDirect3DTexture2 fields */
void* D3Ddevice; /* I put (void *) to use the same pointer for both
@ -130,7 +130,7 @@ struct IDirect3DTexture2Impl
struct IDirect3DViewport2Impl
{
/* IUnknown fields */
ICOM_VTABLE(IDirect3DViewport2)* lpvtbl;
ICOM_VFIELD(IDirect3DViewport2);
DWORD ref;
/* IDirect3DViewport2 fields */
union {
@ -171,7 +171,7 @@ struct IDirect3DViewport2Impl
struct IDirect3DExecuteBufferImpl
{
/* IUnknown fields */
ICOM_VTABLE(IDirect3DExecuteBuffer)* lpvtbl;
ICOM_VFIELD(IDirect3DExecuteBuffer);
DWORD ref;
/* IDirect3DExecuteBuffer fields */
IDirect3DDeviceImpl* d3ddev;
@ -198,7 +198,7 @@ struct IDirect3DExecuteBufferImpl
struct IDirect3DDeviceImpl
{
/* IUnknown fields */
ICOM_VTABLE(IDirect3DDevice)* lpvtbl;
ICOM_VFIELD(IDirect3DDevice);
DWORD ref;
/* IDirect3DDevice fields */
IDirect3DImpl* d3d;
@ -216,7 +216,7 @@ struct IDirect3DDeviceImpl
struct IDirect3DDevice2Impl
{
/* IUnknown fields */
ICOM_VTABLE(IDirect3DDevice2)* lpvtbl;
ICOM_VFIELD(IDirect3DDevice2);
DWORD ref;
/* IDirect3DDevice fields */
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));
odev = (OpenGL_IDirect3DDevice2 *) (*device);
(*device)->ref = 1;
(*device)->lpvtbl = &OpenGL_vtable;
ICOM_VTBL(*device) = &OpenGL_vtable;
(*device)->d3d = d3d;
(*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));
odev = (OpenGL_IDirect3DDevice *) (*device);
(*device)->ref = 1;
(*device)->lpvtbl = &OpenGL_vtable_dx3;
ICOM_VTBL(*device) = &OpenGL_vtable_dx3;
(*device)->d3d = NULL;
(*device)->surface = surface;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2196,7 +2196,7 @@ HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags,
TRACE("(%08lx,%p,%p)\n", dwFlags, ilplpDDClipper, pUnkOuter);
*ilplpDDClipper = (IDirectDrawClipperImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawClipperImpl));
(*ilplpDDClipper)->lpvtbl = &ddclipvt;
ICOM_VTBL(*ilplpDDClipper) = &ddclipvt;
(*ilplpDDClipper)->ref = 1;
return DD_OK;
@ -2518,7 +2518,7 @@ static HRESULT WINAPI IDirect3DImpl_QueryInterface(
d3d->ref = 1;
d3d->ddraw = This->ddraw;
IDirect3D_AddRef(iface);
d3d->lpvtbl = &d3d2vt;
ICOM_VTBL(d3d) = &d3d2vt;
*obj = d3d;
TRACE(" Creating IDirect3D2 interface (%p)\n", *obj);
@ -2676,7 +2676,7 @@ static HRESULT WINAPI IDirect3D2Impl_QueryInterface(
d3d->ref = 1;
d3d->ddraw = This->ddraw;
IDirect3D2_AddRef(iface);
d3d->lpvtbl = &d3dvt;
ICOM_VTBL(d3d) = &d3dvt;
*obj = d3d;
TRACE(" Creating IDirect3D interface (%p)\n", *obj);
@ -2865,7 +2865,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_CreateSurface(
IDirectDraw2_AddRef(iface);
(*ilpdsf)->ref = 1;
(*ilpdsf)->lpvtbl = (ICOM_VTABLE(IDirectDrawSurface)*)&dga_dds4vt;
ICOM_VTBL(*ilpdsf) = (ICOM_VTABLE(IDirectDrawSurface)*)&dga_dds4vt;
(*ilpdsf)->s.ddraw = This;
(*ilpdsf)->s.palette = NULL;
(*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);
back->ref = 1;
back->lpvtbl = (ICOM_VTABLE(IDirectDrawSurface4)*)&dga_dds4vt;
ICOM_VTBL(back) = (ICOM_VTABLE(IDirectDrawSurface4)*)&dga_dds4vt;
for (i=0;i<32;i++)
if (!(This->e.dga.vpmask & (1<<i)))
break;
@ -3132,7 +3132,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_CreateSurface(
(*ilpdsf)->s.ddraw = This;
(*ilpdsf)->ref = 1;
(*ilpdsf)->lpvtbl = (ICOM_VTABLE(IDirectDrawSurface)*)&xlib_dds4vt;
ICOM_VTBL(*ilpdsf) = (ICOM_VTABLE(IDirectDrawSurface)*)&xlib_dds4vt;
(*ilpdsf)->s.palette = NULL;
(*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->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 */
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)->ref = 1;
(*ilpddclip)->lpvtbl = &ddclipvt;
ICOM_VTBL(*ilpddclip) = &ddclipvt;
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);
res = common_IDirectDraw2Impl_CreatePalette(This,dwFlags,palent,ilpddpal,lpunk,&xsize);
if (res != 0) return res;
(*ilpddpal)->lpvtbl = &dga_ddpalvt;
ICOM_VTBL(*ilpddpal) = &dga_ddpalvt;
if (This->d.directdraw_pixelformat.u.dwRGBBitCount<=8) {
(*ilpddpal)->cm = TSXCreateColormap(display,DefaultRootWindow(display),DefaultVisualOfScreen(X11DRV_GetXScreen()),AllocAll);
} else {
@ -3910,7 +3910,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_CreatePalette(
TRACE("(%p)->(%08lx,%p,%p,%p)\n",This,dwFlags,palent,ilpddpal,lpunk);
res = common_IDirectDraw2Impl_CreatePalette(This,dwFlags,palent,ilpddpal,lpunk,&xsize);
if (res != 0) return res;
(*ilpddpal)->lpvtbl = &xlib_ddpalvt;
ICOM_VTBL(*ilpddpal) = &xlib_ddpalvt;
return DD_OK;
}
@ -4013,7 +4013,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface(
return S_OK;
}
if ( IsEqualGUID( &IID_IDirectDraw, refiid ) ) {
This->lpvtbl = (ICOM_VTABLE(IDirectDraw2)*)&dga_ddvt;
ICOM_VTBL(This) = (ICOM_VTABLE(IDirectDraw2)*)&dga_ddvt;
IDirectDraw2_AddRef(iface);
*obj = This;
@ -4022,7 +4022,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface(
return S_OK;
}
if ( IsEqualGUID( &IID_IDirectDraw2, refiid ) ) {
This->lpvtbl = (ICOM_VTABLE(IDirectDraw2)*)&dga_dd2vt;
ICOM_VTBL(This) = (ICOM_VTABLE(IDirectDraw2)*)&dga_dd2vt;
IDirectDraw2_AddRef(iface);
*obj = This;
@ -4031,7 +4031,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface(
return S_OK;
}
if ( IsEqualGUID( &IID_IDirectDraw4, refiid ) ) {
This->lpvtbl = (ICOM_VTABLE(IDirectDraw2)*)&dga_dd4vt;
ICOM_VTBL(This) = (ICOM_VTABLE(IDirectDraw2)*)&dga_dd4vt;
IDirectDraw2_AddRef(iface);
*obj = This;
@ -4046,7 +4046,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface(
d3d->ref = 1;
d3d->ddraw = (IDirectDrawImpl*)This;
IDirectDraw2_AddRef(iface);
d3d->lpvtbl = &d3dvt;
ICOM_VTBL(d3d) = &d3dvt;
*obj = d3d;
TRACE(" Creating IDirect3D interface (%p)\n", *obj);
@ -4060,7 +4060,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface(
d3d->ref = 1;
d3d->ddraw = (IDirectDrawImpl*)This;
IDirectDraw2_AddRef(iface);
d3d->lpvtbl = &d3d2vt;
ICOM_VTBL(d3d) = &d3d2vt;
*obj = d3d;
TRACE(" Creating IDirect3D2 interface (%p)\n", *obj);
@ -4089,7 +4089,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_QueryInterface(
return S_OK;
}
if ( IsEqualGUID( &IID_IDirectDraw, refiid ) ) {
This->lpvtbl = (ICOM_VTABLE(IDirectDraw2)*)&xlib_ddvt;
ICOM_VTBL(This) = (ICOM_VTABLE(IDirectDraw2)*)&xlib_ddvt;
IDirectDraw2_AddRef(iface);
*obj = This;
@ -4098,7 +4098,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_QueryInterface(
return S_OK;
}
if ( IsEqualGUID( &IID_IDirectDraw2, refiid ) ) {
This->lpvtbl = (ICOM_VTABLE(IDirectDraw2)*)&xlib_dd2vt;
ICOM_VTBL(This) = (ICOM_VTABLE(IDirectDraw2)*)&xlib_dd2vt;
IDirectDraw2_AddRef(iface);
*obj = This;
@ -4107,7 +4107,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_QueryInterface(
return S_OK;
}
if ( IsEqualGUID( &IID_IDirectDraw4, refiid ) ) {
This->lpvtbl = (ICOM_VTABLE(IDirectDraw2)*)&xlib_dd4vt;
ICOM_VTBL(This) = (ICOM_VTABLE(IDirectDraw2)*)&xlib_dd4vt;
IDirectDraw2_AddRef(iface);
*obj = This;
@ -4122,7 +4122,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_QueryInterface(
d3d->ref = 1;
d3d->ddraw = (IDirectDrawImpl*)This;
IDirectDraw2_AddRef(iface);
d3d->lpvtbl = &d3dvt;
ICOM_VTBL(d3d) = &d3dvt;
*obj = d3d;
TRACE(" Creating IDirect3D interface (%p)\n", *obj);
@ -4136,7 +4136,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_QueryInterface(
d3d->ref = 1;
d3d->ddraw = (IDirectDrawImpl*)This;
IDirectDraw2_AddRef(iface);
d3d->lpvtbl = &d3d2vt;
ICOM_VTBL(d3d) = &d3d2vt;
*obj = d3d;
TRACE(" Creating IDirect3D2 interface (%p)\n", *obj);
@ -4927,7 +4927,7 @@ static HRESULT WINAPI DGA_DirectDrawCreate( LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnk
return DDERR_GENERIC;
}
*ilplpDD = (IDirectDrawImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawImpl));
(*ilplpDD)->lpvtbl = &dga_ddvt;
ICOM_VTBL(*ilplpDD) = &dga_ddvt;
(*ilplpDD)->ref = 1;
TSXF86DGAQueryVersion(display,&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;
*ilplpDD = (IDirectDrawImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawImpl));
(*ilplpDD)->lpvtbl = &xlib_ddvt;
ICOM_VTBL(*ilplpDD) = &xlib_ddvt;
(*ilplpDD)->ref = 1;
(*ilplpDD)->d.drawable = 0; /* in SetDisplayMode */
@ -5097,7 +5097,7 @@ HRESULT WINAPI DirectDrawCreate( LPGUID lpGUID, LPDIRECTDRAW *lplpDD, LPUNKNOWN
typedef struct
{
/* IUnknown fields */
ICOM_VTABLE(IClassFactory)* lpvtbl;
ICOM_VFIELD(IClassFactory);
DWORD ref;
} IClassFactoryImpl;

View File

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

View File

@ -166,7 +166,7 @@ HRESULT (WINAPI *fnAVIStreamGetFrameClose)(PGETFRAME pg);
fprintf(stderr,"DirectDrawCreate: 0x%08lx\n",hres);
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) {
fprintf(stderr,"ddraw.SetDisplayMode: 0x%08lx (change resolution!)\n",hres);
exit(1);
@ -174,7 +174,7 @@ HRESULT (WINAPI *fnAVIStreamGetFrameClose)(PGETFRAME pg);
dsdesc.dwSize=sizeof(dsdesc);
dsdesc.dwFlags = DDSD_CAPS;
dsdesc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hres = ddraw->lpvtbl->fnCreateSurface(ddraw,&dsdesc,&dsurf,NULL);
hres = IDirectDraw_CreateSurface(ddraw,&dsdesc,&dsurf,NULL);
if (hres) {
fprintf(stderr,"ddraw.CreateSurface: 0x%08lx\n",hres);
exit(1);
@ -183,18 +183,18 @@ HRESULT (WINAPI *fnAVIStreamGetFrameClose)(PGETFRAME pg);
RGBQUAD *rgb = (RGBQUAD*)(bmi+1);
int i;
hres = ddraw->lpvtbl->fnCreatePalette(ddraw,DDPCAPS_8BIT,NULL,&dpal,NULL);
hres = IDirectDraw_CreatePalette(ddraw,DDPCAPS_8BIT,NULL,&dpal,NULL);
if (hres) {
fprintf(stderr,"ddraw.CreateSurface: 0x%08lx\n",hres);
exit(1);
}
dsurf->lpvtbl->fnSetPalette(dsurf,dpal);
IDirectDrawSurface_SetPalette(dsurf,dpal);
for (i=0;i<bmi->biClrUsed;i++) {
palent[i].peRed = rgb[i].rgbRed;
palent[i].peBlue = rgb[i].rgbBlue;
palent[i].peGreen = rgb[i].rgbGreen;
}
dpal->lpvtbl->fnSetEntries(dpal,0,0,bmi->biClrUsed,palent);
IDirectDrawPalette_SetEntries(dpal,0,0,bmi->biClrUsed,palent);
} else
dpal = NULL;
/********************* end display setup *******************************/
@ -234,11 +234,11 @@ HRESULT (WINAPI *fnAVIStreamGetFrameClose)(PGETFRAME pg);
palent[i].peBlue = rgb[i].rgbBlue;
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);
hres = dsurf->lpvtbl->fnLock(dsurf,NULL,&dsdesc,DDLOCK_WRITEONLY,0);
hres = IDirectDrawSurface_Lock(dsurf,NULL,&dsdesc,DDLOCK_WRITEONLY,0);
if (hres) {
fprintf(stderr,"dsurf.Lock: 0x%08lx\n",hres);
exit(1);
@ -250,14 +250,14 @@ HRESULT (WINAPI *fnAVIStreamGetFrameClose)(PGETFRAME pg);
bytesline
);
}
dsurf->lpvtbl->fnUnlock(dsurf,dsdesc.y.lpSurface);
IDirectDrawSurface_Unlock(dsurf,dsdesc.y.lpSurface);
}
tend = time(NULL);
fnAVIStreamGetFrameClose(vidgetframe);
((IUnknown*)dsurf)->lpvtbl->fnRelease((IUnknown*)dsurf);
ddraw->lpvtbl->fnRestoreDisplayMode(ddraw);
((IUnknown*)ddraw)->lpvtbl->fnRelease((IUnknown*)ddraw);
IDirectDrawSurface_Release(dsurf);
IDirectDraw_RestoreDisplayMode(ddraw);
IDirectDraw_Release(ddraw);
if (vids) fnAVIStreamRelease(vids);
if (auds) fnAVIStreamRelease(auds);
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
{
ICOM_VTABLE(IDirectInputDevice2A)* lpvtbl;
ICOM_VFIELD(IDirectInputDevice2A);
DWORD ref;
GUID guid;
};
@ -75,7 +75,7 @@ struct IDirectInputDevice2AImpl
struct SysKeyboardAImpl
{
/* IDirectInputDevice2AImpl */
ICOM_VTABLE(IDirectInputDevice2A)* lpvtbl;
ICOM_VFIELD(IDirectInputDevice2A);
DWORD ref;
GUID guid;
/* SysKeyboardAImpl */
@ -88,7 +88,7 @@ static ICOM_VTABLE(IDirectInputDevice2A) JoystickAvt;
struct JoystickAImpl
{
/* IDirectInputDevice2AImpl */
ICOM_VTABLE(IDirectInputDevice2A)* lpvtbl;
ICOM_VFIELD(IDirectInputDevice2A);
DWORD ref;
GUID guid;
@ -106,7 +106,7 @@ struct JoystickAImpl
struct SysMouseAImpl
{
/* IDirectInputDevice2AImpl */
ICOM_VTABLE(IDirectInputDevice2A)* lpvtbl;
ICOM_VFIELD(IDirectInputDevice2A);
DWORD ref;
GUID guid;
@ -180,7 +180,7 @@ static void _dump_cooperativelevel(DWORD dwFlags) {
struct IDirectInputAImpl
{
ICOM_VTABLE(IDirectInputA)* lpvtbl;
ICOM_VFIELD(IDirectInputA);
DWORD ref;
};
@ -195,7 +195,7 @@ HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPU
);
This = (IDirectInputAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInputAImpl));
This->ref = 1;
This->lpvtbl = &ddiavt;
ICOM_VTBL(This) = &ddiavt;
*ppDI=(IDirectInputA*)This;
return 0;
}
@ -296,7 +296,7 @@ static HRESULT WINAPI IDirectInputAImpl_CreateDevice(
SysKeyboardAImpl* newDevice;
newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysKeyboardAImpl));
newDevice->ref = 1;
newDevice->lpvtbl = &SysKeyboardAvt;
ICOM_VTBL(newDevice) = &SysKeyboardAvt;
memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
memset(newDevice->keystate,0,256);
*pdev=(IDirectInputDeviceA*)newDevice;
@ -307,7 +307,7 @@ static HRESULT WINAPI IDirectInputAImpl_CreateDevice(
SysMouseAImpl* newDevice;
newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysMouseAImpl));
newDevice->ref = 1;
newDevice->lpvtbl = &SysMouseAvt;
ICOM_VTBL(newDevice) = &SysMouseAvt;
InitializeCriticalSection(&(newDevice->crit));
MakeCriticalSectionGlobal(&(newDevice->crit));
memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
@ -320,7 +320,7 @@ static HRESULT WINAPI IDirectInputAImpl_CreateDevice(
JoystickAImpl* newDevice;
newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(JoystickAImpl));
newDevice->ref = 1;
newDevice->lpvtbl = &JoystickAvt;
ICOM_VTBL(newDevice) = &JoystickAvt;
newDevice->joyfd = -1;
memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
*pdev=(IDirectInputDeviceA*)newDevice;