X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=dll%2Fwin32%2Fshlwapi%2Fclist.c;h=77917b3546909fef9a1529575fb39bd0e1b947c2;hp=763a40e34984f697b0d8cbd98bdecbc47cb1025b;hb=d3fd5bdd974ba222aa37324e35861e2059f7cc9d;hpb=9c589bb13195509565b0c9ec6beaa69d3dc0be4a diff --git a/dll/win32/shlwapi/clist.c b/dll/win32/shlwapi/clist.c index 763a40e3498..77917b35469 100644 --- a/dll/win32/shlwapi/clist.c +++ b/dll/win32/shlwapi/clist.c @@ -17,8 +17,19 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include +#include -#include "precomp.h" +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "objbase.h" +#include "shlobj.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); /* dwSignature for contained DATABLOCK_HEADER items */ #define CLIST_ID_CONTAINER (~0U) @@ -54,19 +65,19 @@ 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) +BOOL WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem) { LPDATABLOCK_HEADER lpInsertAt = NULL; ULONG ulSize; TRACE("(%p,%p)\n", lppList, lpNewItem); - if(!lppList || !lpNewItem ) - return E_INVALIDARG; + if(!lppList || !lpNewItem) + return FALSE; if (lpNewItem->cbSize < sizeof(DATABLOCK_HEADER) || lpNewItem->dwSignature == CLIST_ID_CONTAINER) - return S_OK; + return FALSE; ulSize = lpNewItem->cbSize; @@ -123,9 +134,9 @@ HRESULT WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewIt lpInsertAt = NextItem(lpInsertAt); lpInsertAt->cbSize = 0; - return lpNewItem->cbSize; + return TRUE; } - return S_OK; + return FALSE; } /************************************************************************* @@ -343,7 +354,7 @@ VOID WINAPI SHFreeDataBlockList(LPDBLIST lpList) */ BOOL WINAPI SHRemoveDataBlock(LPDBLIST* lppList, DWORD dwSignature) { - LPDATABLOCK_HEADER lpList = 0; + LPDATABLOCK_HEADER lpList = NULL; LPDATABLOCK_HEADER lpItem = NULL; LPDATABLOCK_HEADER lpNext; ULONG ulNewSize;