[SHLWAPI] Partly revert SHLWAPI Wine 3.0 sync b725032 .
[reactos.git] / dll / win32 / shlwapi / clist.c
index 763a40e..52c5f61 100644 (file)
@@ -45,8 +45,13 @@ static inline LPDATABLOCK_HEADER NextItem(LPDBLIST lpList)
  *  lpNewItem [I] The new item to add to the list
  *
  * RETURNS
+#ifndef __REACTOS__
  *  Success: S_OK. The item is added to the list.
  *  Failure: An HRESULT error code.
+#else
+ *  Success: TRUE. The item is added to the list.
+ *  Failure: FALSE.
+#endif
  *
  * NOTES
  *  If the size of the element to be inserted is less than the size of a
@@ -54,7 +59,12 @@ static inline LPDATABLOCK_HEADER NextItem(LPDBLIST lpList)
  *  the call returns S_OK but does not actually add the element.
  *  See SHWriteDataBlockList.
  */
-HRESULT WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem)
+#ifndef __REACTOS__
+HRESULT
+#else
+BOOL
+#endif
+WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem)
 {
   LPDATABLOCK_HEADER lpInsertAt = NULL;
   ULONG ulSize;
@@ -62,11 +72,19 @@ HRESULT WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewIt
   TRACE("(%p,%p)\n", lppList, lpNewItem);
 
   if(!lppList || !lpNewItem )
+#ifndef __REACTOS__
     return E_INVALIDARG;
+#else
+    return FALSE;
+#endif
 
   if (lpNewItem->cbSize < sizeof(DATABLOCK_HEADER) ||
       lpNewItem->dwSignature == CLIST_ID_CONTAINER)
+#ifndef __REACTOS__
     return S_OK;
+#else
+    return FALSE;
+#endif
 
   ulSize = lpNewItem->cbSize;
 
@@ -123,9 +141,17 @@ HRESULT WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewIt
     lpInsertAt = NextItem(lpInsertAt);
     lpInsertAt->cbSize = 0;
 
+#ifndef __REACTOS__
     return lpNewItem->cbSize;
+#else
+    return TRUE;
+#endif
   }
+#ifndef __REACTOS__
   return S_OK;
+#else
+  return FALSE;
+#endif
 }
 
 /*************************************************************************
@@ -343,7 +369,11 @@ VOID WINAPI SHFreeDataBlockList(LPDBLIST lpList)
  */
 BOOL WINAPI SHRemoveDataBlock(LPDBLIST* lppList, DWORD dwSignature)
 {
+#ifndef __REACTOS__
   LPDATABLOCK_HEADER lpList = 0;
+#else
+  LPDATABLOCK_HEADER lpList = NULL;
+#endif
   LPDATABLOCK_HEADER lpItem = NULL;
   LPDATABLOCK_HEADER lpNext;
   ULONG ulNewSize;