Changelog: John K. Hohm <jhohm@acm.org> comcat.dll with factory and manager but E_NOTIMPL work methods NOTE to Alexandre: Are you comfortable with the size and frequency of my comcat patches? I could break them up or batch them if not.
? dlls/comcat Index: configure =================================================================== RCS file: /home/wine/wine/configure,v retrieving revision 1.295 diff -u -r1.295 configure --- configure 12 May 2002 03:16:39 -0000 1.295 +++ configure 14 May 2002 01:23:50 -0000 @@ -12873,7 +12873,7 @@ MAKE_PROG_RULES=programs/Makeprog.rules -ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules programs/Makeprog.rules Makefile controls/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 files/Makefile graphics/Makefile graphics/x11drv/Makefile if1632/Makefile include/Makefile library/Makefile libtest/Makefile loader/Makefile loader/ne/Makefile memory/Makefile misc/Makefile miscemu/Makefile msdos/Makefile objects/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 relay32/Makefile scheduler/Makefile server/Makefile tools/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile win32/Makefile windows/Makefile" +ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules programs/Makeprog.rules Makefile controls/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 files/Makefile graphics/Makefile graphics/x11drv/Makefile if1632/Makefile include/Makefile library/Makefile libtest/Makefile loader/Makefile loader/ne/Makefile memory/Makefile misc/Makefile miscemu/Makefile msdos/Makefile objects/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 relay32/Makefile scheduler/Makefile server/Makefile tools/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile win32/Makefile windows/Makefile" cat >confcache <<\_ACEOF @@ -13360,6 +13360,7 @@ "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" ;; Index: configure.ac =================================================================== RCS file: /home/wine/wine/configure.ac,v retrieving revision 1.37 diff -u -r1.37 configure.ac --- configure.ac 12 May 2002 03:16:39 -0000 1.37 +++ configure.ac 14 May 2002 01:23:50 -0000 @@ -1288,6 +1288,7 @@ dlls/advapi32/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile +dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile Index: winedefault.reg =================================================================== RCS file: /home/wine/wine/winedefault.reg,v retrieving revision 1.43 diff -u -r1.43 winedefault.reg --- winedefault.reg 2 May 2002 01:29:18 -0000 1.43 +++ winedefault.reg 14 May 2002 01:23:51 -0000 @@ -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. # Index: dlls/Makefile.in =================================================================== RCS file: /home/wine/wine/dlls/Makefile.in,v retrieving revision 1.127 diff -u -r1.127 Makefile.in --- dlls/Makefile.in 2 May 2002 01:29:18 -0000 1.127 +++ dlls/Makefile.in 14 May 2002 01:23:51 -0000 @@ -19,6 +19,7 @@ advapi32 \ avicap32 \ avifil32 \ + comcat \ comctl32 \ commdlg \ crtdll \ @@ -111,6 +112,7 @@ 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 @@ 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) $@ @@ -520,6 +525,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 winmm.dll$(DLLEXT) user32.dll$(DLLEXT) \ gdi32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT) ntdll.dll$(DLLEXT) diff -Nu /home/jhohm/emptydir/.cvsignore dlls/comcat/.cvsignore --- /home/jhohm/emptydir/.cvsignore Wed Dec 31 18:00:00 1969 +++ dlls/comcat/.cvsignore Sat May 11 00:14:21 2002 @@ -0,0 +1,2 @@ +Makefile +comcat.spec.c \ No newline at end of file diff -Nu /home/jhohm/emptydir/Makefile.in dlls/comcat/Makefile.in --- /home/jhohm/emptydir/Makefile.in Wed Dec 31 18:00:00 1969 +++ dlls/comcat/Makefile.in Sat May 11 15:04:50 2002 @@ -0,0 +1,21 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = comcat.dll +IMPORTS = ole32.dll advapi32.dll kernel32.dll ntdll.dll +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: diff -Nu /home/jhohm/emptydir/comcat.h dlls/comcat/comcat.h --- /home/jhohm/emptydir/comcat.h Wed Dec 31 18:00:00 1969 +++ dlls/comcat/comcat.h Sat May 11 12:48:31 2002 @@ -0,0 +1,61 @@ +/* + * 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; diff -Nu /home/jhohm/emptydir/comcat.spec dlls/comcat/comcat.spec --- /home/jhohm/emptydir/comcat.spec Wed Dec 31 18:00:00 1969 +++ dlls/comcat/comcat.spec Sat May 11 00:29:40 2002 @@ -0,0 +1,9 @@ +name comcat +type win32 + +debug_channels (ole) + +@ stdcall DllCanUnloadNow() COMCAT_DllCanUnloadNow +@ stdcall DllGetClassObject(ptr ptr ptr) COMCAT_DllGetClassObject +@ stdcall DllRegisterServer() COMCAT_DllRegisterServer +@ stdcall DllUnregisterServer() COMCAT_DllUnregisterServer diff -Nu /home/jhohm/emptydir/comcat_main.c dlls/comcat/comcat_main.c --- /home/jhohm/emptydir/comcat_main.c Wed Dec 31 18:00:00 1969 +++ dlls/comcat/comcat_main.c Sat May 11 23:13:36 2002 @@ -0,0 +1,68 @@ +/* + * 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; +} diff -Nu /home/jhohm/emptydir/factory.c dlls/comcat/factory.c --- /home/jhohm/emptydir/factory.c Wed Dec 31 18:00:00 1969 +++ dlls/comcat/factory.c Mon May 13 20:16:26 2002 @@ -0,0 +1,144 @@ +/* + * 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 }; diff -Nu /home/jhohm/emptydir/information.c dlls/comcat/information.c --- /home/jhohm/emptydir/information.c Wed Dec 31 18:00:00 1969 +++ dlls/comcat/information.c Sat May 11 23:46:15 2002 @@ -0,0 +1,175 @@ +/* + * 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 +}; diff -Nu /home/jhohm/emptydir/manager.c dlls/comcat/manager.c --- /home/jhohm/emptydir/manager.c Wed Dec 31 18:00:00 1969 +++ dlls/comcat/manager.c Mon May 13 20:16:39 2002 @@ -0,0 +1,115 @@ +/* + * 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 +}; diff -Nu /home/jhohm/emptydir/register.c dlls/comcat/register.c --- /home/jhohm/emptydir/register.c Wed Dec 31 18:00:00 1969 +++ dlls/comcat/register.c Sat May 11 23:46:54 2002 @@ -0,0 +1,172 @@ +/* + * 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 +};