Component Categories Manager: headers, uuids

John K. Hohm jhohm at acm.org
Wed May 8 22:34:27 CDT 2002


Changelog:
John K. Hohm <jhohm at acm.org>

Beginngs of implementing The Component Categories Manager, coming soon to
a comcat.dll near you.  These definitions are enough to compile a program
using the manager, but trying to instantiate the object will fail as it is
not yet implemented.

* include/wine/obj_enumguid.h : Created; contains defs of EnumGUID

* include/wine/obj_comcat.h : Created; contains defs of CATID,
CATEGORYINFO, EnumCATEGORYINFO, ICatInformation, ICatRegister,
CLSID_StdComponentCategoriesMgr

* include/wine/comcat.h : Removed CATID def; Included wine/obj_base.h,
wine/obj_enumguid.h, wine/obj_comcat.h

* include/Makefile.in : Added wine/obj_enumguid.h, wine/obj_comcat.h

* ole/uuid.c : Included comcat.h to get UUIDs in uuid.lib equivalent

All of my contributions are licensed under the LGPL, unless explicitly
specified otherwise.
-------------- next part --------------
? include/wine/obj_comcat.h
? include/wine/obj_enumguid.h
Index: include/Makefile.in
===================================================================
RCS file: /home/wine/wine/include/Makefile.in,v
retrieving revision 1.48
diff -u -r1.48 Makefile.in
--- include/Makefile.in	5 May 2002 19:40:58 -0000	1.48
+++ include/Makefile.in	9 May 2002 03:06:15 -0000
@@ -143,6 +143,7 @@
 	wine/obj_cache.h \
 	wine/obj_channel.h \
 	wine/obj_clientserver.h \
+	wine/obj_comcat.h \
 	wine/obj_commdlgbrowser.h \
 	wine/obj_connection.h \
 	wine/obj_contextmenu.h \
@@ -150,6 +151,7 @@
 	wine/obj_dataobject.h \
 	wine/obj_dockingwindowframe.h \
 	wine/obj_dragdrop.h \
+	wine/obj_enumguid.h \
 	wine/obj_enumidlist.h \
 	wine/obj_errorinfo.h \
 	wine/obj_extracticon.h \
Index: include/comcat.h
===================================================================
RCS file: /home/wine/wine/include/comcat.h,v
retrieving revision 1.4
diff -u -r1.4 comcat.h
--- include/comcat.h	10 Mar 2002 00:02:34 -0000	1.4
+++ include/comcat.h	9 May 2002 03:06:15 -0000
@@ -28,9 +28,8 @@
 #ifndef __WINE_COMCAT_H
 #define __WINE_COMCAT_H
 
-#include "unknwn.h"
-
-typedef GUID CATID;
-typedef REFGUID REFCATID;
+#include "wine/obj_base.h"
+#include "wine/obj_enumguid.h"
+#include "wine/obj_comcat.h"
 
 #endif /*__WINE_COMCAT_H */
Index: ole/uuid.c
===================================================================
RCS file: /home/wine/wine/ole/uuid.c,v
retrieving revision 1.9
diff -u -r1.9 uuid.c
--- ole/uuid.c	2 May 2002 01:29:19 -0000	1.9
+++ ole/uuid.c	9 May 2002 03:06:15 -0000
@@ -47,6 +47,8 @@
 #include "wine/obj_queryassociations.h"
 #include "wine/obj_channel.h"
 
+#include "comcat.h"
+
 /* FIXME: cguids declares GUIDs but does not define their values */
 
 
--- /dev/null	Fri Mar 15 21:55:30 2002
+++ include/wine/obj_comcat.h	Wed May  8 21:46:59 2002
@@ -0,0 +1,163 @@
+/*
+ * Defines the COM interfaces and APIs related to Component Category Manager
+ *
+ * Depends on 'obj_enumguid.h'.
+ *
+ * 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
+ */
+
+#ifndef __WINE_WINE_OBJ_COMCAT_H
+#define __WINE_WINE_OBJ_COMCAT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* defined(__cplusplus) */
+
+/*****************************************************************************
+ * Types
+ */
+typedef GUID CATID;
+typedef REFGUID REFCATID;
+#define CATID_NULL GUID_NULL
+#define IsEqualCATID(a, b) IsEqualGUID(a, b)
+
+typedef struct tagCATEGORYINFO {
+    CATID   catid;		/* category identifier for component */
+    LCID    lcid;		/* locale identifier */
+    OLECHAR szDescription[128];	/* description of the category */
+} CATEGORYINFO, *LPCATEGORYINFO;
+
+/*****************************************************************************
+ * Aliases for EnumGUID
+ */
+#define IEnumCATID IEnumGUID
+#define LPENUMCATID LPENUMGUID
+#define IID_IEnumCATID IID_IEnumGUID
+
+#define IEnumCLSID IEnumGUID
+#define LPENUMCLSID LPENUMGUID
+#define IID_IEnumCLSID IID_IEnumGUID
+
+/*****************************************************************************
+ * Predeclare the interfaces
+ */
+DEFINE_OLEGUID(IID_ICatInformation, 0x0002E013L, 0, 0);
+typedef struct ICatInformation ICatInformation, *LPCATINFORMATION;
+
+DEFINE_OLEGUID(IID_ICatRegister, 0x0002E012L, 0, 0);
+typedef struct ICatRegister ICatRegister, *LPCATREGISTER;
+
+DEFINE_OLEGUID(IID_IEnumCATEGORYINFO, 0x0002E011L, 0, 0);
+typedef struct IEnumCATEGORYINFO IEnumCATEGORYINFO, *LPENUMCATEGORYINFO;
+
+/* The Component Category Manager */
+DEFINE_OLEGUID(CLSID_StdComponentCategoriesMgr, 0x0002E005L, 0, 0);
+
+/*****************************************************************************
+ * ICatInformation
+ */
+#define ICOM_INTERFACE ICatInformation
+#define ICatInformation_METHODS \
+    ICOM_METHOD2(HRESULT, EnumCategories, LCID, lcid, IEnumCATEGORYINFO**, ppenumCatInfo) \
+    ICOM_METHOD3(HRESULT, GetCategoryDesc, REFCATID, rcatid, LCID, lcid, PWCHAR*, ppszDesc) \
+    ICOM_METHOD5(HRESULT, EnumClassesOfCategories, ULONG, cImplemented, CATID*, rgcatidImpl, ULONG, cRequired, CATID*, rgcatidReq, IEnumCLSID**, ppenumCLSID) \
+    ICOM_METHOD5(HRESULT, IsClassOfCategories, REFCLSID, rclsid, ULONG, cImplemented, CATID*, rgcatidImpl, ULONG, cRequired, CATID*, rgcatidReq) \
+    ICOM_METHOD2(HRESULT, EnumImplCategoriesOfClass, REFCLSID, rclsid, IEnumCATID**, ppenumCATID) \
+    ICOM_METHOD2(HRESULT, EnumReqCategoriesOfClass, REFCLSID, rclsid, IEnumCATID**, ppenumCATID)
+#define ICatInformation_IMETHODS \
+    IUnknown_IMETHODS \
+    ICatInformation_METHODS
+ICOM_DEFINE(ICatInformation,IUnknown)
+#undef ICOM_INTERFACE
+
+#ifdef ICOM_CINTERFACE
+/*** IUnknown methods ***/
+#define ICatInformation_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
+#define ICatInformation_AddRef(p)             ICOM_CALL (AddRef,p)
+#define ICatInformation_Release(p)            ICOM_CALL (Release,p)
+/*** ICatInformation methods ***/
+#define ICatInformation_EnumCategories(p,a,b) ICOM_CALL2(EnumCategories,p,a,b)
+#define ICatInformation_GetCategoryDesc(p,a,b,c) ICOM_CALL3(GetCategoryDesc,p,a,b,c)
+#define ICatInformation_EnumClassesOfCategories(p,a,b,c,d,e) ICOM_CALL5(EnumClassesOfCategories,p,a,b,c,d,e)
+#define ICatInformation_IsClassOfCategories(p,a,b,c,d,e) ICOM_CALL5(IsClassOfCategories,p,a,b,c,d,e)
+#define ICatInformation_EnumImplCategoriesOfClass(p,a,b) ICOM_CALL2(EnumImplCategoriesOfClass(p,a,b)
+#define ICatInformation_EnumReqCategoriesOfClass(p,a,b) ICOM_CALL2(EnumReqCategoriesOfClass(p,a,b)
+#endif
+
+/*****************************************************************************
+ * ICatRegister
+ */
+#define ICOM_INTERFACE ICatRegister
+#define ICatRegister_METHODS \
+    ICOM_METHOD2(HRESULT, RegisterCategories, ULONG, cCategories, CATEGORYINFO*, rgCategoryInfo) \
+    ICOM_METHOD2(HRESULT, UnRegisterCategories, ULONG, cCategories, CATID*, rgcatid) \
+    ICOM_METHOD3(HRESULT, RegisterClassImplCategories, REFCLSID, rclsid, ULONG, cCategories, CATID*, rgcatid) \
+    ICOM_METHOD3(HRESULT, UnRegisterClassImplCategories, REFCLSID, rclsid, ULONG, cCategories, CATID*, rgcatid) \
+    ICOM_METHOD3(HRESULT, RegisterClassReqCategories, REFCLSID, rclsid, ULONG, cCategories, CATID*, rgcatid) \
+    ICOM_METHOD3(HRESULT, UnRegisterClassReqCategories, REFCLSID, rclsid, ULONG, cCategories, CATID*, rgcatid)
+#define ICatRegister_IMETHODS \
+    IUnknown_IMETHODS \
+    ICatRegister_METHODS
+ICOM_DEFINE(ICatRegister,IUnknown)
+#undef ICOM_INTERFACE
+
+#ifdef ICOM_CINTERFACE
+/*** IUnknown methods ***/
+#define ICatRegister_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
+#define ICatRegister_AddRef(p)             ICOM_CALL (AddRef,p)
+#define ICatRegister_Release(p)            ICOM_CALL (Release,p)
+/*** ICatRegister methods ***/
+#define ICatRegister_RegisterCategories(p,a,b) ICOM_CALL2(RegisterCategories,p,a,b)
+#define ICatRegister_UnRegisterCategories(p,a,b) ICOM_CALL2(UnRegisterCategories,p,a,b)
+#define ICatRegister_RegisterClassImplCategories(p,a,b,c) ICOM_CALL3(RegisterClassImplCategories,p,a,b,c)
+#define ICatRegister_UnRegisterClassImplCategories(p,a,b,c) ICOM_CALL3(UnRegisterClassImplCategories,p,a,b,c)
+#define ICatRegister_RegisterClassReqCategories(p,a,b,c) ICOM_CALL3(RegisterClassReqCategories,p,a,b,c)
+#define ICatRegister_UnRegisterClassReqCategories(p,a,b,c) ICOM_CALL3(UnRegisterClassReqCategories,p,a,b,c)
+#endif
+
+/*****************************************************************************
+ * IEnumCATEGORYINFO
+ */
+#define ICOM_INTERFACE IEnumCATEGORYINFO
+#define IEnumCATEGORYINFO_METHODS \
+    ICOM_METHOD3(HRESULT, Next, ULONG, celt, CATEGORYINFO*, rgelt, ULONG*, pceltFetched) \
+    ICOM_METHOD1(HRESULT, Skip, ULONG, celt) \
+    ICOM_METHOD (HRESULT, Reset) \
+    ICOM_METHOD1(HRESULT, Clone, IEnumCATEGORYINFO**, ppenum)
+#define IEnumCATEGORYINFO_IMETHODS \
+    IUnknown_IMETHODS \
+    IEnumCATEGORYINFO_METHODS
+ICOM_DEFINE(IEnumCATEGORYINFO,IUnknown)
+#undef ICOM_INTERFACE
+
+#ifdef ICOM_CINTERFACE
+/*** IUnknown methods ***/
+#define IEnumCATEGORYINFO_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
+#define IEnumCATEGORYINFO_AddRef(p)             ICOM_CALL (AddRef,p)
+#define IEnumCATEGORYINFO_Release(p)            ICOM_CALL (Release,p)
+/*** IEnumCATEGORYINFO methods ***/
+#define IEnumCATEGORYINFO_Next(p,a,b,c)         ICOM_CALL3(Next,p,a,b,c)
+#define IEnumCATEGORYINFO_Skip(p,a)             ICOM_CALL1(Skip,p,a)
+#define IEnumCATEGORYINFO_Reset(p)              ICOM_CALL(Reset,p)
+#define IEnumCATEGORYINFO_Clone(p,a)            ICOM_CALL1(Clone,p,a)
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* defined(__cplusplus) */
+
+#endif /* __WINE_WINE_OBJ_COMCAT_H */
--- /dev/null	Fri Mar 15 21:55:30 2002
+++ include/wine/obj_enumguid.h	Wed May  8 21:26:08 2002
@@ -0,0 +1,67 @@
+/*
+ * Defines the COM interfaces and APIs related to EnumGUID
+ *
+ * Depends on 'obj_base.h'.
+ *
+ * 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
+ */
+
+#ifndef __WINE_WINE_OBJ_ENUMGUID_H
+#define __WINE_WINE_OBJ_ENUMGUID_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* defined(__cplusplus) */
+
+/*****************************************************************************
+ * Predeclare the interfaces
+ */
+DEFINE_OLEGUID(IID_IEnumGUID, 0x0002E000L, 0, 0);
+typedef struct IEnumGUID IEnumGUID, *LPENUMGUID;
+
+/*****************************************************************************
+ * IEnumGUID
+ */
+#define ICOM_INTERFACE IEnumGUID
+#define IEnumGUID_METHODS \
+    ICOM_METHOD3(HRESULT, Next, ULONG, celt, GUID*, rgelt, ULONG*, pceltFetched) \
+    ICOM_METHOD1(HRESULT, Skip, ULONG, celt) \
+    ICOM_METHOD (HRESULT, Reset) \
+    ICOM_METHOD1(HRESULT, Clone, IEnumGUID**, ppenum)
+#define IEnumGUID_IMETHODS \
+    IUnknown_IMETHODS \
+    IEnumGUID_METHODS
+ICOM_DEFINE(IEnumGUID,IUnknown)
+#undef ICOM_INTERFACE
+
+#ifdef ICOM_CINTERFACE
+/*** IUnknown methods ***/
+#define IEnumGUID_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
+#define IEnumGUID_AddRef(p)             ICOM_CALL (AddRef,p)
+#define IEnumGUID_Release(p)            ICOM_CALL (Release,p)
+/*** IEnumGUID methods ***/
+#define IEnumGUID_Next(p,a,b,c)         ICOM_CALL3(Next,p,a,b,c)
+#define IEnumGUID_Skip(p,a)             ICOM_CALL1(Skip,p,a)
+#define IEnumGUID_Reset(p)              ICOM_CALL(Reset,p)
+#define IEnumGUID_Clone(p,a)            ICOM_CALL1(Clone,p,a)
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* defined(__cplusplus) */
+
+#endif /* __WINE_WINE_OBJ_ENUMGUID_H */


More information about the wine-patches mailing list