* 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 <stdarg.h>
+#include <string.h>
-#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)
* 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;
lpInsertAt = NextItem(lpInsertAt);
lpInsertAt->cbSize = 0;
- return lpNewItem->cbSize;
+ return TRUE;
}
- return S_OK;
+ return FALSE;
}
/*************************************************************************
*/
BOOL WINAPI SHRemoveDataBlock(LPDBLIST* lppList, DWORD dwSignature)
{
- LPDATABLOCK_HEADER lpList = 0;
+ LPDATABLOCK_HEADER lpList = NULL;
LPDATABLOCK_HEADER lpItem = NULL;
LPDATABLOCK_HEADER lpNext;
ULONG ulNewSize;