This file is indexed.

/usr/share/mingw-w64/include/_dbdao.h is in mingw-w64-common 3.2.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
/**
 * This file has no copyright assigned and is placed in the Public Domain.
 * This file is part of the mingw-w64 runtime package.
 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
 */
#ifndef __DBDAO_H_
#define __DBDAO_H_

#ifndef __cplusplus
#error This file can be used only in C++
#else

class COleVariant;
class CdbBookmark;
class CdbException;
class CdbOleObject;
class CdbObject;
class CdbError;
class CdbProperty;
class CdbDBEngine;
class CdbWorkspace;
class CdbDatabase;
class CdbConnection;
class CdbRecordset;
class CdbGetRowsEx;
class CdbQueryDef;
class CdbTableDef;
class CdbField;
class CdbRelation;
class CdbIndex;
class CdbUser;
class CdbGroup;
class CdbDocument;
class CdbContainer;
class CdbParameter;
class CdbCollection;
class CdbErrors;
class CdbProperties;
class CdbWorkspaces;
class CdbDatabases;
class CdbConnections;
class CdbRecordsets;
class CdbQueryDefs;
class CdbTableDefs;
class CdbFields;
class CdbRelations;
class CdbIndexes;
class CdbUsers;
class CdbGroups;
class CdbDocuments;
class CdbContainers;
class CdbParameters;
class CdbBStr;

const char szKEY[] = "mbmabptebkjcdlgtjmskjwtsdhjbmkmwtrak";

#define DAO_MAXSEEKFIELDS 13

class DLLEXPORT CdbBSTR {
public:
  CONSTRUCTOR CdbBSTR(BSTR=NULL);
  DESTRUCTOR ~CdbBSTR(VOID);
  operator BSTR *(VOID);
  operator LPCTSTR(VOID);
private:
  BSTR m_bstr;
};

class CdbVariant : public COleVariant {
public:
  CONSTRUCTOR CdbVariant(LONG l);
  CONSTRUCTOR CdbVariant(VOID);
  CONSTRUCTOR CdbVariant(LPCTSTR pstr);
  CONSTRUCTOR CdbVariant(SHORT s,WINBOOL bIsBool = FALSE);
  CONSTRUCTOR CdbVariant(LPVARIANT pv);
  CONSTRUCTOR CdbVariant(LPSAFEARRAY psa);
  VOID operator =(LPVARIANT pv);
  VOID operator =(LPCTSTR pstr);
  VOID operator =(SHORT s);
  VOID operator =(const int i);
  VOID operator =(LONG l);
};

inline CONSTRUCTOR CdbVariant::CdbVariant(VOID) : COleVariant() {
  vt = VT_ERROR;
  scode = DISP_E_PARAMNOTFOUND;
}

inline CdbVariant::CdbVariant(LONG l) {
  if(l==-1) {
    vt = VT_ERROR;
    scode = DISP_E_PARAMNOTFOUND;
  } else {
    vt = VT_I4;
    lVal = l;
  }
}

inline CONSTRUCTOR CdbVariant::CdbVariant(LPCTSTR pstr): COleVariant(pstr,VT_BSTRT) {
  if(!pstr) {
    VariantClear(this);
    vt = VT_ERROR;
    scode = DISP_E_PARAMNOTFOUND;
  }
}

inline CONSTRUCTOR CdbVariant::CdbVariant(SHORT s,WINBOOL bIsBool) : COleVariant(s) {
  if(bIsBool) {
    vt = VT_BOOL;
    boolVal = s;
  } else if(s==-1) {
    vt = VT_ERROR;
    scode = DISP_E_PARAMNOTFOUND;
  }
}

inline CONSTRUCTOR CdbVariant::CdbVariant(LPVARIANT pv) {
  if(!pv) {
    vt = VT_ERROR;
    scode = DISP_E_PARAMNOTFOUND;
  } else
    VariantCopy(this,pv);
}

inline CONSTRUCTOR CdbVariant::CdbVariant(LPSAFEARRAY psa) {
  if(!psa) {
    vt = VT_ERROR;
    scode = DISP_E_PARAMNOTFOUND;
  } else {
    vt = VT_ARRAY|VT_UI1;
    parray = psa;
  }
}

inline VOID CdbVariant::operator =(LPVARIANT pv) {
  if(!pv) {
    vt = VT_ERROR;
    scode = DISP_E_PARAMNOTFOUND;
  } else
    VariantCopy(this,pv);
}

inline VOID CdbVariant::operator =(LPCTSTR pstr) {
  if(!pstr) {
    VariantClear(this);
    vt = VT_ERROR;
    scode = DISP_E_PARAMNOTFOUND;
  } else {
#if defined(UNICODE)
    bstrVal = SysAllocString(pstr);
#else
    bstrVal = SysAllocStringByteLen(pstr,strlen(pstr));
#endif
    vt = VT_BSTR;
  }
}

inline VOID CdbVariant::operator =(SHORT s) {
  if(s==-1) {
    vt = VT_ERROR;
    scode = DISP_E_PARAMNOTFOUND;
  } else {
    vt = VT_I2;
    iVal = s;
  }
}

inline VOID CdbVariant::operator =(const int i) {
  if(i==-1) {
    vt = VT_ERROR;
    scode = DISP_E_PARAMNOTFOUND;
  } else {
    vt = VT_I2;
    iVal =(SHORT)i;
  }
}

inline VOID CdbVariant::operator =(LONG l) {
  if(l==-1) {
    vt = VT_ERROR;
    scode = DISP_E_PARAMNOTFOUND;
  } else {
    vt = VT_I4;
    lVal = l;
  }
}

HRESULT CdbWideFromAnsi(LPSTR,unsigned int,BSTR *);

class CdbWide {
public:
  CONSTRUCTOR CdbWide(LPSTR pstr,unsigned int cb=0) {
    CdbWideFromAnsi(pstr,(pstr ? (cb==0 ? strlen(pstr) : cb) : 0),&m_bstr);
  }
  DESTRUCTOR ~CdbWide() {
    SysFreeString(m_bstr);
  }
  operator LPWSTR() { return (LPWSTR)m_bstr; }
  operator LPSTR() { return (LPSTR)m_bstr; }
  ULONG cBytes() { return SysStringByteLen(m_bstr); }
private:
  BSTR m_bstr;
};

class DLLEXPORT CdbOleObject : public CObject {
public:
  CONSTRUCTOR CdbOleObject(VOID);
  virtual DESTRUCTOR ~CdbOleObject(VOID);
  WINBOOL Exists(VOID);
  CdbOleObject &operator = (CdbOleObject &o);
  operator LPUNKNOWN(){ return GetInterface();}
  VOID SetInterface(LPUNKNOWN punk,WINBOOL bAddRef=FALSE);
  VOID SetInterface(REFIID riidClass,REFIID riidInterface);
  VOID SetInterfaceLic(REFIID riidClass,REFIID riidInterface);
  LPUNKNOWN GetInterface(WINBOOL bAddRef=FALSE,WINBOOL bThrowException=TRUE) const;
  virtual VOID OnInterfaceChange(VOID);
  VOID SetRichErrorInfo(LPOLESTR pstrSource,LPOLESTR pstrDescription,LPOLESTR pstrHelpFile,ULONG ulHelpID) const;
protected:
  WINBOOL StartOLE(VOID);
  LPUNKNOWN m_punkInterface;
};

class DLLEXPORT CdbCollection : public CdbOleObject {
public:
  virtual CdbObject ObItem(LONG i) = 0;
  virtual CdbObject ObItem(LPCTSTR pstr) = 0;
  virtual LONG GetCount(VOID) = 0;
  virtual VOID ObAppend(CdbObject &obj) = 0;
  virtual VOID Delete(LPCTSTR pstr) = 0;
  virtual VOID Refresh(VOID) = 0;
};

class DLLEXPORT CdbStaticCollection : public CdbCollection {
public:
  CdbObject ObItem(LONG i);
  CdbObject ObItem(LPCTSTR pstr);
  LONG GetCount(VOID);
  VOID ObAppend(CdbObject &obj);
  VOID Delete(LPCTSTR pstr);
  VOID Refresh(VOID);
};

class DLLEXPORT CdbDynamicCollection : public CdbCollection {
public:
  CdbObject ObItem(LONG i);
  CdbObject ObItem(LPCTSTR pstr);
  LONG GetCount(VOID);
  VOID ObAppend(CdbObject &obj);
  VOID Delete(LPCTSTR pstr);
  VOID Refresh(VOID);
};

#define DAOMFC_STATIC_COLLECTION_DECL(objColl,objSingle,intSingle) class DLLEXPORT objColl : public CdbStaticCollection { public: objSingle Item(LONG i); objSingle Item(LPCTSTR pstr); objSingle operator[](LONG i); objSingle operator[](LPCTSTR pstr); }
#define DAOMFC_DYNAMIC_COLLECTION_DECL(objColl,objSingle,intSingle) class DLLEXPORT objColl : public CdbDynamicCollection { public: objSingle Item(LONG i); objSingle Item(LPCTSTR pstr); VOID Append(objSingle &o); objSingle operator[](LONG i); objSingle operator[](LPCTSTR pstr); }

DAOMFC_STATIC_COLLECTION_DECL(CdbErrors,CdbError,DAOError);
DAOMFC_STATIC_COLLECTION_DECL(CdbDatabases,CdbDatabase,DAODatabase);
DAOMFC_STATIC_COLLECTION_DECL(CdbRecordsets,CdbRecordset,DAORecordset);
DAOMFC_STATIC_COLLECTION_DECL(CdbParameters,CdbParameter,DAOParameter);
DAOMFC_STATIC_COLLECTION_DECL(CdbDocuments,CdbDocument,DAODocument);
DAOMFC_STATIC_COLLECTION_DECL(CdbContainers,CdbContainer,DAOContainer);
DAOMFC_DYNAMIC_COLLECTION_DECL(CdbProperties,CdbProperty,DAOProperty);
DAOMFC_DYNAMIC_COLLECTION_DECL(CdbFields,CdbField,DAOField);
DAOMFC_DYNAMIC_COLLECTION_DECL(CdbQueryDefs,CdbQueryDef,DAOQueryDef);
DAOMFC_DYNAMIC_COLLECTION_DECL(CdbTableDefs,CdbTableDef,DAOTableDef);
DAOMFC_DYNAMIC_COLLECTION_DECL(CdbIndexes,CdbIndex,DAOIndex);
DAOMFC_DYNAMIC_COLLECTION_DECL(CdbRelations,CdbRelation,DAORelation);
DAOMFC_DYNAMIC_COLLECTION_DECL(CdbUsers,CdbUser,DAOUser);
DAOMFC_DYNAMIC_COLLECTION_DECL(CdbGroups,CdbGroup,DAOGroup);

class DLLEXPORT CdbWorkspaces : public CdbDynamicCollection {
  friend CdbDBEngine;
private:
  DAODBEngine *pDBEng;
  WINBOOL m_bDontStart;
public:
  CONSTRUCTOR CdbWorkspaces(VOID){pDBEng = NULL;}
  CdbWorkspace Item(LONG i);
  CdbWorkspace Item(LPCTSTR pstr);
  VOID Append(CdbWorkspace &o);
  CdbWorkspace operator[](LONG i);
  CdbWorkspace operator[](LPCTSTR pstr);
  VOID SetDBEngine(DAODBEngine *peng){pDBEng = peng;}
  VOID GetDelayedInterface();
};

class DLLEXPORT CdbConnections : public CdbStaticCollection {
public:
  CONSTRUCTOR CdbConnections(CdbConnections &Connections);
  CONSTRUCTOR CdbConnections() { pwrk = NULL; }
  CdbConnection Item(LONG i);
  CdbConnection Item(LPCTSTR pstr);
  CdbConnection operator[](LONG i);
  CdbConnection operator[](LPCTSTR pstr);
  CdbConnections &operator = (CdbConnections &o);
  LONG GetCount(VOID);
  VOID Refresh(VOID);
  VOID SetWorkspace(DAOWorkspace *pParent) { pwrk = pParent; }
private:
  VOID CheckInterface();
  DAOWorkspace *pwrk;
};

class DLLEXPORT CdbObject : public CdbOleObject {
public:
  CONSTRUCTOR CdbObject(VOID);
  CONSTRUCTOR CdbObject(LPUNKNOWN punk,WINBOOL bAddRef=FALSE);
  virtual CString GetName(VOID);
  virtual VOID SetName(LPCTSTR pstr);
  CdbProperties Properties;
};

class DLLEXPORT CdbGetRowsEx : public CdbObject {
public:
  CONSTRUCTOR CdbGetRowsEx(VOID);
  CONSTRUCTOR CdbGetRowsEx(ICDAORecordset *pGetRows,WINBOOL bAddRef=FALSE);
  CONSTRUCTOR CdbGetRowsEx(const CdbGetRowsEx &);
  CdbGetRowsEx &operator =(const CdbGetRowsEx &);
  VOID OnInterfaceChange(VOID);
};

#define DAOVINIT(var) do { (var).vt = VT_ERROR; (var).scode = DISP_E_PARAMNOTFOUND; } while (0)
#define STV(pstr) CdbVariant(pstr)
#define STB(pstr) V_BSTR(((LPVARIANT)STV(pstr)))
#define LTV(l) CdbVariant(l)
#define OLTV(l) CdbVariant((l))
#define BTB(b) ((VARIANT_BOOL)(b?-1:0))
#define BTV(b) CdbVariant(BTB(b),TRUE)
#define SHTV(s) CdbVariant((SHORT)s)
#define VTV(pv) CdbVariant(pv)
#define ATV(psa,var) do { if(!psa) { var.vt = VT_ERROR; var.scode = DISP_E_PARAMNOTFOUND; } else { var.vt = VT_ARRAY|VT_UI1; SafeArrayCopy(psa,&var.parray); } } while (0)
#define DAOMFC_CALL(hr) do { HRESULT hresult = (hr); if(FAILED(hresult)) { TRACE0("\nDBDAO Call Failed.\n\t"); TRACE2("\nIn file %s on line %d\n",_T("DBDAO.CPP"),__LINE__); TRACE1("hResult = %X\n",hresult); if(GetScode(hresult)==E_OUTOFMEMORY) AfxThrowMemoryException(); else throw CdbException(hresult); } } while (0)
#define LPROPGET(intDAO,meth) do { intDAO *p = (intDAO *)GetInterface(); LONG l = 0; DAOMFC_CALL(p->meth(&l)); return l; } while (0)
#define LPROPSET(intDAO,meth,l) do { intDAO *p = (intDAO *)GetInterface(); DAOMFC_CALL(p->meth(l)); } while(0)
#define WPROPGET(intDAO,meth) do { intDAO *p = (intDAO *)GetInterface(); SHORT s = 0; DAOMFC_CALL(p->meth(&s)); return s; } while (0)
#define WPROPSET(intDAO,meth,s) do { intDAO *p = (intDAO *)GetInterface(); DAOMFC_CALL(p->meth(s)); } while(0)
#define SPROPGET(intDAO,meth) do { intDAO *p = (intDAO *)GetInterface(); CdbBSTR bstr; DAOMFC_CALL(p->meth(bstr)); return bstr; } while (0)
#define SPROPSET(intDAO,meth,s) do { intDAO *p = (intDAO *)GetInterface(); DAOMFC_CALL(p->meth(STB(s))); } while(0)
#define DPROPGET(intDAO,meth) do { intDAO *p = (intDAO *)GetInterface(); VARIANT Var; VariantInit(&Var); DAOMFC_CALL(p->meth(&Var)); return Var; } while (0)
#define DPROPSET(intDAO,meth,pv) do { intDAO *p = (intDAO *)GetInterface(); DAOMFC_CALL(p->meth(*pv)); } while(0)
#define BPROPGET(intDAO,meth) do { intDAO *p = (intDAO *)GetInterface(); VARIANT_BOOL vb = 0; DAOMFC_CALL(p->meth(&vb)); return(WINBOOL)vb; } while (0)
#define BPROPSET(intDAO,meth,b) do { intDAO *p = (intDAO *)GetInterface(); DAOMFC_CALL(p->meth(BTB(b))); } while(0)
#define VPROPGET(intDAO,meth) do { intDAO *p = (intDAO *)GetInterface(); COleVariant v; VariantInit(&v); DAOMFC_CALL(p->meth(&v)); return &v; } while (0)
#define VPROPSET(intDAO,meth,pv) do { intDAO *p = (intDAO *)GetInterface(); DAOMFC_CALL(p->meth(*pv)); } while(0)
#define DWPROPGET(intDAO,meth) do { intDAO *p = (intDAO *)GetInterface(); DWORD dw = 0; DAOMFC_CALL(p->meth(&dw)); return dw; } while (0)
#define DAOMFC_STATIC_COLLECTION_IMPL(objColl,objSingle,intColl,intSingle) objSingle objColl::Item(LONG i) { return (intSingle *)(ObItem(i).GetInterface(TRUE)); } objSingle objColl::Item(LPCTSTR pstr) { return (intSingle *)(ObItem(pstr).GetInterface(TRUE)); } objSingle objColl::operator[](LONG i) { return (intSingle *)(Item(i).GetInterface(TRUE)); } objSingle objColl::operator[](LPCTSTR pstr) { return (intSingle *)(Item(pstr).GetInterface(TRUE)); }
#define DAOMFC_DYNAMIC_COLLECTION_IMPL(objColl,objSingle,intColl,intSingle) objSingle objColl::Item(LONG i) { return (intSingle *)(ObItem(i).GetInterface(TRUE)); } objSingle objColl::Item(LPCTSTR pstr) { return (intSingle *)(ObItem(pstr).GetInterface(TRUE)); } VOID objColl::Append(objSingle &o) { ObAppend(o); } objSingle objColl::operator[](LONG i) { return (intSingle *)(Item(i).GetInterface(TRUE)); } objSingle objColl::operator[](LPCTSTR pstr) { return (intSingle *)(Item(pstr).GetInterface(TRUE)); }

DECLARE_INTERFACE_(DAOMFCSCollection,_DAOCollection) {
  STDMETHOD(get_Item) (VARIANT index,LPUNKNOWN *ppunk);
};

DECLARE_INTERFACE_(DAOMFCDCollection,_DAODynaCollection) {
  STDMETHOD(get_Item) (VARIANT index,LPUNKNOWN *ppunk);
};

#endif /* __cplusplus */

#endif