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.

143 lines
3.8 KiB

  1. /************************************************************************
  2. ** D A O G E T R W . H *
  3. ** *
  4. ** GetRows interface *
  5. ** *
  6. ** Warning: The interface defined in this file is for internal use by *
  7. ** the Microsoft Foundation Classes and the dbdao C++ classes. *
  8. ** Future releases of DAO may not be completely compatible with this *
  9. ** implementation. However, if you write to the MFC or dbdao *
  10. ** classes that use this interface, those classes will continue to *
  11. ** be compatible even if this underlying interface changes. *
  12. ** *
  13. *************************************************************************
  14. ** Copyright (C) 1995 by Microsoft Corporation *
  15. ** All Rights Reserved *
  16. ************************************************************************/
  17. #if !defined (_DAOGETRW_H_)
  18. #define _DAOGETRW_H_
  19. /*
  20. Enumerations
  21. */
  22. typedef enum
  23. {
  24. DAOCOLKIND_IND = 0,
  25. DAOCOLKIND_STR,
  26. DAOCOLKIND_WSTR
  27. } DAOCOLKIND;
  28. typedef enum
  29. {
  30. DAO_I2 = 0,
  31. DAO_I4,
  32. DAO_R4,
  33. DAO_R8,
  34. DAO_CURRENCY,
  35. DAO_DATE,
  36. DAO_BOOL,
  37. DAO_BSTR,
  38. DAO_LPSTR,
  39. DAO_LPWSTR,
  40. DAO_BLOB,
  41. DAO_BYTES,
  42. DAO_CHAR,
  43. DAO_WCHAR,
  44. DAO_ANYVARIANT,
  45. DAO_BOOKMARK,
  46. DAO_BYTE,
  47. DAO_GUID,
  48. DAO_DATATYPEMAX
  49. } DAODATATYPE;
  50. /*
  51. Macros
  52. */
  53. #define DAO_NOINDICATOR 0xffffffff
  54. #define DAO_NULL 0xffffffff
  55. #define DAO_CANTCOERCE 0xfffffffc
  56. #define DAO_NOMAXLENGTH 0x00000000
  57. #define DAOROWFETCH_CALLEEALLOCATES 0x00000001
  58. #define DAOROWFETCH_DONTADVANCE 0x00000002
  59. #define DAOROWFETCH_FORCEREFRESH 0x00000004
  60. #define DAOROWFETCH_BINDABSOLUTE 0x00000008
  61. #define DAOBINDING_DIRECT 0x00000001
  62. #define DAOBINDING_VARIANT 0x00000002
  63. #define DAOBINDING_CALLBACK 0x00000004
  64. /*
  65. Structures
  66. */
  67. typedef struct
  68. {
  69. DWORD dwKind;
  70. union
  71. {
  72. LONG ind;
  73. LPCSTR lpstr;
  74. LPCWSTR lpwstr;
  75. };
  76. } DAOCOLUMNID;
  77. typedef DAOCOLUMNID *LPDAOCOLUMNID;
  78. // Callback for binding
  79. EXTERN_C typedef HRESULT (STDAPICALLTYPE *LPDAOBINDFUNC)(ULONG cb, DWORD dwUser, LPVOID *ppData);
  80. #define DAOBINDINGFUNC(f) STDAPI f (ULONG cb, DWORD dwUser, LPVOID *ppData)
  81. typedef struct
  82. {
  83. DAOCOLUMNID columnID;
  84. ULONG cbDataOffset;
  85. ULONG cbMaxLen;
  86. ULONG cbInfoOffset;
  87. DWORD dwBinding;
  88. DWORD dwDataType;
  89. DWORD dwUser;
  90. } DAOCOLUMNBINDING;
  91. typedef DAOCOLUMNBINDING *LPDAOCOLUMNBINDING;
  92. typedef struct
  93. {
  94. ULONG cRowsRequested;
  95. DWORD dwFlags;
  96. LPVOID pData;
  97. LPVOID pVarData;
  98. ULONG cbVarData;
  99. ULONG cRowsReturned;
  100. } DAOFETCHROWS;
  101. typedef DAOFETCHROWS *LPDAOFETCHROWS;
  102. /*
  103. New Errors
  104. **NOTE: OLE standard ids to be determined.
  105. */
  106. #define GETROWSUCCESS(x) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, x)
  107. #define GETROWERR(x) MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, x)
  108. #define S_BUFFERTOOSMALL GETROWSUCCESS(0x1000)
  109. #define S_ENDOFCURSOR GETROWSUCCESS(0x1001)
  110. #define S_SILENTCANCEL GETROWSUCCESS(0x1002)
  111. #define S_RECORDDELETED GETROWSUCCESS(0x1003)
  112. #define E_ROWTOOSHORT GETROWERR(0x1000)
  113. #define E_BADBINDINFO GETROWERR(0x1001)
  114. #define E_COLUMNUNAVAILABLE GETROWERR(0x1002)
  115. /*
  116. Interfaces
  117. */
  118. #undef INTERFACE
  119. #define INTERFACE ICDAORecordset
  120. DECLARE_INTERFACE_(ICDAORecordset, IDispatch)
  121. {
  122. STDMETHOD(GetRows) (THIS_ LONG cRowsToSkip, LONG cCol, LPDAOCOLUMNBINDING prgBndCol, ULONG cbRowLen, LPDAOFETCHROWS pFetchRows) PURE;
  123. };
  124. #endif // _DAOGETRW_H_