spacedeploy.tli

来自「《Visual C++视频技术方案宝典》配套光盘」· TLI 代码 · 共 733 行 · 第 1/2 页

TLI
733
字号
inline void _Recordset::PutCursorLocation ( CursorLocationEnum plCursorLoc ) {
    HRESULT _hr = put_CursorLocation(plCursorLoc);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _RecordsetPtr _Recordset::NextRecordset ( VARIANT * RecordsAffected ) {
    struct _Recordset * _result;
    HRESULT _hr = raw_NextRecordset(RecordsAffected, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _RecordsetPtr(_result, false);
}

inline VARIANT_BOOL _Recordset::Supports ( CursorOptionEnum CursorOptions ) {
    VARIANT_BOOL _result;
    HRESULT _hr = raw_Supports(CursorOptions, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline _variant_t _Recordset::GetCollect ( const _variant_t & Index ) {
    VARIANT _result;
    VariantInit(&_result);
    HRESULT _hr = get_Collect(Index, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _variant_t(_result, false);
}

inline void _Recordset::PutCollect ( const _variant_t & Index, const _variant_t & pvar ) {
    HRESULT _hr = put_Collect(Index, pvar);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline MarshalOptionsEnum _Recordset::GetMarshalOptions ( ) {
    MarshalOptionsEnum _result;
    HRESULT _hr = get_MarshalOptions(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void _Recordset::PutMarshalOptions ( MarshalOptionsEnum peMarshal ) {
    HRESULT _hr = put_MarshalOptions(peMarshal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline HRESULT _Recordset::Find ( _bstr_t Criteria, long SkipRecords, SearchDirectionEnum SearchDirection, const _variant_t & Start ) {
    HRESULT _hr = raw_Find(Criteria, SkipRecords, SearchDirection, Start);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT _Recordset::Cancel ( ) {
    HRESULT _hr = raw_Cancel();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline IUnknownPtr _Recordset::GetDataSource ( ) {
    IUnknown * _result;
    HRESULT _hr = get_DataSource(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IUnknownPtr(_result, false);
}

inline void _Recordset::PutRefDataSource ( IUnknown * ppunkDataSource ) {
    HRESULT _hr = putref_DataSource(ppunkDataSource);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline HRESULT _Recordset::Save ( _bstr_t FileName, PersistFormatEnum PersistFormat ) {
    HRESULT _hr = raw_Save(FileName, PersistFormat);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline IDispatchPtr _Recordset::GetActiveCommand ( ) {
    IDispatch * _result;
    HRESULT _hr = get_ActiveCommand(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline void _Recordset::PutStayInSync ( VARIANT_BOOL pbStayInSync ) {
    HRESULT _hr = put_StayInSync(pbStayInSync);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline VARIANT_BOOL _Recordset::GetStayInSync ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = get_StayInSync(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline _bstr_t _Recordset::GetString ( StringFormatEnum StringFormat, long NumRows, _bstr_t ColumnDelimeter, _bstr_t RowDelimeter, _bstr_t NullExpr ) {
    BSTR _result;
    HRESULT _hr = raw_GetString(StringFormat, NumRows, ColumnDelimeter, RowDelimeter, NullExpr, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline _bstr_t _Recordset::GetDataMember ( ) {
    BSTR _result;
    HRESULT _hr = get_DataMember(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void _Recordset::PutDataMember ( _bstr_t pbstrDataMember ) {
    HRESULT _hr = put_DataMember(pbstrDataMember);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline CompareEnum _Recordset::CompareBookmarks ( const _variant_t & Bookmark1, const _variant_t & Bookmark2 ) {
    CompareEnum _result;
    HRESULT _hr = raw_CompareBookmarks(Bookmark1, Bookmark2, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline _RecordsetPtr _Recordset::Clone ( LockTypeEnum LockType ) {
    struct _Recordset * _result;
    HRESULT _hr = raw_Clone(LockType, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _RecordsetPtr(_result, false);
}

inline HRESULT _Recordset::Resync ( AffectEnum AffectRecords, ResyncEnum ResyncValues ) {
    HRESULT _hr = raw_Resync(AffectRecords, ResyncValues);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

//
// interface _Collection wrapper method implementations
//

inline long _Collection::GetCount ( ) {
    long _result;
    HRESULT _hr = get_Count(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline IUnknownPtr _Collection::_NewEnum ( ) {
    IUnknown * _result;
    HRESULT _hr = raw__NewEnum(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IUnknownPtr(_result, false);
}

inline HRESULT _Collection::Refresh ( ) {
    HRESULT _hr = raw_Refresh();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

//
// interface Properties wrapper method implementations
//

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

//
// interface Property wrapper method implementations
//

inline _variant_t Property::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 Property::PutValue ( const _variant_t & pval ) {
    HRESULT _hr = put_Value(pval);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

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

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

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

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

//
// interface Fields wrapper method implementations
//

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

inline HRESULT Fields::Append ( _bstr_t Name, DataTypeEnum Type, long DefinedSize, FieldAttributeEnum Attrib ) {
    HRESULT _hr = raw_Append(Name, Type, DefinedSize, Attrib);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT Fields::Delete ( const _variant_t & Index ) {
    HRESULT _hr = raw_Delete(Index);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

//
// interface Field wrapper method implementations
//

inline long Field::GetActualSize ( ) {
    long _result;
    HRESULT _hr = get_ActualSize(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

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

inline long Field::GetDefinedSize ( ) {
    long _result;
    HRESULT _hr = get_DefinedSize(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

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

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

inline _variant_t Field::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 Field::PutValue ( const _variant_t & pvar ) {
    HRESULT _hr = put_Value(pvar);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

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

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

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

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

inline _variant_t Field::GetOriginalValue ( ) {
    VARIANT _result;
    VariantInit(&_result);
    HRESULT _hr = get_OriginalValue(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    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::PutRefDataFormat ( IUnknown * ppiDF ) {
    HRESULT _hr = putref_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 ( 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));
}

⌨️ 快捷键说明

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