Author: tfaber
Date: Fri Mar 21 11:45:30 2014
New Revision: 62541
URL:
http://svn.reactos.org/svn/reactos?rev=62541&view=rev
Log:
[COM_APITEST]
- Verify interfaces against HKLM\Software\Classes\Interface
Modified:
trunk/rostests/apitests/com/com_apitest.c
trunk/rostests/apitests/com/testlist.c
Modified: trunk/rostests/apitests/com/com_apitest.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/com_apitest.…
==============================================================================
--- trunk/rostests/apitests/com/com_apitest.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/com/com_apitest.c [iso-8859-1] Fri Mar 21 11:45:30 2014
@@ -22,219 +22,221 @@
{
const IID *iid;
PCSTR name;
+ PCWSTR wname;
+ BOOLEAN noreg;
} KNOWN_INTERFACE;
typedef const KNOWN_INTERFACE *PCKNOWN_INTERFACE;
#undef ID_NAME
-#define ID_NAME(c) { &c, #c }
+#define ID_NAME(c) &c, #c, L ## #c
static KNOWN_INTERFACE KnownInterfaces[] =
{
- ID_NAME(IID_IACList),
- ID_NAME(IID_IACList2),
- ID_NAME(IID_IADesktopP2),
- ID_NAME(IID_IAccessible),
- ID_NAME(IID_IAccessControl),
- ID_NAME(IID_IAccessor),
- ID_NAME(IID_IActiveDesktop),
- ID_NAME(IID_IActiveDesktopP),
- ID_NAME(IID_IAddressBarParser),
- ID_NAME(IID_IAddressBand),
- ID_NAME(IID_IAddressEditBox),
- ID_NAME(IID_IAugmentedShellFolder),
- ID_NAME(IID_IAugmentedShellFolder2),
- ID_NAME(IID_IAutoComplete),
- ID_NAME(IID_IAutoComplete2),
- ID_NAME(IID_IBandNavigate),
- ID_NAME(IID_IBandProxy),
- ID_NAME(IID_IBandSite),
- ID_NAME(IID_IBandSiteHelper),
- ID_NAME(IID_IBanneredBar),
- ID_NAME(IID_IBindCtx),
- ID_NAME(IID_IBrowserFrameOptions),
- ID_NAME(IID_IBrowserService),
- ID_NAME(IID_IBrowserService2),
- ID_NAME(IID_IBrowserService3),
- ID_NAME(IID_IClassFactory),
- ID_NAME(IID_IClassFactory2),
- ID_NAME(IID_IClassFactory3),
- ID_NAME(IID_IClientSecurity),
- ID_NAME(IID_IComThreadingInfo),
- ID_NAME(IID_IContext),
- ID_NAME(IID_IContextMenu),
- ID_NAME(IID_IContextMenu2),
- ID_NAME(IID_IContextMenu3),
- ID_NAME(IID_IContextMenuCB),
- ID_NAME(IID_IContextMenuSite),
- ID_NAME(IID_IContinue),
- ID_NAME(IID_IDVGetEnum),
- ID_NAME(IID_IDataObject),
- ID_NAME(IID_IDefViewID),
- ID_NAME(IID_IDefViewFrame),
- ID_NAME(IID_IDefViewFrame3),
- ID_NAME(IID_IDefViewFrameGroup),
- ID_NAME(IID_IDefViewSafety),
- ID_NAME(IID_IDefViewScript),
- ID_NAME(IID_IDeskBand),
- ID_NAME(IID_IDeskBandEx),
- ID_NAME(IID_IDeskBar),
- ID_NAME(IID_IDeskBarClient),
- ID_NAME(IID_IDeskMovr),
- ID_NAME(IID_IDispatch),
- ID_NAME(IID_IDockingWindow),
- ID_NAME(IID_IDockingWindowFrame),
- ID_NAME(IID_IDockingWindowSite),
- ID_NAME(IID_IDocViewSite),
- ID_NAME(IID_IDragSourceHelper),
- ID_NAME(IID_IDropSource),
- ID_NAME(IID_IDropTarget),
- ID_NAME(IID_IDropTargetHelper),
- ID_NAME(IID_IEnumExtraSearch),
- ID_NAME(IID_IEnumGUID),
- ID_NAME(IID_IEnumIDList),
- ID_NAME(IID_IEnumShellItems),
- ID_NAME(IID_IEnumString),
- ID_NAME(IID_IEnumUnknown),
- ID_NAME(IID_IEnumVARIANT),
- ID_NAME(IID_IErrorLog),
- ID_NAME(IID_IExplorerToolbar),
- ID_NAME(IID_IExtractIconA),
- ID_NAME(IID_IExtractIconW),
- ID_NAME(IID_IExtractImage),
- ID_NAME(IID_IExtractImage2),
- ID_NAME(IID_IFileDialog),
- ID_NAME(IID_IFileDialog2),
- ID_NAME(IID_IFileSearchBand),
- ID_NAME(IID_IFolderBandPriv),
- ID_NAME(IID_IFolderFilter),
- ID_NAME(IID_IFolderFilterSite),
- ID_NAME(IID_IFolderView),
- ID_NAME(IID_IFolderView2),
- ID_NAME(IID_IFolderViewOC),
- ID_NAME(IID_IFolderViewSettings),
- ID_NAME(IID_IGlobalFolderSettings),
- ID_NAME(IID_IInitializeObject),
- ID_NAME(IID_IInputObject),
- ID_NAME(IID_IInputObjectSite),
- ID_NAME(IID_IInternalUnknown),
- ID_NAME(IID_IMarshal),
- ID_NAME(IID_IMenuBand),
- ID_NAME(IID_IMenuPopup),
- ID_NAME(IID_IMoniker),
- ID_NAME(IID_IMultiMonitorDockingSite),
- ID_NAME(IID_IMultiQI),
- ID_NAME(IID_INamespaceProxy),
- ID_NAME(IID_INameSpaceTreeControl),
- ID_NAME(IID_INSCTree),
- ID_NAME(IID_INSCTree2),
- ID_NAME(IID_IObjMgr),
- ID_NAME(IID_IObjectSafety),
- ID_NAME(IID_IObjectWithSite),
- ID_NAME(IID_IOleCommandTarget),
- ID_NAME(IID_IOleInPlaceActiveObject),
- ID_NAME(IID_IOleInPlaceFrame),
- ID_NAME(IID_IOleInPlaceObject),
- ID_NAME(IID_IOleInPlaceObjectWindowless),
- ID_NAME(IID_IOleInPlaceSite),
- ID_NAME(IID_IOleInPlaceSiteEx),
- ID_NAME(IID_IOleInPlaceSiteWindowless),
- ID_NAME(IID_IOleInPlaceUIWindow),
- ID_NAME(IID_IOleObject),
- ID_NAME(IID_IOleWindow),
- ID_NAME(IID_IPersist),
- ID_NAME(IID_IPersistFile),
- ID_NAME(IID_IPersistFolder),
- ID_NAME(IID_IPersistFolder2),
- ID_NAME(IID_IPersistFolder3),
- ID_NAME(IID_IPersistHistory),
- ID_NAME(IID_IPersistIDList),
- ID_NAME(IID_IPersistMemory),
- ID_NAME(IID_IPersistPropertyBag),
- ID_NAME(IID_IPersistPropertyBag2),
- ID_NAME(IID_IPersistStorage),
- ID_NAME(IID_IPersistStream),
- ID_NAME(IID_IPersistStreamInit),
- ID_NAME(IID_IProgressDialog),
- ID_NAME(IID_IPropertyBag),
- ID_NAME(IID_IPropertyBag2),
- ID_NAME(IID_IQueryAssociations),
- ID_NAME(IID_IQueryInfo),
- ID_NAME(IID_IRegTreeOptions),
- ID_NAME(IID_IRunnableObject),
- ID_NAME(IID_IServerSecurity),
- ID_NAME(IID_IServiceProvider),
- ID_NAME(IID_ISFHelper),
- ID_NAME(IID_IShellBrowser),
- ID_NAME(IID_IShellBrowserService),
- ID_NAME(IID_IShellChangeNotify),
- ID_NAME(IID_IShellDesktopTray),
- ID_NAME(IID_IShellDispatch),
- ID_NAME(IID_IShellDispatch2),
- ID_NAME(IID_IShellDispatch3),
- ID_NAME(IID_IShellDispatch4),
- ID_NAME(IID_IShellDispatch5),
- ID_NAME(IID_IShellExtInit),
- ID_NAME(IID_IShellPropSheetExt),
- ID_NAME(IID_IShellIconOverlayIdentifier),
- ID_NAME(IID_IShellFolder),
- ID_NAME(IID_IShellFolder2),
- ID_NAME(IID_IShellFolderBand),
- ID_NAME(IID_IShellFolderView),
- ID_NAME(IID_IShellFolderViewCB),
- ID_NAME(IID_IShellFolderViewDual),
- ID_NAME(IID_IShellFolderViewDual2),
- ID_NAME(IID_IShellIcon),
- ID_NAME(IID_IShellItem),
- ID_NAME(IID_IShellItem2),
- ID_NAME(IID_IShellItemArray),
- ID_NAME(IID_IShellItemFilter),
- ID_NAME(IID_IShellLinkA),
- ID_NAME(IID_IShellLinkDual),
- ID_NAME(IID_IShellLinkDual2),
- ID_NAME(IID_IShellLinkW),
- ID_NAME(IID_IShellMenu),
- ID_NAME(IID_IShellMenu2),
- ID_NAME(IID_IShellMenuAcc),
- ID_NAME(IID_IShellMenuCallback),
- ID_NAME(IID_IShellNameSpace),
- ID_NAME(IID_IShellService),
- ID_NAME(IID_IShellView),
- ID_NAME(IID_IShellView2),
- ID_NAME(IID_IShellView3),
- ID_NAME(IID_IShellWindows),
- ID_NAME(IID_IStorage),
- ID_NAME(IID_IStream),
- ID_NAME(IID_ISurrogate),
- ID_NAME(IID_ISynchronize),
- ID_NAME(IID_ISynchronizeContainer),
- ID_NAME(IID_ISynchronizeEvent),
- ID_NAME(IID_ISynchronizeHandle),
- ID_NAME(IID_ITaskbarList),
- ID_NAME(IID_ITaskbarList2),
- ID_NAME(IID_ITrackShellMenu),
- ID_NAME(IID_ITrayPriv),
- ID_NAME(IID_ITrayPriv2),
- ID_NAME(IID_IUnknown),
- ID_NAME(IID_IViewObject),
- ID_NAME(IID_IViewObject2),
- ID_NAME(IID_IViewObjectEx),
- ID_NAME(IID_IWinEventHandler),
-
- ID_NAME(IID_DFConstraint),
- ID_NAME(DIID_DShellFolderViewEvents),
-
- ID_NAME(IID_CDefView),
- ID_NAME(IID_Folder),
- ID_NAME(IID_Folder2),
- ID_NAME(IID_Folder3),
- ID_NAME(IID_FolderItem),
- ID_NAME(IID_FolderItem2),
- ID_NAME(IID_FolderItems),
- ID_NAME(IID_FolderItems2),
- ID_NAME(IID_FolderItems3),
- ID_NAME(IID_FolderItemVerb),
- ID_NAME(IID_FolderItemVerbs),
-
- ID_NAME(CLSID_ShellDesktop)
+ { ID_NAME(IID_IACList), TRUE },
+ { ID_NAME(IID_IACList2), TRUE },
+ { ID_NAME(IID_IADesktopP2), TRUE },
+ { ID_NAME(IID_IAccessible) },
+ { ID_NAME(IID_IAccessControl), TRUE },
+ { ID_NAME(IID_IAccessor) },
+ { ID_NAME(IID_IActiveDesktop), TRUE },
+ { ID_NAME(IID_IActiveDesktopP), TRUE },
+ { ID_NAME(IID_IAddressBarParser), TRUE },
+ { ID_NAME(IID_IAddressBand), TRUE },
+ { ID_NAME(IID_IAddressEditBox), TRUE },
+ { ID_NAME(IID_IAugmentedShellFolder), TRUE },
+ { ID_NAME(IID_IAugmentedShellFolder2), TRUE },
+ { ID_NAME(IID_IAutoComplete), TRUE },
+ { ID_NAME(IID_IAutoComplete2), TRUE },
+ { ID_NAME(IID_IBandNavigate), TRUE },
+ { ID_NAME(IID_IBandProxy), TRUE },
+ { ID_NAME(IID_IBandSite) },
+ { ID_NAME(IID_IBandSiteHelper), TRUE },
+ { ID_NAME(IID_IBanneredBar), TRUE },
+ { ID_NAME(IID_IBindCtx) },
+ { ID_NAME(IID_IBrowserFrameOptions), TRUE },
+ { ID_NAME(IID_IBrowserService) },
+ { ID_NAME(IID_IBrowserService2), TRUE },
+ { ID_NAME(IID_IBrowserService3), TRUE },
+ { ID_NAME(IID_IClassFactory) },
+ { ID_NAME(IID_IClassFactory2) },
+ { ID_NAME(IID_IClassFactory3), TRUE },
+ { ID_NAME(IID_IClientSecurity), TRUE },
+ { ID_NAME(IID_IComThreadingInfo), TRUE },
+ { ID_NAME(IID_IContext), TRUE },
+ { ID_NAME(IID_IContextMenu), TRUE },
+ { ID_NAME(IID_IContextMenu2), TRUE },
+ { ID_NAME(IID_IContextMenu3), TRUE },
+ { ID_NAME(IID_IContextMenuCB), TRUE },
+ { ID_NAME(IID_IContextMenuSite) },
+ { ID_NAME(IID_IContinue) },
+ { ID_NAME(IID_IDVGetEnum), TRUE },
+ { ID_NAME(IID_IDataObject) },
+ //{ ID_NAME(IID_IDefViewID) }, == DefViewFrame3
+ { ID_NAME(IID_IDefViewFrame), TRUE },
+ { ID_NAME(IID_IDefViewFrame3) },
+ { ID_NAME(IID_IDefViewFrameGroup) },
+ { ID_NAME(IID_IDefViewSafety), },
+ { ID_NAME(IID_IDefViewScript), TRUE },
+ { ID_NAME(IID_IDeskBand) },
+ { ID_NAME(IID_IDeskBandEx) },
+ { ID_NAME(IID_IDeskBar), TRUE },
+ { ID_NAME(IID_IDeskBarClient), TRUE },
+ { ID_NAME(IID_IDeskMovr), TRUE },
+ { ID_NAME(IID_IDispatch) },
+ { ID_NAME(IID_IDockingWindow) },
+ { ID_NAME(IID_IDockingWindowFrame), TRUE },
+ { ID_NAME(IID_IDockingWindowSite), TRUE },
+ { ID_NAME(IID_IDocViewSite), TRUE },
+ { ID_NAME(IID_IDragSourceHelper), TRUE },
+ { ID_NAME(IID_IDropSource) },
+ { ID_NAME(IID_IDropTarget) },
+ { ID_NAME(IID_IDropTargetHelper), TRUE },
+ { ID_NAME(IID_IEnumExtraSearch) },
+ { ID_NAME(IID_IEnumGUID) },
+ { ID_NAME(IID_IEnumIDList) },
+ { ID_NAME(IID_IEnumShellItems) },
+ { ID_NAME(IID_IEnumString) },
+ { ID_NAME(IID_IEnumUnknown) },
+ { ID_NAME(IID_IEnumVARIANT) },
+ { ID_NAME(IID_IErrorLog) },
+ { ID_NAME(IID_IExplorerToolbar), TRUE },
+ { ID_NAME(IID_IExtractIconA), TRUE },
+ { ID_NAME(IID_IExtractIconW), TRUE },
+ { ID_NAME(IID_IExtractImage) },
+ { ID_NAME(IID_IExtractImage2) },
+ { ID_NAME(IID_IFileDialog) },
+ { ID_NAME(IID_IFileDialog2), TRUE },
+ { ID_NAME(IID_IFileSearchBand) },
+ { ID_NAME(IID_IFolderBandPriv) },
+ { ID_NAME(IID_IFolderFilter) },
+ { ID_NAME(IID_IFolderFilterSite) },
+ { ID_NAME(IID_IFolderView) },
+ { ID_NAME(IID_IFolderView2) },
+ { ID_NAME(IID_IFolderViewOC) },
+ { ID_NAME(IID_IFolderViewSettings) },
+ { ID_NAME(IID_IGlobalFolderSettings), TRUE },
+ { ID_NAME(IID_IInitializeObject), TRUE },
+ { ID_NAME(IID_IInputObject) },
+ { ID_NAME(IID_IInputObjectSite) },
+ { ID_NAME(IID_IInternalUnknown), TRUE },
+ { ID_NAME(IID_IMarshal) },
+ { ID_NAME(IID_IMenuBand), TRUE },
+ { ID_NAME(IID_IMenuPopup), TRUE },
+ { ID_NAME(IID_IMoniker) },
+ { ID_NAME(IID_IMultiMonitorDockingSite), TRUE },
+ { ID_NAME(IID_IMultiQI), TRUE },
+ { ID_NAME(IID_INamespaceProxy), TRUE },
+ { ID_NAME(IID_INameSpaceTreeControl), TRUE },
+ { ID_NAME(IID_INSCTree), TRUE },
+ { ID_NAME(IID_INSCTree2), TRUE },
+ { ID_NAME(IID_IObjMgr), TRUE },
+ { ID_NAME(IID_IObjectSafety) },
+ { ID_NAME(IID_IObjectWithSite) },
+ { ID_NAME(IID_IOleCommandTarget) },
+ { ID_NAME(IID_IOleInPlaceActiveObject) },
+ { ID_NAME(IID_IOleInPlaceFrame) },
+ { ID_NAME(IID_IOleInPlaceObject) },
+ { ID_NAME(IID_IOleInPlaceObjectWindowless), TRUE },
+ { ID_NAME(IID_IOleInPlaceSite) },
+ { ID_NAME(IID_IOleInPlaceSiteEx) },
+ { ID_NAME(IID_IOleInPlaceSiteWindowless), TRUE },
+ { ID_NAME(IID_IOleInPlaceUIWindow) },
+ { ID_NAME(IID_IOleObject) },
+ { ID_NAME(IID_IOleWindow) },
+ { ID_NAME(IID_IPersist) },
+ { ID_NAME(IID_IPersistFile) },
+ { ID_NAME(IID_IPersistFolder) },
+ { ID_NAME(IID_IPersistFolder2) },
+ { ID_NAME(IID_IPersistFolder3) },
+ { ID_NAME(IID_IPersistHistory) },
+ { ID_NAME(IID_IPersistIDList) },
+ { ID_NAME(IID_IPersistMemory) },
+ { ID_NAME(IID_IPersistPropertyBag) },
+ { ID_NAME(IID_IPersistPropertyBag2) },
+ { ID_NAME(IID_IPersistStorage) },
+ { ID_NAME(IID_IPersistStream) },
+ { ID_NAME(IID_IPersistStreamInit) },
+ { ID_NAME(IID_IProgressDialog), TRUE },
+ { ID_NAME(IID_IPropertyBag) },
+ { ID_NAME(IID_IPropertyBag2) },
+ { ID_NAME(IID_IQueryAssociations), TRUE },
+ { ID_NAME(IID_IQueryInfo), TRUE },
+ { ID_NAME(IID_IRegTreeOptions), TRUE },
+ { ID_NAME(IID_IRunnableObject) },
+ { ID_NAME(IID_IServerSecurity), TRUE },
+ { ID_NAME(IID_IServiceProvider) },
+ { ID_NAME(IID_ISFHelper), TRUE },
+ { ID_NAME(IID_IShellBrowser) },
+ { ID_NAME(IID_IShellBrowserService), TRUE },
+ { ID_NAME(IID_IShellChangeNotify), TRUE },
+ { ID_NAME(IID_IShellDesktopTray), TRUE },
+ { ID_NAME(IID_IShellDispatch) },
+ { ID_NAME(IID_IShellDispatch2) },
+ { ID_NAME(IID_IShellDispatch3) },
+ { ID_NAME(IID_IShellDispatch4) },
+ { ID_NAME(IID_IShellDispatch5), TRUE },
+ { ID_NAME(IID_IShellExtInit), TRUE },
+ { ID_NAME(IID_IShellPropSheetExt), TRUE },
+ { ID_NAME(IID_IShellIconOverlayIdentifier), TRUE },
+ { ID_NAME(IID_IShellFolder) },
+ { ID_NAME(IID_IShellFolder2) },
+ { ID_NAME(IID_IShellFolderBand), TRUE },
+ { ID_NAME(IID_IShellFolderView), TRUE },
+ { ID_NAME(IID_IShellFolderViewCB), TRUE },
+ { ID_NAME(IID_IShellFolderViewDual) },
+ { ID_NAME(IID_IShellFolderViewDual2) },
+ { ID_NAME(IID_IShellIcon) },
+ { ID_NAME(IID_IShellItem) },
+ { ID_NAME(IID_IShellItem2) },
+ { ID_NAME(IID_IShellItemArray) },
+ { ID_NAME(IID_IShellItemFilter) },
+ { ID_NAME(IID_IShellLinkA) },
+ { ID_NAME(IID_IShellLinkDual) },
+ { ID_NAME(IID_IShellLinkDual2) },
+ { ID_NAME(IID_IShellLinkW) },
+ { ID_NAME(IID_IShellMenu), TRUE },
+ { ID_NAME(IID_IShellMenu2), TRUE },
+ { ID_NAME(IID_IShellMenuAcc), TRUE },
+ { ID_NAME(IID_IShellMenuCallback), TRUE },
+ { ID_NAME(IID_IShellNameSpace) },
+ { ID_NAME(IID_IShellService), TRUE },
+ { ID_NAME(IID_IShellView) },
+ { ID_NAME(IID_IShellView2) },
+ { ID_NAME(IID_IShellView3) },
+ { ID_NAME(IID_IShellWindows) },
+ { ID_NAME(IID_IStorage) },
+ { ID_NAME(IID_IStream) },
+ { ID_NAME(IID_ISurrogate) },
+ { ID_NAME(IID_ISynchronize) },
+ { ID_NAME(IID_ISynchronizeContainer), TRUE },
+ { ID_NAME(IID_ISynchronizeEvent), TRUE },
+ { ID_NAME(IID_ISynchronizeHandle), TRUE },
+ { ID_NAME(IID_ITaskbarList) },
+ { ID_NAME(IID_ITaskbarList2) },
+ { ID_NAME(IID_ITrackShellMenu), TRUE },
+ { ID_NAME(IID_ITrayPriv), TRUE },
+ { ID_NAME(IID_ITrayPriv2), TRUE },
+ { ID_NAME(IID_IUnknown) },
+ { ID_NAME(IID_IViewObject) },
+ { ID_NAME(IID_IViewObject2) },
+ { ID_NAME(IID_IViewObjectEx), TRUE },
+ { ID_NAME(IID_IWinEventHandler), TRUE },
+
+ { ID_NAME(IID_DFConstraint), TRUE },
+ { ID_NAME(DIID_DShellFolderViewEvents) },
+
+ { ID_NAME(IID_CDefView), TRUE },
+ { ID_NAME(IID_Folder) },
+ { ID_NAME(IID_Folder2) },
+ { ID_NAME(IID_Folder3) },
+ { ID_NAME(IID_FolderItem) },
+ { ID_NAME(IID_FolderItem2) },
+ { ID_NAME(IID_FolderItems) },
+ { ID_NAME(IID_FolderItems2) },
+ { ID_NAME(IID_FolderItems3) },
+ { ID_NAME(IID_FolderItemVerb) },
+ { ID_NAME(IID_FolderItemVerbs) },
+
+ { ID_NAME(CLSID_ShellDesktop), TRUE }
};
static const INT KnownInterfaceCount = RTL_NUMBER_OF(KnownInterfaces);
@@ -345,7 +347,7 @@
continue;
offset = GetInterfaceOffset(pUnk, iface->iid);
#ifdef GENERATE_TABLE_ENTRIES
- ok(offset == INTF_NOT_EXPOSED, "%s: { %s%x, &%s },\n",
class->name, offset < 0 ? "-" : "", offset < 0 ? -offset :
offset, iface->name);
+ ok(offset == INTF_NOT_EXPOSED, "%s: { %s0x%x, &%s },\n",
class->name, offset < 0 ? "-" : "", offset < 0 ? -offset :
offset, iface->name);
#else
ok(offset == INTF_NOT_EXPOSED, "%s exposes %s (offset %ld), but
shouldn't\n", class->name, iface->name, offset);
#endif
@@ -495,3 +497,76 @@
CoUninitialize();
}
+
+static
+VOID
+TestInterfaceRegistry(
+ _In_ PCKNOWN_INTERFACE Interfaces,
+ _In_ INT InterfaceCount)
+{
+ INT i;
+ HKEY hKeyInterface;
+ LONG result;
+
+ result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Classes\\Interface",
0, KEY_ENUMERATE_SUB_KEYS, &hKeyInterface);
+ ok(result == NO_ERROR, "Failed to open interface key, error %lu\n",
result);
+ if (!myskip(result == NO_ERROR, "No interface key\n"))
+ {
+ for (i = 0; i < InterfaceCount; i++)
+ {
+ HKEY hKey;
+ NTSTATUS status;
+ UNICODE_STRING iid;
+ DWORD type;
+ WCHAR data[100];
+ DWORD dataSize;
+ PCKNOWN_INTERFACE iface;
+ PCWSTR expectedName;
+
+ iface = &Interfaces[i];
+ status = RtlStringFromGUID(iface->iid, &iid);
+ ok(status == STATUS_SUCCESS, "Failed to convert guid to string for %s,
status %lx\n", iface->name, status);
+ if (myskip(NT_SUCCESS(status), "No guid string\n"))
+ continue;
+
+ result = RegOpenKeyEx(hKeyInterface, iid.Buffer, 0, KEY_QUERY_VALUE,
&hKey);
+ if (iface->noreg)
+ {
+ ok(result == ERROR_FILE_NOT_FOUND, "RegOpenKeyEx returned %lu for
%s\n", result, iface->name);
+ }
+ else
+ {
+ ok(result == NO_ERROR, "Failed to open key for %s, error
%lu\n", iface->name, result);
+ (void)myskip(result == NO_ERROR, "No key\n");
+ }
+ RtlFreeUnicodeString(&iid);
+ if (result != NO_ERROR)
+ continue;
+
+ dataSize = sizeof(data);
+ result = RegQueryValueEx(hKey, NULL, NULL, &type, (PBYTE)data,
&dataSize);
+ ok(result == NO_ERROR, "Failed to query value for %s, error %lu\n",
iface->name, result);
+ if (!myskip(result == NO_ERROR, "No module name\n"))
+ {
+ ok(type == REG_SZ, "type %lu for %s\n", type, iface->name);
+ ok(dataSize % sizeof(WCHAR) == 0, "size %lu for %s\n",
dataSize, iface->name);
+ ok(dataSize <= sizeof(data), "size %lu for %s\n", dataSize,
iface->name);
+ ok(data[dataSize / sizeof(WCHAR) - 1] == UNICODE_NULL, "Not null
terminated for %s\n", iface->name);
+ expectedName = wcschr(iface->wname, L'_');
+ if (expectedName)
+ expectedName++;
+ else
+ expectedName = iface->wname;
+ ok(!wcsicmp(data, expectedName), "Name is %ls, expected %ls\n",
data, expectedName);
+ }
+
+ RegCloseKey(hKey);
+ }
+ RegCloseKey(hKeyInterface);
+ }
+}
+
+START_TEST(interfaces)
+{
+ TestInterfaceRegistry(KnownInterfaces, KnownInterfaceCount);
+}
Modified: trunk/rostests/apitests/com/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/testlist.c?r…
==============================================================================
--- trunk/rostests/apitests/com/testlist.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/com/testlist.c [iso-8859-1] Fri Mar 21 11:45:30 2014
@@ -5,6 +5,7 @@
extern void func_browseui(void);
extern void func_ieframe(void);
+extern void func_interfaces(void);
extern void func_shdocvw(void);
extern void func_shell32(void);
@@ -12,6 +13,7 @@
{
{ "browseui", func_browseui },
{ "ieframe", func_ieframe },
+ { "interfaces", func_interfaces },
{ "shdocvw", func_shdocvw },
{ "shell32", func_shell32 },