Author: akhaldi
Date: Tue Apr 22 21:18:59 2014
New Revision: 62894
URL:
http://svn.reactos.org/svn/reactos?rev=62894&view=rev
Log:
[HLINK_WINETEST]
* Sync with Wine 1.7.17.
CORE-8080
Modified:
trunk/rostests/winetests/hlink/hlink.c
Modified: trunk/rostests/winetests/hlink/hlink.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/hlink/hlink.c?r…
==============================================================================
--- trunk/rostests/winetests/hlink/hlink.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/hlink/hlink.c [iso-8859-1] Tue Apr 22 21:18:59 2014
@@ -79,18 +79,6 @@
DEFINE_GUID(IID_IHlinkHistory,0x79eac9c8,0xbaf9,0x11ce,0x8c,0x82,0x00,0xaa,0x00,0x4b,0xa9,0x0b);
-static const char *debugstr_guid(REFIID riid)
-{
- static char buf[50];
-
- sprintf(buf, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
- riid->Data1, riid->Data2, riid->Data3, riid->Data4[0],
- riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4],
- riid->Data4[5], riid->Data4[6], riid->Data4[7]);
-
- return buf;
-}
-
static void test_HlinkIsShortcut(void)
{
UINT i;
@@ -638,6 +626,8 @@
static const WCHAR clsid_nameW[] =
{'c','l','s','i','d',':',
'2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-','A','2','D','8',
'-','0','8','0','0','2','B','3','0','3','0','9','D',':',0};
+ static const WCHAR file_urlW[] =
+
{'f','i','l','e',':','/','/','/','c',':','\\','f','i','l','e','.','t','x','t',0};
CreateBindCtx(0, &bctx);
@@ -669,7 +659,7 @@
IMoniker_Release(mon);
hres = HlinkParseDisplayName(bctx, invalid_urlW, FALSE, &eaten, &mon);
- ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres);
+ ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres);
ok(eaten == sizeof(invalid_urlW)/sizeof(WCHAR)-1, "eaten=%d\n", eaten);
ok(mon != NULL, "mon == NULL\n");
@@ -683,6 +673,22 @@
ok(issys == MKSYS_FILEMONIKER, "issys=%x\n", issys);
IMoniker_Release(mon);
+
+ hres = HlinkParseDisplayName(bctx, file_urlW, FALSE, &eaten, &mon);
+ ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres);
+ ok(eaten == sizeof(file_urlW)/sizeof(WCHAR)-1, "eaten=%d\n", eaten);
+ ok(mon != NULL, "mon == NULL\n");
+
+ hres = IMoniker_GetDisplayName(mon, bctx, 0, &name);
+ ok(hres == S_OK, "GetDiasplayName failed: %08x\n", hres);
+ ok(!lstrcmpW(name, file_urlW+8), "wrong display name %s\n",
wine_dbgstr_w(name));
+ CoTaskMemFree(name);
+
+ hres = IMoniker_IsSystemMoniker(mon, &issys);
+ ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres);
+ ok(issys == MKSYS_FILEMONIKER, "issys=%x\n", issys);
+
+ IMoniker_Release(mon);
IBindCtx_Release(bctx);
}
@@ -707,7 +713,7 @@
static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface,
REFGUID guidService, REFIID riid, void **ppv)
{
- ok(0, "unexpected service %s\n", debugstr_guid(guidService));
+ ok(0, "unexpected service %s\n", wine_dbgstr_guid(guidService));
return E_NOINTERFACE;
}
@@ -729,7 +735,7 @@
return S_OK;
}
- ok(0, "unexpected interface %s\n", debugstr_guid(riid));
+ ok(0, "unexpected interface %s\n", wine_dbgstr_guid(riid));
return E_NOINTERFACE;
}
@@ -820,7 +826,7 @@
return E_NOINTERFACE;
}
- ok(0, "unexpected interface: %s\n", debugstr_guid(riid));
+ ok(0, "unexpected interface: %s\n", wine_dbgstr_guid(riid));
return E_NOINTERFACE;
}
@@ -964,7 +970,7 @@
return S_OK;
}
- ok(0, "unexpected interface: %s\n", debugstr_guid(riid));
+ ok(0, "unexpected interface: %s\n", wine_dbgstr_guid(riid));
return E_NOINTERFACE;
}
@@ -1037,7 +1043,7 @@
{
*ppv = NULL;
- ok(0, "unexpected riid: %s\n", debugstr_guid(riid));
+ ok(0, "unexpected riid: %s\n", wine_dbgstr_guid(riid));
return E_NOINTERFACE;
}
@@ -1089,7 +1095,7 @@
ok(pbc != _bctx, "pbc != _bctx\n");
ok(pmkToLeft == NULL, "pmkToLeft = %p\n", pmkToLeft);
- ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n",
debugstr_guid(riid));
+ ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n",
wine_dbgstr_guid(riid));
ok(ppv != NULL, "ppv == NULL\n");
ok(*ppv == NULL, "*ppv = %p\n", *ppv);
@@ -1109,7 +1115,7 @@
ok(pbc == _bctx, "pbc != _bctx\n");
ok(pmkToLeft == NULL, "pmkToLeft=%p\n", pmkToLeft);
- ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n",
debugstr_guid(riid));
+ ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n",
wine_dbgstr_guid(riid));
ok(ppv != NULL, "ppv == NULL\n");
ok(*ppv == NULL, "*ppv=%p\n", *ppv);
@@ -1719,8 +1725,8 @@
}
}
-static WCHAR site_monikerW[] =
{'S','I','T','E','_','M','O','N','I','K','E','R',0};
-static WCHAR ref_monikerW[] =
{'R','E','F','_','M','O','N','I','K','E','R',0};
+static const WCHAR site_monikerW[] =
{'S','I','T','E','_','M','O','N','I','K','E','R',0};
+static const WCHAR ref_monikerW[] =
{'R','E','F','_','M','O','N','I','K','E','R',0};
static HRESULT WINAPI hls_test_Moniker_BindToStorage(IMoniker *iface,
IBindCtx *pbc, IMoniker *toLeft, REFIID riid, void **obj)
@@ -1832,7 +1838,7 @@
static HRESULT WINAPI hls_QueryInterface(IHlinkSite *iface, REFGUID iid,
void **obj)
{
- ok(0, "QI: %p %s %p\n", iface, debugstr_guid(iid), obj);
+ ok(0, "QI: %p %s %p\n", iface, wine_dbgstr_guid(iid), obj);
return E_NOTIMPL;
}
@@ -1849,8 +1855,8 @@
static HRESULT WINAPI hls_QueryService(IHlinkSite *iface, DWORD siteData,
REFGUID service, REFIID riid, IUnknown **punk)
{
- ok(0, "QS: %p %x %s %s %p\n", iface, siteData, debugstr_guid(service),
- debugstr_guid(riid), punk);
+ ok(0, "QS: %p %x %s %s %p\n", iface, siteData, wine_dbgstr_guid(service),
+ wine_dbgstr_guid(riid), punk);
return E_NOTIMPL;
}