mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 05:50:37 +00:00
wuapi: Use an iface instead of a vtbl pointer in update_downloader.
This commit is contained in:
parent
c3827f1b7b
commit
ecd7ea605e
|
@ -36,13 +36,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(wuapi);
|
|||
|
||||
typedef struct _update_downloader
|
||||
{
|
||||
const struct IUpdateDownloaderVtbl *vtbl;
|
||||
IUpdateDownloader IUpdateDownloader_iface;
|
||||
LONG refs;
|
||||
} update_downloader;
|
||||
|
||||
static inline update_downloader *impl_from_IUpdateDownloader( IUpdateDownloader *iface )
|
||||
{
|
||||
return (update_downloader *)((char *)iface - FIELD_OFFSET( update_downloader, vtbl ));
|
||||
return CONTAINING_RECORD(iface, update_downloader, IUpdateDownloader_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI update_downloader_AddRef(
|
||||
|
@ -257,10 +257,10 @@ HRESULT UpdateDownloader_create( IUnknown *pUnkOuter, LPVOID *ppObj )
|
|||
downloader = HeapAlloc( GetProcessHeap(), 0, sizeof(*downloader) );
|
||||
if (!downloader) return E_OUTOFMEMORY;
|
||||
|
||||
downloader->vtbl = &update_downloader_vtbl;
|
||||
downloader->IUpdateDownloader_iface.lpVtbl = &update_downloader_vtbl;
|
||||
downloader->refs = 1;
|
||||
|
||||
*ppObj = &downloader->vtbl;
|
||||
*ppObj = &downloader->IUpdateDownloader_iface;
|
||||
|
||||
TRACE("returning iface %p\n", *ppObj);
|
||||
return S_OK;
|
||||
|
|
Loading…
Reference in a new issue