msoledbsql.h 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452
  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. #ifndef __REQUIRED_RPCNDR_H_VERSION__
  7. #define __REQUIRED_RPCNDR_H_VERSION__ 475
  8. #endif
  9. #include "rpc.h"
  10. #include "rpcndr.h"
  11. #ifndef __RPCNDR_H_VERSION__
  12. #error This stub requires an updated version of <rpcndr.h>
  13. #endif
  14. #ifndef COM_NO_WINDOWS_H
  15. #include "windows.h"
  16. #include "ole2.h"
  17. #endif
  18. #ifndef __msoledbsql_h__
  19. #define __msoledbsql_h__
  20. #ifndef __ICommandWithParameters_FWD_DEFINED__
  21. #define __ICommandWithParameters_FWD_DEFINED__
  22. typedef struct ICommandWithParameters ICommandWithParameters;
  23. #endif
  24. #ifndef __IUMSInitialize_FWD_DEFINED__
  25. #define __IUMSInitialize_FWD_DEFINED__
  26. typedef struct IUMSInitialize IUMSInitialize;
  27. #endif
  28. #ifndef __ISQLServerErrorInfo_FWD_DEFINED__
  29. #define __ISQLServerErrorInfo_FWD_DEFINED__
  30. typedef struct ISQLServerErrorInfo ISQLServerErrorInfo;
  31. #endif
  32. #ifndef __IRowsetFastLoad_FWD_DEFINED__
  33. #define __IRowsetFastLoad_FWD_DEFINED__
  34. typedef struct IRowsetFastLoad IRowsetFastLoad;
  35. #endif
  36. #ifndef __ISchemaLock_FWD_DEFINED__
  37. #define __ISchemaLock_FWD_DEFINED__
  38. typedef struct ISchemaLock ISchemaLock;
  39. #endif
  40. #ifndef __IBCPSession_FWD_DEFINED__
  41. #define __IBCPSession_FWD_DEFINED__
  42. typedef struct IBCPSession IBCPSession;
  43. #endif
  44. #ifndef __IBCPSession2_FWD_DEFINED__
  45. #define __IBCPSession2_FWD_DEFINED__
  46. typedef struct IBCPSession2 IBCPSession2;
  47. #endif
  48. #ifndef __ISSAbort_FWD_DEFINED__
  49. #define __ISSAbort_FWD_DEFINED__
  50. typedef struct ISSAbort ISSAbort;
  51. #endif
  52. #ifndef __ISSCommandWithParameters_FWD_DEFINED__
  53. #define __ISSCommandWithParameters_FWD_DEFINED__
  54. typedef struct ISSCommandWithParameters ISSCommandWithParameters;
  55. #endif
  56. #ifndef __IDBAsynchStatus_FWD_DEFINED__
  57. #define __IDBAsynchStatus_FWD_DEFINED__
  58. typedef struct IDBAsynchStatus IDBAsynchStatus;
  59. #endif
  60. #ifndef __ISSAsynchStatus_FWD_DEFINED__
  61. #define __ISSAsynchStatus_FWD_DEFINED__
  62. typedef struct ISSAsynchStatus ISSAsynchStatus;
  63. #endif
  64. #include "unknwn.h"
  65. #include "oaidl.h"
  66. #ifdef __cplusplus
  67. extern "C"{
  68. #endif
  69. #ifndef MSOLEDBSQL_VER
  70. #define MSOLEDBSQL_VER 1800
  71. #endif
  72. #if (MSOLEDBSQL_VER >= 1800)
  73. #define MSOLEDBSQL_PRODUCT_NAME_FULL_ANSI "Microsoft OLE DB Driver for SQL Server"
  74. #define MSOLEDBSQL_PRODUCT_NAME_SHORT_ANSI "OLE DB Driver for SQL Server"
  75. #define MSOLEDBSQL_FILE_NAME_ANSI "msoledbsql"
  76. #define MSOLEDBSQL_FILE_NAME_FULL_ANSI "msoledbsql.dll"
  77. #define MSOLEDBSQL_PRODUCT_NAME_FULL_UNICODE L"Microsoft OLE DB Driver for SQL Server"
  78. #define MSOLEDBSQL_PRODUCT_NAME_SHORT_UNICODE L"OLE DB Driver for SQL Server"
  79. #define MSOLEDBSQL_FILE_NAME_UNICODE L"msoledbsql"
  80. #define MSOLEDBSQL_FILE_NAME_FULL_UNICODE L"msoledbsql.dll"
  81. #define MSOLEDBSQL_VI_PROG_ID_ANSI "MSOLEDBSQL"
  82. #define MSOLEDBSQL_VI_ERROR_LOOKUP_PROG_ID_ANSI "MSOLEDBSQL.ErrorLookup"
  83. #define MSOLEDBSQL_VI_ENUMERATOR_PROG_ID_ANSI "MSOLEDBSQL.Enumerator"
  84. #define MSOLEDBSQL_PROG_ID_ANSI "MSOLEDBSQL.1"
  85. #define MSOLEDBSQL_ERROR_LOOKUP_PROG_ID_ANSI "MSOLEDBSQL.ErrorLookup.1"
  86. #define MSOLEDBSQL_ENUMERATOR_PROG_ID_ANSI "MSOLEDBSQL.Enumerator.1"
  87. #define MSOLEDBSQL_VI_PROG_ID_UNICODE L"MSOLEDBSQL"
  88. #define MSOLEDBSQL_VI_ERROR_LOOKUP_PROG_ID_UNICODE L"MSOLEDBSQL.ErrorLookup"
  89. #define MSOLEDBSQL_VI_ENUMERATOR_PROG_ID_UNICODE L"MSOLEDBSQL.Enumerator"
  90. #define MSOLEDBSQL_PROG_ID_UNICODE L"MSOLEDBSQL.1"
  91. #define MSOLEDBSQL_ERROR_LOOKUP_PROG_ID_UNICODE L"MSOLEDBSQL.ErrorLookup.1"
  92. #define MSOLEDBSQL_ENUMERATOR_PROG_ID_UNICODE L"MSOLEDBSQL.Enumerator.1"
  93. #define MSOLEDBSQL_CLSID CLSID_MSOLEDBSQL
  94. #define MSOLEDBSQL_ERROR_CLSID CLSID_MSOLEDBSQL_ERROR
  95. #define MSOLEDBSQL_ENUMERATOR_CLSID CLSID_MSOLEDBSQL_ENUMERATOR
  96. #endif
  97. #if defined(_UNICODE) || defined(UNICODE)
  98. #define MSOLEDBSQL_PRODUCT_NAME_FULL MSOLEDBSQL_PRODUCT_NAME_FULL_UNICODE
  99. #define MSOLEDBSQL_PRODUCT_NAME_SHORT MSOLEDBSQL_PRODUCT_NAME_SHORT_UNICODE
  100. #define MSOLEDBSQL_FILE_NAME MSOLEDBSQL_FILE_NAME_UNICODE
  101. #define MSOLEDBSQL_FILE_NAME_FULL MSOLEDBSQL_FILE_NAME_FULL_UNICODE
  102. #define MSOLEDBSQL_VI_PROG_ID MSOLEDBSQL_VI_PROG_ID_UNICODE
  103. #define MSOLEDBSQL_VI_ERROR_LOOKUP_PROG_ID MSOLEDBSQL_VI_ERROR_LOOKUP_PROG_ID_UNICODE
  104. #define MSOLEDBSQL_VI_ENUMERATOR_PROG_ID MSOLEDBSQL_VI_ENUMERATOR_PROG_ID_UNICODE
  105. #define MSOLEDBSQL_PROG_ID MSOLEDBSQL_PROG_ID_UNICODE
  106. #define MSOLEDBSQL_ERROR_LOOKUP_PROG_ID MSOLEDBSQL_ERROR_LOOKUP_PROG_ID_UNICODE
  107. #define MSOLEDBSQL_ENUMERATOR_PROG_ID MSOLEDBSQL_ENUMERATOR_PROG_ID_UNICODE
  108. #else
  109. #define MSOLEDBSQL_PRODUCT_NAME_FULL MSOLEDBSQL_PRODUCT_NAME_FULL_ANSI
  110. #define MSOLEDBSQL_PRODUCT_NAME_SHORT MSOLEDBSQL_PRODUCT_NAME_SHORT_ANSI
  111. #define MSOLEDBSQL_FILE_NAME MSOLEDBSQL_FILE_NAME_ANSI
  112. #define MSOLEDBSQL_FILE_NAME_FULL MSOLEDBSQL_FILE_NAME_FULL_ANSI
  113. #define MSOLEDBSQL_VI_PROG_ID MSOLEDBSQL_VI_PROG_ID_ANSI
  114. #define MSOLEDBSQL_VI_ERROR_LOOKUP_PROG_ID MSOLEDBSQL_VI_ERROR_LOOKUP_PROG_ID_ANSI
  115. #define MSOLEDBSQL_VI_ENUMERATOR_PROG_ID MSOLEDBSQL_VI_ENUMERATOR_PROG_ID_ANSI
  116. #define MSOLEDBSQL_PROG_ID MSOLEDBSQL_PROG_ID_ANSI
  117. #define MSOLEDBSQL_ERROR_LOOKUP_PROG_ID MSOLEDBSQL_ERROR_LOOKUP_PROG_ID_ANSI
  118. #define MSOLEDBSQL_ENUMERATOR_PROG_ID MSOLEDBSQL_ENUMERATOR_PROG_ID_ANSI
  119. #endif
  120. #ifndef __oledb_h__
  121. #include <oledb.h>
  122. #endif
  123. #define V_SS_VT(X) ((X)->vt)
  124. #define V_SS_UNION(X, Y) ((X)->Y)
  125. #define V_SS_UI1(X) V_SS_UNION(X, bTinyIntVal)
  126. #define V_SS_I2(X) V_SS_UNION(X, sShortIntVal)
  127. #define V_SS_I4(X) V_SS_UNION(X, lIntVal)
  128. #define V_SS_I8(X) V_SS_UNION(X, llBigIntVal)
  129. #define V_SS_R4(X) V_SS_UNION(X, fltRealVal)
  130. #define V_SS_R8(X) V_SS_UNION(X, dblFloatVal)
  131. #define V_SS_UI4(X) V_SS_UNION(X, ulVal)
  132. #define V_SS_MONEY(X) V_SS_UNION(X, cyMoneyVal)
  133. #define V_SS_SMALLMONEY(X) V_SS_UNION(X, cyMoneyVal)
  134. #define V_SS_WSTRING(X) V_SS_UNION(X, NCharVal)
  135. #define V_SS_WVARSTRING(X) V_SS_UNION(X, NCharVal)
  136. #define V_SS_STRING(X) V_SS_UNION(X, CharVal)
  137. #define V_SS_VARSTRING(X) V_SS_UNION(X, CharVal)
  138. #define V_SS_BIT(X) V_SS_UNION(X, fBitVal)
  139. #define V_SS_GUID(X) V_SS_UNION(X, rgbGuidVal)
  140. #define V_SS_NUMERIC(X) V_SS_UNION(X, numNumericVal)
  141. #define V_SS_DECIMAL(X) V_SS_UNION(X, numNumericVal)
  142. #define V_SS_BINARY(X) V_SS_UNION(X, BinaryVal)
  143. #define V_SS_VARBINARY(X) V_SS_UNION(X, BinaryVal)
  144. #define V_SS_DATETIME(X) V_SS_UNION(X, tsDateTimeVal)
  145. #define V_SS_SMALLDATETIME(X) V_SS_UNION(X, tsDateTimeVal)
  146. #define V_SS_UNKNOWN(X) V_SS_UNION(X, UnknownType)
  147. #define V_SS_IMAGE(X) V_SS_UNION(X, ImageVal)
  148. #define V_SS_TEXT(X) V_SS_UNION(X, TextVal)
  149. #define V_SS_NTEXT(X) V_SS_UNION(X, NTextVal)
  150. #define V_SS_DATE(X) V_SS_UNION(X, dDateVal)
  151. #define V_SS_TIME2(X) V_SS_UNION(X, Time2Val)
  152. #define V_SS_DATETIME2(X) V_SS_UNION(X, DateTimeVal)
  153. #define V_SS_DATETIMEOFFSET(X) V_SS_UNION(X, DateTimeOffsetVal)
  154. typedef enum DBTYPEENUM EOledbTypes;
  155. #define DBTYPE_XML ((EOledbTypes) 141)
  156. #define DBTYPE_TABLE ((EOledbTypes) 143)
  157. #define DBTYPE_DBTIME2 ((EOledbTypes) 145)
  158. #define DBTYPE_DBTIMESTAMPOFFSET ((EOledbTypes) 146)
  159. #ifdef _SQLOLEDB_H_
  160. #undef DBTYPE_SQLVARIANT
  161. #endif
  162. #define DBTYPE_SQLVARIANT ((EOledbTypes) 144)
  163. #ifndef _SQLOLEDB_H_
  164. enum SQLVARENUM {
  165. VT_SS_EMPTY = DBTYPE_EMPTY, VT_SS_NULL = DBTYPE_NULL, VT_SS_UI1 = DBTYPE_UI1,
  166. VT_SS_I2 = DBTYPE_I2, VT_SS_I4 = DBTYPE_I4, VT_SS_I8 = DBTYPE_I8,
  167. VT_SS_R4 = DBTYPE_R4, VT_SS_R8 = DBTYPE_R8, VT_SS_MONEY = DBTYPE_CY,
  168. VT_SS_SMALLMONEY = 200, VT_SS_WSTRING = 201, VT_SS_WVARSTRING = 202,
  169. VT_SS_STRING = 203, VT_SS_VARSTRING = 204, VT_SS_BIT = DBTYPE_BOOL,
  170. VT_SS_GUID = DBTYPE_GUID, VT_SS_NUMERIC = DBTYPE_NUMERIC, VT_SS_DECIMAL = 205,
  171. VT_SS_DATETIME = DBTYPE_DBTIMESTAMP, VT_SS_SMALLDATETIME = 206,
  172. VT_SS_BINARY = 207, VT_SS_VARBINARY = 208, VT_SS_UNKNOWN = 209,
  173. VT_SS_DATE = DBTYPE_DBDATE, VT_SS_TIME2 = DBTYPE_DBTIME2,
  174. VT_SS_DATETIME2 = 212, VT_SS_DATETIMEOFFSET = DBTYPE_DBTIMESTAMPOFFSET
  175. };
  176. typedef unsigned short SSVARTYPE;
  177. enum DBPARAMFLAGSENUM_SS_100 {
  178. DBPARAMFLAGS_SS_ISVARIABLESCALE = 0x40000000
  179. };
  180. enum DBCOLUMNFLAGSENUM_SS_100 {
  181. DBCOLUMNFLAGS_SS_ISVARIABLESCALE = 0x40000000,
  182. DBCOLUMNFLAGS_SS_ISCOLUMNSET = 0x80000000
  183. };
  184. extern RPC_IF_HANDLE __MIDL_itf_msoledbsql_0000_0001_v0_0_c_ifspec;
  185. extern RPC_IF_HANDLE __MIDL_itf_msoledbsql_0000_0001_v0_0_s_ifspec;
  186. #ifndef __IUMSInitialize_INTERFACE_DEFINED__
  187. #define __IUMSInitialize_INTERFACE_DEFINED__
  188. EXTERN_C const IID IID_IUMSInitialize;
  189. #if defined(__cplusplus) && !defined(CINTERFACE)
  190. struct IUMSInitialize : public IUnknown {
  191. public:
  192. virtual HRESULT WINAPI Initialize(void *pUMS) = 0;
  193. };
  194. #else
  195. typedef struct IUMSInitializeVtbl {
  196. BEGIN_INTERFACE
  197. HRESULT (WINAPI *QueryInterface)(IUMSInitialize *This, REFIID riid, void **ppvObject);
  198. ULONG (WINAPI *AddRef)(IUMSInitialize *This);
  199. ULONG (WINAPI *Release)(IUMSInitialize *This);
  200. HRESULT (WINAPI *Initialize)(IUMSInitialize *This, void *pUMS);
  201. END_INTERFACE
  202. } IUMSInitializeVtbl;
  203. struct IUMSInitialize {
  204. CONST_VTBL struct IUMSInitializeVtbl *lpVtbl;
  205. };
  206. #ifdef COBJMACROS
  207. #define IUMSInitialize_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  208. #define IUMSInitialize_AddRef(This) (This)->lpVtbl->AddRef(This)
  209. #define IUMSInitialize_Release(This) (This)->lpVtbl->Release(This)
  210. #define IUMSInitialize_Initialize(This,pUMS) (This)->lpVtbl->Initialize(This,pUMS)
  211. #endif
  212. #endif
  213. #endif
  214. typedef struct tagSSErrorInfo {
  215. LPOLESTR pwszMessage;
  216. LPOLESTR pwszServer;
  217. LPOLESTR pwszProcedure;
  218. LONG lNative;
  219. BYTE bState;
  220. BYTE bClass;
  221. WORD wLineNumber;
  222. } SSERRORINFO;
  223. extern RPC_IF_HANDLE __MIDL_itf_msoledbsql_0000_0002_v0_0_c_ifspec;
  224. extern RPC_IF_HANDLE __MIDL_itf_msoledbsql_0000_0002_v0_0_s_ifspec;
  225. #ifndef __ISQLServerErrorInfo_INTERFACE_DEFINED__
  226. #define __ISQLServerErrorInfo_INTERFACE_DEFINED__
  227. EXTERN_C const IID IID_ISQLServerErrorInfo;
  228. #if defined(__cplusplus) && !defined(CINTERFACE)
  229. struct ISQLServerErrorInfo : public IUnknown {
  230. public:
  231. virtual HRESULT WINAPI GetErrorInfo(SSERRORINFO **ppErrorInfo, OLECHAR **ppStringsBuffer) = 0;
  232. };
  233. #else
  234. typedef struct ISQLServerErrorInfoVtbl {
  235. BEGIN_INTERFACE
  236. HRESULT (WINAPI *QueryInterface)(ISQLServerErrorInfo *This, REFIID riid, void **ppvObject);
  237. ULONG (WINAPI *AddRef)(ISQLServerErrorInfo *This);
  238. ULONG (WINAPI *Release)(ISQLServerErrorInfo *This);
  239. HRESULT (WINAPI *GetErrorInfo)(ISQLServerErrorInfo *This, SSERRORINFO **ppErrorInfo, OLECHAR **ppStringsBuffer);
  240. END_INTERFACE
  241. } ISQLServerErrorInfoVtbl;
  242. struct ISQLServerErrorInfo {
  243. CONST_VTBL struct ISQLServerErrorInfoVtbl *lpVtbl;
  244. };
  245. #ifdef COBJMACROS
  246. #define ISQLServerErrorInfo_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  247. #define ISQLServerErrorInfo_AddRef(This) (This)->lpVtbl->AddRef(This)
  248. #define ISQLServerErrorInfo_Release(This) (This)->lpVtbl->Release(This)
  249. #define ISQLServerErrorInfo_GetErrorInfo(This,ppErrorInfo,ppStringsBuffer) (This)->lpVtbl->GetErrorInfo(This,ppErrorInfo,ppStringsBuffer)
  250. #endif
  251. #endif
  252. #endif
  253. #ifndef __IRowsetFastLoad_INTERFACE_DEFINED__
  254. #define __IRowsetFastLoad_INTERFACE_DEFINED__
  255. EXTERN_C const IID IID_IRowsetFastLoad;
  256. #if defined(__cplusplus) && !defined(CINTERFACE)
  257. struct IRowsetFastLoad : public IUnknown {
  258. public:
  259. virtual HRESULT WINAPI InsertRow(HACCESSOR hAccessor, void *pData) = 0;
  260. virtual HRESULT WINAPI Commit(BOOL fDone) = 0;
  261. };
  262. #else
  263. typedef struct IRowsetFastLoadVtbl {
  264. BEGIN_INTERFACE
  265. HRESULT (WINAPI *QueryInterface)(IRowsetFastLoad *This, REFIID riid, void **ppvObject);
  266. ULONG (WINAPI *AddRef)(IRowsetFastLoad *This);
  267. ULONG (WINAPI *Release)(IRowsetFastLoad *This);
  268. HRESULT (WINAPI *InsertRow)(IRowsetFastLoad *This, HACCESSOR hAccessor, void *pData);
  269. HRESULT (WINAPI *Commit)(IRowsetFastLoad *This, BOOL fDone);
  270. END_INTERFACE
  271. } IRowsetFastLoadVtbl;
  272. struct IRowsetFastLoad {
  273. CONST_VTBL struct IRowsetFastLoadVtbl *lpVtbl;
  274. };
  275. #ifdef COBJMACROS
  276. #define IRowsetFastLoad_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  277. #define IRowsetFastLoad_AddRef(This) (This)->lpVtbl->AddRef(This)
  278. #define IRowsetFastLoad_Release(This) (This)->lpVtbl->Release(This)
  279. #define IRowsetFastLoad_InsertRow(This,hAccessor,pData) (This)->lpVtbl->InsertRow(This,hAccessor,pData)
  280. #define IRowsetFastLoad_Commit(This,fDone) (This)->lpVtbl->Commit(This,fDone)
  281. #endif
  282. #endif
  283. #endif
  284. #include <pshpack8.h>
  285. typedef struct tagDBTIME2 {
  286. USHORT hour;
  287. USHORT minute;
  288. USHORT second;
  289. ULONG fraction;
  290. } DBTIME2;
  291. typedef struct tagDBTIMESTAMPOFFSET {
  292. SHORT year;
  293. USHORT month;
  294. USHORT day;
  295. USHORT hour;
  296. USHORT minute;
  297. USHORT second;
  298. ULONG fraction;
  299. SHORT timezone_hour;
  300. SHORT timezone_minute;
  301. } DBTIMESTAMPOFFSET;
  302. #include <poppack.h>
  303. /* The original msoledbsql.h header uses a Microsoft-specific "extension" which
  304. * allows Microsoft Visual C++ compiler to ignore the [class.union.anon]'s first
  305. * paragraph in the standard for C++. To allow to use other compilers for this
  306. * header, we have to alter declaration the original `SSVARIANT` structure and
  307. * move declarations of some `struct`s out of the anonymous union inside the
  308. * `SSVARIANT` in the code below (yes -- breaking public API of the original
  309. * header). Moreover, we must place those moved declarations in different
  310. * locations for C and C++ code. To avoid code duplication we use the
  311. * `MSOLEDBSQL_H_DECL_SSVARIANT_STRUCTS` macro. */
  312. #define MSOLEDBSQL_H_DECL_SSVARIANT_STRUCTS \
  313. struct _Time2Val { \
  314. DBTIME2 tTime2Val; \
  315. BYTE bScale; \
  316. }; \
  317. struct _DateTimeVal { \
  318. DBTIMESTAMP tsDateTimeVal; \
  319. BYTE bScale; \
  320. }; \
  321. struct _DateTimeOffsetVal { \
  322. DBTIMESTAMPOFFSET tsoDateTimeOffsetVal; \
  323. BYTE bScale; \
  324. }; \
  325. struct _NCharVal { \
  326. SHORT sActualLength; \
  327. SHORT sMaxLength; \
  328. WCHAR *pwchNCharVal; \
  329. BYTE rgbReserved[5]; \
  330. DWORD dwReserved; \
  331. WCHAR *pwchReserved; \
  332. }; \
  333. struct _CharVal { \
  334. SHORT sActualLength; \
  335. SHORT sMaxLength; \
  336. CHAR *pchCharVal; \
  337. BYTE rgbReserved[5]; \
  338. DWORD dwReserved; \
  339. WCHAR *pwchReserved; \
  340. }; \
  341. struct _BinaryVal { \
  342. SHORT sActualLength; \
  343. SHORT sMaxLength; \
  344. BYTE *prgbBinaryVal; \
  345. DWORD dwReserved; \
  346. }; \
  347. struct _UnknownType { \
  348. DWORD dwActualLength; \
  349. BYTE rgMetadata[16]; \
  350. BYTE *pUnknownData; \
  351. }; \
  352. struct _BLOBType { \
  353. DBOBJECT dbobj; \
  354. IUnknown *pUnk; \
  355. };
  356. /* As it's already mentioned the original msoledbsql.h header defines members of
  357. * the `SSVARIANT::{unnamed union}` of structure types specifying those types
  358. * directly at the member definitions, which is fine for C, but not for C++ (see
  359. * commentaries above). Therefore, we have to separate declaration of those
  360. * structure types from the definition of the union's members.
  361. * For C code (`-x c`/`-Tc`) we can't declare the structure types directly
  362. * inside definition of the `SSVARIANT` type. Because: a) some C compilers know
  363. * about `-fms-extensions` option, and if the latter was specified when invoking
  364. * such compiler, a structure type declared within an enclosing structure type
  365. * becomes anonymous structure (changing memory layout of the enclosing `struct`
  366. * and disallowing several "nested" structure to have fields of the same name);
  367. * b) for all other C compilers there is no much sense to declare "nested"
  368. * structure types within an enclosing one, because semantically it declares all
  369. * those "nested" structure types at scope where this header is included (6.2.1
  370. * Scopes of identifiers). */
  371. #ifndef __cplusplus
  372. MSOLEDBSQL_H_DECL_SSVARIANT_STRUCTS
  373. #endif
  374. struct SSVARIANT {
  375. SSVARTYPE vt;
  376. DWORD dwReserved1;
  377. DWORD dwReserved2;
  378. /* For C++ code (`-x c++`/`-Tp`) we may move the declarations here. This, at
  379. * least, limits scope of the declarations to the `SSVARIANT` structure, if we
  380. * compare declaration of the structures at the global scope (as it's made for
  381. * C code). Both variants break public API of the original header file, but
  382. * unfortunately that's unavoidable. */
  383. #ifdef __cplusplus
  384. MSOLEDBSQL_H_DECL_SSVARIANT_STRUCTS
  385. #endif
  386. union {
  387. BYTE bTinyIntVal;
  388. SHORT sShortIntVal;
  389. LONG lIntVal;
  390. LONGLONG llBigIntVal;
  391. FLOAT fltRealVal;
  392. DOUBLE dblFloatVal;
  393. CY cyMoneyVal;
  394. VARIANT_BOOL fBitVal;
  395. BYTE rgbGuidVal[16];
  396. DB_NUMERIC numNumericVal;
  397. DBDATE dDateVal;
  398. DBTIMESTAMP tsDateTimeVal;
  399. struct _Time2Val Time2Val;
  400. struct _DateTimeVal DateTimeVal;
  401. struct _DateTimeOffsetVal DateTimeOffsetVal;
  402. struct _NCharVal NCharVal;
  403. struct _CharVal CharVal;
  404. struct _BinaryVal BinaryVal;
  405. struct _UnknownType UnknownType;
  406. struct _BLOBType BLOBType;
  407. };
  408. };
  409. typedef DWORD LOCKMODE;
  410. enum LOCKMODEENUM {
  411. LOCKMODE_INVALID = 0, LOCKMODE_EXCLUSIVE = (LOCKMODE_INVALID + 1),
  412. LOCKMODE_SHARED = (LOCKMODE_EXCLUSIVE + 1)
  413. };
  414. extern RPC_IF_HANDLE __MIDL_itf_msoledbsql_0000_0004_v0_0_c_ifspec;
  415. extern RPC_IF_HANDLE __MIDL_itf_msoledbsql_0000_0004_v0_0_s_ifspec;
  416. #ifndef __ISchemaLock_INTERFACE_DEFINED__
  417. #define __ISchemaLock_INTERFACE_DEFINED__
  418. EXTERN_C const IID IID_ISchemaLock;
  419. #if defined(__cplusplus) && !defined(CINTERFACE)
  420. struct ISchemaLock : public IUnknown {
  421. public:
  422. virtual HRESULT WINAPI GetSchemaLock(DBID *pTableID, LOCKMODE lmMode, HANDLE *phLockHandle, ULONGLONG *pTableVersion) = 0;
  423. virtual HRESULT WINAPI ReleaseSchemaLock(HANDLE hLockHandle) = 0;
  424. };
  425. #else
  426. typedef struct ISchemaLockVtbl {
  427. BEGIN_INTERFACE
  428. HRESULT (WINAPI *QueryInterface)(ISchemaLock *This, REFIID riid, void **ppvObject);
  429. ULONG (WINAPI *AddRef)(ISchemaLock *This);
  430. ULONG (WINAPI *Release)(ISchemaLock *This);
  431. HRESULT (WINAPI *GetSchemaLock)(ISchemaLock *This, DBID *pTableID, LOCKMODE lmMode, HANDLE *phLockHandle, ULONGLONG *pTableVersion);
  432. HRESULT (WINAPI *ReleaseSchemaLock)(ISchemaLock *This, HANDLE hLockHandle);
  433. END_INTERFACE
  434. } ISchemaLockVtbl;
  435. struct ISchemaLock {
  436. CONST_VTBL struct ISchemaLockVtbl *lpVtbl;
  437. };
  438. #ifdef COBJMACROS
  439. #define ISchemaLock_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  440. #define ISchemaLock_AddRef(This) (This)->lpVtbl->AddRef(This)
  441. #define ISchemaLock_Release(This) (This)->lpVtbl->Release(This)
  442. #define ISchemaLock_GetSchemaLock(This,pTableID,lmMode,phLockHandle,pTableVersion) (This)->lpVtbl->GetSchemaLock(This,pTableID,lmMode,phLockHandle,pTableVersion)
  443. #define ISchemaLock_ReleaseSchemaLock(This,hLockHandle) (This)->lpVtbl->ReleaseSchemaLock(This,hLockHandle)
  444. #endif
  445. #endif
  446. #endif
  447. #ifndef __IBCPSession_INTERFACE_DEFINED__
  448. #define __IBCPSession_INTERFACE_DEFINED__
  449. EXTERN_C const IID IID_IBCPSession;
  450. #if defined(__cplusplus) && !defined(CINTERFACE)
  451. struct IBCPSession : public IUnknown {
  452. public:
  453. virtual HRESULT WINAPI BCPColFmt(DBORDINAL idxUserDataCol, int eUserDataType, int cbIndicator, int cbUserData, BYTE *pbUserDataTerm, int cbUserDataTerm, DBORDINAL idxServerCol) = 0;
  454. virtual HRESULT WINAPI BCPColumns(DBCOUNTITEM nColumns) = 0;
  455. virtual HRESULT WINAPI BCPControl(int eOption, void *iValue) = 0;
  456. virtual HRESULT WINAPI BCPDone(void) = 0;
  457. virtual HRESULT WINAPI BCPExec(DBROWCOUNT *pRowsCopied) = 0;
  458. virtual HRESULT WINAPI BCPInit(const wchar_t *pwszTable, const wchar_t *pwszDataFile, const wchar_t *pwszErrorFile, int eDirection) = 0;
  459. virtual HRESULT WINAPI BCPReadFmt(const wchar_t *pwszFormatFile) = 0;
  460. virtual HRESULT WINAPI BCPWriteFmt(const wchar_t *pwszFormatFile) = 0;
  461. };
  462. #else
  463. typedef struct IBCPSessionVtbl {
  464. BEGIN_INTERFACE
  465. HRESULT (WINAPI *QueryInterface)(IBCPSession *This, REFIID riid, void **ppvObject);
  466. ULONG (WINAPI *AddRef)(IBCPSession *This);
  467. ULONG (WINAPI *Release)(IBCPSession *This);
  468. HRESULT (WINAPI *BCPColFmt)(IBCPSession *This, DBORDINAL idxUserDataCol, int eUserDataType, int cbIndicator, int cbUserData, BYTE *pbUserDataTerm, int cbUserDataTerm, DBORDINAL idxServerCol);
  469. HRESULT (WINAPI *BCPColumns)(IBCPSession *This, DBCOUNTITEM nColumns);
  470. HRESULT (WINAPI *BCPControl)(IBCPSession *This, int eOption, void *iValue);
  471. HRESULT (WINAPI *BCPDone)(IBCPSession *This);
  472. HRESULT (WINAPI *BCPExec)(IBCPSession *This, DBROWCOUNT *pRowsCopied);
  473. HRESULT (WINAPI *BCPInit)(IBCPSession *This, const wchar_t *pwszTable, const wchar_t *pwszDataFile, const wchar_t *pwszErrorFile, int eDirection);
  474. HRESULT (WINAPI *BCPReadFmt)(IBCPSession *This, const wchar_t *pwszFormatFile);
  475. HRESULT (WINAPI *BCPWriteFmt)(IBCPSession *This, const wchar_t *pwszFormatFile);
  476. END_INTERFACE
  477. } IBCPSessionVtbl;
  478. struct IBCPSession {
  479. CONST_VTBL struct IBCPSessionVtbl *lpVtbl;
  480. };
  481. #ifdef COBJMACROS
  482. #define IBCPSession_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  483. #define IBCPSession_AddRef(This) (This)->lpVtbl->AddRef(This)
  484. #define IBCPSession_Release(This) (This)->lpVtbl->Release(This)
  485. #define IBCPSession_BCPColFmt(This,idxUserDataCol,eUserDataType,cbIndicator,cbUserData,pbUserDataTerm,cbUserDataTerm,idxServerCol) (This)->lpVtbl->BCPColFmt(This,idxUserDataCol,eUserDataType,cbIndicator,cbUserData,pbUserDataTerm,cbUserDataTerm,idxServerCol)
  486. #define IBCPSession_BCPColumns(This,nColumns) (This)->lpVtbl->BCPColumns(This,nColumns)
  487. #define IBCPSession_BCPControl(This,eOption,iValue) (This)->lpVtbl->BCPControl(This,eOption,iValue)
  488. #define IBCPSession_BCPDone(This) (This)->lpVtbl->BCPDone(This)
  489. #define IBCPSession_BCPExec(This,pRowsCopied) (This)->lpVtbl->BCPExec(This,pRowsCopied)
  490. #define IBCPSession_BCPInit(This,pwszTable,pwszDataFile,pwszErrorFile,eDirection) (This)->lpVtbl->BCPInit(This,pwszTable,pwszDataFile,pwszErrorFile,eDirection)
  491. #define IBCPSession_BCPReadFmt(This,pwszFormatFile) (This)->lpVtbl->BCPReadFmt(This,pwszFormatFile)
  492. #define IBCPSession_BCPWriteFmt(This,pwszFormatFile) (This)->lpVtbl->BCPWriteFmt(This,pwszFormatFile)
  493. #endif
  494. #endif
  495. #endif
  496. #ifndef __IBCPSession2_INTERFACE_DEFINED__
  497. #define __IBCPSession2_INTERFACE_DEFINED__
  498. EXTERN_C const IID IID_IBCPSession2;
  499. #if defined(__cplusplus) && !defined(CINTERFACE)
  500. struct IBCPSession2 : public IBCPSession {
  501. public:
  502. virtual HRESULT WINAPI BCPSetBulkMode(int property, void *pField, int cbField, void *pRow, int cbRow) = 0;
  503. };
  504. #else
  505. typedef struct IBCPSession2Vtbl {
  506. BEGIN_INTERFACE
  507. HRESULT (WINAPI *QueryInterface)(IBCPSession2 *This, REFIID riid, void **ppvObject);
  508. ULONG (WINAPI *AddRef)(IBCPSession2 *This);
  509. ULONG (WINAPI *Release)(IBCPSession2 *This);
  510. HRESULT (WINAPI *BCPColFmt)(IBCPSession2 *This, DBORDINAL idxUserDataCol, int eUserDataType, int cbIndicator, int cbUserData, BYTE *pbUserDataTerm, int cbUserDataTerm, DBORDINAL idxServerCol);
  511. HRESULT (WINAPI *BCPColumns)(IBCPSession2 *This, DBCOUNTITEM nColumns);
  512. HRESULT (WINAPI *BCPControl)(IBCPSession2 *This, int eOption, void *iValue);
  513. HRESULT (WINAPI *BCPDone)(IBCPSession2 *This);
  514. HRESULT (WINAPI *BCPExec)(IBCPSession2 *This, DBROWCOUNT *pRowsCopied);
  515. HRESULT (WINAPI *BCPInit)(IBCPSession2 *This, const wchar_t *pwszTable, const wchar_t *pwszDataFile, const wchar_t *pwszErrorFile, int eDirection);
  516. HRESULT (WINAPI *BCPReadFmt)(IBCPSession2 *This, const wchar_t *pwszFormatFile);
  517. HRESULT (WINAPI *BCPWriteFmt)(IBCPSession2 *This, const wchar_t *pwszFormatFile);
  518. HRESULT (WINAPI *BCPSetBulkMode)(IBCPSession2 *This, int property, void *pField, int cbField, void *pRow, int cbRow);
  519. END_INTERFACE
  520. } IBCPSession2Vtbl;
  521. struct IBCPSession2 {
  522. CONST_VTBL struct IBCPSession2Vtbl *lpVtbl;
  523. };
  524. #ifdef COBJMACROS
  525. #define IBCPSession2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  526. #define IBCPSession2_AddRef(This) (This)->lpVtbl->AddRef(This)
  527. #define IBCPSession2_Release(This) (This)->lpVtbl->Release(This)
  528. #define IBCPSession2_BCPColFmt(This,idxUserDataCol,eUserDataType,cbIndicator,cbUserData,pbUserDataTerm,cbUserDataTerm,idxServerCol) (This)->lpVtbl->BCPColFmt(This,idxUserDataCol,eUserDataType,cbIndicator,cbUserData,pbUserDataTerm,cbUserDataTerm,idxServerCol)
  529. #define IBCPSession2_BCPColumns(This,nColumns) (This)->lpVtbl->BCPColumns(This,nColumns)
  530. #define IBCPSession2_BCPControl(This,eOption,iValue) (This)->lpVtbl->BCPControl(This,eOption,iValue)
  531. #define IBCPSession2_BCPDone(This) (This)->lpVtbl->BCPDone(This)
  532. #define IBCPSession2_BCPExec(This,pRowsCopied) (This)->lpVtbl->BCPExec(This,pRowsCopied)
  533. #define IBCPSession2_BCPInit(This,pwszTable,pwszDataFile,pwszErrorFile,eDirection) (This)->lpVtbl->BCPInit(This,pwszTable,pwszDataFile,pwszErrorFile,eDirection)
  534. #define IBCPSession2_BCPReadFmt(This,pwszFormatFile) (This)->lpVtbl->BCPReadFmt(This,pwszFormatFile)
  535. #define IBCPSession2_BCPWriteFmt(This,pwszFormatFile) (This)->lpVtbl->BCPWriteFmt(This,pwszFormatFile)
  536. #define IBCPSession2_BCPSetBulkMode(This,property,pField,cbField,pRow,cbRow) (This,property,pField,cbField,pRow,cbRow)
  537. #endif
  538. #endif
  539. #endif
  540. #endif /* not _SQLOLEDB_H_ */
  541. #define ISOLATIONLEVEL_SNAPSHOT ((ISOLATIONLEVEL)(0x01000000))
  542. #define DBPROPVAL_TI_SNAPSHOT 0x01000000L
  543. extern RPC_IF_HANDLE __MIDL_itf_msoledbsql_0000_0007_v0_0_c_ifspec;
  544. extern RPC_IF_HANDLE __MIDL_itf_msoledbsql_0000_0007_v0_0_s_ifspec;
  545. #ifndef __ISSAbort_INTERFACE_DEFINED__
  546. #define __ISSAbort_INTERFACE_DEFINED__
  547. EXTERN_C const IID IID_ISSAbort;
  548. #if defined(__cplusplus) && !defined(CINTERFACE)
  549. struct ISSAbort : public IUnknown {
  550. public:
  551. virtual HRESULT WINAPI Abort(void) = 0;
  552. };
  553. #else
  554. typedef struct ISSAbortVtbl {
  555. BEGIN_INTERFACE
  556. HRESULT (WINAPI *QueryInterface)(ISSAbort *This, REFIID riid, void **ppvObject);
  557. ULONG (WINAPI *AddRef)(ISSAbort *This);
  558. ULONG (WINAPI *Release)(ISSAbort *This);
  559. HRESULT (WINAPI *Abort)(ISSAbort *This);
  560. END_INTERFACE
  561. } ISSAbortVtbl;
  562. struct ISSAbort {
  563. CONST_VTBL struct ISSAbortVtbl *lpVtbl;
  564. };
  565. #ifdef COBJMACROS
  566. #define ISSAbort_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  567. #define ISSAbort_AddRef(This) (This)->lpVtbl->AddRef(This)
  568. #define ISSAbort_Release(This) (This)->lpVtbl->Release(This)
  569. #define ISSAbort_Abort(This) (This)->lpVtbl->Abort(This)
  570. #endif
  571. #endif
  572. #endif
  573. enum DBBINDFLAGENUM90 {
  574. DBBINDFLAG_OBJECT = 0x2
  575. };
  576. enum SSACCESSORFLAGS {
  577. SSACCESSOR_ROWDATA = 0x100
  578. };
  579. enum DBPROPFLAGSENUM90 {
  580. DBPROPFLAGS_PARAMETER = 0x10000
  581. };
  582. typedef struct tagSSPARAMPROPS {
  583. DBORDINAL iOrdinal;
  584. ULONG cPropertySets;
  585. DBPROPSET *rgPropertySets;
  586. } SSPARAMPROPS;
  587. extern RPC_IF_HANDLE __MIDL_itf_msoledbsql_0000_0008_v0_0_c_ifspec;
  588. extern RPC_IF_HANDLE __MIDL_itf_msoledbsql_0000_0008_v0_0_s_ifspec;
  589. #ifndef __ISSCommandWithParameters_INTERFACE_DEFINED__
  590. #define __ISSCommandWithParameters_INTERFACE_DEFINED__
  591. EXTERN_C const IID IID_ISSCommandWithParameters;
  592. #if defined(__cplusplus) && !defined(CINTERFACE)
  593. struct ISSCommandWithParameters : public ICommandWithParameters {
  594. public:
  595. virtual HRESULT WINAPI GetParameterProperties(DB_UPARAMS *pcParams, SSPARAMPROPS **prgParamProperties) = 0;
  596. virtual HRESULT WINAPI SetParameterProperties(DB_UPARAMS cParams, SSPARAMPROPS rgParamProperties[]) = 0;
  597. };
  598. #else
  599. typedef struct ISSCommandWithParametersVtbl {
  600. BEGIN_INTERFACE
  601. HRESULT (WINAPI *QueryInterface)(ISSCommandWithParameters *This, REFIID riid, void **ppvObject);
  602. ULONG (WINAPI *AddRef)(ISSCommandWithParameters *This);
  603. ULONG (WINAPI *Release)(ISSCommandWithParameters *This);
  604. HRESULT (WINAPI *GetParameterInfo)(ISSCommandWithParameters *This, DB_UPARAMS *pcParams, DBPARAMINFO **prgParamInfo, OLECHAR **ppNamesBuffer);
  605. HRESULT (WINAPI *MapParameterNames)(ISSCommandWithParameters *This, DB_UPARAMS cParamNames, const OLECHAR *rgParamNames[], DB_LPARAMS rgParamOrdinals[]);
  606. HRESULT (WINAPI *SetParameterInfo)(ISSCommandWithParameters *This, DB_UPARAMS cParams, const DB_UPARAMS rgParamOrdinals[], const DBPARAMBINDINFO rgParamBindInfo[]);
  607. HRESULT (WINAPI *GetParameterProperties)(ISSCommandWithParameters *This, DB_UPARAMS *pcParams, SSPARAMPROPS **prgParamProperties);
  608. HRESULT (WINAPI *SetParameterProperties)(ISSCommandWithParameters *This, DB_UPARAMS cParams, SSPARAMPROPS rgParamProperties[]);
  609. END_INTERFACE
  610. } ISSCommandWithParametersVtbl;
  611. struct ISSCommandWithParameters {
  612. CONST_VTBL struct ISSCommandWithParametersVtbl *lpVtbl;
  613. };
  614. #ifdef COBJMACROS
  615. #define ISSCommandWithParameters_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  616. #define ISSCommandWithParameters_AddRef(This) (This)->lpVtbl->AddRef(This)
  617. #define ISSCommandWithParameters_Release(This) (This)->lpVtbl->Release(This)
  618. #define ISSCommandWithParameters_GetParameterInfo(This,pcParams,prgParamInfo,ppNamesBuffer) (This)->lpVtbl->GetParameterInfo(This,pcParams,prgParamInfo,ppNamesBuffer)
  619. #define ISSCommandWithParameters_MapParameterNames(This,cParamNames,rgParamNames,rgParamOrdinals) (This)->lpVtbl->MapParameterNames(This,cParamNames,rgParamNames,rgParamOrdinals)
  620. #define ISSCommandWithParameters_SetParameterInfo(This,cParams,rgParamOrdinals,rgParamBindInfo) (This)->lpVtbl->SetParameterInfo(This,cParams,rgParamOrdinals,rgParamBindInfo)
  621. #define ISSCommandWithParameters_GetParameterProperties(This,pcParams,prgParamProperties) (This)->lpVtbl->GetParameterProperties(This,pcParams,prgParamProperties)
  622. #define ISSCommandWithParameters_SetParameterProperties(This,cParams,rgParamProperties) (This)->lpVtbl->SetParameterProperties(This,cParams,rgParamProperties)
  623. #endif
  624. #endif
  625. #endif
  626. #ifndef __IDBAsynchStatus_INTERFACE_DEFINED__
  627. #define __IDBAsynchStatus_INTERFACE_DEFINED__
  628. EXTERN_C const IID IID_IDBAsynchStatus;
  629. #if defined(__cplusplus) && !defined(CINTERFACE)
  630. struct IDBAsynchStatus : public IUnknown {
  631. public:
  632. virtual HRESULT WINAPI Abort(HCHAPTER hChapter, DBASYNCHOP eOperation) = 0;
  633. virtual HRESULT WINAPI GetStatus(HCHAPTER hChapter, DBASYNCHOP eOperation, DBCOUNTITEM *pulProgress, DBCOUNTITEM *pulProgressMax, DBASYNCHPHASE *peAsynchPhase, LPOLESTR *ppwszStatusText) = 0;
  634. };
  635. #else
  636. typedef struct IDBAsynchStatusVtbl {
  637. BEGIN_INTERFACE
  638. HRESULT (WINAPI *QueryInterface)(IDBAsynchStatus *This, REFIID riid, void **ppvObject);
  639. ULONG (WINAPI *AddRef)(IDBAsynchStatus *This);
  640. ULONG (WINAPI *Release)(IDBAsynchStatus *This);
  641. HRESULT (WINAPI *Abort)(IDBAsynchStatus *This, HCHAPTER hChapter, DBASYNCHOP eOperation);
  642. HRESULT (WINAPI *GetStatus)(IDBAsynchStatus *This, HCHAPTER hChapter, DBASYNCHOP eOperation, DBCOUNTITEM *pulProgress, DBCOUNTITEM *pulProgressMax, DBASYNCHPHASE *peAsynchPhase, LPOLESTR *ppwszStatusText);
  643. END_INTERFACE
  644. } IDBAsynchStatusVtbl;
  645. struct IDBAsynchStatus {
  646. CONST_VTBL struct IDBAsynchStatusVtbl *lpVtbl;
  647. };
  648. #ifdef COBJMACROS
  649. #define IDBAsynchStatus_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  650. #define IDBAsynchStatus_AddRef(This) (This)->lpVtbl->AddRef(This)
  651. #define IDBAsynchStatus_Release(This) (This)->lpVtbl->Release(This)
  652. #define IDBAsynchStatus_Abort(This,hChapter,eOperation) (This)->lpVtbl->Abort(This,hChapter,eOperation)
  653. #define IDBAsynchStatus_GetStatus(This,hChapter,eOperation,pulProgress,pulProgressMax,peAsynchPhase,ppwszStatusText) (This)->lpVtbl->GetStatus(This,hChapter,eOperation,pulProgress,pulProgressMax,peAsynchPhase,ppwszStatusText)
  654. #endif
  655. #endif
  656. HRESULT WINAPI IDBAsynchStatus_RemoteAbort_Proxy(IDBAsynchStatus *This, HCHAPTER hChapter, DBASYNCHOP eOperation, IErrorInfo **ppErrorInfoRem);
  657. void __RPC_STUB IDBAsynchStatus_RemoteAbort_Stub(IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase);
  658. HRESULT WINAPI IDBAsynchStatus_RemoteGetStatus_Proxy(IDBAsynchStatus *This, HCHAPTER hChapter, DBASYNCHOP eOperation, DBCOUNTITEM *pulProgress, DBCOUNTITEM *pulProgressMax, DBASYNCHPHASE *peAsynchPhase, LPOLESTR *ppwszStatusText, IErrorInfo **ppErrorInfoRem);
  659. void __RPC_STUB IDBAsynchStatus_RemoteGetStatus_Stub(IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase);
  660. #endif
  661. #ifndef __ISSAsynchStatus_INTERFACE_DEFINED__
  662. #define __ISSAsynchStatus_INTERFACE_DEFINED__
  663. EXTERN_C const IID IID_ISSAsynchStatus;
  664. #if defined(__cplusplus) && !defined(CINTERFACE)
  665. struct ISSAsynchStatus : public IDBAsynchStatus {
  666. public:
  667. virtual HRESULT WINAPI WaitForAsynchCompletion(DWORD dwMillisecTimeOut) = 0;
  668. };
  669. #else
  670. typedef struct ISSAsynchStatusVtbl {
  671. BEGIN_INTERFACE
  672. HRESULT (WINAPI *QueryInterface)(ISSAsynchStatus *This, REFIID riid, void **ppvObject);
  673. ULONG (WINAPI *AddRef)(ISSAsynchStatus *This);
  674. ULONG (WINAPI *Release)(ISSAsynchStatus *This);
  675. HRESULT (WINAPI *Abort)(ISSAsynchStatus *This, HCHAPTER hChapter, DBASYNCHOP eOperation);
  676. HRESULT (WINAPI *GetStatus)(ISSAsynchStatus *This, HCHAPTER hChapter, DBASYNCHOP eOperation, DBCOUNTITEM *pulProgress, DBCOUNTITEM *pulProgressMax, DBASYNCHPHASE *peAsynchPhase, LPOLESTR *ppwszStatusText);
  677. HRESULT (WINAPI *WaitForAsynchCompletion)(ISSAsynchStatus *This, DWORD dwMillisecTimeOut);
  678. END_INTERFACE
  679. } ISSAsynchStatusVtbl;
  680. struct ISSAsynchStatus {
  681. CONST_VTBL struct ISSAsynchStatusVtbl *lpVtbl;
  682. };
  683. #ifdef COBJMACROS
  684. #define ISSAsynchStatus_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  685. #define ISSAsynchStatus_AddRef(This) (This)->lpVtbl->AddRef(This)
  686. #define ISSAsynchStatus_Release(This) (This)->lpVtbl->Release(This)
  687. #define ISSAsynchStatus_Abort(This,hChapter,eOperation) (This)->lpVtbl->Abort(This,hChapter,eOperation)
  688. #define ISSAsynchStatus_GetStatus(This,hChapter,eOperation,pulProgress,pulProgressMax,peAsynchPhase,ppwszStatusText) (This)->lpVtbl->GetStatus(This,hChapter,eOperation,pulProgress,pulProgressMax,peAsynchPhase,ppwszStatusText)
  689. #define ISSAsynchStatus_WaitForAsynchCompletion(This,dwMillisecTimeOut) (This)->lpVtbl->WaitForAsynchCompletion(This,dwMillisecTimeOut)
  690. #endif
  691. #endif
  692. #endif
  693. #define TABLE_HAS_UPDATE_INSTEAD_OF_TRIGGER 0x00000001
  694. #define TABLE_HAS_DELETE_INSTEAD_OF_TRIGGER 0x00000002
  695. #define TABLE_HAS_INSERT_INSTEAD_OF_TRIGGER 0x00000004
  696. #define TABLE_HAS_AFTER_UPDATE_TRIGGER 0x00000008
  697. #define TABLE_HAS_AFTER_DELETE_TRIGGER 0x00000010
  698. #define TABLE_HAS_AFTER_INSERT_TRIGGER 0x00000020
  699. #define TABLE_HAS_CASCADE_UPDATE 0x00000040
  700. #define TABLE_HAS_CASCADE_DELETE 0x00000080
  701. #if (OLEDBVER >= 0x0210)
  702. #define DBPROP_INIT_GENERALTIMEOUT 0x11cL
  703. #endif
  704. #define SSPROP_ENABLEFASTLOAD 2
  705. #define SSPROP_ENABLEBULKCOPY 3
  706. #define SSPROP_UNICODELCID 2
  707. #define SSPROP_UNICODECOMPARISONSTYLE 3
  708. #define SSPROP_COLUMNLEVELCOLLATION 4
  709. #define SSPROP_CHARACTERSET 5
  710. #define SSPROP_SORTORDER 6
  711. #define SSPROP_CURRENTCOLLATION 7
  712. #define SSPROP_INTEGRATEDAUTHENTICATIONMETHOD 8
  713. #define SSPROP_MUTUALLYAUTHENTICATED 9
  714. #define SSPROP_INIT_CURRENTLANGUAGE 4
  715. #define SSPROP_INIT_NETWORKADDRESS 5
  716. #define SSPROP_INIT_NETWORKLIBRARY 6
  717. #define SSPROP_INIT_USEPROCFORPREP 7
  718. #define SSPROP_INIT_AUTOTRANSLATE 8
  719. #define SSPROP_INIT_PACKETSIZE 9
  720. #define SSPROP_INIT_APPNAME 10
  721. #define SSPROP_INIT_WSID 11
  722. #define SSPROP_INIT_FILENAME 12
  723. #define SSPROP_INIT_ENCRYPT 13
  724. #define SSPROP_AUTH_REPL_SERVER_NAME 14
  725. #define SSPROP_INIT_TAGCOLUMNCOLLATION 15
  726. #define SSPROP_INIT_MARSCONNECTION 16
  727. #define SSPROP_INIT_FAILOVERPARTNER 18
  728. #define SSPROP_AUTH_OLD_PASSWORD 19
  729. #define SSPROP_INIT_DATATYPECOMPATIBILITY 20
  730. #define SSPROP_INIT_TRUST_SERVER_CERTIFICATE 21
  731. #define SSPROP_INIT_SERVERSPN 22
  732. #define SSPROP_INIT_FAILOVERPARTNERSPN 23
  733. #define SSPROP_INIT_APPLICATIONINTENT 24
  734. #define SSPROP_INIT_MULTISUBNETFAILOVER 25
  735. #define SSPROP_INIT_USEFMTONLY 26
  736. #define SSPROPVAL_USEPROCFORPREP_OFF 0
  737. #define SSPROPVAL_USEPROCFORPREP_ON 1
  738. #define SSPROPVAL_USEPROCFORPREP_ON_DROP 2
  739. #define SSPROPVAL_DATATYPECOMPATIBILITY_SQL2000 80
  740. #define SSPROPVAL_DATATYPECOMPATIBILITY_DEFAULT 0
  741. #define SSPROP_QUOTEDCATALOGNAMES 2
  742. #define SSPROP_ALLOWNATIVEVARIANT 3
  743. #define SSPROP_SQLXMLXPROGID 4
  744. #define SSPROP_ASYNCH_BULKCOPY 5
  745. #define SSPROP_MAXBLOBLENGTH 8
  746. #define SSPROP_FASTLOADOPTIONS 9
  747. #define SSPROP_FASTLOADKEEPNULLS 10
  748. #define SSPROP_FASTLOADKEEPIDENTITY 11
  749. #define SSPROP_CURSORAUTOFETCH 12
  750. #define SSPROP_DEFERPREPARE 13
  751. #define SSPROP_IRowsetFastLoad 14
  752. #define SSPROP_QP_NOTIFICATION_TIMEOUT 17
  753. #define SSPROP_QP_NOTIFICATION_MSGTEXT 18
  754. #define SSPROP_QP_NOTIFICATION_OPTIONS 19
  755. #define SSPROP_NOCOUNT_STATUS 20
  756. #define SSPROP_COMPUTE_ID 21
  757. #define SSPROP_COLUMN_ID 22
  758. #define SSPROP_COMPUTE_BYLIST 23
  759. #define SSPROP_ISSAsynchStatus 24
  760. #define SSPROPVAL_DEFAULT_NOTIFICATION_TIMEOUT 432000
  761. #define SSPROPVAL_MAX_NOTIFICATION_TIMEOUT 0x7FFFFFFF
  762. #define MAX_NOTIFICATION_LEN 2000
  763. #define SSPROP_COL_COLLATIONNAME 14
  764. #define SSPROP_COL_UDT_CATALOGNAME 31
  765. #define SSPROP_COL_UDT_SCHEMANAME 32
  766. #define SSPROP_COL_UDT_NAME 33
  767. #define SSPROP_COL_XML_SCHEMACOLLECTION_CATALOGNAME 34
  768. #define SSPROP_COL_XML_SCHEMACOLLECTION_SCHEMANAME 35
  769. #define SSPROP_COL_XML_SCHEMACOLLECTIONNAME 36
  770. #define SSPROP_COL_COMPUTED 37
  771. #define SSPROP_STREAM_XMLROOT 19
  772. #define SSPROP_PARAM_XML_SCHEMACOLLECTION_CATALOGNAME 24
  773. #define SSPROP_PARAM_XML_SCHEMACOLLECTION_SCHEMANAME 25
  774. #define SSPROP_PARAM_XML_SCHEMACOLLECTIONNAME 26
  775. #define SSPROP_PARAM_UDT_CATALOGNAME 27
  776. #define SSPROP_PARAM_UDT_SCHEMANAME 28
  777. #define SSPROP_PARAM_UDT_NAME 29
  778. #define SSPROP_PARAM_TYPE_CATALOGNAME 38
  779. #define SSPROP_PARAM_TYPE_SCHEMANAME 39
  780. #define SSPROP_PARAM_TYPE_TYPENAME 40
  781. #define SSPROP_PARAM_TABLE_DEFAULT_COLUMNS 41
  782. #define SSPROP_PARAM_TABLE_COLUMN_SORT_ORDER 42
  783. #define SSPROP_INDEX_XML 1
  784. #define BCP_TYPE_DEFAULT 0x00
  785. #define BCP_TYPE_SQLTEXT 0x23
  786. #define BCP_TYPE_SQLVARBINARY 0x25
  787. #define BCP_TYPE_SQLINTN 0x26
  788. #define BCP_TYPE_SQLVARCHAR 0x27
  789. #define BCP_TYPE_SQLBINARY 0x2d
  790. #define BCP_TYPE_SQLIMAGE 0x22
  791. #define BCP_TYPE_SQLCHARACTER 0x2f
  792. #define BCP_TYPE_SQLINT1 0x30
  793. #define BCP_TYPE_SQLBIT 0x32
  794. #define BCP_TYPE_SQLINT2 0x34
  795. #define BCP_TYPE_SQLINT4 0x38
  796. #define BCP_TYPE_SQLMONEY 0x3c
  797. #define BCP_TYPE_SQLDATETIME 0x3d
  798. #define BCP_TYPE_SQLFLT8 0x3e
  799. #define BCP_TYPE_SQLFLTN 0x6d
  800. #define BCP_TYPE_SQLMONEYN 0x6e
  801. #define BCP_TYPE_SQLDATETIMN 0x6f
  802. #define BCP_TYPE_SQLFLT4 0x3b
  803. #define BCP_TYPE_SQLMONEY4 0x7a
  804. #define BCP_TYPE_SQLDATETIM4 0x3a
  805. #define BCP_TYPE_SQLDECIMAL 0x6a
  806. #define BCP_TYPE_SQLNUMERIC 0x6c
  807. #define BCP_TYPE_SQLUNIQUEID 0x24
  808. #define BCP_TYPE_SQLBIGCHAR 0xaf
  809. #define BCP_TYPE_SQLBIGVARCHAR 0xa7
  810. #define BCP_TYPE_SQLBIGBINARY 0xad
  811. #define BCP_TYPE_SQLBIGVARBINARY
  812. #define BCP_TYPE_SQLBITN 0x68
  813. #define BCP_TYPE_SQLNCHAR 0xef
  814. #define BCP_TYPE_SQLNVARCHAR 0xe7
  815. #define BCP_TYPE_SQLNTEXT 0x63
  816. #define BCP_TYPE_SQLDECIMALN 0x6a
  817. #define BCP_TYPE_SQLNUMERICN 0x6c
  818. #define BCP_TYPE_SQLINT8 0x7f
  819. #define BCP_TYPE_SQLVARIANT 0x62
  820. #define BCP_TYPE_SQLUDT 0xf0
  821. #define BCP_TYPE_SQLXML 0xf1
  822. #define BCP_TYPE_SQLDATE 0x28
  823. #define BCP_TYPE_SQLTIME 0x29
  824. #define BCP_TYPE_SQLDATETIME2 0x2a
  825. #define BCP_TYPE_SQLDATETIMEOFFSET 0x2b
  826. #define BCP_DIRECTION_IN 1
  827. #define BCP_DIRECTION_OUT 2
  828. #define BCP_OPTION_MAXERRS 1
  829. #define BCP_OPTION_FIRST 2
  830. #define BCP_OPTION_LAST 3
  831. #define BCP_OPTION_BATCH 4
  832. #define BCP_OPTION_KEEPNULLS 5
  833. #define BCP_OPTION_ABORT 6
  834. #define BCP_OPTION_KEEPIDENTITY 8
  835. #define BCP_OPTION_HINTSA 10
  836. #define BCP_OPTION_HINTSW 11
  837. #define BCP_OPTION_FILECP 12
  838. #define BCP_OPTION_UNICODEFILE 13
  839. #define BCP_OPTION_TEXTFILE 14
  840. #define BCP_OPTION_FILEFMT 15
  841. #define BCP_OPTION_FMTXML 16
  842. #define BCP_OPTION_FIRSTEX 17
  843. #define BCP_OPTION_LASTEX 18
  844. #define BCP_OPTION_ROWCOUNT 19
  845. #define BCP_OPTION_DELAYREADFMT 20
  846. #define BCP_OUT_CHARACTER_MODE 0x01
  847. #define BCP_OUT_WIDE_CHARACTER_MODE 0x02
  848. #define BCP_OUT_NATIVE_TEXT_MODE 0x03
  849. #define BCP_OUT_NATIVE_MODE 0x04
  850. #define BCP_FILECP_ACP 0
  851. #define BCP_FILECP_OEMCP 1
  852. #define BCP_FILECP_RAW (-1)
  853. #ifdef UNICODE
  854. #define BCP_OPTION_HINTS BCP_OPTION_HINTSW
  855. #else
  856. #define BCP_OPTION_HINTS BCP_OPTION_HINTSA
  857. #endif
  858. #define BCP_PREFIX_DEFAULT (-10)
  859. #define BCP_LENGTH_NULL (-1)
  860. #define BCP_LENGTH_VARIABLE (-10)
  861. #if (MSOLEDBSQL_VER >= 1800)
  862. #ifdef DBINITCONSTANTS
  863. extern const GUID CLSID_MSOLEDBSQL = {0x5a23de84L,0x1d7b,0x4a16,{0x8d,0xed,0xb2,0x9c,0x9,0xcb,0x64,0x8d}};
  864. extern const GUID CLSID_MSOLEDBSQL_ERROR = {0xecab1ccbL,0x116a,0x4541,{0xad,0xba,0x69,0xc,0xeb,0x9c,0xc8,0x43}};
  865. extern const GUID CLSID_MSOLEDBSQL_ENUMERATOR = {0x720818d5L,0x1465,0x4812,{0x83,0x9f,0x9f,0x15,0xc3,0x8a,0x52,0xcb}};
  866. #else
  867. extern const GUID CLSID_MSOLEDBSQL;
  868. extern const GUID CLSID_MSOLEDBSQL_ERROR;
  869. extern const GUID CLSID_MSOLEDBSQL_ENUMERATOR;
  870. #endif
  871. #endif
  872. #ifdef DBINITCONSTANTS
  873. extern const GUID CLSID_ROWSET_TVP = {0xc7ef28d5L,0x7bee,0x443f,{0x86,0xda,0xe3,0x98,0x4f,0xcd,0x4d,0xf9}};
  874. #else
  875. extern const GUID CLSID_ROWSET_TVP;
  876. #endif
  877. #ifndef _SQLOLEDB_H_
  878. #ifdef DBINITCONSTANTS
  879. extern const GUID IID_ISQLServerErrorInfo = {0x5cf4ca12,0xef21,0x11d0,{0x97,0xe7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  880. extern const GUID IID_IRowsetFastLoad = {0x5cf4ca13,0xef21,0x11d0,{0x97,0xe7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  881. extern const GUID IID_IUMSInitialize = {0x5cf4ca14,0xef21,0x11d0,{0x97,0xe7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  882. extern const GUID IID_ISchemaLock = {0x4c2389fb,0x2511,0x11d4,{0xb2,0x58,0x0,0xc0,0x4f,0x79,0x71,0xce}};
  883. extern const GUID IID_ISQLXMLHelper = {0xd22a7678L,0xf860,0x40cd,{0xa5,0x67,0x15,0x63,0xde,0xb4,0x6d,0x49}};
  884. #else
  885. extern const GUID IID_ISQLServerErrorInfo;
  886. extern const GUID IID_IRowsetFastLoad;
  887. extern const GUID IID_IUMSInitialize;
  888. extern const GUID IID_ISchemaLock;
  889. extern const GUID IID_ISQLXMLHelper;
  890. #endif
  891. #endif
  892. #ifdef DBINITCONSTANTS
  893. extern const GUID IID_ISSAbort = {0x5cf4ca15,0xef21,0x11d0,{0x97,0xe7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  894. extern const GUID IID_IBCPSession = {0x88352D80,0x42D1,0x42f0,{0xA1,0x70,0xAB,0x0F,0x8B,0x45,0xB9,0x39}};
  895. extern const GUID IID_IBCPSession2 = {0xad79d3b6,0x59dd,0x46a3,{0xbf,0xc6,0xe6,0x2a,0x65,0xff,0x35,0x23}};
  896. extern const GUID IID_ISSCommandWithParameters = {0xeec30162,0x6087,0x467c,{0xb9,0x95,0x7c,0x52,0x3c,0xe9,0x65,0x61}};
  897. extern const GUID IID_ISSAsynchStatus = {0x1FF1F743,0x8BB0, 0x4c00,{0xAC,0xC4,0xC1,0x0E,0x43,0xB0,0x8F,0xC1}};
  898. #else
  899. extern const GUID IID_ISSAbort;
  900. extern const GUID IID_IBCPSession;
  901. extern const GUID IID_IBCPSession2;
  902. extern const GUID IID_ISSCommandWithParameters;
  903. extern const GUID IID_ISSAsynchStatus;
  904. #endif
  905. #ifndef _SQLOLEDB_H_
  906. #ifdef DBINITCONSTANTS
  907. extern const GUID DBSCHEMA_LINKEDSERVERS = {0x9093caf4,0x2eac,0x11d1,{0x98,0x9,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  908. #else
  909. extern const GUID DBSCHEMA_LINKEDSERVERS;
  910. #endif
  911. #endif
  912. #ifdef DBINITCONSTANTS
  913. extern const GUID DBSCHEMA_SQL_ASSEMBLIES = {0x7c1112c8, 0xc2d3, 0x4f6e, {0x94, 0x9a, 0x98, 0x3d, 0x38, 0xa5, 0x8f, 0x46}};
  914. extern const GUID DBSCHEMA_SQL_ASSEMBLY_DEPENDENCIES = {0xcb0f837b, 0x974c, 0x41b8, {0x90, 0x9d, 0x64, 0x9c, 0xaf, 0x45, 0xad, 0x2f}};
  915. extern const GUID DBSCHEMA_SQL_USER_TYPES = {0xf1198bd8, 0xa424, 0x4ea3, {0x8d, 0x4c, 0x60, 0x7e, 0xee, 0x2b, 0xab, 0x60}};
  916. extern const GUID DBSCHEMA_XML_COLLECTIONS = {0x56bfad8c, 0x6e8f, 0x480d, {0x91, 0xde, 0x35, 0x16, 0xd9, 0x9a, 0x5d, 0x10}};
  917. extern const GUID DBSCHEMA_SQL_TABLE_TYPES = {0x4e26cde7, 0xaaa4, 0x41ed, {0x93, 0xdd, 0x37, 0x6e, 0x6d, 0x40, 0x9c, 0x17}};
  918. extern const GUID DBSCHEMA_SQL_TABLE_TYPE_PRIMARY_KEYS = {0x9738faea, 0x31e8, 0x4f63, {0xae, 0xd, 0x61, 0x33, 0x16, 0x41, 0x8c, 0xdd}};
  919. extern const GUID DBSCHEMA_SQL_TABLE_TYPE_COLUMNS = {0xa663d94b, 0xddf7, 0x4a7f, {0xa5, 0x37, 0xd6, 0x1f, 0x12, 0x36, 0x5d, 0x7c}};
  920. extern const GUID DBSCHEMA_COLUMNS_EXTENDED = {0x66462f01, 0x633a, 0x44d9, {0xb0, 0xd0, 0xfe, 0x66, 0xf2, 0x1a, 0x0d, 0x24}};
  921. extern const GUID DBSCHEMA_SPARSE_COLUMN_SET = {0x31a4837c, 0xf9ff, 0x405f, {0x89, 0x82, 0x02, 0x19, 0xaa, 0xaa, 0x4a, 0x12}};
  922. #else
  923. extern const GUID DBSCHEMA_SQL_ASSEMBLIES;
  924. extern const GUID DBSCHEMA_SQL_ASSEMBLY_DEPENDENCIES;
  925. extern const GUID DBSCHEMA_SQL_USER_TYPES;
  926. extern const GUID DBSCHEMA_XML_COLLECTIONS;
  927. extern const GUID DBSCHEMA_SQL_TABLE_TYPES;
  928. extern const GUID DBSCHEMA_SQL_TABLE_TYPE_PRIMARY_KEYS;
  929. extern const GUID DBSCHEMA_SQL_TABLE_TYPE_COLUMNS;
  930. extern const GUID DBSCHEMA_COLUMNS_EXTENDED;
  931. extern const GUID DBSCHEMA_SPARSE_COLUMN_SET;
  932. #endif
  933. #ifndef CRESTRICTIONS_DBSCHEMA_LINKEDSERVERS
  934. #define CRESTRICTIONS_DBSCHEMA_LINKEDSERVERS 1
  935. #endif
  936. #ifndef CRESTRICTIONS_DBSCHEMA_ASSEMBLIES
  937. #define CRESTRICTIONS_DBSCHEMA_SQL_ASSEMBLIES 4
  938. #endif
  939. #ifndef CRESTRICTIONS_DBSCHEMA_ASSEMBLY_DEPENDENCIES
  940. #define CRESTRICTIONS_DBSCHEMA_SQL_ASSEMBLY_DEPENDENCIES 4
  941. #endif
  942. #ifndef CRESTRICTIONS_DBSCHEMA_USER_TYPES
  943. #define CRESTRICTIONS_DBSCHEMA_SQL_USER_TYPES 3
  944. #endif
  945. #ifndef CRESTRICTIONS_DBSCHEMA_XML_COLLECTIONS
  946. #define CRESTRICTIONS_DBSCHEMA_XML_COLLECTIONS 4
  947. #endif
  948. #ifndef CRESTRICTIONS_DBSCHEMA_SQL_TABLE_TYPES
  949. #define CRESTRICTIONS_DBSCHEMA_SQL_TABLE_TYPES 3
  950. #endif
  951. #ifndef CRESTRICTIONS_DBSCHEMA_SQL_TABLE_TYPE_PRIMARY_KEYS
  952. #define CRESTRICTIONS_DBSCHEMA_SQL_TABLE_TYPE_PRIMARY_KEYS 3
  953. #endif
  954. #ifndef CRESTRICTIONS_DBSCHEMA_SQL_TABLE_TYPE_COLUMNS
  955. #define CRESTRICTIONS_DBSCHEMA_SQL_TABLE_TYPE_COLUMNS 4
  956. #endif
  957. #ifndef CRESTRICTIONS_DBSCHEMA_COLUMNS_EXTENDED
  958. #define CRESTRICTIONS_DBSCHEMA_COLUMNS_EXTENDED 4
  959. #endif
  960. #ifndef CRESTRICTIONS_DBSCHEMA_SPARSE_COLUMN_SET
  961. #define CRESTRICTIONS_DBSCHEMA_SPARSE_COLUMN_SET 4
  962. #endif
  963. #ifndef _SQLOLEDB_H_
  964. extern const GUID OLEDBDECLSPEC DBPROPSET_SQLSERVERDATASOURCE = {0x28efaee4,0x2d2c,0x11d1,{0x98,0x7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  965. extern const GUID OLEDBDECLSPEC DBPROPSET_SQLSERVERDATASOURCEINFO= {0xdf10cb94,0x35f6,0x11d2,{0x9c,0x54,0x0,0xc0,0x4f,0x79,0x71,0xd3}};
  966. extern const GUID OLEDBDECLSPEC DBPROPSET_SQLSERVERDBINIT = {0x5cf4ca10,0xef21,0x11d0,{0x97,0xe7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  967. extern const GUID OLEDBDECLSPEC DBPROPSET_SQLSERVERROWSET = {0x5cf4ca11,0xef21,0x11d0,{0x97,0xe7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  968. extern const GUID OLEDBDECLSPEC DBPROPSET_SQLSERVERSESSION = {0x28efaee5,0x2d2c,0x11d1,{0x98,0x7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  969. extern const GUID OLEDBDECLSPEC DBPROPSET_SQLSERVERCOLUMN = {0x3b63fb5e,0x3fbb,0x11d3,{0x9f,0x29,0x0,0xc0,0x4f,0x8e,0xe9,0xdc}};
  970. extern const GUID OLEDBDECLSPEC DBPROPSET_SQLSERVERSTREAM = {0x9f79c073,0x8a6d,0x4bca,{0xa8,0xa8,0xc9,0xb7,0x9a,0x9b,0x96,0x2d}};
  971. #endif
  972. extern const GUID OLEDBDECLSPEC DBPROPSET_SQLSERVERPARAMETER = {0xfee09128,0xa67d,0x47ea,{0x8d,0x40,0x24,0xa1,0xd4,0x73,0x7e,0x8d}};
  973. extern const GUID OLEDBDECLSPEC DBPROPSET_SQLSERVERINDEX = {0xE428B84E,0xA6B7,0x413a,{0x94,0x65,0x56,0x23,0x2E,0x0D,0x2B,0xEB}};
  974. extern const GUID OLEDBDECLSPEC DBPROPSET_PARAMETERALL = {0x2cd2b7d8,0xe7c2,0x4f6c,{0x9b,0x30,0x75,0xe2,0x58,0x46,0x10,0x97}};
  975. #define DBCOLUMN_SS_X_GUID {0x627bd890,0xed54,0x11d2,{0xb9,0x94,0x0,0xc0,0x4f,0x8c,0xa8,0x2c}}
  976. #ifndef _SQLOLEDB_H_
  977. extern const DBID OLEDBDECLSPEC DBCOLUMN_SS_COMPFLAGS = {DBCOLUMN_SS_X_GUID, DBKIND_GUID_PROPID, (LPOLESTR)100};
  978. extern const DBID OLEDBDECLSPEC DBCOLUMN_SS_SORTID = {DBCOLUMN_SS_X_GUID, DBKIND_GUID_PROPID, (LPOLESTR)101};
  979. extern const DBID OLEDBDECLSPEC DBCOLUMN_BASETABLEINSTANCE = {DBCOLUMN_SS_X_GUID, DBKIND_GUID_PROPID, (LPOLESTR)102};
  980. extern const DBID OLEDBDECLSPEC DBCOLUMN_SS_TDSCOLLATION = {DBCOLUMN_SS_X_GUID, DBKIND_GUID_PROPID, (LPOLESTR)103};
  981. #endif
  982. extern const DBID OLEDBDECLSPEC DBCOLUMN_BASESERVERNAME = {DBCOLUMN_SS_X_GUID, DBKIND_GUID_PROPID, (LPOLESTR)104};
  983. extern const DBID OLEDBDECLSPEC DBCOLUMN_SS_XML_SCHEMACOLLECTION_CATALOGNAME = {DBCOLUMN_SS_X_GUID, DBKIND_GUID_PROPID, (LPOLESTR)105};
  984. extern const DBID OLEDBDECLSPEC DBCOLUMN_SS_XML_SCHEMACOLLECTION_SCHEMANAME = {DBCOLUMN_SS_X_GUID, DBKIND_GUID_PROPID, (LPOLESTR)106};
  985. extern const DBID OLEDBDECLSPEC DBCOLUMN_SS_XML_SCHEMACOLLECTIONNAME = {DBCOLUMN_SS_X_GUID, DBKIND_GUID_PROPID, (LPOLESTR)107};
  986. extern const DBID OLEDBDECLSPEC DBCOLUMN_SS_UDT_CATALOGNAME = {DBCOLUMN_SS_X_GUID, DBKIND_GUID_PROPID, (LPOLESTR)108};
  987. extern const DBID OLEDBDECLSPEC DBCOLUMN_SS_UDT_SCHEMANAME = {DBCOLUMN_SS_X_GUID, DBKIND_GUID_PROPID, (LPOLESTR)109};
  988. extern const DBID OLEDBDECLSPEC DBCOLUMN_SS_UDT_NAME = {DBCOLUMN_SS_X_GUID, DBKIND_GUID_PROPID, (LPOLESTR)110};
  989. extern const DBID OLEDBDECLSPEC DBCOLUMN_SS_ASSEMBLY_TYPENAME= {DBCOLUMN_SS_X_GUID, DBKIND_GUID_PROPID, (LPOLESTR)111};
  990. #ifndef SQL_FILESTREAM_DEFINED
  991. #define SQL_FILESTREAM_DEFINED
  992. typedef enum _SQL_FILESTREAM_DESIRED_ACCESS {
  993. SQL_FILESTREAM_READ = 0, SQL_FILESTREAM_WRITE = 1,
  994. SQL_FILESTREAM_READWRITE = 2
  995. } SQL_FILESTREAM_DESIRED_ACCESS;
  996. #define SQL_FILESTREAM_OPEN_FLAG_ASYNC 0x00000001L
  997. #define SQL_FILESTREAM_OPEN_FLAG_NO_BUFFERING 0x00000002L
  998. #define SQL_FILESTREAM_OPEN_FLAG_NO_WRITE_THROUGH 0x00000004L
  999. #define SQL_FILESTREAM_OPEN_FLAG_SEQUENTIAL_SCAN 0x00000008L
  1000. #define SQL_FILESTREAM_OPEN_FLAG_RANDOM_ACCESS 0x00000010L
  1001. HANDLE __stdcall OpenSqlFilestream(LPCWSTR FilestreamPath, SQL_FILESTREAM_DESIRED_ACCESS DesiredAccess, ULONG OpenOptions, LPBYTE FilestreamTransactionContext, SSIZE_T FilestreamTransactionContextLength, PLARGE_INTEGER AllocationSize);
  1002. #define FSCTL_SQL_FILESTREAM_FETCH_OLD_CONTENT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 2392, METHOD_BUFFERED, FILE_ANY_ACCESS)
  1003. #endif
  1004. #ifndef _SQLUSERINSTANCE_H_
  1005. #define _SQLUSERINSTANCE_H_
  1006. #include <windows.h>
  1007. #ifdef __cplusplus
  1008. extern "C" {
  1009. #endif
  1010. #define LOCALDB_MAX_SQLCONNECTION_BUFFER_SIZE 260
  1011. typedef HRESULT __cdecl FnLocalDBCreateInstance(PCWSTR wszVersion, PCWSTR pInstanceName, DWORD dwFlags);
  1012. typedef FnLocalDBCreateInstance* PFnLocalDBCreateInstance;
  1013. typedef HRESULT __cdecl FnLocalDBStartInstance(PCWSTR pInstanceName, DWORD dwFlags, LPWSTR wszSqlConnection, LPDWORD lpcchSqlConnection);
  1014. typedef FnLocalDBStartInstance* PFnLocalDBStartInstance;
  1015. #define LOCALDB_TRUNCATE_ERR_MESSAGE 0x0001L
  1016. typedef HRESULT __cdecl FnLocalDBFormatMessage(HRESULT hrLocalDB, DWORD dwFlags, DWORD dwLanguageId, LPWSTR wszMessage, LPDWORD lpcchMessage);
  1017. typedef FnLocalDBFormatMessage* PFnLocalDBFormatMessage;
  1018. #define LOCALDB_ERROR_NOT_INSTALLED ((HRESULT)0x89C50116L)
  1019. FnLocalDBCreateInstance LocalDBCreateInstance;
  1020. FnLocalDBStartInstance LocalDBStartInstance;
  1021. typedef HRESULT __cdecl FnLocalDBStopInstance(PCWSTR pInstanceName, DWORD dwFlags, ULONG ulTimeout);
  1022. typedef FnLocalDBStopInstance* PFnLocalDBStopInstance;
  1023. #define LOCALDB_SHUTDOWN_KILL_PROCESS 0x0001L
  1024. #define LOCALDB_SHUTDOWN_WITH_NOWAIT 0x0002L
  1025. FnLocalDBStopInstance LocalDBStopInstance;
  1026. typedef HRESULT __cdecl FnLocalDBDeleteInstance(PCWSTR pInstanceName, DWORD dwFlags);
  1027. typedef FnLocalDBDeleteInstance* PFnLocalDBDeleteInstance;
  1028. FnLocalDBDeleteInstance LocalDBDeleteInstance;
  1029. FnLocalDBFormatMessage LocalDBFormatMessage;
  1030. #define MAX_LOCALDB_INSTANCE_NAME_LENGTH 128
  1031. #define MAX_LOCALDB_PARENT_INSTANCE_LENGTH MAX_INSTANCE_NAME
  1032. typedef WCHAR TLocalDBInstanceName[MAX_LOCALDB_INSTANCE_NAME_LENGTH + 1];
  1033. typedef TLocalDBInstanceName* PTLocalDBInstanceName;
  1034. typedef HRESULT __cdecl FnLocalDBGetInstances(PTLocalDBInstanceName pInstanceNames, LPDWORD lpdwNumberOfInstances);
  1035. typedef FnLocalDBGetInstances* PFnLocalDBGetInstances;
  1036. FnLocalDBGetInstances LocalDBGetInstances;
  1037. #define MAX_STRING_SID_LENGTH 186
  1038. #pragma pack(push,8)
  1039. typedef struct _LocalDBInstanceInfo {
  1040. DWORD cbLocalDBInstanceInfoSize;
  1041. TLocalDBInstanceName wszInstanceName;
  1042. BOOL bExists;
  1043. BOOL bConfigurationCorrupted;
  1044. BOOL bIsRunning;
  1045. DWORD dwMajor;
  1046. DWORD dwMinor;
  1047. DWORD dwBuild;
  1048. DWORD dwRevision;
  1049. FILETIME ftLastStartDateUTC;
  1050. WCHAR wszConnection[LOCALDB_MAX_SQLCONNECTION_BUFFER_SIZE];
  1051. BOOL bIsShared;
  1052. TLocalDBInstanceName wszSharedInstanceName;
  1053. WCHAR wszOwnerSID[MAX_STRING_SID_LENGTH + 1];
  1054. BOOL bIsAutomatic;
  1055. } LocalDBInstanceInfo;
  1056. #pragma pack(pop)
  1057. typedef LocalDBInstanceInfo* PLocalDBInstanceInfo;
  1058. typedef HRESULT __cdecl FnLocalDBGetInstanceInfo(PCWSTR wszInstanceName, PLocalDBInstanceInfo pInfo, DWORD cbInfo);
  1059. typedef FnLocalDBGetInstanceInfo* PFnLocalDBGetInstanceInfo;
  1060. FnLocalDBGetInstanceInfo LocalDBGetInstanceInfo;
  1061. #define MAX_LOCALDB_VERSION_LENGTH 43
  1062. typedef WCHAR TLocalDBVersion[MAX_LOCALDB_VERSION_LENGTH + 1];
  1063. typedef TLocalDBVersion* PTLocalDBVersion;
  1064. typedef HRESULT __cdecl FnLocalDBGetVersions(PTLocalDBVersion pVersions, LPDWORD lpdwNumberOfVersions);
  1065. typedef FnLocalDBGetVersions* PFnLocalDBGetVersions;
  1066. FnLocalDBGetVersions LocalDBGetVersions;
  1067. #pragma pack(push,8)
  1068. typedef struct _LocalDBVersionInfo {
  1069. DWORD cbLocalDBVersionInfoSize;
  1070. TLocalDBVersion wszVersion;
  1071. BOOL bExists;
  1072. DWORD dwMajor;
  1073. DWORD dwMinor;
  1074. DWORD dwBuild;
  1075. DWORD dwRevision;
  1076. } LocalDBVersionInfo;
  1077. #pragma pack(pop)
  1078. typedef LocalDBVersionInfo* PLocalDBVersionInfo;
  1079. typedef HRESULT __cdecl FnLocalDBGetVersionInfo(PCWSTR wszVersion, PLocalDBVersionInfo pVersionInfo, DWORD cbVersionInfo);
  1080. typedef FnLocalDBGetVersionInfo* PFnLocalDBGetVersionInfo;
  1081. FnLocalDBGetVersionInfo LocalDBGetVersionInfo;
  1082. typedef HRESULT __cdecl FnLocalDBStartTracing();
  1083. typedef FnLocalDBStartTracing* PFnLocalDBStartTracing;
  1084. FnLocalDBStartTracing LocalDBStartTracing;
  1085. typedef HRESULT __cdecl FnLocalDBStopTracing();
  1086. typedef FnLocalDBStopTracing* PFnFnLocalDBStopTracing;
  1087. FnLocalDBStopTracing LocalDBStopTracing;
  1088. typedef HRESULT __cdecl FnLocalDBShareInstance(PSID pOwnerSID, PCWSTR wszPrivateLocalDBInstanceName, PCWSTR wszSharedName, DWORD dwFlags);
  1089. typedef FnLocalDBShareInstance* PFnLocalDBShareInstance;
  1090. FnLocalDBShareInstance LocalDBShareInstance;
  1091. typedef HRESULT __cdecl FnLocalDBUnshareInstance(PCWSTR pInstanceName, DWORD dwFlags);
  1092. typedef FnLocalDBUnshareInstance* PFnLocalDBUnshareInstance;
  1093. FnLocalDBUnshareInstance LocalDBUnshareInstance;
  1094. #ifdef __cplusplus
  1095. } // extern "C"
  1096. #endif
  1097. #ifdef LOCALDB_DEFINE_PROXY_FUNCTIONS
  1098. #define LOCALDB_PROXY(LocalDBFn) static Fn##LocalDBFn* pfn##LocalDBFn = NULL; if (!pfn##LocalDBFn) {HRESULT hr = LocalDBGetPFn(#LocalDBFn, (FARPROC *)&pfn##LocalDBFn); if (FAILED(hr)) return hr;} return (*pfn##LocalDBFn)
  1099. typedef struct {
  1100. DWORD dwComponent[2];
  1101. WCHAR wszKeyName[256];
  1102. } Version;
  1103. static BOOL ParseVersion(Version * pVersion)
  1104. {
  1105. pVersion->dwComponent[0] = 0;
  1106. pVersion->dwComponent[1] = 0;
  1107. WCHAR *pwch = pVersion->wszKeyName;
  1108. for (int i = 0; i < 2; i++) {
  1109. LONGLONG llVal = 0;
  1110. BOOL fHaveDigit = FALSE;
  1111. while (*pwch >= L'0' && *pwch <= L'9') {
  1112. llVal = llVal * 10 + (*pwch++ - L'0');
  1113. fHaveDigit = TRUE;
  1114. if (llVal > 0x7fffffff) {
  1115. return FALSE;
  1116. }
  1117. }
  1118. if (!fHaveDigit)
  1119. return FALSE;
  1120. pVersion->dwComponent[i] = (DWORD)llVal;
  1121. if (*pwch == L'\0')
  1122. return TRUE;
  1123. if (*pwch != L'.')
  1124. return FALSE;
  1125. pwch++;
  1126. }
  1127. return FALSE;
  1128. }
  1129. #include <assert.h>
  1130. static HRESULT LocalDBGetPFn(LPCSTR szLocalDBFn, FARPROC *pfnLocalDBFn)
  1131. {
  1132. static volatile HMODULE hLocalDBDll = NULL;
  1133. if (!hLocalDBDll) {
  1134. LONG ec;
  1135. HKEY hkeyVersions = NULL;
  1136. HKEY hkeyVersion = NULL;
  1137. Version verHigh = {0};
  1138. Version verCurrent;
  1139. DWORD cchKeyName;
  1140. DWORD dwValueType;
  1141. WCHAR wszLocalDBDll[MAX_PATH+1];
  1142. DWORD cbLocalDBDll = sizeof(wszLocalDBDll) - sizeof(WCHAR);
  1143. HMODULE hLocalDBDllTemp = NULL;
  1144. if (ERROR_SUCCESS != (ec = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Microsoft SQL Server Local DB\\Installed Versions", 0, KEY_READ, &hkeyVersions)))
  1145. goto Cleanup;
  1146. for (int i = 0; ; i++) {
  1147. cchKeyName = 256;
  1148. if (ERROR_SUCCESS != (ec = RegEnumKeyExW(hkeyVersions, i, verCurrent.wszKeyName, &cchKeyName, 0, NULL, NULL, NULL))) {
  1149. if (ERROR_NO_MORE_ITEMS == ec)
  1150. break;
  1151. goto Cleanup;
  1152. }
  1153. if (!ParseVersion(&verCurrent))
  1154. continue;
  1155. if (verCurrent.dwComponent[0] > verHigh.dwComponent[0] ||
  1156. (verCurrent.dwComponent[0] == verHigh.dwComponent[0] && verCurrent.dwComponent[1] > verHigh.dwComponent[1]))
  1157. verHigh = verCurrent;
  1158. }
  1159. if (!verHigh.wszKeyName[0]) {
  1160. assert(ec == ERROR_NO_MORE_ITEMS);
  1161. ec = ERROR_FILE_NOT_FOUND;
  1162. goto Cleanup;
  1163. }
  1164. if (ERROR_SUCCESS != (ec = RegOpenKeyExW(hkeyVersions, verHigh.wszKeyName, 0, KEY_READ, &hkeyVersion)))
  1165. goto Cleanup;
  1166. if (ERROR_SUCCESS != (ec = RegQueryValueExW(hkeyVersion, L"InstanceAPIPath", NULL, &dwValueType, (PBYTE) wszLocalDBDll, &cbLocalDBDll)))
  1167. goto Cleanup;
  1168. if (dwValueType != REG_SZ) {
  1169. ec = ERROR_INVALID_DATA;
  1170. goto Cleanup;
  1171. }
  1172. wszLocalDBDll[cbLocalDBDll/sizeof(WCHAR)] = L'\0';
  1173. hLocalDBDllTemp = LoadLibraryW(wszLocalDBDll);
  1174. if (NULL == hLocalDBDllTemp) {
  1175. ec = GetLastError();
  1176. goto Cleanup;
  1177. }
  1178. if (NULL == InterlockedCompareExchangePointer((volatile PVOID *)&hLocalDBDll, hLocalDBDllTemp, NULL))
  1179. hLocalDBDllTemp = NULL;
  1180. ec = ERROR_SUCCESS;
  1181. Cleanup:
  1182. if (hLocalDBDllTemp)
  1183. FreeLibrary(hLocalDBDllTemp);
  1184. if (hkeyVersion)
  1185. RegCloseKey(hkeyVersion);
  1186. if (hkeyVersions)
  1187. RegCloseKey(hkeyVersions);
  1188. if (ec == ERROR_FILE_NOT_FOUND)
  1189. return LOCALDB_ERROR_NOT_INSTALLED;
  1190. if (ec != ERROR_SUCCESS)
  1191. return HRESULT_FROM_WIN32(ec);
  1192. }
  1193. FARPROC pfn = GetProcAddress(hLocalDBDll, szLocalDBFn);
  1194. if (!pfn)
  1195. return HRESULT_FROM_WIN32(GetLastError());
  1196. *pfnLocalDBFn = pfn;
  1197. return S_OK;
  1198. }
  1199. HRESULT __cdecl LocalDBCreateInstance(PCWSTR wszVersion, PCWSTR pInstanceName, DWORD dwFlags)
  1200. {
  1201. LOCALDB_PROXY(LocalDBCreateInstance)(wszVersion, pInstanceName, dwFlags);
  1202. }
  1203. HRESULT __cdecl LocalDBStartInstance(PCWSTR pInstanceName, DWORD dwFlags, LPWSTR wszSqlConnection, LPDWORD lpcchSqlConnection)
  1204. {
  1205. LOCALDB_PROXY(LocalDBStartInstance)(pInstanceName, dwFlags, wszSqlConnection, lpcchSqlConnection);
  1206. }
  1207. HRESULT __cdecl LocalDBStopInstance(PCWSTR pInstanceName, DWORD dwFlags, ULONG ulTimeout)
  1208. {
  1209. LOCALDB_PROXY(LocalDBStopInstance)(pInstanceName, dwFlags, ulTimeout);
  1210. }
  1211. HRESULT __cdecl LocalDBDeleteInstance(PCWSTR pInstanceName, DWORD dwFlags)
  1212. {
  1213. LOCALDB_PROXY(LocalDBDeleteInstance)(pInstanceName, dwFlags);
  1214. }
  1215. HRESULT __cdecl LocalDBFormatMessage(HRESULT hrLocalDB, DWORD dwFlags, DWORD dwLanguageId, LPWSTR wszMessage, LPDWORD lpcchMessage)
  1216. {
  1217. LOCALDB_PROXY(LocalDBFormatMessage)(hrLocalDB, dwFlags, dwLanguageId, wszMessage, lpcchMessage);
  1218. }
  1219. HRESULT __cdecl LocalDBGetInstances(PTLocalDBInstanceName pInstanceNames, LPDWORD lpdwNumberOfInstances)
  1220. {
  1221. LOCALDB_PROXY(LocalDBGetInstances)(pInstanceNames, lpdwNumberOfInstances);
  1222. }
  1223. HRESULT __cdecl LocalDBGetInstanceInfo(PCWSTR wszInstanceName, PLocalDBInstanceInfo pInfo, DWORD cbInfo)
  1224. {
  1225. LOCALDB_PROXY(LocalDBGetInstanceInfo)(wszInstanceName, pInfo, cbInfo);
  1226. }
  1227. HRESULT __cdecl LocalDBStartTracing()
  1228. {
  1229. LOCALDB_PROXY(LocalDBStartTracing)();
  1230. }
  1231. HRESULT __cdecl LocalDBStopTracing()
  1232. {
  1233. LOCALDB_PROXY(LocalDBStopTracing)();
  1234. }
  1235. HRESULT __cdecl LocalDBShareInstance(PSID pOwnerSID, PCWSTR wszLocalDBInstancePrivateName, PCWSTR wszSharedName, DWORD dwFlags)
  1236. {
  1237. LOCALDB_PROXY(LocalDBShareInstance)(pOwnerSID, wszLocalDBInstancePrivateName, wszSharedName, dwFlags);
  1238. }
  1239. HRESULT __cdecl LocalDBGetVersions(PTLocalDBVersion pVersions, LPDWORD lpdwNumberOfVersions)
  1240. {
  1241. LOCALDB_PROXY(LocalDBGetVersions)(pVersions, lpdwNumberOfVersions);
  1242. }
  1243. HRESULT __cdecl LocalDBUnshareInstance(PCWSTR pInstanceName, DWORD dwFlags)
  1244. {
  1245. LOCALDB_PROXY(LocalDBUnshareInstance)(pInstanceName, dwFlags);
  1246. }
  1247. HRESULT __cdecl LocalDBGetVersionInfo(PCWSTR wszVersion, PLocalDBVersionInfo pVersionInfo, DWORD cbVersionInfo)
  1248. {
  1249. LOCALDB_PROXY(LocalDBGetVersionInfo)(wszVersion, pVersionInfo, cbVersionInfo);
  1250. }
  1251. #endif
  1252. #endif
  1253. #ifndef _LOCALDB_MESSAGES_H_
  1254. #define _LOCALDB_MESSAGES_H_
  1255. #define FACILITY_LOCALDB 0x9C5
  1256. #define LOCALDB_SEVERITY_SUCCESS 0x0
  1257. #define LOCALDB_SEVERITY_ERROR 0x2
  1258. #define LOCALDB_ERROR_CANNOT_CREATE_INSTANCE_FOLDER ((HRESULT)0x89C50100L)
  1259. #define LOCALDB_ERROR_INVALID_PARAMETER ((HRESULT)0x89C50101L)
  1260. #define LOCALDB_ERROR_INSTANCE_EXISTS_WITH_LOWER_VERSION ((HRESULT)0x89C50102L)
  1261. #define LOCALDB_ERROR_CANNOT_GET_USER_PROFILE_FOLDER ((HRESULT)0x89C50103L)
  1262. #define LOCALDB_ERROR_INSTANCE_FOLDER_PATH_TOO_LONG ((HRESULT)0x89C50104L)
  1263. #define LOCALDB_ERROR_CANNOT_ACCESS_INSTANCE_FOLDER ((HRESULT)0x89C50105L)
  1264. #define LOCALDB_ERROR_CANNOT_ACCESS_INSTANCE_REGISTRY ((HRESULT)0x89C50106L)
  1265. #define LOCALDB_ERROR_UNKNOWN_INSTANCE ((HRESULT)0x89C50107L)
  1266. #define LOCALDB_ERROR_INTERNAL_ERROR ((HRESULT)0x89C50108L)
  1267. #define LOCALDB_ERROR_CANNOT_MODIFY_INSTANCE_REGISTRY ((HRESULT)0x89C50109L)
  1268. #define LOCALDB_ERROR_SQL_SERVER_STARTUP_FAILED ((HRESULT)0x89C5010AL)
  1269. #define LOCALDB_ERROR_INSTANCE_CONFIGURATION_CORRUPT ((HRESULT)0x89C5010BL)
  1270. #define LOCALDB_ERROR_CANNOT_CREATE_SQL_PROCESS ((HRESULT)0x89C5010CL)
  1271. #define LOCALDB_ERROR_UNKNOWN_VERSION ((HRESULT)0x89C5010DL)
  1272. #define LOCALDB_ERROR_UNKNOWN_LANGUAGE_ID ((HRESULT)0x89C5010EL)
  1273. #define LOCALDB_ERROR_INSTANCE_STOP_FAILED ((HRESULT)0x89C5010FL)
  1274. #define LOCALDB_ERROR_UNKNOWN_ERROR_CODE ((HRESULT)0x89C50110L)
  1275. #define LOCALDB_ERROR_VERSION_REQUESTED_NOT_INSTALLED ((HRESULT)0x89C50111L)
  1276. #define LOCALDB_ERROR_INSTANCE_BUSY ((HRESULT)0x89C50112L)
  1277. #define LOCALDB_ERROR_INVALID_OPERATION ((HRESULT)0x89C50113L)
  1278. #define LOCALDB_ERROR_INSUFFICIENT_BUFFER ((HRESULT)0x89C50114L)
  1279. #define LOCALDB_ERROR_WAIT_TIMEOUT ((HRESULT)0x89C50115L)
  1280. #define LOCALDB_ERROR_XEVENT_FAILED ((HRESULT)0x89C50117L)
  1281. #define LOCALDB_ERROR_AUTO_INSTANCE_CREATE_FAILED ((HRESULT)0x89C50118L)
  1282. #define LOCALDB_ERROR_SHARED_NAME_TAKEN ((HRESULT)0x89C50119L)
  1283. #define LOCALDB_ERROR_CALLER_IS_NOT_OWNER ((HRESULT)0x89C5011AL)
  1284. #define LOCALDB_ERROR_INVALID_INSTANCE_NAME ((HRESULT)0x89C5011BL)
  1285. #define LOCALDB_ERROR_INSTANCE_ALREADY_SHARED ((HRESULT)0x89C5011CL)
  1286. #define LOCALDB_ERROR_INSTANCE_NOT_SHARED ((HRESULT)0x89C5011DL)
  1287. #define LOCALDB_ERROR_ADMIN_RIGHTS_REQUIRED ((HRESULT)0x89C5011EL)
  1288. #define LOCALDB_ERROR_TOO_MANY_SHARED_INSTANCES ((HRESULT)0x89C5011FL)
  1289. #define LOCALDB_ERROR_CANNOT_GET_LOCAL_APP_DATA_PATH ((HRESULT)0x89C50120L)
  1290. #define LOCALDB_ERROR_CANNOT_LOAD_RESOURCES ((HRESULT)0x89C50121L)
  1291. #define LOCALDB_EDETAIL_DATADIRECTORY_IS_MISSING ((HRESULT)0x89C50200L)
  1292. #define LOCALDB_EDETAIL_CANNOT_ACCESS_INSTANCE_FOLDER ((HRESULT)0x89C50201L)
  1293. #define LOCALDB_EDETAIL_DATADIRECTORY_IS_TOO_LONG ((HRESULT)0x89C50202L)
  1294. #define LOCALDB_EDETAIL_PARENT_INSTANCE_IS_MISSING ((HRESULT)0x89C50203L)
  1295. #define LOCALDB_EDETAIL_PARENT_INSTANCE_IS_TOO_LONG ((HRESULT)0x89C50204L)
  1296. #define LOCALDB_EDETAIL_DATA_DIRECTORY_INVALID ((HRESULT)0x89C50205L)
  1297. #define LOCALDB_EDETAIL_XEVENT_ASSERT ((HRESULT)0x89C50206L)
  1298. #define LOCALDB_EDETAIL_XEVENT_ERROR ((HRESULT)0x89C50207L)
  1299. #define LOCALDB_EDETAIL_INSTALLATION_CORRUPTED ((HRESULT)0x89C50208L)
  1300. #define LOCALDB_EDETAIL_CANNOT_GET_PROGRAM_FILES_LOCATION ((HRESULT)0x89C50209L)
  1301. #define LOCALDB_EDETAIL_XEVENT_CANNOT_INITIALIZE ((HRESULT)0x89C5020AL)
  1302. #define LOCALDB_EDETAIL_XEVENT_CANNOT_FIND_CONF_FILE ((HRESULT)0x89C5020BL)
  1303. #define LOCALDB_EDETAIL_XEVENT_CANNOT_CONFIGURE ((HRESULT)0x89C5020CL)
  1304. #define LOCALDB_EDETAIL_XEVENT_CONF_FILE_NAME_TOO_LONG ((HRESULT)0x89C5020DL)
  1305. #define LOCALDB_EDETAIL_COINITIALIZEEX_FAILED ((HRESULT)0x89C5020EL)
  1306. #define LOCALDB_EDETAIL_PARENT_INSTANCE_VERSION_INVALID ((HRESULT)0x89C5020FL)
  1307. #define LOCALDB_EDETAIL_WINAPI_ERROR ((HRESULT)0xC9C50210L)
  1308. #define LOCALDB_EDETAIL_UNEXPECTED_RESULT ((HRESULT)0x89C50211L)
  1309. #endif
  1310. extern RPC_IF_HANDLE __MIDL_itf_msoledbsql_0000_0011_v0_0_c_ifspec;
  1311. extern RPC_IF_HANDLE __MIDL_itf_msoledbsql_0000_0011_v0_0_s_ifspec;
  1312. #ifdef __cplusplus
  1313. }
  1314. #endif
  1315. #endif