Maarten Lankhorst : browseui: Add undocumented Component Category Cache Daemon stub.
Alexandre Julliard
julliard at winehq.org
Sat Feb 16 09:57:33 CST 2008
Module: wine
Branch: master
Commit: a33ab3484e8b12f426448cedc6104d5db988a9bf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a33ab3484e8b12f426448cedc6104d5db988a9bf
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Mon Feb 11 10:18:07 2008 -0800
browseui: Add undocumented Component Category Cache Daemon stub.
---
dlls/browseui/Makefile.in | 1 +
dlls/browseui/browseui.h | 3 +
dlls/browseui/browseui_main.c | 4 +
dlls/browseui/compcatcachedaemon.c | 159 ++++++++++++++++++++++++++++++++++++
dlls/browseui/regsvr.c | 8 ++
5 files changed, 175 insertions(+), 0 deletions(-)
diff --git a/dlls/browseui/Makefile.in b/dlls/browseui/Makefile.in
index b48886d..70de186 100644
--- a/dlls/browseui/Makefile.in
+++ b/dlls/browseui/Makefile.in
@@ -10,6 +10,7 @@ EXTRADEFS = -DCOM_NO_WINDOWS_H
C_SRCS = \
aclmulti.c \
browseui_main.c \
+ compcatcachedaemon.c \
progressdlg.c \
regsvr.c
diff --git a/dlls/browseui/browseui.h b/dlls/browseui/browseui.h
index 74fd2d7..2c538d6 100644
--- a/dlls/browseui/browseui.h
+++ b/dlls/browseui/browseui.h
@@ -26,5 +26,8 @@ extern HINSTANCE BROWSEUI_hinstance;
HRESULT WINAPI ACLMulti_Constructor(IUnknown *punkOuter, IUnknown **ppOut);
HRESULT WINAPI ProgressDialog_Constructor(IUnknown *punkOuter, IUnknown **ppOut);
+HRESULT WINAPI CompCatCacheDaemon_Constructor(IUnknown *punkOuter, IUnknown **ppOut);
+
+extern const GUID CLSID_CompCatCacheDaemon;
#endif /* __WINE_SHDOCVW_H */
diff --git a/dlls/browseui/browseui_main.c b/dlls/browseui/browseui_main.c
index 8e93cf3..a7210a8 100644
--- a/dlls/browseui/browseui_main.c
+++ b/dlls/browseui/browseui_main.c
@@ -37,6 +37,9 @@
#include "browseui.h"
+#include "initguid.h"
+DEFINE_GUID(CLSID_CompCatCacheDaemon, 0x8C7461EF, 0x2b13, 0x11d2, 0xbe, 0x35, 0x30, 0x78, 0x30, 0x2c, 0x20, 0x30);
+
WINE_DEFAULT_DEBUG_CHANNEL(browseui);
LONG BROWSEUI_refCount = 0;
@@ -51,6 +54,7 @@ static const struct {
} ClassesTable[] = {
{&CLSID_ACLMulti, ACLMulti_Constructor},
{&CLSID_ProgressDialog, ProgressDialog_Constructor},
+ {&CLSID_CompCatCacheDaemon, CompCatCacheDaemon_Constructor},
{NULL, NULL}
};
diff --git a/dlls/browseui/compcatcachedaemon.c b/dlls/browseui/compcatcachedaemon.c
new file mode 100644
index 0000000..755fd8d
--- /dev/null
+++ b/dlls/browseui/compcatcachedaemon.c
@@ -0,0 +1,159 @@
+/*
+ * Component Category Cache 'Daemon'
+ *
+ * Copyright (C) 2008 Maarten Lankhorst
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+
+#include <stdarg.h>
+
+#define COBJMACROS
+
+#include "wine/debug.h"
+#include "windef.h"
+#include "winbase.h"
+#include "winreg.h"
+#include "winuser.h"
+#include "shlwapi.h"
+#include "winerror.h"
+#include "objbase.h"
+
+#include "shlguid.h"
+#include "shlobj.h"
+
+#include "wine/unicode.h"
+
+#include "browseui.h"
+#include "resids.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(browseui);
+
+typedef struct tagCCCD {
+ const IRunnableTaskVtbl *vtbl;
+ LONG refCount;
+ CRITICAL_SECTION cs;
+} CompCatCacheDaemon;
+
+static const IRunnableTaskVtbl CompCatCacheDaemonVtbl;
+
+HRESULT WINAPI CompCatCacheDaemon_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
+{
+ CompCatCacheDaemon *This;
+ if (pUnkOuter)
+ return CLASS_E_NOAGGREGATION;
+
+ This = CoTaskMemAlloc(sizeof(CompCatCacheDaemon));
+ if (This == NULL)
+ return E_OUTOFMEMORY;
+ ZeroMemory(This, sizeof(*This));
+ This->vtbl = &CompCatCacheDaemonVtbl;
+ This->refCount = 1;
+ InitializeCriticalSection(&This->cs);
+
+ TRACE("returning %p\n", This);
+ *ppOut = (IUnknown *)This;
+ BROWSEUI_refCount++;
+ return S_OK;
+}
+
+static void CompCatCacheDaemon_Destructor(CompCatCacheDaemon *This)
+{
+ TRACE("destroying %p\n", This);
+ DeleteCriticalSection(&This->cs);
+ CoTaskMemFree(This);
+ BROWSEUI_refCount--;
+}
+
+static HRESULT WINAPI CompCatCacheDaemon_QueryInterface(IRunnableTask *iface, REFIID iid, LPVOID *ppvOut)
+{
+ CompCatCacheDaemon *This = (CompCatCacheDaemon *)iface;
+ *ppvOut = NULL;
+
+ if (IsEqualIID(iid, &IID_IRunnableTask) || IsEqualIID(iid, &IID_IUnknown))
+ {
+ *ppvOut = This;
+ }
+
+ if (*ppvOut)
+ {
+ IRunnableTask_AddRef(iface);
+ return S_OK;
+ }
+
+ FIXME("unsupported interface: %s\n", debugstr_guid(iid));
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI CompCatCacheDaemon_AddRef(IRunnableTask *iface)
+{
+ CompCatCacheDaemon *This = (CompCatCacheDaemon *)iface;
+ return InterlockedIncrement(&This->refCount);
+}
+
+static ULONG WINAPI CompCatCacheDaemon_Release(IRunnableTask *iface)
+{
+ CompCatCacheDaemon *This = (CompCatCacheDaemon *)iface;
+ ULONG ret;
+
+ ret = InterlockedDecrement(&This->refCount);
+ if (ret == 0)
+ CompCatCacheDaemon_Destructor(This);
+ return ret;
+}
+
+static HRESULT WINAPI CompCatCacheDaemon_Run(IRunnableTask *iface)
+{
+ FIXME("stub\n");
+ return S_OK;
+}
+
+static HRESULT WINAPI CompCatCacheDaemon_Kill(IRunnableTask *iface, BOOL fWait)
+{
+ FIXME("stub\n");
+ return S_OK;
+}
+
+static HRESULT WINAPI CompCatCacheDaemon_Suspend(IRunnableTask *iface)
+{
+ FIXME("stub\n");
+ return S_OK;
+}
+
+static HRESULT WINAPI CompCatCacheDaemon_Resume(IRunnableTask *iface)
+{
+ FIXME("stub\n");
+ return S_OK;
+}
+
+static ULONG WINAPI CompCatCacheDaemon_IsRunning(IRunnableTask *iface)
+{
+ FIXME("stub\n");
+ return 0;
+}
+
+static const IRunnableTaskVtbl CompCatCacheDaemonVtbl =
+{
+ CompCatCacheDaemon_QueryInterface,
+ CompCatCacheDaemon_AddRef,
+ CompCatCacheDaemon_Release,
+ CompCatCacheDaemon_Run,
+ CompCatCacheDaemon_Kill,
+ CompCatCacheDaemon_Suspend,
+ CompCatCacheDaemon_Resume,
+ CompCatCacheDaemon_IsRunning
+};
diff --git a/dlls/browseui/regsvr.c b/dlls/browseui/regsvr.c
index 5019f21..746e20b 100644
--- a/dlls/browseui/regsvr.c
+++ b/dlls/browseui/regsvr.c
@@ -30,6 +30,7 @@
#include "ole2.h"
#include "shlguid.h"
+#include "browseui.h"
#include "wine/debug.h"
@@ -454,6 +455,13 @@ static struct regsvr_coclass const coclass_list[] = {
"browseui.dll",
"Both"
},
+ {
+ &CLSID_CompCatCacheDaemon,
+ "Component Catagory Cache Daemon",
+ NULL,
+ "browseui.dll",
+ "Both"
+ },
{ NULL } /* list terminator */
};
More information about the wine-cvs
mailing list