shlwapi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



- small fixes
- implementations for SHLWAPI_267,  SHLWAPI_268

please apply after shell32 patch since this patch also changes STRRET related 
functions.

---
together with the shell32 patch the myfolder.dll starts working partially.
---
juergen.schmied@debitel.net



Index: wine/dlls/shlwapi/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/Makefile.in,v
retrieving revision 1.17
diff -d -u -r1.17 Makefile.in
--- wine/dlls/shlwapi/Makefile.in	4 Jun 2002 23:11:09 -0000	1.17
+++ wine/dlls/shlwapi/Makefile.in	27 Jun 2002 09:51:30 -0000
@@ -4,7 +4,7 @@
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = shlwapi.dll
-IMPORTS   = user32 gdi32 advapi32 kernel32
+IMPORTS   = user32 gdi32 advapi32 kernel32 ole32
 EXTRALIBS = $(LIBUUID) $(LIBUNICODE)
 
 LDDLLFLAGS = @LDDLLFLAGS@
@@ -28,3 +28,4 @@
 @MAKE_DLL_RULES@
 
 ### Dependencies:
+
Index: wine/dlls/shlwapi/ordinal.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/ordinal.c,v
retrieving revision 1.40
diff -d -u -r1.40 ordinal.c
--- wine/dlls/shlwapi/ordinal.c	31 May 2002 23:40:52 -0000	1.40
+++ wine/dlls/shlwapi/ordinal.c	27 Jun 2002 09:51:34 -0000
@@ -2,7 +2,7 @@
  * SHLWAPI ordinal functions
  *
  * Copyright 1997 Marcus Meissner
- *           1998 Jrgen Schmied
+ *           1998 Jrgen Schmied
  *           2001 Jon Griffiths
  *
  * This library is free software; you can redistribute it and/or
@@ -1512,23 +1512,21 @@
 	LPVOID w,           /* [in]   table of interfaces                   */
 	IFACE_INDEX_TBL *x, /* [in]   array of REFIIDs and indexes to above */
 	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;
 	IUnknown *a_vtbl;
 	IFACE_INDEX_TBL *xmove;
 
-	TRACE("(%p %p %s %p)\n",
-	      w,x,debugstr_guid(riid),z);
-	if (z) {
+	TRACE("(%p %p %s %p)\n", w,x,debugstr_guid(riid),ppv);
+	if (ppv) {
 	    xmove = x;
 	    while (xmove->refid) {
-		TRACE("trying (indx %ld) %s\n", xmove->indx,
-		      debugstr_guid(xmove->refid));
+		TRACE("trying (indx %ld) %s\n", xmove->indx, debugstr_guid(xmove->refid));
 		if (IsEqualIID(riid, xmove->refid)) {
 		    a_vtbl = (IUnknown*)(xmove->indx + (LPBYTE)w);
 		    TRACE("matched, returning (%p)\n", a_vtbl);
-		    *z = (LPVOID)a_vtbl;
+		    *ppv = (LPVOID)a_vtbl;
 		    IUnknown_AddRef(a_vtbl);
 		    return S_OK;
 		}
@@ -1538,14 +1536,16 @@
 	    if (IsEqualIID(riid, &IID_IUnknown)) {
 		a_vtbl = (IUnknown*)(x->indx + (LPBYTE)w);
 		TRACE("returning first for IUnknown (%p)\n", a_vtbl);
-		*z = (LPVOID)a_vtbl;
+		*ppv = (LPVOID)a_vtbl;
 		IUnknown_AddRef(a_vtbl);
 		return S_OK;
 	    }
-	    *z = 0;
+	    *ppv = 0;
 	    ret = E_NOINTERFACE;
 	} else
 	    ret = E_POINTER;
+
+	TRACE("-- 0x%08lx\n", ret);
 	return ret;
 }
 
@@ -1686,32 +1686,51 @@
 
 /*************************************************************************
  *      @	[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 (
-	LPVOID w,
-	LPVOID x,
-	LPVOID y, /* [???] NOTE: same as 3rd parameter of SHLWAPI_219 */
-	LPVOID z) /* [???] NOTE: same as 4th parameter of SHLWAPI_219 */
+	IUnknown * pUnk,   /* outer object */
+	IUnknown * pInner, /* inner object */
+	IID * riid,
+	LPVOID* ppv)
 {
-	FIXME("(%p %p %p %p)stub\n",w,x,y,z);
-
-	/* native seems to do:
-	 *  SHLWAPI_219 ((LPVOID)(((LPSTR)x)-4), ???, (REFIID) y, (LPVOID*) z);
-	 */
+	HRESULT hret = E_NOINTERFACE;
+	TRACE("(pUnk=%p pInner=%p\n\tIID:  %s %p)\n",pUnk,pInner,debugstr_guid(riid), ppv);
 
-	*((LPDWORD)z) = 0xabba1200;
-	return /* 0xabba1254 */ 0;
+	*ppv = NULL;	
+	if(pUnk && pInner) {
+	    hret = IUnknown_QueryInterface(pInner, riid, (LPVOID*)ppv);
+	    if (SUCCEEDED(hret)) IUnknown_Release(pUnk);
+	}
+	TRACE("-- 0x%08lx\n", hret);
+	return hret;
 }
 
 /*************************************************************************
  *      @	[SHLWAPI.268]
+ * NOTES
+ *   pInner is returned by SHLWAPI_267 as ppv
  */
 DWORD WINAPI SHLWAPI_268 (
-	LPVOID w,
-	LPVOID x)
+	IUnknown * pUnk,
+	IUnknown ** pInner)
 {
-	FIXME("(%p %p)\n",w,x);
-	return 0xabba1251; /* 0 = failure */
+	DWORD ret = 0;
+
+	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;
 }
 
 /*************************************************************************
@@ -2474,3 +2493,11 @@
     TlsSetValue(SHLWAPI_ThreadRef_index, (LPVOID) punk);
     return S_OK;
 }
+
+
+
+
+
+
+
+
Index: wine/dlls/shlwapi/shlwapi.spec
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/shlwapi.spec,v
retrieving revision 1.38
diff -d -u -r1.38 shlwapi.spec
--- wine/dlls/shlwapi/shlwapi.spec	21 Jun 2002 19:15:49 -0000	1.38
+++ wine/dlls/shlwapi/shlwapi.spec	27 Jun 2002 09:51:39 -0000
@@ -724,3 +724,4 @@
 @ stub    StrFormatByteSize64A
 @ stub    StrFormatKBSizeA
 @ stub    StrFormatKBSizeW
+
Index: wine/dlls/shlwapi/string.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/string.c,v
retrieving revision 1.22
diff -d -u -r1.22 string.c
--- wine/dlls/shlwapi/string.c	4 Jun 2002 23:11:09 -0000	1.22
+++ wine/dlls/shlwapi/string.c	27 Jun 2002 09:51:40 -0000
@@ -486,14 +486,14 @@
 	{
 	  case STRRET_WSTR:
 	    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;
 
-	  case STRRET_CSTRA:
+	  case STRRET_CSTR:
 	    lstrcpynA((LPSTR)dest, src->u.cStr, len);
 	    break;
 
-	  case STRRET_OFFSETA:
+	  case STRRET_OFFSET:
 	    lstrcpynA((LPSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
 	    break;
 
@@ -531,15 +531,15 @@
 	{
 	  case STRRET_WSTR:
 	    lstrcpynW((LPWSTR)dest, src->u.pOleStr, len);
-/*	    SHFree(src->u.pOleStr);  FIXME: is this right? */
+	    CoTaskMemFree(src->u.pOleStr); 
 	    break;
 
-	  case STRRET_CSTRA:
+	  case STRRET_CSTR:
               if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ) && len)
                   dest[len-1] = 0;
 	    break;
 
-	  case STRRET_OFFSETA:
+	  case STRRET_OFFSET:
 	    if (pidl)
 	    {
               if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1,
@@ -634,3 +634,8 @@
     TRACE("<- '%s'\n", pszSource);
     return trimmed;
 }
+
+
+
+
+


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux