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

objsel: COM cleanup for the IDsObjectPicker iface.

parent 39e80379
...@@ -99,12 +99,17 @@ static VOID OBJSEL_IDsObjectPicker_Destroy(IDsObjectPickerImpl *This) ...@@ -99,12 +99,17 @@ static VOID OBJSEL_IDsObjectPicker_Destroy(IDsObjectPickerImpl *This)
} }
static inline IDsObjectPickerImpl *impl_from_IDsObjectPicker(IDsObjectPicker *iface)
{
return CONTAINING_RECORD(iface, IDsObjectPickerImpl, IDsObjectPicker_iface);
}
/********************************************************************** /**********************************************************************
* OBJSEL_IDsObjectPicker_AddRef (also IUnknown) * OBJSEL_IDsObjectPicker_AddRef (also IUnknown)
*/ */
static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker * iface) static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker * iface)
{ {
IDsObjectPickerImpl *This = (IDsObjectPickerImpl *)iface; IDsObjectPickerImpl *This = impl_from_IDsObjectPicker(iface);
ULONG ref; ULONG ref;
TRACE("\n"); TRACE("\n");
...@@ -127,7 +132,7 @@ static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker * iface) ...@@ -127,7 +132,7 @@ static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker * iface)
*/ */
static ULONG WINAPI OBJSEL_IDsObjectPicker_Release(IDsObjectPicker * iface) static ULONG WINAPI OBJSEL_IDsObjectPicker_Release(IDsObjectPicker * iface)
{ {
IDsObjectPickerImpl *This = (IDsObjectPickerImpl *)iface; IDsObjectPickerImpl *This = impl_from_IDsObjectPicker(iface);
ULONG ref; ULONG ref;
TRACE("\n"); TRACE("\n");
...@@ -219,9 +224,9 @@ HRESULT WINAPI OBJSEL_IDsObjectPicker_Create(LPVOID *ppvObj) ...@@ -219,9 +224,9 @@ HRESULT WINAPI OBJSEL_IDsObjectPicker_Create(LPVOID *ppvObj)
sizeof(IDsObjectPickerImpl)); sizeof(IDsObjectPickerImpl));
if (Instance != NULL) if (Instance != NULL)
{ {
Instance->lpVtbl = &IDsObjectPicker_Vtbl; Instance->IDsObjectPicker_iface.lpVtbl = &IDsObjectPicker_Vtbl;
OBJSEL_IDsObjectPicker_AddRef((IDsObjectPicker *)Instance); OBJSEL_IDsObjectPicker_AddRef(&Instance->IDsObjectPicker_iface);
*ppvObj = Instance; *ppvObj = Instance;
return S_OK; return S_OK;
} }
......
...@@ -55,7 +55,7 @@ typedef struct ...@@ -55,7 +55,7 @@ typedef struct
typedef struct typedef struct
{ {
IDsObjectPickerVtbl *lpVtbl; IDsObjectPicker IDsObjectPicker_iface;
LONG ref; LONG ref;
} IDsObjectPickerImpl; } IDsObjectPickerImpl;
......
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