mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
- implementations for SHLWAPI_267, SHLWAPI_268
- small fixes
This commit is contained in:
parent
23b808791e
commit
9a7cc230dc
4 changed files with 53 additions and 32 deletions
|
@ -812,7 +812,8 @@ shdocvw: ole32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
|
||||||
shell32: ole32.dll$(DLLEXT) shlwapi.dll$(DLLEXT) comctl32.dll$(DLLEXT) user32.dll$(DLLEXT) \
|
shell32: ole32.dll$(DLLEXT) shlwapi.dll$(DLLEXT) comctl32.dll$(DLLEXT) user32.dll$(DLLEXT) \
|
||||||
gdi32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
|
gdi32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
|
||||||
shfolder: shell32.dll$(DLLEXT)
|
shfolder: shell32.dll$(DLLEXT)
|
||||||
shlwapi: user32.dll$(DLLEXT) gdi32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
|
shlwapi: ole32.dll$(DLLEXT) user32.dll$(DLLEXT) gdi32.dll$(DLLEXT) advapi32.dll$(DLLEXT) \
|
||||||
|
kernel32.dll$(DLLEXT)
|
||||||
snmpapi: kernel32.dll$(DLLEXT)
|
snmpapi: kernel32.dll$(DLLEXT)
|
||||||
sti: kernel32.dll$(DLLEXT)
|
sti: kernel32.dll$(DLLEXT)
|
||||||
tapi32: kernel32.dll$(DLLEXT)
|
tapi32: kernel32.dll$(DLLEXT)
|
||||||
|
|
|
@ -4,7 +4,8 @@ TOPOBJDIR = ../..
|
||||||
SRCDIR = @srcdir@
|
SRCDIR = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
MODULE = shlwapi.dll
|
MODULE = shlwapi.dll
|
||||||
IMPORTS = user32 gdi32 advapi32 kernel32
|
# fixme: avoid ole32.dll import
|
||||||
|
IMPORTS = ole32 user32 gdi32 advapi32 kernel32
|
||||||
EXTRALIBS = $(LIBUUID) $(LIBUNICODE)
|
EXTRALIBS = $(LIBUUID) $(LIBUNICODE)
|
||||||
|
|
||||||
LDDLLFLAGS = @LDDLLFLAGS@
|
LDDLLFLAGS = @LDDLLFLAGS@
|
||||||
|
|
|
@ -1512,23 +1512,21 @@ HRESULT WINAPI SHLWAPI_219 (
|
||||||
LPVOID w, /* [in] table of interfaces */
|
LPVOID w, /* [in] table of interfaces */
|
||||||
IFACE_INDEX_TBL *x, /* [in] array of REFIIDs and indexes to above */
|
IFACE_INDEX_TBL *x, /* [in] array of REFIIDs and indexes to above */
|
||||||
REFIID riid, /* [in] REFIID to get interface for */
|
REFIID riid, /* [in] REFIID to get interface for */
|
||||||
LPVOID *z) /* [out] location to get interface pointer */
|
LPVOID *ppv) /* [out] location to get interface pointer */
|
||||||
{
|
{
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
IUnknown *a_vtbl;
|
IUnknown *a_vtbl;
|
||||||
IFACE_INDEX_TBL *xmove;
|
IFACE_INDEX_TBL *xmove;
|
||||||
|
|
||||||
TRACE("(%p %p %s %p)\n",
|
TRACE("(%p %p %s %p)\n", w,x,debugstr_guid(riid),ppv);
|
||||||
w,x,debugstr_guid(riid),z);
|
if (ppv) {
|
||||||
if (z) {
|
|
||||||
xmove = x;
|
xmove = x;
|
||||||
while (xmove->refid) {
|
while (xmove->refid) {
|
||||||
TRACE("trying (indx %ld) %s\n", xmove->indx,
|
TRACE("trying (indx %ld) %s\n", xmove->indx, debugstr_guid(xmove->refid));
|
||||||
debugstr_guid(xmove->refid));
|
|
||||||
if (IsEqualIID(riid, xmove->refid)) {
|
if (IsEqualIID(riid, xmove->refid)) {
|
||||||
a_vtbl = (IUnknown*)(xmove->indx + (LPBYTE)w);
|
a_vtbl = (IUnknown*)(xmove->indx + (LPBYTE)w);
|
||||||
TRACE("matched, returning (%p)\n", a_vtbl);
|
TRACE("matched, returning (%p)\n", a_vtbl);
|
||||||
*z = (LPVOID)a_vtbl;
|
*ppv = (LPVOID)a_vtbl;
|
||||||
IUnknown_AddRef(a_vtbl);
|
IUnknown_AddRef(a_vtbl);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -1538,14 +1536,16 @@ HRESULT WINAPI SHLWAPI_219 (
|
||||||
if (IsEqualIID(riid, &IID_IUnknown)) {
|
if (IsEqualIID(riid, &IID_IUnknown)) {
|
||||||
a_vtbl = (IUnknown*)(x->indx + (LPBYTE)w);
|
a_vtbl = (IUnknown*)(x->indx + (LPBYTE)w);
|
||||||
TRACE("returning first for IUnknown (%p)\n", a_vtbl);
|
TRACE("returning first for IUnknown (%p)\n", a_vtbl);
|
||||||
*z = (LPVOID)a_vtbl;
|
*ppv = (LPVOID)a_vtbl;
|
||||||
IUnknown_AddRef(a_vtbl);
|
IUnknown_AddRef(a_vtbl);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
*z = 0;
|
*ppv = 0;
|
||||||
ret = E_NOINTERFACE;
|
ret = E_NOINTERFACE;
|
||||||
} else
|
} else
|
||||||
ret = E_POINTER;
|
ret = E_POINTER;
|
||||||
|
|
||||||
|
TRACE("-- 0x%08lx\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1686,32 +1686,51 @@ DWORD WINAPI SHLWAPI_266 (
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* @ [SHLWAPI.267]
|
* @ [SHLWAPI.267]
|
||||||
|
*
|
||||||
|
* NOTES:
|
||||||
|
* This QueryInterface asks the inner object for a interface. In case
|
||||||
|
* of aggregation this request would be forwarded by the inner to the
|
||||||
|
* outer object. This function asks the inner object directly for the
|
||||||
|
* interface circumventing the forwarding to the outer object.
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI SHLWAPI_267 (
|
HRESULT WINAPI SHLWAPI_267 (
|
||||||
LPVOID w,
|
IUnknown * pUnk, /* outer object */
|
||||||
LPVOID x,
|
IUnknown * pInner, /* inner object */
|
||||||
LPVOID y, /* [???] NOTE: same as 3rd parameter of SHLWAPI_219 */
|
IID * riid,
|
||||||
LPVOID z) /* [???] NOTE: same as 4th parameter of SHLWAPI_219 */
|
LPVOID* ppv)
|
||||||
{
|
{
|
||||||
FIXME("(%p %p %p %p)stub\n",w,x,y,z);
|
HRESULT hret = E_NOINTERFACE;
|
||||||
|
TRACE("(pUnk=%p pInner=%p\n\tIID: %s %p)\n",pUnk,pInner,debugstr_guid(riid), ppv);
|
||||||
|
|
||||||
/* native seems to do:
|
*ppv = NULL;
|
||||||
* SHLWAPI_219 ((LPVOID)(((LPSTR)x)-4), ???, (REFIID) y, (LPVOID*) z);
|
if(pUnk && pInner) {
|
||||||
*/
|
hret = IUnknown_QueryInterface(pInner, riid, (LPVOID*)ppv);
|
||||||
|
if (SUCCEEDED(hret)) IUnknown_Release(pUnk);
|
||||||
*((LPDWORD)z) = 0xabba1200;
|
}
|
||||||
return /* 0xabba1254 */ 0;
|
TRACE("-- 0x%08lx\n", hret);
|
||||||
|
return hret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* @ [SHLWAPI.268]
|
* @ [SHLWAPI.268]
|
||||||
|
* NOTES
|
||||||
|
* pInner is returned by SHLWAPI_267 as ppv
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHLWAPI_268 (
|
DWORD WINAPI SHLWAPI_268 (
|
||||||
LPVOID w,
|
IUnknown * pUnk,
|
||||||
LPVOID x)
|
IUnknown ** pInner)
|
||||||
{
|
{
|
||||||
FIXME("(%p %p)\n",w,x);
|
DWORD ret = 0;
|
||||||
return 0xabba1251; /* 0 = failure */
|
|
||||||
|
TRACE("(pUnk=%p pInner=%p)\n",pUnk,pInner);
|
||||||
|
|
||||||
|
IUnknown_AddRef(pUnk);
|
||||||
|
if (pInner && *pInner) {
|
||||||
|
ret = IUnknown_Release(*pInner);
|
||||||
|
*pInner = NULL;
|
||||||
|
}
|
||||||
|
TRACE("-- count=%lu\n",ret);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
|
|
|
@ -486,14 +486,14 @@ HRESULT WINAPI StrRetToBufA (LPSTRRET src, const ITEMIDLIST *pidl, LPSTR dest, D
|
||||||
{
|
{
|
||||||
case STRRET_WSTR:
|
case STRRET_WSTR:
|
||||||
WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, (LPSTR)dest, len, NULL, NULL);
|
WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, (LPSTR)dest, len, NULL, NULL);
|
||||||
/* SHFree(src->u.pOleStr); FIXME: is this right? */
|
CoTaskMemFree(src->u.pOleStr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STRRET_CSTRA:
|
case STRRET_CSTR:
|
||||||
lstrcpynA((LPSTR)dest, src->u.cStr, len);
|
lstrcpynA((LPSTR)dest, src->u.cStr, len);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STRRET_OFFSETA:
|
case STRRET_OFFSET:
|
||||||
lstrcpynA((LPSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
|
lstrcpynA((LPSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -531,15 +531,15 @@ HRESULT WINAPI StrRetToBufW (LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest,
|
||||||
{
|
{
|
||||||
case STRRET_WSTR:
|
case STRRET_WSTR:
|
||||||
lstrcpynW((LPWSTR)dest, src->u.pOleStr, len);
|
lstrcpynW((LPWSTR)dest, src->u.pOleStr, len);
|
||||||
/* SHFree(src->u.pOleStr); FIXME: is this right? */
|
CoTaskMemFree(src->u.pOleStr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STRRET_CSTRA:
|
case STRRET_CSTR:
|
||||||
if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ) && len)
|
if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ) && len)
|
||||||
dest[len-1] = 0;
|
dest[len-1] = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STRRET_OFFSETA:
|
case STRRET_OFFSET:
|
||||||
if (pidl)
|
if (pidl)
|
||||||
{
|
{
|
||||||
if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1,
|
if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1,
|
||||||
|
|
Loading…
Reference in a new issue