home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 September / VPR0009A.BIN / VS60SP4JPN / support / sqloledb.h < prev    next >
C/C++ Source or Header  |  1999-03-06  |  13KB  |  417 lines

  1. //--------------------------------------------------------------------
  2. // Microsoft OLE DB Provider for SQL Server
  3. // (C) Copyright 1997 By Microsoft Corporation.
  4. //
  5. // @doc
  6. //
  7. // @module SQLOLEDB.H | Provider Specific definitions
  8. //
  9. //--------------------------------------------------------------------
  10.  
  11. #ifndef  _SQLOLEDB_H_
  12. #define  _SQLOLEDB_H_
  13.  
  14. //----------------------------------------------------------------------------
  15. // Provider-specific Class Ids
  16. #ifdef DBINITCONSTANTS
  17. // Provider CLSID         {0C7FF16C-38E3-11d0-97AB-00C04FC2AD98}
  18. extern const GUID CLSID_SQLOLEDB              = {0xc7ff16cL,0x38e3,0x11d0,{0x97,0xab,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  19. // Error Lookup CLSID         {C0932C62-38E5-11d0-97AB-00C04FC2AD98}
  20. extern const GUID CLSID_SQLOLEDB_ERROR         = {0xc0932c62L,0x38e5,0x11d0,{0x97,0xab,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  21. // Enumerator CLSID         {DFA22B8E-E68D-11d0-97E4-00C04FC2AD98}
  22. extern const GUID CLSID_SQLOLEDB_ENUMERATOR     = {0xdfa22b8eL,0xe68d,0x11d0,{0x97,0xe4,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  23. #else // !DBINITCONSTANTS
  24. extern const GUID CLSID_SQLOLEDB;
  25. extern const GUID CLSID_SQLOLEDB_ERROR;
  26. extern const GUID CLSID_SQLOLEDB_ENUMERATOR;
  27. #endif // DBINITCONSTANTS
  28.  
  29. //----------------------------------------------------------------------------
  30. // Provider-specific Interface Ids
  31. #ifdef DBINITCONSTANTS
  32. extern const GUID IID_ISQLServerErrorInfo    = {0x5cf4ca12,0xef21,0x11d0,{0x97,0xe7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  33. extern const GUID IID_IRowsetFastLoad         = {0x5cf4ca13,0xef21,0x11d0,{0x97,0xe7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  34. #else // !DBINITCONSTANTS
  35. extern const GUID IID_ISQLServerErrorInfo;
  36. extern const GUID IID_IRowsetFastLoad;
  37. #endif // DBINITCONSTANTS
  38.  
  39. //----------------------------------------------------------------------------
  40. // Provider-specific schema rowsets
  41. #ifdef DBINITCONSTANTS
  42. extern const GUID DBSCHEMA_LINKEDSERVERS    = {0x9093caf4,0x2eac,0x11d1,{0x98,0x9,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  43. #else // !DBINITCONSTANTS
  44. extern const GUID DBSCHEMA_LINKEDSERVERS;
  45. #endif // DBINITCONSTANTS
  46.  
  47. #define CRESTRICTIONS_DBSCHEMA_LINKEDSERVERS    1
  48.  
  49.  
  50. //----------------------------------------------------------------------------
  51. // Provider-specific property sets
  52. #ifdef DBINITCONSTANTS
  53. extern const GUID DBPROPSET_SQLSERVERDATASOURCE = {0x28efaee4,0x2d2c,0x11d1,{0x98,0x7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  54. extern const GUID DBPROPSET_SQLSERVERDATASOURCEINFO = {0xdf10cb94,0x35f6,0x11d2,{0x9c,0x54,0x0,0xc0,0x4f,0x79,0x71,0xd3}};
  55. extern const GUID DBPROPSET_SQLSERVERDBINIT     = {0x5cf4ca10,0xef21,0x11d0,{0x97,0xe7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  56. extern const GUID DBPROPSET_SQLSERVERROWSET     = {0x5cf4ca11,0xef21,0x11d0,{0x97,0xe7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  57. extern const GUID DBPROPSET_SQLSERVERSESSION    = {0x28efaee5,0x2d2c,0x11d1,{0x98,0x7,0x0,0xc0,0x4f,0xc2,0xad,0x98}};
  58.  
  59. #else // !DBINITCONSTANTS
  60. extern const GUID DBPROPSET_SQLSERVERDATASOURCE;
  61. extern const GUID DBPROPSET_SQLSERVERDATASOURCEINFO;
  62. extern const GUID DBPROPSET_SQLSERVERDBINIT;
  63. extern const GUID DBPROPSET_SQLSERVERROWSET;
  64. extern const GUID DBPROPSET_SQLSERVERSESSION;
  65. #endif // DBINITCONSTANTS
  66.  
  67. //----------------------------------------------------------------------------
  68. // PropIds for DBPROPSET_SQLSERVERDATASOURCE
  69. #define SSPROP_ENABLEFASTLOAD            2
  70.  
  71. //----------------------------------------------------------------------------
  72. // PropIds for DBPROPSET_SQLSERVERDATASOURCEINFO
  73. #define SSPROP_UNICODELCID                2
  74. #define SSPROP_UNICODECOMPARISONSTYLE    3
  75.  
  76. //----------------------------------------------------------------------------
  77. // PropIds for DBPROPSET_SQLSERVERDBINIT 
  78. #define SSPROP_INIT_CURRENTLANGUAGE        4
  79. #define SSPROP_INIT_NETWORKADDRESS        5
  80. #define SSPROP_INIT_NETWORKLIBRARY        6
  81. #define SSPROP_INIT_USEPROCFORPREP        7
  82. #define SSPROP_INIT_AUTOTRANSLATE        8
  83. #define SSPROP_INIT_PACKETSIZE            9
  84. #define SSPROP_INIT_APPNAME            10
  85. #define SSPROP_INIT_WSID            11
  86. #define SSPROP_INIT_FILENAME            12
  87.  
  88. // Values for SSPROP_USEPROCFORPREP
  89. #define SSPROPVAL_USEPROCFORPREP_OFF        0
  90. #define SSPROPVAL_USEPROCFORPREP_ON        1
  91. #define SSPROPVAL_USEPROCFORPREP_ON_DROP    2
  92.  
  93. //----------------------------------------------------------------------------
  94. // PropIds for DBPROPSET_SQLSERVERSESSION
  95. #define SSPROP_QUOTEDCATALOGNAMES        2
  96.  
  97. //----------------------------------------------------------------------------
  98. // PropIds for DBPROPSET_SQLSERVERROWSET 
  99. #define SSPROP_MAXBLOBLENGTH            8
  100. #define SSPROP_FASTLOADOPTIONS            9
  101. #define SSPROP_FASTLOADKEEPNULLS        10
  102. #define SSPROP_FASTLOADKEEPIDENTITY        11
  103.  
  104.  
  105. /* this ALWAYS GENERATED file contains the definitions for the interfaces */
  106.  
  107.  
  108. /* File created by MIDL compiler version 3.01.75 */
  109. /* at Sun Sep 14 11:43:38 1997
  110.  */
  111. /* Compiler settings for ..\inc\sqloledb.idl:
  112.     Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
  113.     error checks: none
  114. */
  115. //@@MIDL_FILE_HEADING(  )
  116. #include "rpc.h"
  117. #include "rpcndr.h"
  118. #ifndef COM_NO_WINDOWS_H
  119. #include "windows.h"
  120. #include "ole2.h"
  121. #endif /*COM_NO_WINDOWS_H*/
  122.  
  123. #ifndef __sqloledb_h__
  124. #define __sqloledb_h__
  125.  
  126. #ifdef __cplusplus
  127. extern "C"{
  128. #endif 
  129.  
  130. /* Forward Declarations */ 
  131.  
  132. #ifndef __ISQLServerErrorInfo_FWD_DEFINED__
  133. #define __ISQLServerErrorInfo_FWD_DEFINED__
  134. typedef interface ISQLServerErrorInfo ISQLServerErrorInfo;
  135. #endif     /* __ISQLServerErrorInfo_FWD_DEFINED__ */
  136.  
  137.  
  138. #ifndef __IRowsetFastLoad_FWD_DEFINED__
  139. #define __IRowsetFastLoad_FWD_DEFINED__
  140. typedef interface IRowsetFastLoad IRowsetFastLoad;
  141. #endif     /* __IRowsetFastLoad_FWD_DEFINED__ */
  142.  
  143.  
  144. /* header files for imported files */
  145. #include "unknwn.h"
  146.  
  147. void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);
  148. void __RPC_USER MIDL_user_free( void __RPC_FAR * ); 
  149.  
  150. /****************************************
  151.  * Generated header for interface: __MIDL_itf_sqloledb_0000
  152.  * at Sun Sep 14 11:43:38 1997
  153.  * using MIDL 3.01.75
  154.  ****************************************/
  155. /* [local] */ 
  156.  
  157.  
  158. // the structure returned by  ISQLServerErrorInfo::GetSQLServerInfo
  159. typedef struct  tagSSErrorInfo
  160.     {
  161.     LPOLESTR pwszMessage;
  162.     LPOLESTR pwszServer;
  163.     LPOLESTR pwszProcedure;
  164.     LONG lNative;
  165.     BYTE bState;
  166.     BYTE bClass;
  167.     WORD wLineNumber;
  168.     }    SSERRORINFO;
  169.  
  170.  
  171.  
  172. extern RPC_IF_HANDLE __MIDL_itf_sqloledb_0000_v0_0_c_ifspec;
  173. extern RPC_IF_HANDLE __MIDL_itf_sqloledb_0000_v0_0_s_ifspec;
  174.  
  175. #ifndef __ISQLServerErrorInfo_INTERFACE_DEFINED__
  176. #define __ISQLServerErrorInfo_INTERFACE_DEFINED__
  177.  
  178. /****************************************
  179.  * Generated header for interface: ISQLServerErrorInfo
  180.  * at Sun Sep 14 11:43:38 1997
  181.  * using MIDL 3.01.75
  182.  ****************************************/
  183. /* [unique][object][local][uuid] */ 
  184.  
  185.  
  186.  
  187. EXTERN_C const IID IID_ISQLServerErrorInfo;
  188.  
  189. #if defined(__cplusplus) && !defined(CINTERFACE)
  190.     
  191.     interface ISQLServerErrorInfo : public IUnknown
  192.     {
  193.     public:
  194.         virtual HRESULT STDMETHODCALLTYPE GetErrorInfo( 
  195.             /* [out] */ SSERRORINFO __RPC_FAR *__RPC_FAR *ppErrorInfo,
  196.             /* [out] */ OLECHAR __RPC_FAR *__RPC_FAR *ppStringsBuffer) = 0;
  197.         
  198.     };
  199.     
  200. #else     /* C style interface */
  201.  
  202.     typedef struct ISQLServerErrorInfoVtbl
  203.     {
  204.         BEGIN_INTERFACE
  205.         
  206.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( 
  207.             ISQLServerErrorInfo __RPC_FAR * This,
  208.             /* [in] */ REFIID riid,
  209.             /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
  210.         
  211.         ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( 
  212.             ISQLServerErrorInfo __RPC_FAR * This);
  213.         
  214.         ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( 
  215.             ISQLServerErrorInfo __RPC_FAR * This);
  216.         
  217.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetErrorInfo )( 
  218.             ISQLServerErrorInfo __RPC_FAR * This,
  219.             /* [out] */ SSERRORINFO __RPC_FAR *__RPC_FAR *ppErrorInfo,
  220.             /* [out] */ OLECHAR __RPC_FAR *__RPC_FAR *ppStringsBuffer);
  221.         
  222.         END_INTERFACE
  223.     } ISQLServerErrorInfoVtbl;
  224.  
  225.     interface ISQLServerErrorInfo
  226.     {
  227.         CONST_VTBL struct ISQLServerErrorInfoVtbl __RPC_FAR *lpVtbl;
  228.     };
  229.  
  230.     
  231.  
  232. #ifdef COBJMACROS
  233.  
  234.  
  235. #define ISQLServerErrorInfo_QueryInterface(This,riid,ppvObject)    \
  236.     (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
  237.  
  238. #define ISQLServerErrorInfo_AddRef(This)    \
  239.     (This)->lpVtbl -> AddRef(This)
  240.  
  241. #define ISQLServerErrorInfo_Release(This)    \
  242.     (This)->lpVtbl -> Release(This)
  243.  
  244.  
  245. #define ISQLServerErrorInfo_GetErrorInfo(This,ppErrorInfo,ppStringsBuffer)    \
  246.     (This)->lpVtbl -> GetErrorInfo(This,ppErrorInfo,ppStringsBuffer)
  247.  
  248. #endif /* COBJMACROS */
  249.  
  250.  
  251. #endif     /* C style interface */
  252.  
  253.  
  254.  
  255. HRESULT STDMETHODCALLTYPE ISQLServerErrorInfo_GetErrorInfo_Proxy( 
  256.     ISQLServerErrorInfo __RPC_FAR * This,
  257.     /* [out] */ SSERRORINFO __RPC_FAR *__RPC_FAR *ppErrorInfo,
  258.     /* [out] */ OLECHAR __RPC_FAR *__RPC_FAR *ppStringsBuffer);
  259.  
  260.  
  261. void __RPC_STUB ISQLServerErrorInfo_GetErrorInfo_Stub(
  262.     IRpcStubBuffer *This,
  263.     IRpcChannelBuffer *_pRpcChannelBuffer,
  264.     PRPC_MESSAGE _pRpcMessage,
  265.     DWORD *_pdwStubPhase);
  266.  
  267.  
  268.  
  269. #endif     /* __ISQLServerErrorInfo_INTERFACE_DEFINED__ */
  270.  
  271.  
  272. /****************************************
  273.  * Generated header for interface: __MIDL_itf_sqloledb_0006
  274.  * at Sun Sep 14 11:43:38 1997
  275.  * using MIDL 3.01.75
  276.  ****************************************/
  277. /* [local] */ 
  278.  
  279.  
  280. typedef ULONG HACCESSOR;
  281.  
  282.  
  283.  
  284. extern RPC_IF_HANDLE __MIDL_itf_sqloledb_0006_v0_0_c_ifspec;
  285. extern RPC_IF_HANDLE __MIDL_itf_sqloledb_0006_v0_0_s_ifspec;
  286.  
  287. #ifndef __IRowsetFastLoad_INTERFACE_DEFINED__
  288. #define __IRowsetFastLoad_INTERFACE_DEFINED__
  289.  
  290. /****************************************
  291.  * Generated header for interface: IRowsetFastLoad
  292.  * at Sun Sep 14 11:43:38 1997
  293.  * using MIDL 3.01.75
  294.  ****************************************/
  295. /* [unique][object][local][uuid] */ 
  296.  
  297.  
  298.  
  299. EXTERN_C const IID IID_IRowsetFastLoad;
  300.  
  301. #if defined(__cplusplus) && !defined(CINTERFACE)
  302.     
  303.     interface IRowsetFastLoad : public IUnknown
  304.     {
  305.     public:
  306.         virtual HRESULT STDMETHODCALLTYPE InsertRow( 
  307.             /* [in] */ HACCESSOR hAccessor,
  308.             /* [in] */ void __RPC_FAR *pData) = 0;
  309.         
  310.         virtual HRESULT STDMETHODCALLTYPE Commit( 
  311.             /* [in] */ BOOL fDone) = 0;
  312.         
  313.     };
  314.     
  315. #else     /* C style interface */
  316.  
  317.     typedef struct IRowsetFastLoadVtbl
  318.     {
  319.         BEGIN_INTERFACE
  320.         
  321.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( 
  322.             IRowsetFastLoad __RPC_FAR * This,
  323.             /* [in] */ REFIID riid,
  324.             /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
  325.         
  326.         ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( 
  327.             IRowsetFastLoad __RPC_FAR * This);
  328.         
  329.         ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( 
  330.             IRowsetFastLoad __RPC_FAR * This);
  331.         
  332.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *InsertRow )( 
  333.             IRowsetFastLoad __RPC_FAR * This,
  334.             /* [in] */ HACCESSOR hAccessor,
  335.             /* [in] */ void __RPC_FAR *pData);
  336.         
  337.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Commit )( 
  338.             IRowsetFastLoad __RPC_FAR * This,
  339.             /* [in] */ BOOL fDone);
  340.         
  341.         END_INTERFACE
  342.     } IRowsetFastLoadVtbl;
  343.  
  344.     interface IRowsetFastLoad
  345.     {
  346.         CONST_VTBL struct IRowsetFastLoadVtbl __RPC_FAR *lpVtbl;
  347.     };
  348.  
  349.     
  350.  
  351. #ifdef COBJMACROS
  352.  
  353.  
  354. #define IRowsetFastLoad_QueryInterface(This,riid,ppvObject)    \
  355.     (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
  356.  
  357. #define IRowsetFastLoad_AddRef(This)    \
  358.     (This)->lpVtbl -> AddRef(This)
  359.  
  360. #define IRowsetFastLoad_Release(This)    \
  361.     (This)->lpVtbl -> Release(This)
  362.  
  363.  
  364. #define IRowsetFastLoad_InsertRow(This,hAccessor,pData)    \
  365.     (This)->lpVtbl -> InsertRow(This,hAccessor,pData)
  366.  
  367. #define IRowsetFastLoad_Commit(This,fDone)    \
  368.     (This)->lpVtbl -> Commit(This,fDone)
  369.  
  370. #endif /* COBJMACROS */
  371.  
  372.  
  373. #endif     /* C style interface */
  374.  
  375.  
  376.  
  377. HRESULT STDMETHODCALLTYPE IRowsetFastLoad_InsertRow_Proxy( 
  378.     IRowsetFastLoad __RPC_FAR * This,
  379.     /* [in] */ HACCESSOR hAccessor,
  380.     /* [in] */ void __RPC_FAR *pData);
  381.  
  382.  
  383. void __RPC_STUB IRowsetFastLoad_InsertRow_Stub(
  384.     IRpcStubBuffer *This,
  385.     IRpcChannelBuffer *_pRpcChannelBuffer,
  386.     PRPC_MESSAGE _pRpcMessage,
  387.     DWORD *_pdwStubPhase);
  388.  
  389.  
  390. HRESULT STDMETHODCALLTYPE IRowsetFastLoad_Commit_Proxy( 
  391.     IRowsetFastLoad __RPC_FAR * This,
  392.     /* [in] */ BOOL fDone);
  393.  
  394.  
  395. void __RPC_STUB IRowsetFastLoad_Commit_Stub(
  396.     IRpcStubBuffer *This,
  397.     IRpcChannelBuffer *_pRpcChannelBuffer,
  398.     PRPC_MESSAGE _pRpcMessage,
  399.     DWORD *_pdwStubPhase);
  400.  
  401.  
  402.  
  403. #endif     /* __IRowsetFastLoad_INTERFACE_DEFINED__ */
  404.  
  405.  
  406. /* Additional Prototypes for ALL interfaces */
  407.  
  408. /* end of Additional Prototypes */
  409.  
  410. #ifdef __cplusplus
  411. }
  412. #endif
  413.  
  414. #endif
  415.  
  416. #endif //_SQLOLEDB_H_
  417.