#ifndef __WV_LIST
#define __WV_LIST

#include "Common.h"

#define GetLIDataPtr(lpListItem)	(LPVOID)(((ULONG_PTR)(lpListItem)) + sizeof(LISTITEM))
#define ResetEnum(lpListEnum)		(lpListEnum)->lpCurrentItem = (lpListEnum)->lpLs->lpFirst

LPLIST		CreateList(LPEQUALFCN lpEqFcn);
LPVOID		CreateItem(LPLIST lpLs, ULONG cItemSize, BOOL bFirst);
VOID		AddItem(LPLIST lpLs, LPVOID lpData, BOOL bFirst);
LPVOID		GetItemValue(LPLIST lpLs, INT id);
BOOL		RemoveItemById(LPLIST lpLs, INT id);
BOOL		RemoveItem(LPLIST lpLs, LPVOID lpData);
VOID		ClearList(LPLIST lpLs);
LPLISTENUM	BeginListEnum(LPLIST lpLs);
BOOL		NextListItem(LPLISTENUM lpLe, LPVOID * lplpItem);
VOID		EndListEnum(LPLISTENUM lpLe);
VOID		DestroyList(LPLIST lpLs);

#endif	//__WV_LIST