Author: akhaldi
Date: Sun Feb 26 20:35:07 2017
New Revision: 73986
URL:
http://svn.reactos.org/svn/reactos?rev=73986&view=rev
Log:
[WSHOM_WINETEST] Sync with Wine Staging 2.2. CORE-12823
Modified:
trunk/rostests/winetests/wshom/wshom.c
trunk/rostests/winetests/wshom/wshom.idl
Modified: trunk/rostests/winetests/wshom/wshom.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wshom/wshom.c?r…
==============================================================================
--- trunk/rostests/winetests/wshom/wshom.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/wshom/wshom.c [iso-8859-1] Sun Feb 26 20:35:07 2017
@@ -33,6 +33,31 @@
#define EXPECT_HR(hr,hr_exp) \
ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp)
+
+#define test_provideclassinfo(a, b) _test_provideclassinfo((IDispatch*)a, b, __LINE__)
+static void _test_provideclassinfo(IDispatch *disp, const GUID *guid, int line)
+{
+ IProvideClassInfo *classinfo;
+ TYPEATTR *attr;
+ ITypeInfo *ti;
+ HRESULT hr;
+
+ hr = IDispatch_QueryInterface(disp, &IID_IProvideClassInfo, (void
**)&classinfo);
+ ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#x.\n",
hr);
+
+ hr = IProvideClassInfo_GetClassInfo(classinfo, &ti);
+ ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#x.\n", hr);
+
+ hr = ITypeInfo_GetTypeAttr(ti, &attr);
+ ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#x.\n", hr);
+
+ ok_(__FILE__,line) (IsEqualGUID(&attr->guid, guid), "Unexpected typeinfo
%s, expected %s\n", wine_dbgstr_guid(&attr->guid),
+ wine_dbgstr_guid(guid));
+
+ IProvideClassInfo_Release(classinfo);
+ ITypeInfo_ReleaseTypeAttr(ti, attr);
+ ITypeInfo_Release(ti);
+}
static void test_wshshell(void)
{
@@ -69,10 +94,11 @@
hr = IDispatch_QueryInterface(disp, &IID_IWshShell3, (void**)&shell);
EXPECT_HR(hr, S_OK);
- IDispatch_Release(disp);
+ test_provideclassinfo(disp, &IID_IWshShell3);
hr = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
EXPECT_HR(hr, E_NOINTERFACE);
+ IDispatch_Release(disp);
hr = IUnknown_QueryInterface(shell, &IID_IWshShell3, (void**)&sh3);
EXPECT_HR(hr, S_OK);
@@ -90,6 +116,7 @@
hr = IWshShell3_get_SpecialFolders(sh3, &coll);
EXPECT_HR(hr, S_OK);
+ test_provideclassinfo(coll, &IID_IWshCollection);
hr = IWshCollection_QueryInterface(coll, &IID_IFolderCollection,
(void**)&folders);
EXPECT_HR(hr, E_NOINTERFACE);
@@ -131,6 +158,7 @@
SysFreeString(str);
hr = IDispatch_QueryInterface(shortcut, &IID_IWshShortcut, (void**)&shcut);
EXPECT_HR(hr, S_OK);
+ test_provideclassinfo(shortcut, &IID_IWshShortcut);
hr = IWshShortcut_get_Arguments(shcut, NULL);
ok(hr == E_POINTER, "got 0x%08x\n", hr);
@@ -158,6 +186,7 @@
hr = IWshEnvironment_get_Item(env, NULL, NULL);
ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ test_provideclassinfo(env, &IID_IWshEnvironment);
ret = (BSTR)0x1;
hr = IWshEnvironment_get_Item(env, NULL, &ret);
Modified: trunk/rostests/winetests/wshom/wshom.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wshom/wshom.idl…
==============================================================================
--- trunk/rostests/winetests/wshom/wshom.idl [iso-8859-1] (original)
+++ trunk/rostests/winetests/wshom/wshom.idl [iso-8859-1] Sun Feb 26 20:35:07 2017
@@ -663,4 +663,12 @@
coclass WshNetwork {
[default] interface IWshNetwork2;
}
+
+ [
+ uuid(08fed191-be19-11d3-a28b-00104bd35090),
+ threading(apartment)
+ ]
+ coclass WshExec {
+ [default] interface IWshExec;
+ }
}