Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #if !defined (_DAOGETRW_H_)
      7 #define _DAOGETRW_H_
      8 
      9 typedef enum {
     10   DAOCOLKIND_IND = 0,DAOCOLKIND_STR,DAOCOLKIND_WSTR
     11 } DAOCOLKIND;
     12 
     13 typedef enum {
     14   DAO_I2 = 0,DAO_I4,DAO_R4,DAO_R8,DAO_CURRENCY,DAO_DATE,DAO_BOOL,DAO_BSTR,DAO_LPSTR,DAO_LPWSTR,DAO_BLOB,DAO_BYTES,DAO_CHAR,DAO_WCHAR,DAO_ANYVARIANT,
     15   DAO_BOOKMARK,DAO_BYTE,DAO_GUID,DAO_DATATYPEMAX
     16 } DAODATATYPE;
     17 
     18 #define DAO_NOINDICATOR 0xffffffff
     19 #define DAO_NULL 0xffffffff
     20 #define DAO_CANTCOERCE 0xfffffffc
     21 #define DAO_NOMAXLENGTH 0x00000000
     22 
     23 #define DAOROWFETCH_CALLEEALLOCATES 0x00000001
     24 #define DAOROWFETCH_DONTADVANCE 0x00000002
     25 #define DAOROWFETCH_FORCEREFRESH 0x00000004
     26 #define DAOROWFETCH_BINDABSOLUTE 0x00000008
     27 #define DAOROWFETCH_ODBCNEXT 0x00000010
     28 
     29 #define DAOBINDING_DIRECT 0x00000001
     30 #define DAOBINDING_VARIANT 0x00000002
     31 #define DAOBINDING_CALLBACK 0x00000004
     32 
     33 typedef struct {
     34   DWORD dwKind;
     35   union
     36   {
     37     LONG ind;
     38     LPCSTR lpstr;
     39     LPCWSTR lpwstr;
     40   };
     41 } DAOCOLUMNID;
     42 typedef DAOCOLUMNID *LPDAOCOLUMNID;
     43 #ifdef __cplusplus
     44 extern "C" {
     45 #endif
     46 typedef HRESULT (WINAPI *LPDAOBINDFUNC)(ULONG cb,DWORD dwUser,LPVOID *ppData);
     47 #ifdef __cplusplus
     48 }
     49 #endif
     50 #define DAOBINDINGFUNC(f) STDAPI f (ULONG cb,DWORD dwUser,LPVOID *ppData)
     51 
     52 typedef struct {
     53   DAOCOLUMNID columnID;
     54   ULONG cbDataOffset;
     55   ULONG cbMaxLen;
     56   ULONG cbInfoOffset;
     57   DWORD dwBinding;
     58   DWORD dwDataType;
     59   DWORD dwUser;
     60 } DAOCOLUMNBINDING;
     61 typedef DAOCOLUMNBINDING *LPDAOCOLUMNBINDING;
     62 
     63 typedef struct {
     64   ULONG cRowsRequested;
     65   DWORD dwFlags;
     66   LPVOID pData;
     67   LPVOID pVarData;
     68   ULONG cbVarData;
     69   ULONG cRowsReturned;
     70 } DAOFETCHROWS;
     71 typedef DAOFETCHROWS *LPDAOFETCHROWS;
     72 
     73 #define S_BUFFERTOOSMALL MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x1000)
     74 #define S_ENDOFCURSOR MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x1001)
     75 #define S_SILENTCANCEL MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x1002)
     76 #define S_RECORDDELETED MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x1003)
     77 
     78 #define E_ROWTOOSHORT MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x1000)
     79 #define E_BADBINDINFO MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x1001)
     80 #define E_COLUMNUNAVAILABLE MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x1002)
     81 
     82 #undef INTERFACE
     83 #define INTERFACE ICDAORecordset
     84 DECLARE_INTERFACE_(ICDAORecordset,IDispatch) {
     85   STDMETHOD(GetRows) (THIS_ LONG cRowsToSkip,LONG cCol,LPDAOCOLUMNBINDING prgBndCol,ULONG cbRowLen,LPDAOFETCHROWS pFetchRows) PURE;
     86   STDMETHOD(SetNotify) (THIS_ REFIID riid,WINBOOL fNotify);
     87   STDMETHOD(GetNotify) (THIS_ REFIID riid,WINBOOL *fNotify);
     88   STDMETHOD(OnBeforeNotify) (THIS_ REFIID riid,DWORD cat,DWORD rsn,VARIANT v1,VARIANT v2);
     89   STDMETHOD(OnAfterNotify) (THIS_ REFIID riid,DWORD cat,DWORD rsn,VARIANT v1,VARIANT v2,HRESULT hr);
     90   STDMETHOD(PutLock) (THIS_ WINBOOL f);
     91   STDMETHOD(GetLock) (THIS_ WINBOOL *f);
     92   STDMETHOD(AddGetRowsErr) (THIS_ HRESULT hr) PURE;
     93 };
     94 
     95 #define errVtoFetchBuffTooSmall -30028
     96 #define errVtoEOFDuringFetch -30029
     97 #define errVtoSilentCancel -30030
     98 #define errVtoRecordDeleted -30031
     99 #define errVtoRowLenTooSmall -30032
    100 #define errVtoBadBindInfo -30033
    101 #define errVtoColumnMissing -30034
    102 #endif
    103