Source code of Windows XP (NT5)
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.

61 lines
1.9 KiB

  1. // WWIMP.H: Definition of CITWordWheel
  2. #ifndef __WWIMP_H__
  3. #define __WWIMP_H__
  4. #include "verinfo.h"
  5. class CITWordWheelLocal :
  6. public IITWordWheel,
  7. public CComObjectRootEx<CComMultiThreadModel>,
  8. public CComCoClass<CITWordWheelLocal,&CLSID_IITWordWheelLocal>
  9. {
  10. public:
  11. CITWordWheelLocal() : m_hWheel(NULL), m_pSubStorage(NULL),
  12. m_cEntries(0), m_pCatalog(NULL), m_pIITGroup(NULL),
  13. m_hScratchBuffer(NULL), m_cbScratchBuffer(0) {}
  14. ~CITWordWheelLocal() { if (m_hWheel) Close(); }
  15. BEGIN_COM_MAP(CITWordWheelLocal)
  16. COM_INTERFACE_ENTRY(IITWordWheel)
  17. END_COM_MAP()
  18. DECLARE_REGISTRY(CLSID_IITWordWheelLocal, "ITIR.LocalWordWheel.4", "ITIR.LocalWordWheel", 0, THREADFLAGS_BOTH )
  19. // ITWordWheel methods go here
  20. public:
  21. STDMETHOD(Open)(IITDatabase* lpITDB, LPCWSTR lpszMoniker, DWORD dwFlags=0L);
  22. STDMETHOD(Close)(void);
  23. STDMETHOD(GetLocaleInfo)(DWORD *pdwCodePageID, LCID *plcid);
  24. STDMETHOD(GetSorterInstance)(DWORD *pdwObjInstance);
  25. STDMETHOD(Count)(LONG *pcEntries);
  26. STDMETHOD(Lookup)(LONG lEntry, LPVOID lpvKeyBuf, DWORD cbKeyBuf);
  27. STDMETHOD(Lookup)(LONG lEntry, IITResultSet* lpITResult, LONG cEntries);
  28. STDMETHOD(Lookup)(LPCVOID lpcvPrefix, BOOL fExactMatch, LONG *plEntry);
  29. STDMETHOD(SetGroup)(IITGroup* pIITGroup);
  30. STDMETHOD(GetGroup)(IITGroup** ppiitGroup);
  31. STDMETHOD(GetDataCount)(LONG lEntry, DWORD *pdwCount);
  32. STDMETHOD(GetData)(LONG lEntry, IITResultSet* lpITResult);
  33. STDMETHOD(GetDataColumns)(IITResultSet* pRS);
  34. // Data members
  35. private:
  36. HWHEEL m_hWheel; // Word wheel handle
  37. IStorage* m_pSubStorage; // Substorage containing WW
  38. LONG m_cEntries, m_cMaxEntries;
  39. IITCatalog* m_pCatalog; // The catalog
  40. HANDLE m_hScratchBuffer; // Scratch buffer
  41. DWORD m_cbScratchBuffer; // Byte count for scratch buffer
  42. IITGroup* m_pIITGroup; // Group filter
  43. _ThreadModel::AutoCriticalSection m_cs; // Critical section obj.
  44. };
  45. #endif