home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / dbmsg / ado / isapi / debug / msado15.tli < prev   
Encoding:
Text File  |  1998-02-03  |  49.0 KB  |  1,401 lines

  1. // Created by Microsoft (R) C/C++ Compiler Version 12.00.8085.0 (e3a0b30c).
  2. //
  3. // d:\temp_s\sdk\dbmsg\ado\isapi\debug\msado15.tli
  4. //
  5. // Wrapper implementations for Win32 type library c:\program files\common files\system\ado\msado15.dll
  6. // compiler-generated file created 03/30/98 at 02:39:30 - DO NOT EDIT!
  7.  
  8. #pragma once
  9.  
  10. //
  11. // interface _Collection wrapper method implementations
  12. //
  13.  
  14. inline long _Collection::GetCount ( ) {
  15.     long _result;
  16.     HRESULT _hr = get_Count(&_result);
  17.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  18.     return _result;
  19. }
  20.  
  21. inline IUnknownPtr _Collection::_NewEnum ( ) {
  22.     IUnknown * _result;
  23.     HRESULT _hr = raw__NewEnum(&_result);
  24.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  25.     return IUnknownPtr(_result, false);
  26. }
  27.  
  28. inline HRESULT _Collection::Refresh ( ) {
  29.     HRESULT _hr = raw_Refresh();
  30.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  31.     return _hr;
  32. }
  33.  
  34. //
  35. // interface _DynaCollection wrapper method implementations
  36. //
  37.  
  38. inline HRESULT _DynaCollection::Append ( IDispatch * Object ) {
  39.     HRESULT _hr = raw_Append(Object);
  40.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  41.     return _hr;
  42. }
  43.  
  44. inline HRESULT _DynaCollection::Delete ( const _variant_t & Index ) {
  45.     HRESULT _hr = raw_Delete(Index);
  46.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  47.     return _hr;
  48. }
  49.  
  50. //
  51. // interface _ADO wrapper method implementations
  52. //
  53.  
  54. inline PropertiesPtr _ADO::GetProperties ( ) {
  55.     struct Properties * _result;
  56.     HRESULT _hr = get_Properties(&_result);
  57.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  58.     return PropertiesPtr(_result, false);
  59. }
  60.  
  61. //
  62. // interface Properties wrapper method implementations
  63. //
  64.  
  65. inline PropertyPtr Properties::GetItem ( const _variant_t & Index ) {
  66.     struct Property * _result;
  67.     HRESULT _hr = get_Item(Index, &_result);
  68.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  69.     return PropertyPtr(_result, false);
  70. }
  71.  
  72. //
  73. // interface Property wrapper method implementations
  74. //
  75.  
  76. inline _variant_t Property::GetValue ( ) {
  77.     VARIANT _result;
  78.     VariantInit(&_result);
  79.     HRESULT _hr = get_Value(&_result);
  80.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  81.     return _variant_t(_result, false);
  82. }
  83.  
  84. inline void Property::PutValue ( const _variant_t & pval ) {
  85.     HRESULT _hr = put_Value(pval);
  86.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  87. }
  88.  
  89. inline _bstr_t Property::GetName ( ) {
  90.     BSTR _result;
  91.     HRESULT _hr = get_Name(&_result);
  92.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  93.     return _bstr_t(_result, false);
  94. }
  95.  
  96. inline enum DataTypeEnum Property::GetType ( ) {
  97.     enum DataTypeEnum _result;
  98.     HRESULT _hr = get_Type(&_result);
  99.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  100.     return _result;
  101. }
  102.  
  103. inline long Property::GetAttributes ( ) {
  104.     long _result;
  105.     HRESULT _hr = get_Attributes(&_result);
  106.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  107.     return _result;
  108. }
  109.  
  110. inline void Property::PutAttributes ( long plAttributes ) {
  111.     HRESULT _hr = put_Attributes(plAttributes);
  112.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  113. }
  114.  
  115. //
  116. // interface Error wrapper method implementations
  117. //
  118.  
  119. inline long Error::GetNumber ( ) {
  120.     long _result;
  121.     HRESULT _hr = get_Number(&_result);
  122.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  123.     return _result;
  124. }
  125.  
  126. inline _bstr_t Error::GetSource ( ) {
  127.     BSTR _result;
  128.     HRESULT _hr = get_Source(&_result);
  129.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  130.     return _bstr_t(_result, false);
  131. }
  132.  
  133. inline _bstr_t Error::GetDescription ( ) {
  134.     BSTR _result;
  135.     HRESULT _hr = get_Description(&_result);
  136.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  137.     return _bstr_t(_result, false);
  138. }
  139.  
  140. inline _bstr_t Error::GetHelpFile ( ) {
  141.     BSTR _result;
  142.     HRESULT _hr = get_HelpFile(&_result);
  143.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  144.     return _bstr_t(_result, false);
  145. }
  146.  
  147. inline long Error::GetHelpContext ( ) {
  148.     long _result;
  149.     HRESULT _hr = get_HelpContext(&_result);
  150.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  151.     return _result;
  152. }
  153.  
  154. inline _bstr_t Error::GetSQLState ( ) {
  155.     BSTR _result;
  156.     HRESULT _hr = get_SQLState(&_result);
  157.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  158.     return _bstr_t(_result, false);
  159. }
  160.  
  161. inline long Error::GetNativeError ( ) {
  162.     long _result;
  163.     HRESULT _hr = get_NativeError(&_result);
  164.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  165.     return _result;
  166. }
  167.  
  168. //
  169. // interface Errors wrapper method implementations
  170. //
  171.  
  172. inline ErrorPtr Errors::GetItem ( const _variant_t & Index ) {
  173.     struct Error * _result;
  174.     HRESULT _hr = get_Item(Index, &_result);
  175.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  176.     return ErrorPtr(_result, false);
  177. }
  178.  
  179. inline HRESULT Errors::Clear ( ) {
  180.     HRESULT _hr = raw_Clear();
  181.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  182.     return _hr;
  183. }
  184.  
  185. //
  186. // interface _Command wrapper method implementations
  187. //
  188.  
  189. inline _ConnectionPtr _Command::GetActiveConnection ( ) {
  190.     struct _Connection * _result;
  191.     HRESULT _hr = get_ActiveConnection(&_result);
  192.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  193.     return _ConnectionPtr(_result, false);
  194. }
  195.  
  196. inline void _Command::PutRefActiveConnection ( struct _Connection * ppvObject ) {
  197.     HRESULT _hr = putref_ActiveConnection(ppvObject);
  198.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  199. }
  200.  
  201. inline void _Command::PutActiveConnection ( const _variant_t & ppvObject ) {
  202.     HRESULT _hr = put_ActiveConnection(ppvObject);
  203.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  204. }
  205.  
  206. inline _bstr_t _Command::GetCommandText ( ) {
  207.     BSTR _result;
  208.     HRESULT _hr = get_CommandText(&_result);
  209.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  210.     return _bstr_t(_result, false);
  211. }
  212.  
  213. inline void _Command::PutCommandText ( _bstr_t pbstr ) {
  214.     HRESULT _hr = put_CommandText(pbstr);
  215.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  216. }
  217.  
  218. inline long _Command::GetCommandTimeout ( ) {
  219.     long _result;
  220.     HRESULT _hr = get_CommandTimeout(&_result);
  221.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  222.     return _result;
  223. }
  224.  
  225. inline void _Command::PutCommandTimeout ( long pl ) {
  226.     HRESULT _hr = put_CommandTimeout(pl);
  227.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  228. }
  229.  
  230. inline VARIANT_BOOL _Command::GetPrepared ( ) {
  231.     VARIANT_BOOL _result;
  232.     HRESULT _hr = get_Prepared(&_result);
  233.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  234.     return _result;
  235. }
  236.  
  237. inline void _Command::PutPrepared ( VARIANT_BOOL pfPrepared ) {
  238.     HRESULT _hr = put_Prepared(pfPrepared);
  239.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  240. }
  241.  
  242. inline _RecordsetPtr _Command::Execute ( VARIANT * RecordsAffected, VARIANT * Parameters, long Options ) {
  243.     struct _Recordset * _result;
  244.     HRESULT _hr = raw_Execute(RecordsAffected, Parameters, Options, &_result);
  245.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  246.     return _RecordsetPtr(_result, false);
  247. }
  248.  
  249. inline _ParameterPtr _Command::CreateParameter ( _bstr_t Name, enum DataTypeEnum Type, enum ParameterDirectionEnum Direction, long Size, const _variant_t & Value ) {
  250.     struct _Parameter * _result;
  251.     HRESULT _hr = raw_CreateParameter(Name, Type, Direction, Size, Value, &_result);
  252.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  253.     return _ParameterPtr(_result, false);
  254. }
  255.  
  256. inline ParametersPtr _Command::GetParameters ( ) {
  257.     struct Parameters * _result;
  258.     HRESULT _hr = get_Parameters(&_result);
  259.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  260.     return ParametersPtr(_result, false);
  261. }
  262.  
  263. inline void _Command::PutCommandType ( enum CommandTypeEnum plCmdType ) {
  264.     HRESULT _hr = put_CommandType(plCmdType);
  265.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  266. }
  267.  
  268. inline enum CommandTypeEnum _Command::GetCommandType ( ) {
  269.     enum CommandTypeEnum _result;
  270.     HRESULT _hr = get_CommandType(&_result);
  271.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  272.     return _result;
  273. }
  274.  
  275. inline _bstr_t _Command::GetName ( ) {
  276.     BSTR _result;
  277.     HRESULT _hr = get_Name(&_result);
  278.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  279.     return _bstr_t(_result, false);
  280. }
  281.  
  282. inline void _Command::PutName ( _bstr_t pbstrName ) {
  283.     HRESULT _hr = put_Name(pbstrName);
  284.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  285. }
  286.  
  287. inline long _Command::GetState ( ) {
  288.     long _result;
  289.     HRESULT _hr = get_State(&_result);
  290.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  291.     return _result;
  292. }
  293.  
  294. inline HRESULT _Command::Cancel ( ) {
  295.     HRESULT _hr = raw_Cancel();
  296.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  297.     return _hr;
  298. }
  299.  
  300. //
  301. // interface _Connection wrapper method implementations
  302. //
  303.  
  304. inline _bstr_t _Connection::GetConnectionString ( ) {
  305.     BSTR _result;
  306.     HRESULT _hr = get_ConnectionString(&_result);
  307.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  308.     return _bstr_t(_result, false);
  309. }
  310.  
  311. inline void _Connection::PutConnectionString ( _bstr_t pbstr ) {
  312.     HRESULT _hr = put_ConnectionString(pbstr);
  313.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  314. }
  315.  
  316. inline long _Connection::GetCommandTimeout ( ) {
  317.     long _result;
  318.     HRESULT _hr = get_CommandTimeout(&_result);
  319.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  320.     return _result;
  321. }
  322.  
  323. inline void _Connection::PutCommandTimeout ( long plTimeout ) {
  324.     HRESULT _hr = put_CommandTimeout(plTimeout);
  325.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  326. }
  327.  
  328. inline long _Connection::GetConnectionTimeout ( ) {
  329.     long _result;
  330.     HRESULT _hr = get_ConnectionTimeout(&_result);
  331.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  332.     return _result;
  333. }
  334.  
  335. inline void _Connection::PutConnectionTimeout ( long plTimeout ) {
  336.     HRESULT _hr = put_ConnectionTimeout(plTimeout);
  337.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  338. }
  339.  
  340. inline _bstr_t _Connection::GetVersion ( ) {
  341.     BSTR _result;
  342.     HRESULT _hr = get_Version(&_result);
  343.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  344.     return _bstr_t(_result, false);
  345. }
  346.  
  347. inline HRESULT _Connection::Close ( ) {
  348.     HRESULT _hr = raw_Close();
  349.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  350.     return _hr;
  351. }
  352.  
  353. inline _RecordsetPtr _Connection::Execute ( _bstr_t CommandText, VARIANT * RecordsAffected, long Options ) {
  354.     struct _Recordset * _result;
  355.     HRESULT _hr = raw_Execute(CommandText, RecordsAffected, Options, &_result);
  356.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  357.     return _RecordsetPtr(_result, false);
  358. }
  359.  
  360. inline long _Connection::BeginTrans ( ) {
  361.     long _result;
  362.     HRESULT _hr = raw_BeginTrans(&_result);
  363.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  364.     return _result;
  365. }
  366.  
  367. inline HRESULT _Connection::CommitTrans ( ) {
  368.     HRESULT _hr = raw_CommitTrans();
  369.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  370.     return _hr;
  371. }
  372.  
  373. inline HRESULT _Connection::RollbackTrans ( ) {
  374.     HRESULT _hr = raw_RollbackTrans();
  375.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  376.     return _hr;
  377. }
  378.  
  379. inline HRESULT _Connection::Open ( _bstr_t ConnectionString, _bstr_t UserID, _bstr_t Password, long Options ) {
  380.     HRESULT _hr = raw_Open(ConnectionString, UserID, Password, Options);
  381.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  382.     return _hr;
  383. }
  384.  
  385. inline ErrorsPtr _Connection::GetErrors ( ) {
  386.     struct Errors * _result;
  387.     HRESULT _hr = get_Errors(&_result);
  388.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  389.     return ErrorsPtr(_result, false);
  390. }
  391.  
  392. inline _bstr_t _Connection::GetDefaultDatabase ( ) {
  393.     BSTR _result;
  394.     HRESULT _hr = get_DefaultDatabase(&_result);
  395.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  396.     return _bstr_t(_result, false);
  397. }
  398.  
  399. inline void _Connection::PutDefaultDatabase ( _bstr_t pbstr ) {
  400.     HRESULT _hr = put_DefaultDatabase(pbstr);
  401.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  402. }
  403.  
  404. inline enum IsolationLevelEnum _Connection::GetIsolationLevel ( ) {
  405.     enum IsolationLevelEnum _result;
  406.     HRESULT _hr = get_IsolationLevel(&_result);
  407.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  408.     return _result;
  409. }
  410.  
  411. inline void _Connection::PutIsolationLevel ( enum IsolationLevelEnum Level ) {
  412.     HRESULT _hr = put_IsolationLevel(Level);
  413.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  414. }
  415.  
  416. inline long _Connection::GetAttributes ( ) {
  417.     long _result;
  418.     HRESULT _hr = get_Attributes(&_result);
  419.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  420.     return _result;
  421. }
  422.  
  423. inline void _Connection::PutAttributes ( long plAttr ) {
  424.     HRESULT _hr = put_Attributes(plAttr);
  425.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  426. }
  427.  
  428. inline enum CursorLocationEnum _Connection::GetCursorLocation ( ) {
  429.     enum CursorLocationEnum _result;
  430.     HRESULT _hr = get_CursorLocation(&_result);
  431.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  432.     return _result;
  433. }
  434.  
  435. inline void _Connection::PutCursorLocation ( enum CursorLocationEnum plCursorLoc ) {
  436.     HRESULT _hr = put_CursorLocation(plCursorLoc);
  437.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  438. }
  439.  
  440. inline enum ConnectModeEnum _Connection::GetMode ( ) {
  441.     enum ConnectModeEnum _result;
  442.     HRESULT _hr = get_Mode(&_result);
  443.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  444.     return _result;
  445. }
  446.  
  447. inline void _Connection::PutMode ( enum ConnectModeEnum plMode ) {
  448.     HRESULT _hr = put_Mode(plMode);
  449.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  450. }
  451.  
  452. inline _bstr_t _Connection::GetProvider ( ) {
  453.     BSTR _result;
  454.     HRESULT _hr = get_Provider(&_result);
  455.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  456.     return _bstr_t(_result, false);
  457. }
  458.  
  459. inline void _Connection::PutProvider ( _bstr_t pbstr ) {
  460.     HRESULT _hr = put_Provider(pbstr);
  461.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  462. }
  463.  
  464. inline long _Connection::GetState ( ) {
  465.     long _result;
  466.     HRESULT _hr = get_State(&_result);
  467.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  468.     return _result;
  469. }
  470.  
  471. inline _RecordsetPtr _Connection::OpenSchema ( enum SchemaEnum Schema, const _variant_t & Restrictions, const _variant_t & SchemaID ) {
  472.     struct _Recordset * _result;
  473.     HRESULT _hr = raw_OpenSchema(Schema, Restrictions, SchemaID, &_result);
  474.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  475.     return _RecordsetPtr(_result, false);
  476. }
  477.  
  478. inline HRESULT _Connection::Cancel ( ) {
  479.     HRESULT _hr = raw_Cancel();
  480.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  481.     return _hr;
  482. }
  483.  
  484. //
  485. // interface _Recordset wrapper method implementations
  486. //
  487.  
  488. inline enum PositionEnum _Recordset::GetAbsolutePosition ( ) {
  489.     enum PositionEnum _result;
  490.     HRESULT _hr = get_AbsolutePosition(&_result);
  491.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  492.     return _result;
  493. }
  494.  
  495. inline void _Recordset::PutAbsolutePosition ( enum PositionEnum pl ) {
  496.     HRESULT _hr = put_AbsolutePosition(pl);
  497.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  498. }
  499.  
  500. inline void _Recordset::PutRefActiveConnection ( IDispatch * pvar ) {
  501.     HRESULT _hr = putref_ActiveConnection(pvar);
  502.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  503. }
  504.  
  505. inline void _Recordset::PutActiveConnection ( const _variant_t & pvar ) {
  506.     HRESULT _hr = put_ActiveConnection(pvar);
  507.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  508. }
  509.  
  510. inline _variant_t _Recordset::GetActiveConnection ( ) {
  511.     VARIANT _result;
  512.     VariantInit(&_result);
  513.     HRESULT _hr = get_ActiveConnection(&_result);
  514.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  515.     return _variant_t(_result, false);
  516. }
  517.  
  518. inline VARIANT_BOOL _Recordset::GetBOF ( ) {
  519.     VARIANT_BOOL _result;
  520.     HRESULT _hr = get_BOF(&_result);
  521.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  522.     return _result;
  523. }
  524.  
  525. inline _variant_t _Recordset::GetBookmark ( ) {
  526.     VARIANT _result;
  527.     VariantInit(&_result);
  528.     HRESULT _hr = get_Bookmark(&_result);
  529.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  530.     return _variant_t(_result, false);
  531. }
  532.  
  533. inline void _Recordset::PutBookmark ( const _variant_t & pvBookmark ) {
  534.     HRESULT _hr = put_Bookmark(pvBookmark);
  535.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  536. }
  537.  
  538. inline long _Recordset::GetCacheSize ( ) {
  539.     long _result;
  540.     HRESULT _hr = get_CacheSize(&_result);
  541.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  542.     return _result;
  543. }
  544.  
  545. inline void _Recordset::PutCacheSize ( long pl ) {
  546.     HRESULT _hr = put_CacheSize(pl);
  547.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  548. }
  549.  
  550. inline enum CursorTypeEnum _Recordset::GetCursorType ( ) {
  551.     enum CursorTypeEnum _result;
  552.     HRESULT _hr = get_CursorType(&_result);
  553.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  554.     return _result;
  555. }
  556.  
  557. inline void _Recordset::PutCursorType ( enum CursorTypeEnum plCursorType ) {
  558.     HRESULT _hr = put_CursorType(plCursorType);
  559.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  560. }
  561.  
  562. inline VARIANT_BOOL _Recordset::GetEndOfFile ( ) {
  563.     VARIANT_BOOL _result;
  564.     HRESULT _hr = get_EndOfFile(&_result);
  565.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  566.     return _result;
  567. }
  568.  
  569. inline FieldsPtr _Recordset::GetFields ( ) {
  570.     struct Fields * _result;
  571.     HRESULT _hr = get_Fields(&_result);
  572.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  573.     return FieldsPtr(_result, false);
  574. }
  575.  
  576. inline enum LockTypeEnum _Recordset::GetLockType ( ) {
  577.     enum LockTypeEnum _result;
  578.     HRESULT _hr = get_LockType(&_result);
  579.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  580.     return _result;
  581. }
  582.  
  583. inline void _Recordset::PutLockType ( enum LockTypeEnum plLockType ) {
  584.     HRESULT _hr = put_LockType(plLockType);
  585.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  586. }
  587.  
  588. inline long _Recordset::GetMaxRecords ( ) {
  589.     long _result;
  590.     HRESULT _hr = get_MaxRecords(&_result);
  591.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  592.     return _result;
  593. }
  594.  
  595. inline void _Recordset::PutMaxRecords ( long plMaxRecords ) {
  596.     HRESULT _hr = put_MaxRecords(plMaxRecords);
  597.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  598. }
  599.  
  600. inline long _Recordset::GetRecordCount ( ) {
  601.     long _result;
  602.     HRESULT _hr = get_RecordCount(&_result);
  603.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  604.     return _result;
  605. }
  606.  
  607. inline void _Recordset::PutRefSource ( IDispatch * pvSource ) {
  608.     HRESULT _hr = putref_Source(pvSource);
  609.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  610. }
  611.  
  612. inline void _Recordset::PutSource ( _bstr_t pvSource ) {
  613.     HRESULT _hr = put_Source(pvSource);
  614.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  615. }
  616.  
  617. inline _variant_t _Recordset::GetSource ( ) {
  618.     VARIANT _result;
  619.     VariantInit(&_result);
  620.     HRESULT _hr = get_Source(&_result);
  621.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  622.     return _variant_t(_result, false);
  623. }
  624.  
  625. inline HRESULT _Recordset::AddNew ( const _variant_t & FieldList, const _variant_t & Values ) {
  626.     HRESULT _hr = raw_AddNew(FieldList, Values);
  627.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  628.     return _hr;
  629. }
  630.  
  631. inline HRESULT _Recordset::CancelUpdate ( ) {
  632.     HRESULT _hr = raw_CancelUpdate();
  633.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  634.     return _hr;
  635. }
  636.  
  637. inline HRESULT _Recordset::Close ( ) {
  638.     HRESULT _hr = raw_Close();
  639.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  640.     return _hr;
  641. }
  642.  
  643. inline HRESULT _Recordset::Delete ( enum AffectEnum AffectRecords ) {
  644.     HRESULT _hr = raw_Delete(AffectRecords);
  645.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  646.     return _hr;
  647. }
  648.  
  649. inline _variant_t _Recordset::GetRows ( long Rows, const _variant_t & Start, const _variant_t & Fields ) {
  650.     VARIANT _result;
  651.     VariantInit(&_result);
  652.     HRESULT _hr = raw_GetRows(Rows, Start, Fields, &_result);
  653.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  654.     return _variant_t(_result, false);
  655. }
  656.  
  657. inline HRESULT _Recordset::Move ( long NumRecords, const _variant_t & Start ) {
  658.     HRESULT _hr = raw_Move(NumRecords, Start);
  659.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  660.     return _hr;
  661. }
  662.  
  663. inline HRESULT _Recordset::MoveNext ( ) {
  664.     HRESULT _hr = raw_MoveNext();
  665.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  666.     return _hr;
  667. }
  668.  
  669. inline HRESULT _Recordset::MovePrevious ( ) {
  670.     HRESULT _hr = raw_MovePrevious();
  671.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  672.     return _hr;
  673. }
  674.  
  675. inline HRESULT _Recordset::MoveFirst ( ) {
  676.     HRESULT _hr = raw_MoveFirst();
  677.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  678.     return _hr;
  679. }
  680.  
  681. inline HRESULT _Recordset::MoveLast ( ) {
  682.     HRESULT _hr = raw_MoveLast();
  683.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  684.     return _hr;
  685. }
  686.  
  687. inline HRESULT _Recordset::Open ( const _variant_t & Source, const _variant_t & ActiveConnection, enum CursorTypeEnum CursorType, enum LockTypeEnum LockType, long Options ) {
  688.     HRESULT _hr = raw_Open(Source, ActiveConnection, CursorType, LockType, Options);
  689.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  690.     return _hr;
  691. }
  692.  
  693. inline HRESULT _Recordset::Requery ( long Options ) {
  694.     HRESULT _hr = raw_Requery(Options);
  695.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  696.     return _hr;
  697. }
  698.  
  699. inline HRESULT _Recordset::_xResync ( enum AffectEnum AffectRecords ) {
  700.     HRESULT _hr = raw__xResync(AffectRecords);
  701.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  702.     return _hr;
  703. }
  704.  
  705. inline HRESULT _Recordset::Update ( const _variant_t & Fields, const _variant_t & Values ) {
  706.     HRESULT _hr = raw_Update(Fields, Values);
  707.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  708.     return _hr;
  709. }
  710.  
  711. inline enum PositionEnum _Recordset::GetAbsolutePage ( ) {
  712.     enum PositionEnum _result;
  713.     HRESULT _hr = get_AbsolutePage(&_result);
  714.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  715.     return _result;
  716. }
  717.  
  718. inline void _Recordset::PutAbsolutePage ( enum PositionEnum pl ) {
  719.     HRESULT _hr = put_AbsolutePage(pl);
  720.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  721. }
  722.  
  723. inline enum EditModeEnum _Recordset::GetEditMode ( ) {
  724.     enum EditModeEnum _result;
  725.     HRESULT _hr = get_EditMode(&_result);
  726.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  727.     return _result;
  728. }
  729.  
  730. inline _variant_t _Recordset::GetFilter ( ) {
  731.     VARIANT _result;
  732.     VariantInit(&_result);
  733.     HRESULT _hr = get_Filter(&_result);
  734.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  735.     return _variant_t(_result, false);
  736. }
  737.  
  738. inline void _Recordset::PutFilter ( const _variant_t & Criteria ) {
  739.     HRESULT _hr = put_Filter(Criteria);
  740.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  741. }
  742.  
  743. inline long _Recordset::GetPageCount ( ) {
  744.     long _result;
  745.     HRESULT _hr = get_PageCount(&_result);
  746.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  747.     return _result;
  748. }
  749.  
  750. inline long _Recordset::GetPageSize ( ) {
  751.     long _result;
  752.     HRESULT _hr = get_PageSize(&_result);
  753.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  754.     return _result;
  755. }
  756.  
  757. inline void _Recordset::PutPageSize ( long pl ) {
  758.     HRESULT _hr = put_PageSize(pl);
  759.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  760. }
  761.  
  762. inline _bstr_t _Recordset::GetSort ( ) {
  763.     BSTR _result;
  764.     HRESULT _hr = get_Sort(&_result);
  765.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  766.     return _bstr_t(_result, false);
  767. }
  768.  
  769. inline void _Recordset::PutSort ( _bstr_t Criteria ) {
  770.     HRESULT _hr = put_Sort(Criteria);
  771.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  772. }
  773.  
  774. inline long _Recordset::GetStatus ( ) {
  775.     long _result;
  776.     HRESULT _hr = get_Status(&_result);
  777.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  778.     return _result;
  779. }
  780.  
  781. inline long _Recordset::GetState ( ) {
  782.     long _result;
  783.     HRESULT _hr = get_State(&_result);
  784.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  785.     return _result;
  786. }
  787.  
  788. inline _RecordsetPtr _Recordset::_xClone ( ) {
  789.     struct _Recordset * _result;
  790.     HRESULT _hr = raw__xClone(&_result);
  791.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  792.     return _RecordsetPtr(_result, false);
  793. }
  794.  
  795. inline HRESULT _Recordset::UpdateBatch ( enum AffectEnum AffectRecords ) {
  796.     HRESULT _hr = raw_UpdateBatch(AffectRecords);
  797.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  798.     return _hr;
  799. }
  800.  
  801. inline HRESULT _Recordset::CancelBatch ( enum AffectEnum AffectRecords ) {
  802.     HRESULT _hr = raw_CancelBatch(AffectRecords);
  803.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  804.     return _hr;
  805. }
  806.  
  807. inline enum CursorLocationEnum _Recordset::GetCursorLocation ( ) {
  808.     enum CursorLocationEnum _result;
  809.     HRESULT _hr = get_CursorLocation(&_result);
  810.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  811.     return _result;
  812. }
  813.  
  814. inline void _Recordset::PutCursorLocation ( enum CursorLocationEnum plCursorLoc ) {
  815.     HRESULT _hr = put_CursorLocation(plCursorLoc);
  816.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  817. }
  818.  
  819. inline _RecordsetPtr _Recordset::NextRecordset ( VARIANT * RecordsAffected ) {
  820.     struct _Recordset * _result;
  821.     HRESULT _hr = raw_NextRecordset(RecordsAffected, &_result);
  822.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  823.     return _RecordsetPtr(_result, false);
  824. }
  825.  
  826. inline VARIANT_BOOL _Recordset::Supports ( enum CursorOptionEnum CursorOptions ) {
  827.     VARIANT_BOOL _result;
  828.     HRESULT _hr = raw_Supports(CursorOptions, &_result);
  829.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  830.     return _result;
  831. }
  832.  
  833. inline _variant_t _Recordset::GetCollect ( const _variant_t & Index ) {
  834.     VARIANT _result;
  835.     VariantInit(&_result);
  836.     HRESULT _hr = get_Collect(Index, &_result);
  837.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  838.     return _variant_t(_result, false);
  839. }
  840.  
  841. inline void _Recordset::PutCollect ( const _variant_t & Index, const _variant_t & pvar ) {
  842.     HRESULT _hr = put_Collect(Index, pvar);
  843.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  844. }
  845.  
  846. inline enum MarshalOptionsEnum _Recordset::GetMarshalOptions ( ) {
  847.     enum MarshalOptionsEnum _result;
  848.     HRESULT _hr = get_MarshalOptions(&_result);
  849.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  850.     return _result;
  851. }
  852.  
  853. inline void _Recordset::PutMarshalOptions ( enum MarshalOptionsEnum peMarshal ) {
  854.     HRESULT _hr = put_MarshalOptions(peMarshal);
  855.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  856. }
  857.  
  858. inline HRESULT _Recordset::Find ( _bstr_t Criteria, long SkipRecords, enum SearchDirectionEnum SearchDirection, const _variant_t & Start ) {
  859.     HRESULT _hr = raw_Find(Criteria, SkipRecords, SearchDirection, Start);
  860.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  861.     return _hr;
  862. }
  863.  
  864. inline HRESULT _Recordset::Cancel ( ) {
  865.     HRESULT _hr = raw_Cancel();
  866.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  867.     return _hr;
  868. }
  869.  
  870. inline IUnknownPtr _Recordset::GetDataSource ( ) {
  871.     IUnknown * _result;
  872.     HRESULT _hr = get_DataSource(&_result);
  873.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  874.     return IUnknownPtr(_result, false);
  875. }
  876.  
  877. inline void _Recordset::PutRefDataSource ( IUnknown * ppunkDataSource ) {
  878.     HRESULT _hr = putref_DataSource(ppunkDataSource);
  879.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  880. }
  881.  
  882. inline HRESULT _Recordset::Save ( _bstr_t FileName, enum PersistFormatEnum PersistFormat ) {
  883.     HRESULT _hr = raw_Save(FileName, PersistFormat);
  884.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  885.     return _hr;
  886. }
  887.  
  888. inline IDispatchPtr _Recordset::GetActiveCommand ( ) {
  889.     IDispatch * _result;
  890.     HRESULT _hr = get_ActiveCommand(&_result);
  891.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  892.     return IDispatchPtr(_result, false);
  893. }
  894.  
  895. inline void _Recordset::PutStayInSync ( VARIANT_BOOL pbStayInSync ) {
  896.     HRESULT _hr = put_StayInSync(pbStayInSync);
  897.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  898. }
  899.  
  900. inline VARIANT_BOOL _Recordset::GetStayInSync ( ) {
  901.     VARIANT_BOOL _result;
  902.     HRESULT _hr = get_StayInSync(&_result);
  903.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  904.     return _result;
  905. }
  906.  
  907. inline _bstr_t _Recordset::GetString ( enum StringFormatEnum StringFormat, long NumRows, _bstr_t ColumnDelimeter, _bstr_t RowDelimeter, _bstr_t NullExpr ) {
  908.     BSTR _result;
  909.     HRESULT _hr = raw_GetString(StringFormat, NumRows, ColumnDelimeter, RowDelimeter, NullExpr, &_result);
  910.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  911.     return _bstr_t(_result, false);
  912. }
  913.  
  914. inline _bstr_t _Recordset::GetDataMember ( ) {
  915.     BSTR _result;
  916.     HRESULT _hr = get_DataMember(&_result);
  917.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  918.     return _bstr_t(_result, false);
  919. }
  920.  
  921. inline void _Recordset::PutDataMember ( _bstr_t pbstrDataMember ) {
  922.     HRESULT _hr = put_DataMember(pbstrDataMember);
  923.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  924. }
  925.  
  926. inline enum CompareEnum _Recordset::CompareBookmarks ( const _variant_t & Bookmark1, const _variant_t & Bookmark2 ) {
  927.     enum CompareEnum _result;
  928.     HRESULT _hr = raw_CompareBookmarks(Bookmark1, Bookmark2, &_result);
  929.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  930.     return _result;
  931. }
  932.  
  933. inline _RecordsetPtr _Recordset::Clone ( enum LockTypeEnum LockType ) {
  934.     struct _Recordset * _result;
  935.     HRESULT _hr = raw_Clone(LockType, &_result);
  936.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  937.     return _RecordsetPtr(_result, false);
  938. }
  939.  
  940. inline HRESULT _Recordset::Resync ( enum AffectEnum AffectRecords, enum ResyncEnum ResyncValues ) {
  941.     HRESULT _hr = raw_Resync(AffectRecords, ResyncValues);
  942.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  943.     return _hr;
  944. }
  945.  
  946. //
  947. // interface Fields wrapper method implementations
  948. //
  949.  
  950. inline FieldPtr Fields::GetItem ( const _variant_t & Index ) {
  951.     struct Field * _result;
  952.     HRESULT _hr = get_Item(Index, &_result);
  953.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  954.     return FieldPtr(_result, false);
  955. }
  956.  
  957. inline HRESULT Fields::Append ( _bstr_t bstrName, enum DataTypeEnum Type, long DefinedSize, enum FieldAttributeEnum Attrib ) {
  958.     HRESULT _hr = raw_Append(bstrName, Type, DefinedSize, Attrib);
  959.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  960.     return _hr;
  961. }
  962.  
  963. inline HRESULT Fields::Delete ( const _variant_t & Index ) {
  964.     HRESULT _hr = raw_Delete(Index);
  965.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  966.     return _hr;
  967. }
  968.  
  969. //
  970. // interface Field wrapper method implementations
  971. //
  972.  
  973. inline long Field::GetActualSize ( ) {
  974.     long _result;
  975.     HRESULT _hr = get_ActualSize(&_result);
  976.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  977.     return _result;
  978. }
  979.  
  980. inline long Field::GetAttributes ( ) {
  981.     long _result;
  982.     HRESULT _hr = get_Attributes(&_result);
  983.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  984.     return _result;
  985. }
  986.  
  987. inline long Field::GetDefinedSize ( ) {
  988.     long _result;
  989.     HRESULT _hr = get_DefinedSize(&_result);
  990.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  991.     return _result;
  992. }
  993.  
  994. inline _bstr_t Field::GetName ( ) {
  995.     BSTR _result;
  996.     HRESULT _hr = get_Name(&_result);
  997.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  998.     return _bstr_t(_result, false);
  999. }
  1000.  
  1001. inline enum DataTypeEnum Field::GetType ( ) {
  1002.     enum DataTypeEnum _result;
  1003.     HRESULT _hr = get_Type(&_result);
  1004.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1005.     return _result;
  1006. }
  1007.  
  1008. inline _variant_t Field::GetValue ( ) {
  1009.     VARIANT _result;
  1010.     VariantInit(&_result);
  1011.     HRESULT _hr = get_Value(&_result);
  1012.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1013.     return _variant_t(_result, false);
  1014. }
  1015.  
  1016. inline void Field::PutValue ( const _variant_t & pvar ) {
  1017.     HRESULT _hr = put_Value(pvar);
  1018.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1019. }
  1020.  
  1021. inline unsigned char Field::GetPrecision ( ) {
  1022.     unsigned char _result;
  1023.     HRESULT _hr = get_Precision(&_result);
  1024.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1025.     return _result;
  1026. }
  1027.  
  1028. inline unsigned char Field::GetNumericScale ( ) {
  1029.     unsigned char _result;
  1030.     HRESULT _hr = get_NumericScale(&_result);
  1031.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1032.     return _result;
  1033. }
  1034.  
  1035. inline HRESULT Field::AppendChunk ( const _variant_t & Data ) {
  1036.     HRESULT _hr = raw_AppendChunk(Data);
  1037.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1038.     return _hr;
  1039. }
  1040.  
  1041. inline _variant_t Field::GetChunk ( long Length ) {
  1042.     VARIANT _result;
  1043.     VariantInit(&_result);
  1044.     HRESULT _hr = raw_GetChunk(Length, &_result);
  1045.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1046.     return _variant_t(_result, false);
  1047. }
  1048.  
  1049. inline _variant_t Field::GetOriginalValue ( ) {
  1050.     VARIANT _result;
  1051.     VariantInit(&_result);
  1052.     HRESULT _hr = get_OriginalValue(&_result);
  1053.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1054.     return _variant_t(_result, false);
  1055. }
  1056.  
  1057. inline _variant_t Field::GetUnderlyingValue ( ) {
  1058.     VARIANT _result;
  1059.     VariantInit(&_result);
  1060.     HRESULT _hr = get_UnderlyingValue(&_result);
  1061.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1062.     return _variant_t(_result, false);
  1063. }
  1064.  
  1065. inline IUnknownPtr Field::GetDataFormat ( ) {
  1066.     IUnknown * _result;
  1067.     HRESULT _hr = get_DataFormat(&_result);
  1068.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1069.     return IUnknownPtr(_result, false);
  1070. }
  1071.  
  1072. inline void Field::PutDataFormat ( IUnknown * ppiDF ) {
  1073.     HRESULT _hr = put_DataFormat(ppiDF);
  1074.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1075. }
  1076.  
  1077. inline void Field::PutPrecision ( unsigned char pbPrecision ) {
  1078.     HRESULT _hr = put_Precision(pbPrecision);
  1079.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1080. }
  1081.  
  1082. inline void Field::PutNumericScale ( unsigned char pbNumericScale ) {
  1083.     HRESULT _hr = put_NumericScale(pbNumericScale);
  1084.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1085. }
  1086.  
  1087. inline void Field::PutType ( enum DataTypeEnum pDataType ) {
  1088.     HRESULT _hr = put_Type(pDataType);
  1089.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1090. }
  1091.  
  1092. inline void Field::PutDefinedSize ( long pl ) {
  1093.     HRESULT _hr = put_DefinedSize(pl);
  1094.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1095. }
  1096.  
  1097. inline void Field::PutAttributes ( long pl ) {
  1098.     HRESULT _hr = put_Attributes(pl);
  1099.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1100. }
  1101.  
  1102. //
  1103. // interface _Parameter wrapper method implementations
  1104. //
  1105.  
  1106. inline _bstr_t _Parameter::GetName ( ) {
  1107.     BSTR _result;
  1108.     HRESULT _hr = get_Name(&_result);
  1109.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1110.     return _bstr_t(_result, false);
  1111. }
  1112.  
  1113. inline void _Parameter::PutName ( _bstr_t pbstr ) {
  1114.     HRESULT _hr = put_Name(pbstr);
  1115.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1116. }
  1117.  
  1118. inline _variant_t _Parameter::GetValue ( ) {
  1119.     VARIANT _result;
  1120.     VariantInit(&_result);
  1121.     HRESULT _hr = get_Value(&_result);
  1122.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1123.     return _variant_t(_result, false);
  1124. }
  1125.  
  1126. inline void _Parameter::PutValue ( const _variant_t & pvar ) {
  1127.     HRESULT _hr = put_Value(pvar);
  1128.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1129. }
  1130.  
  1131. inline enum DataTypeEnum _Parameter::GetType ( ) {
  1132.     enum DataTypeEnum _result;
  1133.     HRESULT _hr = get_Type(&_result);
  1134.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1135.     return _result;
  1136. }
  1137.  
  1138. inline void _Parameter::PutType ( enum DataTypeEnum psDataType ) {
  1139.     HRESULT _hr = put_Type(psDataType);
  1140.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1141. }
  1142.  
  1143. inline void _Parameter::PutDirection ( enum ParameterDirectionEnum plParmDirection ) {
  1144.     HRESULT _hr = put_Direction(plParmDirection);
  1145.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1146. }
  1147.  
  1148. inline enum ParameterDirectionEnum _Parameter::GetDirection ( ) {
  1149.     enum ParameterDirectionEnum _result;
  1150.     HRESULT _hr = get_Direction(&_result);
  1151.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1152.     return _result;
  1153. }
  1154.  
  1155. inline void _Parameter::PutPrecision ( unsigned char pbPrecision ) {
  1156.     HRESULT _hr = put_Precision(pbPrecision);
  1157.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1158. }
  1159.  
  1160. inline unsigned char _Parameter::GetPrecision ( ) {
  1161.     unsigned char _result;
  1162.     HRESULT _hr = get_Precision(&_result);
  1163.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1164.     return _result;
  1165. }
  1166.  
  1167. inline void _Parameter::PutNumericScale ( unsigned char pbScale ) {
  1168.     HRESULT _hr = put_NumericScale(pbScale);
  1169.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1170. }
  1171.  
  1172. inline unsigned char _Parameter::GetNumericScale ( ) {
  1173.     unsigned char _result;
  1174.     HRESULT _hr = get_NumericScale(&_result);
  1175.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1176.     return _result;
  1177. }
  1178.  
  1179. inline void _Parameter::PutSize ( long pl ) {
  1180.     HRESULT _hr = put_Size(pl);
  1181.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1182. }
  1183.  
  1184. inline long _Parameter::GetSize ( ) {
  1185.     long _result;
  1186.     HRESULT _hr = get_Size(&_result);
  1187.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1188.     return _result;
  1189. }
  1190.  
  1191. inline HRESULT _Parameter::AppendChunk ( const _variant_t & Val ) {
  1192.     HRESULT _hr = raw_AppendChunk(Val);
  1193.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1194.     return _hr;
  1195. }
  1196.  
  1197. inline long _Parameter::GetAttributes ( ) {
  1198.     long _result;
  1199.     HRESULT _hr = get_Attributes(&_result);
  1200.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1201.     return _result;
  1202. }
  1203.  
  1204. inline void _Parameter::PutAttributes ( long plParmAttribs ) {
  1205.     HRESULT _hr = put_Attributes(plParmAttribs);
  1206.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1207. }
  1208.  
  1209. //
  1210. // interface Parameters wrapper method implementations
  1211. //
  1212.  
  1213. inline _ParameterPtr Parameters::GetItem ( const _variant_t & Index ) {
  1214.     struct _Parameter * _result;
  1215.     HRESULT _hr = get_Item(Index, &_result);
  1216.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1217.     return _ParameterPtr(_result, false);
  1218. }
  1219.  
  1220. //
  1221. // interface ADODebugging wrapper method implementations
  1222. //
  1223.  
  1224. inline HRESULT ADODebugging::IsGlobalDebugMode ( VARIANT_BOOL * pfDebuggingOn ) {
  1225.     HRESULT _hr = raw_IsGlobalDebugMode(pfDebuggingOn);
  1226.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1227.     return _hr;
  1228. }
  1229.  
  1230. inline HRESULT ADODebugging::SetGlobalDebugMode ( IUnknown * pDebugger, VARIANT_BOOL fDebuggingOn ) {
  1231.     HRESULT _hr = raw_SetGlobalDebugMode(pDebugger, fDebuggingOn);
  1232.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1233.     return _hr;
  1234. }
  1235.  
  1236. //
  1237. // dispinterface ConnectionEvents wrapper method implementations
  1238. //
  1239.  
  1240. inline HRESULT ConnectionEvents::InfoMessage ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
  1241.     return _com_dispatch_method(this, 0x0, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1242.         L"\x0009\x4003\x0009", pError, adStatus, pConnection);
  1243. }
  1244.  
  1245. inline HRESULT ConnectionEvents::BeginTransComplete ( long TransactionLevel, struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
  1246.     return _com_dispatch_method(this, 0x1, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1247.         L"\x0003\x0009\x4003\x0009", TransactionLevel, pError, adStatus, pConnection);
  1248. }
  1249.  
  1250. inline HRESULT ConnectionEvents::CommitTransComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
  1251.     return _com_dispatch_method(this, 0x3, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1252.         L"\x0009\x4003\x0009", pError, adStatus, pConnection);
  1253. }
  1254.  
  1255. inline HRESULT ConnectionEvents::RollbackTransComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
  1256.     return _com_dispatch_method(this, 0x2, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1257.         L"\x0009\x4003\x0009", pError, adStatus, pConnection);
  1258. }
  1259.  
  1260. inline HRESULT ConnectionEvents::WillExecute ( BSTR * Source, enum CursorTypeEnum * CursorType, enum LockTypeEnum * LockType, long * Options, enum EventStatusEnum * adStatus, struct _Command * pCommand, struct _Recordset * pRecordset, struct _Connection * pConnection ) {
  1261.     return _com_dispatch_method(this, 0x4, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1262.         L"\x4008\x4003\x4003\x4003\x4003\x0009\x0009\x0009", Source, CursorType, LockType, Options, adStatus, pCommand, pRecordset, pConnection);
  1263. }
  1264.  
  1265. inline HRESULT ConnectionEvents::ExecuteComplete ( long RecordsAffected, struct Error * pError, enum EventStatusEnum * adStatus, struct _Command * pCommand, struct _Recordset * pRecordset, struct _Connection * pConnection ) {
  1266.     return _com_dispatch_method(this, 0x5, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1267.         L"\x0003\x0009\x4003\x0009\x0009\x0009", RecordsAffected, pError, adStatus, pCommand, pRecordset, pConnection);
  1268. }
  1269.  
  1270. inline HRESULT ConnectionEvents::WillConnect ( BSTR * ConnectionString, BSTR * UserID, BSTR * Password, long * Options, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
  1271.     return _com_dispatch_method(this, 0x6, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1272.         L"\x4008\x4008\x4008\x4003\x4003\x0009", ConnectionString, UserID, Password, Options, adStatus, pConnection);
  1273. }
  1274.  
  1275. inline HRESULT ConnectionEvents::ConnectComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
  1276.     return _com_dispatch_method(this, 0x7, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1277.         L"\x0009\x4003\x0009", pError, adStatus, pConnection);
  1278. }
  1279.  
  1280. inline HRESULT ConnectionEvents::Disconnect ( enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
  1281.     return _com_dispatch_method(this, 0x8, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1282.         L"\x4003\x0009", adStatus, pConnection);
  1283. }
  1284.  
  1285. //
  1286. // dispinterface RecordsetEvents wrapper method implementations
  1287. //
  1288.  
  1289. inline HRESULT RecordsetEvents::WillChangeField ( long cFields, const _variant_t & Fields, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
  1290.     return _com_dispatch_method(this, 0x9, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1291.         L"\x0003\x000c\x4003\x0009", cFields, &Fields, adStatus, pRecordset);
  1292. }
  1293.  
  1294. inline HRESULT RecordsetEvents::FieldChangeComplete ( long cFields, const _variant_t & Fields, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
  1295.     return _com_dispatch_method(this, 0xa, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1296.         L"\x0003\x000c\x0009\x4003\x0009", cFields, &Fields, pError, adStatus, pRecordset);
  1297. }
  1298.  
  1299. inline HRESULT RecordsetEvents::WillChangeRecord ( enum EventReasonEnum adReason, long cRecords, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
  1300.     return _com_dispatch_method(this, 0xb, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1301.         L"\x0003\x0003\x4003\x0009", adReason, cRecords, adStatus, pRecordset);
  1302. }
  1303.  
  1304. inline HRESULT RecordsetEvents::RecordChangeComplete ( enum EventReasonEnum adReason, long cRecords, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
  1305.     return _com_dispatch_method(this, 0xc, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1306.         L"\x0003\x0003\x0009\x4003\x0009", adReason, cRecords, pError, adStatus, pRecordset);
  1307. }
  1308.  
  1309. inline HRESULT RecordsetEvents::WillChangeRecordset ( enum EventReasonEnum adReason, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
  1310.     return _com_dispatch_method(this, 0xd, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1311.         L"\x0003\x4003\x0009", adReason, adStatus, pRecordset);
  1312. }
  1313.  
  1314. inline HRESULT RecordsetEvents::RecordsetChangeComplete ( enum EventReasonEnum adReason, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
  1315.     return _com_dispatch_method(this, 0xe, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1316.         L"\x0003\x0009\x4003\x0009", adReason, pError, adStatus, pRecordset);
  1317. }
  1318.  
  1319. inline HRESULT RecordsetEvents::WillMove ( enum EventReasonEnum adReason, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
  1320.     return _com_dispatch_method(this, 0xf, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1321.         L"\x0003\x4003\x0009", adReason, adStatus, pRecordset);
  1322. }
  1323.  
  1324. inline HRESULT RecordsetEvents::MoveComplete ( enum EventReasonEnum adReason, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
  1325.     return _com_dispatch_method(this, 0x10, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1326.         L"\x0003\x0009\x4003\x0009", adReason, pError, adStatus, pRecordset);
  1327. }
  1328.  
  1329. inline HRESULT RecordsetEvents::EndOfRecordset ( VARIANT_BOOL * fMoreData, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
  1330.     return _com_dispatch_method(this, 0x11, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1331.         L"\x400b\x4003\x0009", fMoreData, adStatus, pRecordset);
  1332. }
  1333.  
  1334. inline HRESULT RecordsetEvents::FetchProgress ( long Progress, long MaxProgress, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
  1335.     return _com_dispatch_method(this, 0x12, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1336.         L"\x0003\x0003\x4003\x0009", Progress, MaxProgress, adStatus, pRecordset);
  1337. }
  1338.  
  1339. inline HRESULT RecordsetEvents::FetchComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
  1340.     return _com_dispatch_method(this, 0x13, DISPATCH_METHOD, VT_EMPTY, NULL, 
  1341.         L"\x0009\x4003\x0009", pError, adStatus, pRecordset);
  1342. }
  1343.  
  1344. //
  1345. // interface ADOConnectionConstruction wrapper method implementations
  1346. //
  1347.  
  1348. inline IUnknownPtr ADOConnectionConstruction::GetDSO ( ) {
  1349.     IUnknown * _result;
  1350.     HRESULT _hr = get_DSO(&_result);
  1351.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1352.     return IUnknownPtr(_result, false);
  1353. }
  1354.  
  1355. inline IUnknownPtr ADOConnectionConstruction::GetSession ( ) {
  1356.     IUnknown * _result;
  1357.     HRESULT _hr = get_Session(&_result);
  1358.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1359.     return IUnknownPtr(_result, false);
  1360. }
  1361.  
  1362. //
  1363. // interface ADORecordsetConstruction wrapper method implementations
  1364. //
  1365.  
  1366. inline IUnknownPtr ADORecordsetConstruction::GetRowset ( ) {
  1367.     IUnknown * _result;
  1368.     HRESULT _hr = get_Rowset(&_result);
  1369.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1370.     return IUnknownPtr(_result, false);
  1371. }
  1372.  
  1373. inline void ADORecordsetConstruction::PutRowset ( IUnknown * ppRowset ) {
  1374.     HRESULT _hr = put_Rowset(ppRowset);
  1375.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1376. }
  1377.  
  1378. inline long ADORecordsetConstruction::GetChapter ( ) {
  1379.     long _result;
  1380.     HRESULT _hr = get_Chapter(&_result);
  1381.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1382.     return _result;
  1383. }
  1384.  
  1385. inline void ADORecordsetConstruction::PutChapter ( long plChapter ) {
  1386.     HRESULT _hr = put_Chapter(plChapter);
  1387.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1388. }
  1389.  
  1390. inline IUnknownPtr ADORecordsetConstruction::GetRowPosition ( ) {
  1391.     IUnknown * _result;
  1392.     HRESULT _hr = get_RowPosition(&_result);
  1393.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1394.     return IUnknownPtr(_result, false);
  1395. }
  1396.  
  1397. inline void ADORecordsetConstruction::PutRowPosition ( IUnknown * ppRowPos ) {
  1398.     HRESULT _hr = put_RowPosition(ppRowPos);
  1399.     if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  1400. }
  1401.