Commit 34909c20 authored by John K. Hohm's avatar John K. Hohm Committed by Alexandre Julliard

Added comcat.dll with factory and manager but E_NOTIMPL work methods.

parent e53cd36e
......@@ -12903,7 +12903,7 @@ MAKE_DLL_RULES=dlls/Makedll.rules
MAKE_PROG_RULES=programs/Makeprog.rules
ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules programs/Makeprog.rules Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msg711/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/netapi32/Makefile dlls/ntdll/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/user/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile libtest/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile"
ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules programs/Makeprog.rules Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msg711/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/netapi32/Makefile dlls/ntdll/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/user/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile libtest/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile"
cat >confcache <<\_ACEOF
......@@ -13389,6 +13389,7 @@ do
"dlls/advapi32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/advapi32/Makefile" ;;
"dlls/avicap32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/avicap32/Makefile" ;;
"dlls/avifil32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/avifil32/Makefile" ;;
"dlls/comcat/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/comcat/Makefile" ;;
"dlls/comctl32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/comctl32/Makefile" ;;
"dlls/commdlg/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/commdlg/Makefile" ;;
"dlls/crtdll/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/crtdll/Makefile" ;;
......
......@@ -1302,6 +1302,7 @@ dlls/Makefile
dlls/advapi32/Makefile
dlls/avicap32/Makefile
dlls/avifil32/Makefile
dlls/comcat/Makefile
dlls/comctl32/Makefile
dlls/commdlg/Makefile
dlls/crtdll/Makefile
......
......@@ -19,6 +19,7 @@ SUBDIRS = \
advapi32 \
avicap32 \
avifil32 \
comcat \
comctl32 \
commdlg \
crtdll \
......@@ -111,6 +112,7 @@ all: \
avicap32.dll$(DLLEXT) \
avifil32.dll$(DLLEXT) \
avifile.dll$(DLLEXT) \
comcat.dll$(DLLEXT) \
comctl32.dll$(DLLEXT) \
comdlg32.dll$(DLLEXT) \
comm.dll$(DLLEXT) \
......@@ -248,6 +250,9 @@ avicap32.dll$(DLLEXT): avicap32/avicap32.dll$(DLLEXT)
avifil32.dll$(DLLEXT) avifile.dll$(DLLEXT): avifil32/avifil32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) avifil32/avifil32.dll$(DLLEXT) $@
comcat.dll$(DLLEXT): comcat/comcat.dll$(DLLEXT)
$(RM) $@ && $(LN_S) comcat/comcat.dll$(DLLEXT) $@
comctl32.dll$(DLLEXT): comctl32/comctl32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) comctl32/comctl32.dll$(DLLEXT) $@
......@@ -521,6 +526,10 @@ avifil32/avifil32.dll$(DLLEXT): dummy msvfw32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
ntdll.dll$(DLLEXT)
@cd avifil32 && $(MAKE) avifil32.dll$(DLLEXT)
comcat/comcat.dll$(DLLEXT): dummy ole32.dll$(DLLEXT) advapi32.dll$(DLLEXT) \
kernel32.dll$(DLLEXT) ntdll.dll$(DLLEXT)
@cd comcat && $(MAKE) comcat.dll$(DLLEXT)
comctl32/comctl32.dll$(DLLEXT): dummy user32.dll$(DLLEXT) gdi32.dll$(DLLEXT) \
advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT) ntdll.dll$(DLLEXT) winmm.dll$(DLLEXT)
@cd comctl32 && $(MAKE) comctl32.dll$(DLLEXT)
......
Makefile
comcat.dll.dbg.c
comcat.spec.c
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = comcat.dll
IMPORTS = ole32 advapi32 kernel32 ntdll
EXTRALIBS = $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \
comcat_main.c \
factory.c \
manager.c \
register.c \
information.c
@MAKE_DLL_RULES@
### Dependencies:
/*
* includes for comcat.dll
*
* Copyright (C) 2002 John K. Hohm
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "ole2.h"
#include "wine/obj_base.h"
#include "wine/obj_enumguid.h"
#include "wine/obj_comcat.h"
/**********************************************************************
* Dll lifetime tracking declaration for comcat.dll
*/
extern DWORD dll_ref;
/**********************************************************************
* ClassFactory declaration for comcat.dll
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
} ClassFactoryImpl;
extern ClassFactoryImpl COMCAT_ClassFactory;
/**********************************************************************
* StdComponentCategoriesMgr declaration for comcat.dll
*/
typedef struct
{
/* IUnknown fields */
ICOM_VTABLE(IUnknown) *unkVtbl;
ICOM_VTABLE(ICatRegister) *regVtbl;
ICOM_VTABLE(ICatInformation) *infVtbl;
DWORD ref;
} ComCatMgrImpl;
extern ComCatMgrImpl COMCAT_ComCatMgr;
extern ICOM_VTABLE(ICatRegister) COMCAT_ICatRegister_Vtbl;
extern ICOM_VTABLE(ICatInformation) COMCAT_ICatInformation_Vtbl;
name comcat
@ stdcall DllCanUnloadNow() COMCAT_DllCanUnloadNow
@ stdcall DllGetClassObject(ptr ptr ptr) COMCAT_DllGetClassObject
@ stdcall DllRegisterServer() COMCAT_DllRegisterServer
@ stdcall DllUnregisterServer() COMCAT_DllUnregisterServer
/*
* exported dll functions for comcat.dll
*
* Copyright (C) 2002 John K. Hohm
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "comcat.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
DWORD dll_ref = 0;
/***********************************************************************
* DllGetClassObject (COMCAT.@)
*/
HRESULT WINAPI COMCAT_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
{
*ppv = NULL;
if (IsEqualGUID(rclsid, &CLSID_StdComponentCategoriesMgr)) {
return IClassFactory_QueryInterface((LPCLASSFACTORY)&COMCAT_ClassFactory, iid, ppv);
}
FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid));
return CLASS_E_CLASSNOTAVAILABLE;
}
/***********************************************************************
* DllCanUnloadNow (COMCAT.@)
*/
HRESULT WINAPI COMCAT_DllCanUnloadNow()
{
return dll_ref != 0 ? S_FALSE : S_OK;
}
/***********************************************************************
* DllRegisterServer (COMCAT.@)
*/
HRESULT WINAPI COMCAT_DllRegisterServer()
{
FIXME("(): stub\n");
return E_FAIL;
}
/***********************************************************************
* DllUnregisterServer (COMCAT.@)
*/
HRESULT WINAPI COMCAT_DllUnregisterServer()
{
FIXME("(): stub\n");
return E_FAIL;
}
/*
* ClassFactory implementation for comcat.dll
*
* Copyright (C) 2002 John K. Hohm
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "comcat.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
static ULONG WINAPI COMCAT_IClassFactory_AddRef(LPCLASSFACTORY iface);
/**********************************************************************
* COMCAT_IClassFactory_QueryInterface (also IUnknown)
*/
static HRESULT WINAPI COMCAT_IClassFactory_QueryInterface(
LPCLASSFACTORY iface,
REFIID riid,
LPVOID *ppvObj)
{
ICOM_THIS(ClassFactoryImpl, iface);
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER;
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IClassFactory))
{
*ppvObj = (LPVOID)iface;
COMCAT_IClassFactory_AddRef(iface);
return S_OK;
}
return E_NOINTERFACE;
}
/**********************************************************************
* COMCAT_IClassFactory_AddRef (also IUnknown)
*/
static ULONG WINAPI COMCAT_IClassFactory_AddRef(LPCLASSFACTORY iface)
{
ICOM_THIS(ClassFactoryImpl, iface);
TRACE("\n");
if (This == NULL) return E_POINTER;
if (InterlockedIncrement(&This->ref) == 1) {
InterlockedIncrement(&dll_ref);
}
return S_OK;
}
/**********************************************************************
* COMCAT_IClassFactory_Release (also IUnknown)
*/
static ULONG WINAPI COMCAT_IClassFactory_Release(LPCLASSFACTORY iface)
{
ICOM_THIS(ClassFactoryImpl, iface);
TRACE("\n");
if (This == NULL) return E_POINTER;
if (InterlockedDecrement(&This->ref) == 0) {
InterlockedDecrement(&dll_ref);
}
return S_OK;
}
/**********************************************************************
* COMCAT_IClassFactory_CreateInstance
*/
static HRESULT WINAPI COMCAT_IClassFactory_CreateInstance(
LPCLASSFACTORY iface,
LPUNKNOWN pUnkOuter,
REFIID riid,
LPVOID *ppvObj)
{
ICOM_THIS(ClassFactoryImpl, iface);
HRESULT res;
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER;
/* Don't support aggregation (Windows doesn't) */
if (pUnkOuter != NULL) return CLASS_E_NOAGGREGATION;
res = IUnknown_QueryInterface((LPUNKNOWN)&COMCAT_ComCatMgr, riid, ppvObj);
if (SUCCEEDED(res)) {
return res;
}
return CLASS_E_CLASSNOTAVAILABLE;
}
/**********************************************************************
* COMCAT_IClassFactory_LockServer
*/
static HRESULT WINAPI COMCAT_IClassFactory_LockServer(
LPCLASSFACTORY iface,
BOOL fLock)
{
TRACE("\n");
if (fLock != FALSE) {
IClassFactory_AddRef(iface);
} else {
IClassFactory_Release(iface);
}
return S_OK;
}
/**********************************************************************
* IClassFactory_Vtbl
*/
static ICOM_VTABLE(IClassFactory) IClassFactory_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
COMCAT_IClassFactory_QueryInterface,
COMCAT_IClassFactory_AddRef,
COMCAT_IClassFactory_Release,
COMCAT_IClassFactory_CreateInstance,
COMCAT_IClassFactory_LockServer
};
/**********************************************************************
* static ClassFactory instance
*/
ClassFactoryImpl COMCAT_ClassFactory = { &IClassFactory_Vtbl, 0 };
/*
* ComCatMgr ICatInformation implementation for comcat.dll
*
* Copyright (C) 2002 John K. Hohm
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "comcat.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
/**********************************************************************
* COMCAT_ICatInformation_QueryInterface
*/
static HRESULT WINAPI COMCAT_ICatInformation_QueryInterface(
LPCATINFORMATION iface,
REFIID riid,
LPVOID *ppvObj)
{
ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface);
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER;
return IUnknown_QueryInterface((LPUNKNOWN)&This->unkVtbl, riid, ppvObj);
}
/**********************************************************************
* COMCAT_ICatInformation_AddRef
*/
static ULONG WINAPI COMCAT_ICatInformation_AddRef(LPCATINFORMATION iface)
{
ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface);
TRACE("\n");
if (This == NULL) return E_POINTER;
return IUnknown_AddRef((LPUNKNOWN)&This->unkVtbl);
}
/**********************************************************************
* COMCAT_ICatInformation_Release
*/
static ULONG WINAPI COMCAT_ICatInformation_Release(LPCATINFORMATION iface)
{
ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface);
TRACE("\n");
if (This == NULL) return E_POINTER;
return IUnknown_Release((LPUNKNOWN)&This->unkVtbl);
}
/**********************************************************************
* COMCAT_ICatInformation_EnumCategories
*/
static HRESULT WINAPI COMCAT_ICatInformation_EnumCategories(
LPCATINFORMATION iface,
LCID lcid,
LPENUMCATEGORYINFO *ppenumCatInfo)
{
ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface);
FIXME("(): stub\n");
return E_NOTIMPL;
}
/**********************************************************************
* COMCAT_ICatInformation_GetCategoryDesc
*/
static HRESULT WINAPI COMCAT_ICatInformation_GetCategoryDesc(
LPCATINFORMATION iface,
REFCATID rcatid,
LCID lcid,
PWCHAR *ppszDesc)
{
ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface);
FIXME("(): stub\n");
return E_NOTIMPL;
}
/**********************************************************************
* COMCAT_ICatInformation_EnumClassesOfCategories
*/
static HRESULT WINAPI COMCAT_ICatInformation_EnumClassesOfCategories(
LPCATINFORMATION iface,
ULONG cImplemented,
CATID *rgcatidImpl,
ULONG cRequired,
CATID *rgcatidReq,
LPENUMCLSID *ppenumCLSID)
{
ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface);
FIXME("(): stub\n");
return E_NOTIMPL;
}
/**********************************************************************
* COMCAT_ICatInformation_IsClassOfCategories
*/
static HRESULT WINAPI COMCAT_ICatInformation_IsClassOfCategories(
LPCATINFORMATION iface,
REFCLSID rclsid,
ULONG cImplemented,
CATID *rgcatidImpl,
ULONG cRequired,
CATID *rgcatidReq)
{
ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface);
FIXME("(): stub\n");
return E_NOTIMPL;
}
/**********************************************************************
* COMCAT_ICatInformation_EnumImplCategoriesOfClass
*/
static HRESULT WINAPI COMCAT_ICatInformation_EnumImplCategoriesOfClass(
LPCATINFORMATION iface,
REFCLSID rclsid,
LPENUMCATID *ppenumCATID)
{
ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface);
FIXME("(): stub\n");
return E_NOTIMPL;
}
/**********************************************************************
* COMCAT_ICatInformation_EnumReqCategoriesOfClass
*/
static HRESULT WINAPI COMCAT_ICatInformation_EnumReqCategoriesOfClass(
LPCATINFORMATION iface,
REFCLSID rclsid,
LPENUMCATID *ppenumCATID)
{
ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface);
FIXME("(): stub\n");
return E_NOTIMPL;
}
/**********************************************************************
* COMCAT_ICatInformation_Vtbl
*/
ICOM_VTABLE(ICatInformation) COMCAT_ICatInformation_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
COMCAT_ICatInformation_QueryInterface,
COMCAT_ICatInformation_AddRef,
COMCAT_ICatInformation_Release,
COMCAT_ICatInformation_EnumCategories,
COMCAT_ICatInformation_GetCategoryDesc,
COMCAT_ICatInformation_EnumClassesOfCategories,
COMCAT_ICatInformation_IsClassOfCategories,
COMCAT_ICatInformation_EnumImplCategoriesOfClass,
COMCAT_ICatInformation_EnumReqCategoriesOfClass
};
/*
* ComCatMgr IUnknown implementation for comcat.dll
*
* Copyright (C) 2002 John K. Hohm
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "comcat.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
static ULONG WINAPI COMCAT_IUnknown_AddRef(LPUNKNOWN iface);
/**********************************************************************
* COMCAT_IUnknown_QueryInterface
*/
static HRESULT WINAPI COMCAT_IUnknown_QueryInterface(
LPUNKNOWN iface,
REFIID riid,
LPVOID *ppvObj)
{
ICOM_THIS_MULTI(ComCatMgrImpl, unkVtbl, iface);
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER;
if (IsEqualGUID(riid, &IID_IUnknown)) {
*ppvObj = (LPVOID)&This->unkVtbl;
COMCAT_IUnknown_AddRef(iface);
return S_OK;
}
if (IsEqualGUID(riid, &IID_ICatRegister)) {
*ppvObj = (LPVOID)&This->regVtbl;
COMCAT_IUnknown_AddRef(iface);
return S_OK;
}
if (IsEqualGUID(riid, &IID_ICatInformation)) {
*ppvObj = (LPVOID)&This->infVtbl;
COMCAT_IUnknown_AddRef(iface);
return S_OK;
}
return E_NOINTERFACE;
}
/**********************************************************************
* COMCAT_IUnknown_AddRef
*/
static ULONG WINAPI COMCAT_IUnknown_AddRef(LPUNKNOWN iface)
{
ICOM_THIS_MULTI(ComCatMgrImpl, unkVtbl, iface);
TRACE("\n");
if (This == NULL) return E_POINTER;
if (InterlockedIncrement(&This->ref) == 1) {
InterlockedIncrement(&dll_ref);
}
return S_OK;
}
/**********************************************************************
* COMCAT_IUnknown_Release
*/
static ULONG WINAPI COMCAT_IUnknown_Release(LPUNKNOWN iface)
{
ICOM_THIS_MULTI(ComCatMgrImpl, unkVtbl, iface);
TRACE("\n");
if (This == NULL) return E_POINTER;
if (InterlockedDecrement(&This->ref) == 0) {
InterlockedDecrement(&dll_ref);
}
return S_OK;
}
/**********************************************************************
* COMCAT_IUnknown_Vtbl
*/
static ICOM_VTABLE(IUnknown) COMCAT_IUnknown_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
COMCAT_IUnknown_QueryInterface,
COMCAT_IUnknown_AddRef,
COMCAT_IUnknown_Release
};
/**********************************************************************
* static ComCatMgr instance
*/
ComCatMgrImpl COMCAT_ComCatMgr =
{
&COMCAT_IUnknown_Vtbl,
&COMCAT_ICatRegister_Vtbl,
&COMCAT_ICatInformation_Vtbl,
0
};
/*
* ComCatMgr ICatRegister implementation for comcat.dll
*
* Copyright (C) 2002 John K. Hohm
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "comcat.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
/**********************************************************************
* COMCAT_ICatRegister_QueryInterface
*/
static HRESULT WINAPI COMCAT_ICatRegister_QueryInterface(
LPCATREGISTER iface,
REFIID riid,
LPVOID *ppvObj)
{
ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface);
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (This == NULL || ppvObj == NULL) return E_POINTER;
return IUnknown_QueryInterface((LPUNKNOWN)&This->unkVtbl, riid, ppvObj);
}
/**********************************************************************
* COMCAT_ICatRegister_AddRef
*/
static ULONG WINAPI COMCAT_ICatRegister_AddRef(LPCATREGISTER iface)
{
ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface);
TRACE("\n");
if (This == NULL) return E_POINTER;
return IUnknown_AddRef((LPUNKNOWN)&This->unkVtbl);
}
/**********************************************************************
* COMCAT_ICatRegister_Release
*/
static ULONG WINAPI COMCAT_ICatRegister_Release(LPCATREGISTER iface)
{
ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface);
TRACE("\n");
if (This == NULL) return E_POINTER;
return IUnknown_Release((LPUNKNOWN)&This->unkVtbl);
}
/**********************************************************************
* COMCAT_ICatRegister_RegisterCategories
*/
static HRESULT WINAPI COMCAT_ICatRegister_RegisterCategories(
LPCATREGISTER iface,
ULONG cCategories,
CATEGORYINFO *rgCategoryInfo)
{
ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface);
FIXME("(): stub\n");
return E_NOTIMPL;
}
/**********************************************************************
* COMCAT_ICatRegister_UnRegisterCategories
*/
static HRESULT WINAPI COMCAT_ICatRegister_UnRegisterCategories(
LPCATREGISTER iface,
ULONG cCategories,
CATID *rgcatid)
{
ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface);
FIXME("(): stub\n");
return E_NOTIMPL;
}
/**********************************************************************
* COMCAT_ICatRegister_RegisterClassImplCategories
*/
static HRESULT WINAPI COMCAT_ICatRegister_RegisterClassImplCategories(
LPCATREGISTER iface,
REFCLSID rclsid,
ULONG cCategories,
CATID *rgcatid)
{
ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface);
FIXME("(): stub\n");
return E_NOTIMPL;
}
/**********************************************************************
* COMCAT_ICatRegister_UnRegisterClassImplCategories
*/
static HRESULT WINAPI COMCAT_ICatRegister_UnRegisterClassImplCategories(
LPCATREGISTER iface,
REFCLSID rclsid,
ULONG cCategories,
CATID *rgcatid)
{
ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface);
FIXME("(): stub\n");
return E_NOTIMPL;
}
/**********************************************************************
* COMCAT_ICatRegister_RegisterClassReqCategories
*/
static HRESULT WINAPI COMCAT_ICatRegister_RegisterClassReqCategories(
LPCATREGISTER iface,
REFCLSID rclsid,
ULONG cCategories,
CATID *rgcatid)
{
ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface);
FIXME("(): stub\n");
return E_NOTIMPL;
}
/**********************************************************************
* COMCAT_ICatRegister_UnRegisterClassReqCategories
*/
static HRESULT WINAPI COMCAT_ICatRegister_UnRegisterClassReqCategories(
LPCATREGISTER iface,
REFCLSID rclsid,
ULONG cCategories,
CATID *rgcatid)
{
ICOM_THIS_MULTI(ComCatMgrImpl, regVtbl, iface);
FIXME("(): stub\n");
return E_NOTIMPL;
}
/**********************************************************************
* COMCAT_ICatRegister_Vtbl
*/
ICOM_VTABLE(ICatRegister) COMCAT_ICatRegister_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
COMCAT_ICatRegister_QueryInterface,
COMCAT_ICatRegister_AddRef,
COMCAT_ICatRegister_Release,
COMCAT_ICatRegister_RegisterCategories,
COMCAT_ICatRegister_UnRegisterCategories,
COMCAT_ICatRegister_RegisterClassImplCategories,
COMCAT_ICatRegister_UnRegisterClassImplCategories,
COMCAT_ICatRegister_RegisterClassReqCategories,
COMCAT_ICatRegister_UnRegisterClassReqCategories
};
......@@ -200,6 +200,18 @@
@=""
#
# Entries for COMCAT (Component Category Manager)
#
# The Component Category Manager
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{0002E005-0000-0000-C000-000000000046}]
@="StdComponentCategoriesMgr"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{0002E005-0000-0000-C000-000000000046}\InProcServer32]
@="comcat.dll"
"ThreadingModel"="Both"
#
# Entries for DirectX. Used by high-performance multimedia applications, like games.
#
......
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