implement a ordinal 167 and 171

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

 



ChangeLog:
 * dlls/shlwapi/ordinal.c
 * dlls/shlwapi/shlwapi.spec
   - Implement ordinals 167 and 171
   - Add stubs for ordinals 282 and 406

nog.

--- ../cleanwine/dlls/shlwapi/shlwapi.spec	2002-12-10 19:04:27.000000000 +0200
+++ dlls/shlwapi/shlwapi.spec	2002-12-13 17:51:21.000000000 +0200
@@ -279,7 +279,7 @@
 279 stub @
 280 stub @
 281 stdcall @(ptr ptr ptr ptr) SHLWAPI_281
-282 stub @
+282 stdcall @(ptr ptr ptr ptr) SHLWAPI_282
 283 stub @
 284 stdcall @(ptr ptr ptr) SHLWAPI_284
 285 stub @
@@ -403,7 +403,7 @@
 403 stdcall @(ptr) SHLWAPI_403
 404 stdcall ColorHLSToRGB(long long long) ColorHLSToRGB
 405 stub @
-406 stub @
+406 stdcall @(ptr ptr ptr ptr ptr ptr) SHLWAPI_406
 407 stub @
 408 stub @
 409 stub @
--- ../cleanwine/dlls/shlwapi/ordinal.c	2002-12-11 08:17:09.000000000 +0200
+++ dlls/shlwapi/ordinal.c	2002-12-13 18:00:06.000000000 +0200
@@ -976,7 +976,7 @@
 /*************************************************************************
  *      @	[SHLWAPI.167]
  *
- * Change a windows parent.
+ * Change a window's parent.
  *
  * PARAMS
  *  hWnd       [I] Window to change parent of
@@ -987,11 +987,23 @@
  *
  * NOTES
  *  If hWndParent is NULL (desktop), the window style is changed to WS_POPUP.
+ *  If hWndParent is NOT NULL then we set the WS_CHILD style.
  */
 DWORD WINAPI SHLWAPI_167(HWND hWnd, HWND hWndParent)
 {
-	FIXME("%p,%p\n", hWnd, hWndParent);
-	return 0;
+  TRACE("%p, %p\n", hWnd, hWndParent);
+
+  if(GetParent(hWnd) == hWndParent)
+    return 0;
+
+  SetParent(hWnd, hWndParent);
+
+  if(hWndParent)
+    SHLWAPI_165(hWnd, GWL_STYLE, WS_CHILD, WS_CHILD);
+  else
+    SHLWAPI_165(hWnd, GWL_STYLE, WS_POPUP, WS_POPUP);
+
+  return 0;
 }
 
 /*************************************************************************
@@ -1100,12 +1112,40 @@
 /*************************************************************************
  *      @		[SHLWAPI.171]
  *
- * _SHIsSameObject
+ * Check the two interfaces if they come from the same object.
+ *
+ * PARAMS
+ *   lpInt1 [I]: Interface to check against lpInt2.
+ *   lpInt2 [I]: Interface to check against lpInt1.
+ *
+ * RETURNS
+ *   TRUE: Interfaces come from the same object.
+ *   FALSE: Interfaces come from different objects.
  */
-BOOL WINAPI SHLWAPI_171(LPVOID x, LPVOID y)
+BOOL WINAPI SHLWAPI_171(IUnknown* lpInt1, IUnknown* lpInt2)
 {
-	FIXME("%p %p\n",x,y);
-	return 0;
+  LPVOID lpUnknown1, lpUnknown2;
+
+  TRACE("%p %p\n", lpInt1, lpInt2);
+
+  if (!lpInt1 || !lpInt2)
+    return FALSE;
+
+  if (lpInt1 == lpInt2)
+    return TRUE;
+
+  if (!SUCCEEDED(IUnknown_QueryInterface(lpInt1, &IID_IUnknown,
+                                       (LPVOID *)&lpUnknown1)))
+    return FALSE;
+
+  if (!SUCCEEDED(IUnknown_QueryInterface(lpInt2, &IID_IUnknown,
+                                       (LPVOID *)&lpUnknown2)))
+    return FALSE;
+
+  if (lpUnknown1 == lpUnknown2)
+    return TRUE;
+  
+  return FALSE;
 }
 
 /*************************************************************************
@@ -2055,6 +2095,18 @@
 }
 
 /*************************************************************************
+ *      @       [SHLWAPI.282]
+ *
+ * This function seems to be a forward to SHLWAPI.281 (whatever THAT
+ * function does...).
+ */
+HRESULT WINAPI SHLWAPI_282(LPVOID w, LPVOID x, LPVOID y, LPVOID z)
+{
+  FIXME("%p %p %p %p\n", w, x, y, z);
+  return E_FAIL;
+}
+
+/*************************************************************************
  *      @	[SHLWAPI.284]
  *
  * _IConnectionPoint_SimpleInvoke
@@ -2529,6 +2581,15 @@
 }
 
 /*************************************************************************
+ *      @       [SHLWAPI.406]
+ */
+DWORD WINAPI SHLWAPI_406(LPVOID u, LPVOID v, LPVOID w, LPVOID x, LPVOID y, LPVOID z)
+{
+  FIXME("%p %p %p %p %p %p\n", u, v, w, x, y, z);
+  return 0;
+}
+
+/*************************************************************************
  *      @	[SHLWAPI.413]
  *
  * Function unknown seems to always to return 0


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

  Powered by Linux