Commit a1f54604 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

wmiutils: Use an iface instead of an vtbl pointer in status_code.

parent cdf56820
......@@ -37,13 +37,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(wmiutils);
typedef struct status_code
{
const IWbemStatusCodeTextVtbl *vtbl;
IWbemStatusCodeText IWbemStatusCodeText_iface;
LONG refs;
} status_code;
static inline status_code *impl_from_IWbemStatusCodeText( IWbemStatusCodeText *iface )
{
return (status_code *)((char *)iface - FIELD_OFFSET( status_code, vtbl ));
return CONTAINING_RECORD(iface, status_code, IWbemStatusCodeText_iface);
}
static ULONG WINAPI status_code_AddRef(
......@@ -143,10 +143,10 @@ HRESULT WbemStatusCodeText_create( IUnknown *pUnkOuter, LPVOID *ppObj )
sc = HeapAlloc( GetProcessHeap(), 0, sizeof(*sc) );
if (!sc) return E_OUTOFMEMORY;
sc->vtbl = &status_code_vtbl;
sc->IWbemStatusCodeText_iface.lpVtbl = &status_code_vtbl;
sc->refs = 1;
*ppObj = &sc->vtbl;
*ppObj = &sc->IWbemStatusCodeText_iface;
TRACE("returning iface %p\n", *ppObj);
return S_OK;
......
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