Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

268 lines
6.6 KiB

  1. /*++
  2. Copyright (c) 1995-1996 Microsoft Corporation
  3. Module Name :
  4. dynodbc.h
  5. Abstract:
  6. This header declares functions for dynamically loading ODBC.
  7. Author:
  8. Murali R. Krishnan ( MuraliK ) 3-Nov-1995
  9. Environment:
  10. Win32 -- User Mode
  11. Project:
  12. Internet Services Common Code.
  13. Revision History:
  14. --*/
  15. # ifndef _DYNODBC_H_
  16. # define _DYNODBC_H_
  17. /************************************************************
  18. * Include Headers
  19. ************************************************************/
  20. //
  21. // SQL-ODBC interface headers
  22. //
  23. # include "sql.h"
  24. # include "sqlext.h"
  25. /************************************************************
  26. * Dynamic Load support
  27. ************************************************************/
  28. BOOL
  29. DynLoadODBC(
  30. VOID
  31. );
  32. //
  33. // Prototypes form sql.h
  34. //
  35. typedef RETCODE (SQL_API * pfnSQLAllocConnect)(
  36. HENV henv,
  37. HDBC FAR *phdbc);
  38. typedef RETCODE (SQL_API * pfnSQLAllocEnv)(
  39. HENV FAR *phenv);
  40. typedef RETCODE (SQL_API * pfnSQLAllocStmt)(
  41. HDBC hdbc,
  42. HSTMT FAR *phstmt);
  43. typedef RETCODE (SQL_API * pfnSQLBindCol)(
  44. HSTMT hstmt,
  45. UWORD icol,
  46. SWORD fCType,
  47. PTR rgbValue,
  48. SDWORD cbValueMax,
  49. SDWORD FAR *pcbValue);
  50. typedef RETCODE (SQL_API * pfnSQLCancel)(
  51. HSTMT hstmt);
  52. typedef RETCODE (SQL_API * pfnSQLColAttributes)(
  53. HSTMT hstmt,
  54. UWORD icol,
  55. UWORD fDescType,
  56. PTR rgbDesc,
  57. SWORD cbDescMax,
  58. SWORD FAR *pcbDesc,
  59. SDWORD FAR *pfDesc);
  60. typedef RETCODE (SQL_API * pfnSQLConnect)(
  61. HDBC hdbc,
  62. UCHAR FAR *szDSN,
  63. SWORD cbDSN,
  64. UCHAR FAR *szUID,
  65. SWORD cbUID,
  66. UCHAR FAR *szAuthStr,
  67. SWORD cbAuthStr);
  68. typedef RETCODE (SQL_API * pfnSQLDescribeCol)(
  69. HSTMT hstmt,
  70. UWORD icol,
  71. UCHAR FAR *szColName,
  72. SWORD cbColNameMax,
  73. SWORD FAR *pcbColName,
  74. SWORD FAR *pfSqlType,
  75. UDWORD FAR *pcbColDef,
  76. SWORD FAR *pibScale,
  77. SWORD FAR *pfNullable);
  78. typedef RETCODE (SQL_API * pfnSQLDisconnect)(
  79. HDBC hdbc);
  80. typedef RETCODE (SQL_API * pfnSQLError)(
  81. HENV henv,
  82. HDBC hdbc,
  83. HSTMT hstmt,
  84. UCHAR FAR *szSqlState,
  85. SDWORD FAR *pfNativeError,
  86. UCHAR FAR *szErrorMsg,
  87. SWORD cbErrorMsgMax,
  88. SWORD FAR *pcbErrorMsg);
  89. typedef RETCODE (SQL_API * pfnSQLExecDirect)(
  90. HSTMT hstmt,
  91. UCHAR FAR *szSqlStr,
  92. SDWORD cbSqlStr);
  93. typedef RETCODE (SQL_API * pfnSQLExecute)(
  94. HSTMT hstmt);
  95. typedef RETCODE (SQL_API * pfnSQLFetch)(
  96. HSTMT hstmt);
  97. typedef RETCODE (SQL_API * pfnSQLFreeConnect)(
  98. HDBC hdbc);
  99. typedef RETCODE (SQL_API * pfnSQLFreeEnv)(
  100. HENV henv);
  101. typedef RETCODE (SQL_API * pfnSQLFreeStmt)(
  102. HSTMT hstmt,
  103. UWORD fOption);
  104. typedef RETCODE (SQL_API * pfnSQLGetCursorName)(
  105. HSTMT hstmt,
  106. UCHAR FAR *szCursor,
  107. SWORD cbCursorMax,
  108. SWORD FAR *pcbCursor);
  109. typedef RETCODE (SQL_API * pfnSQLNumResultCols)(
  110. HSTMT hstmt,
  111. SWORD FAR *pccol);
  112. typedef RETCODE (SQL_API * pfnSQLPrepare)(
  113. HSTMT hstmt,
  114. UCHAR FAR *szSqlStr,
  115. SDWORD cbSqlStr);
  116. typedef RETCODE (SQL_API * pfnSQLRowCount)(
  117. HSTMT hstmt,
  118. SDWORD FAR *pcrow);
  119. typedef RETCODE (SQL_API * pfnSQLSetCursorName)(
  120. HSTMT hstmt,
  121. UCHAR FAR *szCursor,
  122. SWORD cbCursor);
  123. typedef RETCODE (SQL_API * pfnSQLTransact)(
  124. HENV henv,
  125. HDBC hdbc,
  126. UWORD fType);
  127. //
  128. // Prototypes form sqlext.h
  129. //
  130. typedef RETCODE (SQL_API * pfnSQLSetConnectOption)(
  131. HDBC hdbc,
  132. UWORD fOption,
  133. SQLPOINTER vParam);
  134. typedef RETCODE (SQL_API * pfnSQLDrivers)(
  135. HENV henv,
  136. UWORD fDirection,
  137. UCHAR FAR *szDriverDesc,
  138. SWORD cbDriverDescMax,
  139. SWORD FAR *pcbDriverDesc,
  140. UCHAR FAR *szDriverAttributes,
  141. SWORD cbDrvrAttrMax,
  142. SWORD FAR *pcbDrvrAttr);
  143. typedef RETCODE (SQL_API * pfnSQLBindParameter)(
  144. HSTMT hstmt,
  145. UWORD ipar,
  146. SWORD fParamType,
  147. SWORD fCType,
  148. SWORD fSqlType,
  149. UDWORD cbColDef,
  150. SWORD ibScale,
  151. PTR rgbValue,
  152. SDWORD cbValueMax,
  153. SDWORD FAR *pcbValue);
  154. typedef RETCODE (SQL_API * pfnSQLDataSources)(
  155. HENV henv,
  156. UWORD fDirection,
  157. UCHAR FAR *szDSN,
  158. SWORD cbDSNMax,
  159. SWORD FAR *pcbDSN,
  160. UCHAR FAR *szDescription,
  161. SWORD cbDescriptionMax,
  162. SWORD FAR *pcbDescription);
  163. typedef RETCODE (SQL_API * pfnSQLGetInfo)(
  164. HDBC hdbc,
  165. UWORD fInfoType,
  166. PTR rgbInfoValue,
  167. SWORD cbInfoValueMax,
  168. SWORD FAR *pcbInfoValue);
  169. typedef RETCODE (SQL_API * pfnSQLMoreResults)(
  170. HSTMT hstmt );
  171. /************************************************************
  172. * Variables
  173. ************************************************************/
  174. //
  175. // ODBC DLL Entry Points, fill by calling LoadODBC
  176. //
  177. extern pfnSQLAllocConnect pSQLAllocConnect ;
  178. extern pfnSQLAllocEnv pSQLAllocEnv ;
  179. extern pfnSQLAllocStmt pSQLAllocStmt ;
  180. extern pfnSQLBindCol pSQLBindCol ;
  181. extern pfnSQLCancel pSQLCancel ;
  182. extern pfnSQLColAttributes pSQLColAttributes ;
  183. extern pfnSQLConnect pSQLConnect ;
  184. extern pfnSQLDescribeCol pSQLDescribeCol ;
  185. extern pfnSQLDisconnect pSQLDisconnect ;
  186. extern pfnSQLError pSQLError ;
  187. extern pfnSQLExecDirect pSQLExecDirect ;
  188. extern pfnSQLExecute pSQLExecute ;
  189. extern pfnSQLFetch pSQLFetch ;
  190. extern pfnSQLFreeConnect pSQLFreeConnect ;
  191. extern pfnSQLFreeEnv pSQLFreeEnv ;
  192. extern pfnSQLFreeStmt pSQLFreeStmt ;
  193. extern pfnSQLGetCursorName pSQLGetCursorName ;
  194. extern pfnSQLNumResultCols pSQLNumResultCols ;
  195. extern pfnSQLPrepare pSQLPrepare ;
  196. extern pfnSQLRowCount pSQLRowCount ;
  197. extern pfnSQLSetCursorName pSQLSetCursorName ;
  198. extern pfnSQLTransact pSQLTransact ;
  199. extern pfnSQLSetConnectOption pSQLSetConnectOption;
  200. extern pfnSQLDrivers pSQLDrivers ;
  201. extern pfnSQLDataSources pSQLDataSources ;
  202. extern pfnSQLBindParameter pSQLBindParameter ;
  203. extern pfnSQLGetInfo pSQLGetInfo ;
  204. extern pfnSQLMoreResults pSQLMoreResults ;
  205. # endif // _DYNODBC_H_
  206. /************************ End of File ***********************/
  207.