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.

105 lines
3.2 KiB

  1. // ITRS.H: ITResultSet interface declaration
  2. #ifndef __ITRS_H__
  3. #define __ITRS_H__
  4. // {3BB91D41-998B-11d0-A850-00AA006C7D01}
  5. DEFINE_GUID(IID_IITResultSet,
  6. 0x3bb91d41, 0x998b, 0x11d0, 0xa8, 0x50, 0x0, 0xaa, 0x0, 0x6c, 0x7d, 0x1);
  7. // {4662daa7-d393-11d0-9a56-00c04fb68bf7} (changed from IT 3.0)
  8. DEFINE_GUID(CLSID_IITResultSet,
  9. 0x4662daa7, 0xd393, 0x11d0, 0x9a, 0x56, 0x00, 0xc0, 0x4f, 0xb6, 0x8b, 0xf7);
  10. // maximum number of columns in a row set
  11. #define MAX_COLUMNS 256
  12. // Column priorities
  13. typedef enum
  14. {
  15. PRIORITY_LOW = 0,
  16. PRIORITY_NORMAL = 1,
  17. PRIORITY_HIGH = 2,
  18. } PRIORITY;
  19. // Forward declarations
  20. class CProperty;
  21. typedef struct tagROWSTATUS
  22. {
  23. LONG lRowFirst;
  24. LONG cRows;
  25. LONG cProperties;
  26. LONG cRowsTotal;
  27. } ROWSTATUS, *LPROWSTATUS;
  28. typedef struct tagCOLUMNSTATUS
  29. {
  30. LONG cPropCount;
  31. LONG cPropsLoaded;
  32. } COLUMNSTATUS, *LPCOLUMNSTATUS;
  33. // Used by IITResultSet::SetColumnHeap.
  34. typedef SCODE (__stdcall *PFNCOLHEAPFREE)(LPVOID);
  35. DECLARE_INTERFACE_(IITResultSet, IUnknown)
  36. {
  37. // Initialization
  38. STDMETHOD(SetColumnPriority)(LONG lColumnIndex, PRIORITY ColumnPriority) PURE;
  39. STDMETHOD(SetColumnHeap)(LONG lColumnIndex, LPVOID lpvHeap,
  40. PFNCOLHEAPFREE pfnColHeapFree) PURE;
  41. STDMETHOD(SetKeyProp)(PROPID PropID) PURE;
  42. STDMETHOD(Add)(LPVOID lpvHdr) PURE;
  43. STDMETHOD(Add)(PROPID PropID, LPVOID lpvDefaultData, DWORD cbData, PRIORITY Priority) PURE;
  44. STDMETHOD(Add)(PROPID PropID, LPCWSTR lpszwDefault, PRIORITY Priority) PURE;
  45. STDMETHOD(Add)(PROPID PropID, DWORD dwDefaultData, PRIORITY Priority) PURE;
  46. // Build result set
  47. STDMETHOD(Append)(LPVOID lpvHdr, LPVOID lpvData) PURE;
  48. STDMETHOD(Set)(LONG lRowIndex, LPVOID lpvHdr, LPVOID lpvData) PURE;
  49. STDMETHOD(Set)(LONG lRowIndex, LONG lColumnIndex, DWORD dwData) PURE;
  50. STDMETHOD(Set)(LONG lRowIndex, LONG lColumnIndex, LPCWSTR lpwStr) PURE;
  51. STDMETHOD(Set)(LONG lRowIndex, LONG lColumnIndex, LPVOID lpvData, DWORD cbData) PURE;
  52. STDMETHOD(Copy)(IITResultSet* pRSCopy) PURE;
  53. STDMETHOD(AppendRows)(IITResultSet* pResSrc, LONG lRowSrcFirst, LONG cSrcRows,
  54. LONG& lRowFirstDest) PURE;
  55. // Obtain info about result set
  56. STDMETHOD(Get)(LONG lRowIndex, LONG lColumnIndex, CProperty& Prop) PURE;
  57. STDMETHOD(GetKeyProp)(PROPID& KeyPropID) PURE;
  58. STDMETHOD(GetColumnPriority)(LONG lColumnIndex, PRIORITY& ColumnPriority) PURE;
  59. STDMETHOD(GetRowCount)(LONG& lNumberOfRows) PURE;
  60. STDMETHOD(GetColumnCount)(LONG& lNumberOfColumns) PURE;
  61. STDMETHOD(GetColumn)(LONG lColumnIndex, PROPID& PropID) PURE;
  62. STDMETHOD(GetColumn)(LONG lColumnIndex, PROPID& PropID, DWORD& dwType, LPVOID& lpvDefaultValue,
  63. DWORD& cbSize, PRIORITY& ColumnPriority) PURE;
  64. STDMETHOD(GetColumnFromPropID)(PROPID PropID, LONG& lColumnIndex) PURE;
  65. // Clear result set
  66. STDMETHOD(Clear)() PURE;
  67. STDMETHOD(ClearRows)() PURE;
  68. STDMETHOD(Free)() PURE;
  69. // Asynchronous support
  70. STDMETHOD(IsCompleted)() PURE; // returns S_OK or S_FALSE
  71. STDMETHOD(Cancel)() PURE;
  72. STDMETHOD(Pause)(BOOL fPause) PURE;
  73. STDMETHOD(GetRowStatus)(LONG lRowFirst, LONG cRows, LPROWSTATUS lpRowStatus) PURE;
  74. STDMETHOD(GetColumnStatus)(LPCOLUMNSTATUS lpColStatus) PURE;
  75. };
  76. typedef IITResultSet* LPITRS;
  77. #endif // __ITRS_H__