https://git.reactos.org/?p=reactos.git;a=commitdiff;h=821b39951659392a9517e…
commit 821b39951659392a9517e5c5ecd3e732eeb90703
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Thu Aug 26 23:24:27 2021 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Sep 5 16:39:57 2021 +0200
[COM_APITEST] Add mmc/certmgr tests
CORE-16429
---
modules/rostests/apitests/com/CMakeLists.txt | 1 +
modules/rostests/apitests/com/certmgr.c | 39 ++++++++++++++++++++++++++++
modules/rostests/apitests/com/com_apitest.c | 19 ++++++++++++++
modules/rostests/apitests/com/com_apitest.h | 23 ++++++++++++++++
modules/rostests/apitests/com/testlist.c | 2 ++
5 files changed, 84 insertions(+)
diff --git a/modules/rostests/apitests/com/CMakeLists.txt
b/modules/rostests/apitests/com/CMakeLists.txt
index 865e71c3c16..8451eff8ecc 100644
--- a/modules/rostests/apitests/com/CMakeLists.txt
+++ b/modules/rostests/apitests/com/CMakeLists.txt
@@ -3,6 +3,7 @@ add_definitions(-DWINE_NO_UNICODE_MACROS)
list(APPEND SOURCE
browseui.c
+ certmgr.c
com_apitest.c
ieframe.c
netcfgx.c
diff --git a/modules/rostests/apitests/com/certmgr.c
b/modules/rostests/apitests/com/certmgr.c
new file mode 100644
index 00000000000..5807c2219b2
--- /dev/null
+++ b/modules/rostests/apitests/com/certmgr.c
@@ -0,0 +1,39 @@
+/*
+ * PROJECT: ReactOS API tests
+ * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
+ * PURPOSE: COM interface test for certmgr classes
+ * COPYRIGHT: Copyright 2021 Mark Jansen <mark.jansen(a)reactos.org>
+ */
+
+#include "com_apitest.h"
+
+#define NDEBUG
+#include <debug.h>
+
+static const CLASS_AND_INTERFACES ExpectedInterfaces[] =
+{
+ {
+ ID_NAME(CLSID_CERTMGR_CertMgrAboutObject_1),
+ {
+ { 0x0, &IID_ISnapInAbout },
+ { 0x0, &IID_IUnknown },
+ },
+ L"both"
+ },
+ {
+ ID_NAME(CLSID_CERTMGR_CertMgrObject_1),
+ {
+ { -0x1c, &IID_IComponentData },
+ { 0x0, &IID_IExtendPropertySheet },
+ { 0x0, &IID_IUnknown },
+ { 0x4, &IID_IPersistStream },
+ },
+ L"both"
+ },
+};
+static const INT ExpectedInterfaceCount = RTL_NUMBER_OF(ExpectedInterfaces);
+
+START_TEST(certmgr)
+{
+ TestClasses(L"certmgr", ExpectedInterfaces, ExpectedInterfaceCount);
+}
diff --git a/modules/rostests/apitests/com/com_apitest.c
b/modules/rostests/apitests/com/com_apitest.c
index 769cf0f4ebd..66d22ada9b2 100644
--- a/modules/rostests/apitests/com/com_apitest.c
+++ b/modules/rostests/apitests/com/com_apitest.c
@@ -488,6 +488,25 @@ static KNOWN_INTERFACE KnownInterfaces[] =
{ ID_NAME(IID_IPinnedListOld), TRUE },
{ ID_NAME(IID_IPinnedList), TRUE },
{ ID_NAME(IID_IAttachmentExecute), TRUE },
+
+ // + MMC stuff
+ { ID_NAME(IID_IComponentData), TRUE },
+ { ID_NAME(IID_IConsole), TRUE },
+ { ID_NAME(IID_IConsole2), TRUE },
+ { ID_NAME(IID_IConsoleNameSpace), TRUE },
+ { ID_NAME(IID_IConsoleNameSpace2), TRUE },
+ { ID_NAME(IID_IPropertySheetCallback), TRUE },
+ { ID_NAME(IID_IPropertySheetProvider), TRUE },
+ { ID_NAME(IID_IExtendPropertySheet), TRUE },
+ { ID_NAME(IID_IExtendPropertySheet2), TRUE },
+ { ID_NAME(IID_IHeaderCtrl), TRUE },
+ { ID_NAME(IID_IToolbar), TRUE },
+ { ID_NAME(IID_IImageList_mmc), TRUE },
+ { ID_NAME(IID_IConsoleVerb), TRUE },
+ { ID_NAME(IID_ISnapInAbout), TRUE },
+ // - MMC stuff
+
+ { ID_NAME(IID_ICertificateManager), TRUE },
};
static const INT KnownInterfaceCount = RTL_NUMBER_OF(KnownInterfaces);
diff --git a/modules/rostests/apitests/com/com_apitest.h
b/modules/rostests/apitests/com/com_apitest.h
index 5d93bfd14f1..d4b208db94c 100644
--- a/modules/rostests/apitests/com/com_apitest.h
+++ b/modules/rostests/apitests/com/com_apitest.h
@@ -195,5 +195,28 @@ DEFINE_GUID(CLSID_ZipFolderContextMenu, 0xb8cdcb65, 0xb1bf,
0x4b42, 0x94, 0x2
DEFINE_GUID(CLSID_ZipFolderRightDragHandler,0xbd472f60, 0x27fa, 0x11cf, 0xb8, 0xb4, 0x44,
0x45, 0x53, 0x54, 0x00, 0x00);
DEFINE_GUID(CLSID_ZipFolderDropHandler, 0xed9d80b9, 0xd157, 0x457b, 0x91, 0x92, 0x0e,
0x72, 0x80, 0x31, 0x3b, 0xf0);
+// certmgr.dll
+DEFINE_GUID(CLSID_CERTMGR_CertMgrAboutObject_1, 0x69A25C12, 0x1811, 0x11D2, 0xA5, 0x2B,
0x00, 0x00, 0xF8, 0x03, 0xA9, 0x51);
+DEFINE_GUID(CLSID_CERTMGR_CertMgrObject_1, 0x53D6AB1D, 0x2488, 0x11D1, 0xA2, 0x8C, 0x00,
0xC0, 0x4F, 0xB9, 0x4F, 0x17);
+DEFINE_GUID(IID_ICertificateManager, 0x53D6AB1B, 0x2488, 0x11D1, 0xA2, 0x8C, 0x00,
0xC0, 0x4F, 0xB9, 0x4F, 0x17);
+
+// mmc
+DEFINE_GUID(IID_IComponentData, 0x955ab28a, 0x5218, 0x11d0, 0xa9, 0x85, 0x00,
0xc0, 0x4f, 0xd8, 0xd5, 0x65);
+DEFINE_GUID(IID_IConsole, 0x43136eb1, 0xd36c, 0x11cf, 0xad, 0xbc, 0x00,
0xaa, 0x00, 0xa8, 0x00, 0x33);
+DEFINE_GUID(IID_IConsole2, 0x103d842a, 0xaa63, 0x11d1, 0xa7, 0xe1, 0x00,
0xc0, 0x4f, 0xd8, 0xd5, 0x65);
+DEFINE_GUID(IID_IConsoleNameSpace, 0xbedeb620, 0xf24d, 0x11cf, 0x8a, 0xfc, 0x00,
0xaa, 0x00, 0x3c, 0xa9, 0xf6);
+DEFINE_GUID(IID_IConsoleNameSpace2, 0x255f18cc, 0x65db, 0x11d1, 0xa7, 0xdc, 0x00,
0xc0, 0x4f, 0xd8, 0xd5, 0x65);
+DEFINE_GUID(IID_IPropertySheetCallback, 0x85de64dd, 0xef21, 0x11cf, 0xa2, 0x85, 0x00,
0xc0, 0x4f, 0xd8, 0xdb, 0xe6);
+DEFINE_GUID(IID_IPropertySheetProvider, 0x85de64de, 0xef21, 0x11cf, 0xa2, 0x85, 0x00,
0xc0, 0x4f, 0xd8, 0xdb, 0xe6);
+DEFINE_GUID(IID_IExtendPropertySheet, 0x85de64dc, 0xef21, 0x11cf, 0xa2, 0x85, 0x00,
0xc0, 0x4f, 0xd8, 0xdb, 0xe6);
+DEFINE_GUID(IID_IExtendPropertySheet2, 0xb7a87232, 0x4a51, 0x11d1, 0xa7, 0xea, 0x00,
0xc0, 0x4f, 0xd9, 0x09, 0xdd);
+DEFINE_GUID(IID_IHeaderCtrl, 0x43136eb3, 0xd36c, 0x11cf, 0xad, 0xbc, 0x00,
0xaa, 0x00, 0xa8, 0x00, 0x33);
+DEFINE_GUID(IID_IToolbar, 0x43136eb9, 0xd36c, 0x11cf, 0xad, 0xbc, 0x00,
0xaa, 0x00, 0xa8, 0x00, 0x33);
+DEFINE_GUID(IID_IImageList_mmc, 0x43136eb8, 0xd36c, 0x11cf, 0xad, 0xbc, 0x00,
0xaa, 0x00, 0xa8, 0x00, 0x33); // Should not be '_mmc', but we clash with
commoncontrols otherwise!
+DEFINE_GUID(IID_IConsoleVerb, 0xe49f7a60, 0x74af, 0x11d0, 0xa2, 0x86, 0x00,
0xc0, 0x4f, 0xd8, 0xfe, 0x93);
+DEFINE_GUID(IID_ISnapInAbout, 0x1245208c, 0xa151, 0x11d0, 0xa7, 0xd7, 0x00,
0xc0, 0x4f, 0xd9, 0x09, 0xdd);
+
+
+
#endif /* _COM_APITEST_H_ */
diff --git a/modules/rostests/apitests/com/testlist.c
b/modules/rostests/apitests/com/testlist.c
index 020440467ae..d653b087b4b 100644
--- a/modules/rostests/apitests/com/testlist.c
+++ b/modules/rostests/apitests/com/testlist.c
@@ -4,6 +4,7 @@
#include <apitest.h>
extern void func_browseui(void);
+extern void func_certmgr(void);
extern void func_ieframe(void);
extern void func_interfaces(void);
extern void func_netcfgx(void);
@@ -16,6 +17,7 @@ extern void func_zipfldr(void);
const struct test winetest_testlist[] =
{
{ "browseui", func_browseui },
+ { "certmgr", func_certmgr },
{ "ieframe", func_ieframe },
{ "interfaces", func_interfaces },
{ "netcfgx", func_netcfgx },