Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
665 B

//
// an aribrary list of sized items
//
typedef struct LIST *PLIST;
typedef struct LIST {
PVOID pData;
UINT nBytes;
PLIST next;
PLIST prev;
} LIST;
class CList {
private:
PLIST m_pListHead;
PLIST m_pListCurr;
PLIST m_pListTail;
public:
CList();
~CList();
BOOL IsEmpty() { return (NULL == m_pListHead); }
void RemoveAll();
void RemoveHead(PVOID pData);
void RemoveHead(PVOID pData, PUINT pnBytes);
BOOL Add(PVOID pData, UINT nBytes);
PVOID PeekHead() { return (IsEmpty() ? NULL : m_pListHead->pData); }
};