27#define COMPLETION_BUFFER_SIZE 4096
46 pszUnique = pszUnique?(pszUnique+1):pszText;
58 ASSERT(pszText <= pszUnique);
59 s = pszUnique - pszText;
221 if (!pNode->
Init(pszText))
255 unsigned __int64 nRelativeIndex = 0;
262 if ((nRelativeIndex > nIndex)||(nRelativeIndex >
m_nCount-nIndex-1))
266 if (!pNode && (nIndex <=
m_nCount/2))
270 nRelativeIndex = nIndex;
282 if (nRelativeIndex == 0)
338 DWORD dwMaxSubkeyNameLength;
340 DWORD dwMaxValueNameSize;
361 size_t nKeyNameSize = 0;
364 nKeyNameSize =
_tcslen(pszKey);
369 if (blnCompletionOnKeys)
371 nError =
Key.GetSubkeyNameMaxLength(dwMaxSubkeyNameLength);
375 pszSubkeyName =
new (std::nothrow)
TCHAR[nKeyNameSize+dwMaxSubkeyNameLength+1];
382 Key.InitSubkeyEnumeration(pszSubkeyName+nKeyNameSize,dwMaxSubkeyNameLength);
396 if (blnCompletionOnValues)
398 nError =
Key.GetMaxValueNameLength(dwMaxValueNameSize);
405 pszValueName =
new (std::nothrow)
TCHAR[nKeyNameSize+dwMaxValueNameSize+1];
412 Key.InitValueEnumeration(pszValueName+nKeyNameSize,dwMaxValueNameSize,
NULL,0,
NULL);
427 delete[] pszValueName;
429 delete[] pszSubkeyName;
433 delete[] pszValueName;
435 delete[] pszSubkeyName;
440 const BOOL *pblnForward,
441 const TCHAR *pszContext,
442 const TCHAR *pszBegin)
447 while(*pszContext &&
_istspace(*pszContext))
457 if (blnNewCompletion)
461 TCHAR *pszSeparator = pszBuffer;
474 if (nTotalItems == 0)
477 if (rnIndex >= nTotalItems)
478 rnIndex = nTotalItems-1;
485 if (rnIndex >= nTotalItems)
498 rnIndex = nTotalItems-1;
BOOL FillCompletion(const TCHAR *pszKey)
void InvalidateCompletion()
const TCHAR * CompletionCallback(unsigned __int64 &rnIndex, const BOOL *pblnForward, const TCHAR *pszContext, const TCHAR *pszBegin)
BOOL g_blnCompletionCycle
class CCompletionList g_Completion
#define COMPLETION_BUFFER_SIZE
BOOL Add(const TCHAR *pszText, BOOL blnIsKey)
BOOL IsNewCompletion(const TCHAR *pszContext, const TCHAR *pszBegin, BOOL &rblnNew)
unsigned int m_nLastSearched
const TCHAR * Get(unsigned __int64 nIndex, BOOL &rblnIsKey)
CCompletionMatch * m_pLastSearched
unsigned __int64 GetCount()
unsigned __int64 m_nCount
CCompletionMatch * m_pHead
CCompletionMatch * m_pTail
const TCHAR * GetContext()
CCompletionMatch * m_pNext
CCompletionMatch * m_pPrev
BOOL Init(const TCHAR *pszText)
BOOL GetKey(const TCHAR *pchRelativePath, REGSAM DesiredAccess, CRegistryKey &rKey)
const TCHAR * GetCurrentPath() const
#define ERROR_NO_MORE_ITEMS
GLboolean GLboolean GLboolean b
#define KEY_ENUMERATE_SUB_KEYS