Commit e5299ac7 authored by Alexandre Julliard's avatar Alexandre Julliard

comcat: Get rid of NULL checks on the This pointer.

parent 04f11f20
...@@ -34,10 +34,9 @@ static HRESULT WINAPI COMCAT_IClassFactory_QueryInterface( ...@@ -34,10 +34,9 @@ static HRESULT WINAPI COMCAT_IClassFactory_QueryInterface(
REFIID riid, REFIID riid,
LPVOID *ppvObj) LPVOID *ppvObj)
{ {
ClassFactoryImpl *This = (ClassFactoryImpl *)iface;
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER; if (ppvObj == NULL) return E_POINTER;
if (IsEqualGUID(riid, &IID_IUnknown) || if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IClassFactory)) IsEqualGUID(riid, &IID_IClassFactory))
...@@ -60,8 +59,6 @@ static ULONG WINAPI COMCAT_IClassFactory_AddRef(LPCLASSFACTORY iface) ...@@ -60,8 +59,6 @@ static ULONG WINAPI COMCAT_IClassFactory_AddRef(LPCLASSFACTORY iface)
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
ref = InterlockedIncrement(&This->ref); ref = InterlockedIncrement(&This->ref);
if (ref == 1) { if (ref == 1) {
InterlockedIncrement(&dll_ref); InterlockedIncrement(&dll_ref);
...@@ -79,8 +76,6 @@ static ULONG WINAPI COMCAT_IClassFactory_Release(LPCLASSFACTORY iface) ...@@ -79,8 +76,6 @@ static ULONG WINAPI COMCAT_IClassFactory_Release(LPCLASSFACTORY iface)
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
ref = InterlockedDecrement(&This->ref); ref = InterlockedDecrement(&This->ref);
if (ref == 0) { if (ref == 0) {
InterlockedDecrement(&dll_ref); InterlockedDecrement(&dll_ref);
...@@ -97,11 +92,10 @@ static HRESULT WINAPI COMCAT_IClassFactory_CreateInstance( ...@@ -97,11 +92,10 @@ static HRESULT WINAPI COMCAT_IClassFactory_CreateInstance(
REFIID riid, REFIID riid,
LPVOID *ppvObj) LPVOID *ppvObj)
{ {
ClassFactoryImpl *This = (ClassFactoryImpl *)iface;
HRESULT res; HRESULT res;
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER; if (ppvObj == NULL) return E_POINTER;
/* Don't support aggregation (Windows doesn't) */ /* Don't support aggregation (Windows doesn't) */
if (pUnkOuter != NULL) return CLASS_E_NOAGGREGATION; if (pUnkOuter != NULL) return CLASS_E_NOAGGREGATION;
......
...@@ -54,7 +54,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_QueryInterface( ...@@ -54,7 +54,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_QueryInterface(
ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface); ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface);
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER; if (ppvObj == NULL) return E_POINTER;
return IUnknown_QueryInterface((LPUNKNOWN)&This->unkVtbl, riid, ppvObj); return IUnknown_QueryInterface((LPUNKNOWN)&This->unkVtbl, riid, ppvObj);
} }
...@@ -67,8 +67,6 @@ static ULONG WINAPI COMCAT_ICatInformation_AddRef(LPCATINFORMATION iface) ...@@ -67,8 +67,6 @@ static ULONG WINAPI COMCAT_ICatInformation_AddRef(LPCATINFORMATION iface)
ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface); ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface);
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
return IUnknown_AddRef((LPUNKNOWN)&This->unkVtbl); return IUnknown_AddRef((LPUNKNOWN)&This->unkVtbl);
} }
...@@ -80,8 +78,6 @@ static ULONG WINAPI COMCAT_ICatInformation_Release(LPCATINFORMATION iface) ...@@ -80,8 +78,6 @@ static ULONG WINAPI COMCAT_ICatInformation_Release(LPCATINFORMATION iface)
ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface); ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface);
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
return IUnknown_Release((LPUNKNOWN)&This->unkVtbl); return IUnknown_Release((LPUNKNOWN)&This->unkVtbl);
} }
...@@ -96,7 +92,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_EnumCategories( ...@@ -96,7 +92,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_EnumCategories(
/* ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface); */ /* ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface); */
TRACE("\n"); TRACE("\n");
if (iface == NULL || ppenumCatInfo == NULL) return E_POINTER; if (ppenumCatInfo == NULL) return E_POINTER;
*ppenumCatInfo = COMCAT_IEnumCATEGORYINFO_Construct(lcid); *ppenumCatInfo = COMCAT_IEnumCATEGORYINFO_Construct(lcid);
if (*ppenumCatInfo == NULL) return E_OUTOFMEMORY; if (*ppenumCatInfo == NULL) return E_OUTOFMEMORY;
...@@ -168,7 +164,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_EnumClassesOfCategories( ...@@ -168,7 +164,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_EnumClassesOfCategories(
if (cRequired == (ULONG)-1) if (cRequired == (ULONG)-1)
cRequired = 0; cRequired = 0;
if (iface == NULL || ppenumCLSID == NULL || if (ppenumCLSID == NULL ||
(cImplemented && rgcatidImpl == NULL) || (cImplemented && rgcatidImpl == NULL) ||
(cRequired && rgcatidReq == NULL)) return E_POINTER; (cRequired && rgcatidReq == NULL)) return E_POINTER;
...@@ -247,7 +243,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_EnumImplCategoriesOfClass( ...@@ -247,7 +243,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_EnumImplCategoriesOfClass(
TRACE("\n\tCLSID:\t%s\n",debugstr_guid(rclsid)); TRACE("\n\tCLSID:\t%s\n",debugstr_guid(rclsid));
if (iface == NULL || rclsid == NULL || ppenumCATID == NULL) if (rclsid == NULL || ppenumCATID == NULL)
return E_POINTER; return E_POINTER;
*ppenumCATID = COMCAT_CATID_IEnumGUID_Construct(rclsid, postfix); *ppenumCATID = COMCAT_CATID_IEnumGUID_Construct(rclsid, postfix);
...@@ -270,7 +266,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_EnumReqCategoriesOfClass( ...@@ -270,7 +266,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_EnumReqCategoriesOfClass(
TRACE("\n\tCLSID:\t%s\n",debugstr_guid(rclsid)); TRACE("\n\tCLSID:\t%s\n",debugstr_guid(rclsid));
if (iface == NULL || rclsid == NULL || ppenumCATID == NULL) if (rclsid == NULL || ppenumCATID == NULL)
return E_POINTER; return E_POINTER;
*ppenumCATID = COMCAT_CATID_IEnumGUID_Construct(rclsid, postfix); *ppenumCATID = COMCAT_CATID_IEnumGUID_Construct(rclsid, postfix);
...@@ -315,8 +311,6 @@ static ULONG WINAPI COMCAT_IEnumCATEGORYINFO_AddRef(LPENUMCATEGORYINFO iface) ...@@ -315,8 +311,6 @@ static ULONG WINAPI COMCAT_IEnumCATEGORYINFO_AddRef(LPENUMCATEGORYINFO iface)
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
return InterlockedIncrement(&This->ref); return InterlockedIncrement(&This->ref);
} }
...@@ -325,10 +319,9 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_QueryInterface( ...@@ -325,10 +319,9 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_QueryInterface(
REFIID riid, REFIID riid,
LPVOID *ppvObj) LPVOID *ppvObj)
{ {
IEnumCATEGORYINFOImpl *This = (IEnumCATEGORYINFOImpl *)iface;
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER; if (ppvObj == NULL) return E_POINTER;
if (IsEqualGUID(riid, &IID_IUnknown) || if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IEnumCATEGORYINFO)) IsEqualGUID(riid, &IID_IEnumCATEGORYINFO))
...@@ -348,8 +341,6 @@ static ULONG WINAPI COMCAT_IEnumCATEGORYINFO_Release(LPENUMCATEGORYINFO iface) ...@@ -348,8 +341,6 @@ static ULONG WINAPI COMCAT_IEnumCATEGORYINFO_Release(LPENUMCATEGORYINFO iface)
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
ref = InterlockedDecrement(&This->ref); ref = InterlockedDecrement(&This->ref);
if (ref == 0) { if (ref == 0) {
if (This->key) RegCloseKey(This->key); if (This->key) RegCloseKey(This->key);
...@@ -370,7 +361,7 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Next( ...@@ -370,7 +361,7 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Next(
TRACE("\n"); TRACE("\n");
if (This == NULL || rgelt == NULL) return E_POINTER; if (rgelt == NULL) return E_POINTER;
if (This->key) while (fetched < celt) { if (This->key) while (fetched < celt) {
LSTATUS res; LSTATUS res;
...@@ -412,7 +403,6 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Skip( ...@@ -412,7 +403,6 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Skip(
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
This->next_index += celt; This->next_index += celt;
/* This should return S_FALSE when there aren't celt elems to skip. */ /* This should return S_FALSE when there aren't celt elems to skip. */
return S_OK; return S_OK;
...@@ -424,7 +414,6 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Reset(LPENUMCATEGORYINFO iface) ...@@ -424,7 +414,6 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Reset(LPENUMCATEGORYINFO iface)
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
This->next_index = 0; This->next_index = 0;
return S_OK; return S_OK;
} }
...@@ -441,7 +430,7 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Clone( ...@@ -441,7 +430,7 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Clone(
TRACE("\n"); TRACE("\n");
if (This == NULL || ppenum == NULL) return E_POINTER; if (ppenum == NULL) return E_POINTER;
new_this = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumCATEGORYINFOImpl)); new_this = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumCATEGORYINFOImpl));
if (new_this == NULL) return E_OUTOFMEMORY; if (new_this == NULL) return E_OUTOFMEMORY;
...@@ -619,8 +608,6 @@ static ULONG WINAPI COMCAT_CLSID_IEnumGUID_AddRef(LPENUMGUID iface) ...@@ -619,8 +608,6 @@ static ULONG WINAPI COMCAT_CLSID_IEnumGUID_AddRef(LPENUMGUID iface)
CLSID_IEnumGUIDImpl *This = (CLSID_IEnumGUIDImpl *)iface; CLSID_IEnumGUIDImpl *This = (CLSID_IEnumGUIDImpl *)iface;
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
return InterlockedIncrement(&This->ref); return InterlockedIncrement(&This->ref);
} }
...@@ -629,10 +616,9 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_QueryInterface( ...@@ -629,10 +616,9 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_QueryInterface(
REFIID riid, REFIID riid,
LPVOID *ppvObj) LPVOID *ppvObj)
{ {
CLSID_IEnumGUIDImpl *This = (CLSID_IEnumGUIDImpl *)iface;
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER; if (ppvObj == NULL) return E_POINTER;
if (IsEqualGUID(riid, &IID_IUnknown) || if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IEnumGUID)) IsEqualGUID(riid, &IID_IEnumGUID))
...@@ -652,8 +638,6 @@ static ULONG WINAPI COMCAT_CLSID_IEnumGUID_Release(LPENUMGUID iface) ...@@ -652,8 +638,6 @@ static ULONG WINAPI COMCAT_CLSID_IEnumGUID_Release(LPENUMGUID iface)
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
ref = InterlockedDecrement(&This->ref); ref = InterlockedDecrement(&This->ref);
if (ref == 0) { if (ref == 0) {
if (This->key) RegCloseKey(This->key); if (This->key) RegCloseKey(This->key);
...@@ -675,7 +659,7 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Next( ...@@ -675,7 +659,7 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Next(
TRACE("\n"); TRACE("\n");
if (This == NULL || rgelt == NULL) return E_POINTER; if (rgelt == NULL) return E_POINTER;
if (This->key) while (fetched < celt) { if (This->key) while (fetched < celt) {
LSTATUS res; LSTATUS res;
...@@ -715,7 +699,6 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Skip( ...@@ -715,7 +699,6 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Skip(
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
This->next_index += celt; This->next_index += celt;
FIXME("Never returns S_FALSE\n"); FIXME("Never returns S_FALSE\n");
return S_OK; return S_OK;
...@@ -727,7 +710,6 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Reset(LPENUMGUID iface) ...@@ -727,7 +710,6 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Reset(LPENUMGUID iface)
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
This->next_index = 0; This->next_index = 0;
return S_OK; return S_OK;
} }
...@@ -743,7 +725,7 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Clone( ...@@ -743,7 +725,7 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Clone(
TRACE("\n"); TRACE("\n");
if (This == NULL || ppenum == NULL) return E_POINTER; if (ppenum == NULL) return E_POINTER;
new_this = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CLSID_IEnumGUIDImpl)); new_this = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CLSID_IEnumGUIDImpl));
if (new_this == NULL) return E_OUTOFMEMORY; if (new_this == NULL) return E_OUTOFMEMORY;
...@@ -812,8 +794,6 @@ static ULONG WINAPI COMCAT_CATID_IEnumGUID_AddRef(LPENUMGUID iface) ...@@ -812,8 +794,6 @@ static ULONG WINAPI COMCAT_CATID_IEnumGUID_AddRef(LPENUMGUID iface)
CATID_IEnumGUIDImpl *This = (CATID_IEnumGUIDImpl *)iface; CATID_IEnumGUIDImpl *This = (CATID_IEnumGUIDImpl *)iface;
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
return InterlockedIncrement(&This->ref); return InterlockedIncrement(&This->ref);
} }
...@@ -822,10 +802,9 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_QueryInterface( ...@@ -822,10 +802,9 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_QueryInterface(
REFIID riid, REFIID riid,
LPVOID *ppvObj) LPVOID *ppvObj)
{ {
CATID_IEnumGUIDImpl *This = (CATID_IEnumGUIDImpl *)iface;
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER; if (ppvObj == NULL) return E_POINTER;
if (IsEqualGUID(riid, &IID_IUnknown) || if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IEnumGUID)) IsEqualGUID(riid, &IID_IEnumGUID))
...@@ -845,8 +824,6 @@ static ULONG WINAPI COMCAT_CATID_IEnumGUID_Release(LPENUMGUID iface) ...@@ -845,8 +824,6 @@ static ULONG WINAPI COMCAT_CATID_IEnumGUID_Release(LPENUMGUID iface)
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
ref = InterlockedDecrement(&This->ref); ref = InterlockedDecrement(&This->ref);
if (ref == 0) { if (ref == 0) {
if (This->key) RegCloseKey(This->key); if (This->key) RegCloseKey(This->key);
...@@ -867,7 +844,7 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Next( ...@@ -867,7 +844,7 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Next(
TRACE("\n"); TRACE("\n");
if (This == NULL || rgelt == NULL) return E_POINTER; if (rgelt == NULL) return E_POINTER;
if (This->key) while (fetched < celt) { if (This->key) while (fetched < celt) {
LSTATUS res; LSTATUS res;
...@@ -899,7 +876,6 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Skip( ...@@ -899,7 +876,6 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Skip(
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
This->next_index += celt; This->next_index += celt;
FIXME("Never returns S_FALSE\n"); FIXME("Never returns S_FALSE\n");
return S_OK; return S_OK;
...@@ -911,7 +887,6 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Reset(LPENUMGUID iface) ...@@ -911,7 +887,6 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Reset(LPENUMGUID iface)
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
This->next_index = 0; This->next_index = 0;
return S_OK; return S_OK;
} }
...@@ -925,7 +900,7 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Clone( ...@@ -925,7 +900,7 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Clone(
TRACE("\n"); TRACE("\n");
if (This == NULL || ppenum == NULL) return E_POINTER; if (ppenum == NULL) return E_POINTER;
new_this = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CATID_IEnumGUIDImpl)); new_this = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CATID_IEnumGUIDImpl));
if (new_this == NULL) return E_OUTOFMEMORY; if (new_this == NULL) return E_OUTOFMEMORY;
......
...@@ -37,7 +37,7 @@ static HRESULT WINAPI COMCAT_IUnknown_QueryInterface( ...@@ -37,7 +37,7 @@ static HRESULT WINAPI COMCAT_IUnknown_QueryInterface(
ICOM_THIS_MULTI(ComCatMgrImpl, unkVtbl, iface); ICOM_THIS_MULTI(ComCatMgrImpl, unkVtbl, iface);
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER; if (ppvObj == NULL) return E_POINTER;
if (IsEqualGUID(riid, &IID_IUnknown)) { if (IsEqualGUID(riid, &IID_IUnknown)) {
*ppvObj = &This->unkVtbl; *ppvObj = &This->unkVtbl;
...@@ -70,8 +70,6 @@ static ULONG WINAPI COMCAT_IUnknown_AddRef(LPUNKNOWN iface) ...@@ -70,8 +70,6 @@ static ULONG WINAPI COMCAT_IUnknown_AddRef(LPUNKNOWN iface)
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
ref = InterlockedIncrement(&This->ref); ref = InterlockedIncrement(&This->ref);
if (ref == 1) { if (ref == 1) {
InterlockedIncrement(&dll_ref); InterlockedIncrement(&dll_ref);
...@@ -89,8 +87,6 @@ static ULONG WINAPI COMCAT_IUnknown_Release(LPUNKNOWN iface) ...@@ -89,8 +87,6 @@ static ULONG WINAPI COMCAT_IUnknown_Release(LPUNKNOWN iface)
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
ref = InterlockedDecrement(&This->ref); ref = InterlockedDecrement(&This->ref);
if (ref == 0) { if (ref == 0) {
InterlockedDecrement(&dll_ref); InterlockedDecrement(&dll_ref);
......
...@@ -57,7 +57,7 @@ static HRESULT WINAPI COMCAT_ICatRegister_QueryInterface( ...@@ -57,7 +57,7 @@ static HRESULT WINAPI COMCAT_ICatRegister_QueryInterface(
ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface); ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface);
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER; if (ppvObj == NULL) return E_POINTER;
return IUnknown_QueryInterface((LPUNKNOWN)&This->unkVtbl, riid, ppvObj); return IUnknown_QueryInterface((LPUNKNOWN)&This->unkVtbl, riid, ppvObj);
} }
...@@ -70,8 +70,6 @@ static ULONG WINAPI COMCAT_ICatRegister_AddRef(LPCATREGISTER iface) ...@@ -70,8 +70,6 @@ static ULONG WINAPI COMCAT_ICatRegister_AddRef(LPCATREGISTER iface)
ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface); ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface);
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
return IUnknown_AddRef((LPUNKNOWN)&This->unkVtbl); return IUnknown_AddRef((LPUNKNOWN)&This->unkVtbl);
} }
...@@ -83,8 +81,6 @@ static ULONG WINAPI COMCAT_ICatRegister_Release(LPCATREGISTER iface) ...@@ -83,8 +81,6 @@ static ULONG WINAPI COMCAT_ICatRegister_Release(LPCATREGISTER iface)
ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface); ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface);
TRACE("\n"); TRACE("\n");
if (This == NULL) return E_POINTER;
return IUnknown_Release((LPUNKNOWN)&This->unkVtbl); return IUnknown_Release((LPUNKNOWN)&This->unkVtbl);
} }
...@@ -102,7 +98,7 @@ static HRESULT WINAPI COMCAT_ICatRegister_RegisterCategories( ...@@ -102,7 +98,7 @@ static HRESULT WINAPI COMCAT_ICatRegister_RegisterCategories(
TRACE("\n"); TRACE("\n");
if (iface == NULL || (cCategories && rgci == NULL)) if (cCategories && rgci == NULL)
return E_POINTER; return E_POINTER;
/* Create (or open) the component categories key. */ /* Create (or open) the component categories key. */
...@@ -149,7 +145,7 @@ static HRESULT WINAPI COMCAT_ICatRegister_UnRegisterCategories( ...@@ -149,7 +145,7 @@ static HRESULT WINAPI COMCAT_ICatRegister_UnRegisterCategories(
TRACE("\n"); TRACE("\n");
if (iface == NULL || (cCategories && rgcatid == NULL)) if (cCategories && rgcatid == NULL)
return E_POINTER; return E_POINTER;
/* Open the component categories key. */ /* Open the component categories key. */
......
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