⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msado15.tli

📁 用VC编写基于ADO的数据库程序
💻 TLI
📖 第 1 页 / 共 4 页
字号:
    return _variant_t(_result, false);
}

inline _variant_t Field::GetUnderlyingValue ( ) {
    VARIANT _result;
    VariantInit(&_result);
    HRESULT _hr = get_UnderlyingValue(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _variant_t(_result, false);
}

inline IUnknownPtr Field::GetDataFormat ( ) {
    IUnknown * _result;
    HRESULT _hr = get_DataFormat(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IUnknownPtr(_result, false);
}

inline void Field::PutDataFormat ( IUnknown * ppiDF ) {
    HRESULT _hr = put_DataFormat(ppiDF);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline void Field::PutPrecision ( unsigned char pbPrecision ) {
    HRESULT _hr = put_Precision(pbPrecision);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline void Field::PutNumericScale ( unsigned char pbNumericScale ) {
    HRESULT _hr = put_NumericScale(pbNumericScale);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline void Field::PutType ( enum DataTypeEnum pDataType ) {
    HRESULT _hr = put_Type(pDataType);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline void Field::PutDefinedSize ( long pl ) {
    HRESULT _hr = put_DefinedSize(pl);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline void Field::PutAttributes ( long pl ) {
    HRESULT _hr = put_Attributes(pl);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

//
// interface _Parameter wrapper method implementations
//

inline _bstr_t _Parameter::GetName ( ) {
    BSTR _result;
    HRESULT _hr = get_Name(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void _Parameter::PutName ( _bstr_t pbstr ) {
    HRESULT _hr = put_Name(pbstr);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _variant_t _Parameter::GetValue ( ) {
    VARIANT _result;
    VariantInit(&_result);
    HRESULT _hr = get_Value(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _variant_t(_result, false);
}

inline void _Parameter::PutValue ( const _variant_t & pvar ) {
    HRESULT _hr = put_Value(pvar);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline enum DataTypeEnum _Parameter::GetType ( ) {
    enum DataTypeEnum _result;
    HRESULT _hr = get_Type(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void _Parameter::PutType ( enum DataTypeEnum psDataType ) {
    HRESULT _hr = put_Type(psDataType);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline void _Parameter::PutDirection ( enum ParameterDirectionEnum plParmDirection ) {
    HRESULT _hr = put_Direction(plParmDirection);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline enum ParameterDirectionEnum _Parameter::GetDirection ( ) {
    enum ParameterDirectionEnum _result;
    HRESULT _hr = get_Direction(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void _Parameter::PutPrecision ( unsigned char pbPrecision ) {
    HRESULT _hr = put_Precision(pbPrecision);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline unsigned char _Parameter::GetPrecision ( ) {
    unsigned char _result;
    HRESULT _hr = get_Precision(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void _Parameter::PutNumericScale ( unsigned char pbScale ) {
    HRESULT _hr = put_NumericScale(pbScale);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline unsigned char _Parameter::GetNumericScale ( ) {
    unsigned char _result;
    HRESULT _hr = get_NumericScale(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void _Parameter::PutSize ( long pl ) {
    HRESULT _hr = put_Size(pl);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long _Parameter::GetSize ( ) {
    long _result;
    HRESULT _hr = get_Size(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline HRESULT _Parameter::AppendChunk ( const _variant_t & Val ) {
    HRESULT _hr = raw_AppendChunk(Val);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline long _Parameter::GetAttributes ( ) {
    long _result;
    HRESULT _hr = get_Attributes(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void _Parameter::PutAttributes ( long plParmAttribs ) {
    HRESULT _hr = put_Attributes(plParmAttribs);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

//
// interface Parameters wrapper method implementations
//

inline _ParameterPtr Parameters::GetItem ( const _variant_t & Index ) {
    struct _Parameter * _result;
    HRESULT _hr = get_Item(Index, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _ParameterPtr(_result, false);
}

//
// interface ADODebugging wrapper method implementations
//

inline HRESULT ADODebugging::IsGlobalDebugMode ( VARIANT_BOOL * pfDebuggingOn ) {
    HRESULT _hr = raw_IsGlobalDebugMode(pfDebuggingOn);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ADODebugging::SetGlobalDebugMode ( IUnknown * pDebugger, VARIANT_BOOL fDebuggingOn ) {
    HRESULT _hr = raw_SetGlobalDebugMode(pDebugger, fDebuggingOn);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

//
// dispinterface ConnectionEvents wrapper method implementations
//

inline HRESULT ConnectionEvents::InfoMessage ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
    return _com_dispatch_method(this, 0x0, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0009\x4003\x0009", pError, adStatus, pConnection);
}

inline HRESULT ConnectionEvents::BeginTransComplete ( long TransactionLevel, struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
    return _com_dispatch_method(this, 0x1, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009\x4003\x0009", TransactionLevel, pError, adStatus, pConnection);
}

inline HRESULT ConnectionEvents::CommitTransComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
    return _com_dispatch_method(this, 0x3, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0009\x4003\x0009", pError, adStatus, pConnection);
}

inline HRESULT ConnectionEvents::RollbackTransComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
    return _com_dispatch_method(this, 0x2, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0009\x4003\x0009", pError, adStatus, pConnection);
}

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 ) {
    return _com_dispatch_method(this, 0x4, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x4008\x4003\x4003\x4003\x4003\x0009\x0009\x0009", Source, CursorType, LockType, Options, adStatus, pCommand, pRecordset, pConnection);
}

inline HRESULT ConnectionEvents::ExecuteComplete ( long RecordsAffected, struct Error * pError, enum EventStatusEnum * adStatus, struct _Command * pCommand, struct _Recordset * pRecordset, struct _Connection * pConnection ) {
    return _com_dispatch_method(this, 0x5, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009\x4003\x0009\x0009\x0009", RecordsAffected, pError, adStatus, pCommand, pRecordset, pConnection);
}

inline HRESULT ConnectionEvents::WillConnect ( BSTR * ConnectionString, BSTR * UserID, BSTR * Password, long * Options, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
    return _com_dispatch_method(this, 0x6, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x4008\x4008\x4008\x4003\x4003\x0009", ConnectionString, UserID, Password, Options, adStatus, pConnection);
}

inline HRESULT ConnectionEvents::ConnectComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
    return _com_dispatch_method(this, 0x7, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0009\x4003\x0009", pError, adStatus, pConnection);
}

inline HRESULT ConnectionEvents::Disconnect ( enum EventStatusEnum * adStatus, struct _Connection * pConnection ) {
    return _com_dispatch_method(this, 0x8, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x4003\x0009", adStatus, pConnection);
}

//
// dispinterface RecordsetEvents wrapper method implementations
//

inline HRESULT RecordsetEvents::WillChangeField ( long cFields, const _variant_t & Fields, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
    return _com_dispatch_method(this, 0x9, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x000c\x4003\x0009", cFields, &Fields, adStatus, pRecordset);
}

inline HRESULT RecordsetEvents::FieldChangeComplete ( long cFields, const _variant_t & Fields, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
    return _com_dispatch_method(this, 0xa, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x000c\x0009\x4003\x0009", cFields, &Fields, pError, adStatus, pRecordset);
}

inline HRESULT RecordsetEvents::WillChangeRecord ( enum EventReasonEnum adReason, long cRecords, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
    return _com_dispatch_method(this, 0xb, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0003\x4003\x0009", adReason, cRecords, adStatus, pRecordset);
}

inline HRESULT RecordsetEvents::RecordChangeComplete ( enum EventReasonEnum adReason, long cRecords, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
    return _com_dispatch_method(this, 0xc, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0003\x0009\x4003\x0009", adReason, cRecords, pError, adStatus, pRecordset);
}

inline HRESULT RecordsetEvents::WillChangeRecordset ( enum EventReasonEnum adReason, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
    return _com_dispatch_method(this, 0xd, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x4003\x0009", adReason, adStatus, pRecordset);
}

inline HRESULT RecordsetEvents::RecordsetChangeComplete ( enum EventReasonEnum adReason, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
    return _com_dispatch_method(this, 0xe, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009\x4003\x0009", adReason, pError, adStatus, pRecordset);
}

inline HRESULT RecordsetEvents::WillMove ( enum EventReasonEnum adReason, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
    return _com_dispatch_method(this, 0xf, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x4003\x0009", adReason, adStatus, pRecordset);
}

inline HRESULT RecordsetEvents::MoveComplete ( enum EventReasonEnum adReason, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
    return _com_dispatch_method(this, 0x10, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0009\x4003\x0009", adReason, pError, adStatus, pRecordset);
}

inline HRESULT RecordsetEvents::EndOfRecordset ( VARIANT_BOOL * fMoreData, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
    return _com_dispatch_method(this, 0x11, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x400b\x4003\x0009", fMoreData, adStatus, pRecordset);
}

inline HRESULT RecordsetEvents::FetchProgress ( long Progress, long MaxProgress, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
    return _com_dispatch_method(this, 0x12, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0003\x0003\x4003\x0009", Progress, MaxProgress, adStatus, pRecordset);
}

inline HRESULT RecordsetEvents::FetchComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) {
    return _com_dispatch_method(this, 0x13, DISPATCH_METHOD, VT_EMPTY, NULL, 
        L"\x0009\x4003\x0009", pError, adStatus, pRecordset);
}

//
// interface ADOConnectionConstruction wrapper method implementations
//

inline IUnknownPtr ADOConnectionConstruction::GetDSO ( ) {
    IUnknown * _result;
    HRESULT _hr = get_DSO(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IUnknownPtr(_result, false);
}

inline IUnknownPtr ADOConnectionConstruction::GetSession ( ) {
    IUnknown * _result;
    HRESULT _hr = get_Session(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IUnknownPtr(_result, false);
}

//
// interface ADORecordsetConstruction wrapper method implementations
//

inline IUnknownPtr ADORecordsetConstruction::GetRowset ( ) {
    IUnknown * _result;
    HRESULT _hr = get_Rowset(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IUnknownPtr(_result, false);
}

inline void ADORecordsetConstruction::PutRowset ( IUnknown * ppRowset ) {
    HRESULT _hr = put_Rowset(ppRowset);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long ADORecordsetConstruction::GetChapter ( ) {
    long _result;
    HRESULT _hr = get_Chapter(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void ADORecordsetConstruction::PutChapter ( long plChapter ) {
    HRESULT _hr = put_Chapter(plChapter);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline IUnknownPtr ADORecordsetConstruction::GetRowPosition ( ) {
    IUnknown * _result;
    HRESULT _hr = get_RowPosition(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IUnknownPtr(_result, false);
}

inline void ADORecordsetConstruction::PutRowPosition ( IUnknown * ppRowPos ) {
    HRESULT _hr = put_RowPosition(ppRowPos);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -