Leaked source code of windows server 2003
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.

122 lines
4.4 KiB

  1. /*--------------------------------------------------------------------------
  2. ODBCInst.h -- Prototypes for ODBCINST.DLL
  3. (c) Microsoft Corp., 1990-1993
  4. --------------------------------------------------------------------------*/
  5. #ifndef __ODBCINST_H
  6. #define __ODBCINST_H
  7. #ifdef __cplusplus
  8. extern "C" { // Assume C declarations for C++
  9. #endif // __cplusplus
  10. #ifndef WINVER
  11. #define WINVER 0x300 // Assume Windows 3.0
  12. #endif
  13. #if (WINVER < 0x30a)
  14. // Win 3.1 Types -----------------------------------------------------------
  15. typedef const char FAR* LPCSTR;
  16. #endif
  17. // Constants ---------------------------------------------------------------
  18. // SQLConfigDataSource request flags
  19. #define ODBC_ADD_DSN 1 // Add data source
  20. #define ODBC_CONFIG_DSN 2 // Configure (edit) data source
  21. #define ODBC_REMOVE_DSN 3 // Remove data source
  22. #ifndef EXPORT
  23. #define EXPORT _export
  24. #endif
  25. #ifndef RC_INVOKED
  26. // Prototypes --------------------------------------------------------------
  27. #ifdef WIN32
  28. #define INSTAPI __stdcall
  29. #else
  30. #define INSTAPI EXPORT FAR PASCAL
  31. #endif
  32. #ifndef WIN32
  33. #define SQLGetPrivateProfileString GetPrivateProfileString
  34. #define SQLWritePrivateProfileString WritePrivateProfileString
  35. #endif
  36. // High level APIs
  37. BOOL INSTAPI SQLInstallODBC (HWND hwndParent,
  38. LPCSTR lpszInfFile,
  39. LPCSTR lpszSrcPath,
  40. LPCSTR lpszDrivers);
  41. BOOL INSTAPI SQLManageDataSources (HWND hwndParent);
  42. BOOL INSTAPI SQLCreateDataSource (HWND hwndParent,
  43. LPCSTR lpszDSN);
  44. BOOL INSTAPI SQLGetTranslator (HWND hwnd,
  45. LPSTR lpszName,
  46. WORD cbNameMax,
  47. WORD FAR *pcbNameOut,
  48. LPSTR lpszPath,
  49. WORD cbPathMax,
  50. WORD FAR *pcbPathOut,
  51. DWORD FAR *pvOption);
  52. // Low level APIs
  53. // NOTE: The high-level APIs should always be used. These APIs
  54. // have been left for compatibility.
  55. BOOL INSTAPI SQLInstallDriver (LPCSTR lpszInfFile,
  56. LPCSTR lpszDriver,
  57. LPSTR lpszPath,
  58. WORD cbPathMax,
  59. WORD FAR * pcbPathOut);
  60. BOOL INSTAPI SQLInstallDriverManager (LPSTR lpszPath,
  61. WORD cbPathMax,
  62. WORD FAR * pcbPathOut);
  63. BOOL INSTAPI SQLGetInstalledDrivers (LPSTR lpszBuf,
  64. WORD cbBufMax,
  65. WORD FAR * pcbBufOut);
  66. BOOL INSTAPI SQLGetAvailableDrivers (LPCSTR lpszInfFile,
  67. LPSTR lpszBuf,
  68. WORD cbBufMax,
  69. WORD FAR * pcbBufOut);
  70. BOOL INSTAPI SQLConfigDataSource (HWND hwndParent,
  71. WORD fRequest,
  72. LPCSTR lpszDriver,
  73. LPCSTR lpszAttributes);
  74. BOOL INSTAPI SQLRemoveDefaultDataSource(void);
  75. BOOL INSTAPI SQLWriteDSNToIni (LPCSTR lpszDSN,
  76. LPCSTR lpszDriver);
  77. BOOL INSTAPI SQLRemoveDSNFromIni (LPCSTR lpszDSN);
  78. BOOL INSTAPI SQLValidDSN (LPCSTR lpszDSN);
  79. #ifdef WIN32
  80. BOOL INSTAPI SQLWritePrivateProfileString(LPCSTR lpszSection,
  81. LPCSTR lpszEntry,
  82. LPCSTR lpszString,
  83. LPCSTR lpszFilename);
  84. int INSTAPI SQLGetPrivateProfileString( LPCSTR lpszSection,
  85. LPCSTR lpszEntry,
  86. LPCSTR lpszDefault,
  87. LPSTR lpszRetBuffer,
  88. int cbRetBuffer,
  89. LPCSTR lpszFilename);
  90. #endif
  91. // Driver specific Setup APIs called by installer
  92. BOOL INSTAPI ConfigDSN (HWND hwndParent,
  93. WORD fRequest,
  94. LPCSTR lpszDriver,
  95. LPCSTR lpszAttributes);
  96. BOOL INSTAPI ConfigTranslator ( HWND hwndParent,
  97. DWORD FAR *pvOption);
  98. #endif // RC_INVOKED
  99. #ifdef __cplusplus
  100. } // End of extern "C" {
  101. #endif // __cplusplus
  102. #endif // __ODBCINST_H