mirror of https://github.com/lianthony/NT4.0
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.
67 lines
1.4 KiB
67 lines
1.4 KiB
//+---------------------------------------------------------------------
|
|
//
|
|
// Microsoft Windows
|
|
// Copyright (C) Microsoft Corporation, 1993 - 1994.
|
|
//
|
|
// File: cstrings.h
|
|
//
|
|
// Contents: Defines the class CStrings to manage a dynamically
|
|
// expandable array of string pairs which may be enumerated
|
|
//
|
|
// Classes:
|
|
//
|
|
// Methods:
|
|
//
|
|
// History: 23-Apr-96 BruceMa Created.
|
|
//
|
|
//----------------------------------------------------------------------
|
|
|
|
|
|
const DWORD INCREMENT_SIZE = 1024;
|
|
|
|
|
|
typedef struct
|
|
{
|
|
TCHAR *szItem;
|
|
TCHAR *szTitle;
|
|
DWORD cbTitle;
|
|
TCHAR *szAppid;
|
|
ULONG fMarked:1;
|
|
ULONG fChecked:1;
|
|
ULONG fHasAppid:1;
|
|
ULONG fDontDisplay:1;
|
|
UINT ulClsids;
|
|
UINT ulClsidTbl;
|
|
TCHAR **ppszClsids;
|
|
} SItem;
|
|
|
|
|
|
class CStrings
|
|
{
|
|
public:
|
|
|
|
CStrings(void);
|
|
~CStrings(void);
|
|
SItem *PutItem(TCHAR *szString, TCHAR *szTitle, TCHAR *szAppid);
|
|
SItem *FindItem(TCHAR *szItem);
|
|
SItem *FindAppid(TCHAR *szAppid);
|
|
BOOL AddClsid(SItem *pItem, TCHAR *szClsid);
|
|
DWORD InitGetNext(void);
|
|
SItem *GetNextItem(void);
|
|
SItem *GetItem(DWORD dwItem);
|
|
DWORD GetNumItems(void);
|
|
BOOL RemoveItem(DWORD dwItem);
|
|
BOOL RemoveAll(void);
|
|
|
|
|
|
private:
|
|
|
|
SItem *_psItems;
|
|
DWORD _dwCount;
|
|
DWORD _dwSize;
|
|
DWORD _dwGetCount;
|
|
};
|
|
|
|
|
|
|
|
|