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

📄 comadmin.tli

📁 Com++的例子程序
💻 TLI
字号:
// Created by Microsoft (R) C/C++ Compiler Version 12.00.8447.0 (f2bd86e1).
//
// Comadmin.tli
//
// Wrapper implementations for Win32 type library e:\\winnt\\system32\\com\\Comadmin.dll
// compiler-generated file created 01/10/01 at 11:08:53 - DO NOT EDIT!

#pragma once

//
// interface ICOMAdminCatalog wrapper method implementations
//

inline IDispatchPtr ICOMAdminCatalog::GetCollection ( _bstr_t bstrCollName ) {
    IDispatch * _result;
    HRESULT _hr = raw_GetCollection(bstrCollName, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline IDispatchPtr ICOMAdminCatalog::Connect ( _bstr_t bstrConnectString ) {
    IDispatch * _result;
    HRESULT _hr = raw_Connect(bstrConnectString, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline long ICOMAdminCatalog::GetMajorVersion ( ) {
    long _result;
    HRESULT _hr = get_MajorVersion(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline long ICOMAdminCatalog::GetMinorVersion ( ) {
    long _result;
    HRESULT _hr = get_MinorVersion(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline IDispatchPtr ICOMAdminCatalog::GetCollectionByQuery ( _bstr_t bstrCollName, SAFEARRAY * * aQuery ) {
    IDispatch * _result;
    HRESULT _hr = raw_GetCollectionByQuery(bstrCollName, aQuery, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline HRESULT ICOMAdminCatalog::ImportComponent ( _bstr_t bstrApplIdOrName, _bstr_t bstrCLSIDOrProgId ) {
    HRESULT _hr = raw_ImportComponent(bstrApplIdOrName, bstrCLSIDOrProgId);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::InstallComponent ( _bstr_t bstrApplIdOrName, _bstr_t bstrDLL, _bstr_t bstrTLB, _bstr_t bstrPSDLL ) {
    HRESULT _hr = raw_InstallComponent(bstrApplIdOrName, bstrDLL, bstrTLB, bstrPSDLL);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::ShutdownApplication ( _bstr_t bstrApplIdOrName ) {
    HRESULT _hr = raw_ShutdownApplication(bstrApplIdOrName);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::ExportApplication ( _bstr_t bstrApplIdOrName, _bstr_t bstrApplicationFile, long lOptions ) {
    HRESULT _hr = raw_ExportApplication(bstrApplIdOrName, bstrApplicationFile, lOptions);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::InstallApplication ( _bstr_t bstrApplicationFile, _bstr_t bstrDestinationDirectory, long lOptions, _bstr_t bstrUserId, _bstr_t bstrPassword, _bstr_t bstrRSN ) {
    HRESULT _hr = raw_InstallApplication(bstrApplicationFile, bstrDestinationDirectory, lOptions, bstrUserId, bstrPassword, bstrRSN);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::StopRouter ( ) {
    HRESULT _hr = raw_StopRouter();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::RefreshRouter ( ) {
    HRESULT _hr = raw_RefreshRouter();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::StartRouter ( ) {
    HRESULT _hr = raw_StartRouter();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::Reserved1 ( ) {
    HRESULT _hr = raw_Reserved1();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::Reserved2 ( ) {
    HRESULT _hr = raw_Reserved2();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::InstallMultipleComponents ( _bstr_t bstrApplIdOrName, SAFEARRAY * * varFileNames, SAFEARRAY * * varCLSIDS ) {
    HRESULT _hr = raw_InstallMultipleComponents(bstrApplIdOrName, varFileNames, varCLSIDS);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::GetMultipleComponentsInfo ( _bstr_t bstrApplIdOrName, SAFEARRAY * * varFileNames, SAFEARRAY * * varCLSIDS, SAFEARRAY * * varClassNames, SAFEARRAY * * varFileFlags, SAFEARRAY * * varComponentFlags ) {
    HRESULT _hr = raw_GetMultipleComponentsInfo(bstrApplIdOrName, varFileNames, varCLSIDS, varClassNames, varFileFlags, varComponentFlags);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::RefreshComponents ( ) {
    HRESULT _hr = raw_RefreshComponents();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::BackupREGDB ( _bstr_t bstrBackupFilePath ) {
    HRESULT _hr = raw_BackupREGDB(bstrBackupFilePath);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::RestoreREGDB ( _bstr_t bstrBackupFilePath ) {
    HRESULT _hr = raw_RestoreREGDB(bstrBackupFilePath);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::QueryApplicationFile ( _bstr_t bstrApplicationFile, BSTR * bstrApplicationName, BSTR * bstrApplicationDescription, VARIANT_BOOL * bHasUsers, VARIANT_BOOL * bIsProxy, SAFEARRAY * * varFileNames ) {
    HRESULT _hr = raw_QueryApplicationFile(bstrApplicationFile, bstrApplicationName, bstrApplicationDescription, bHasUsers, bIsProxy, varFileNames);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::StartApplication ( _bstr_t bstrApplIdOrName ) {
    HRESULT _hr = raw_StartApplication(bstrApplIdOrName);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline long ICOMAdminCatalog::ServiceCheck ( long lService ) {
    long _result;
    HRESULT _hr = raw_ServiceCheck(lService, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline HRESULT ICOMAdminCatalog::InstallMultipleEventClasses ( _bstr_t bstrApplIdOrName, SAFEARRAY * * varFileNames, SAFEARRAY * * varCLSIDS ) {
    HRESULT _hr = raw_InstallMultipleEventClasses(bstrApplIdOrName, varFileNames, varCLSIDS);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::InstallEventClass ( _bstr_t bstrApplIdOrName, _bstr_t bstrDLL, _bstr_t bstrTLB, _bstr_t bstrPSDLL ) {
    HRESULT _hr = raw_InstallEventClass(bstrApplIdOrName, bstrDLL, bstrTLB, bstrPSDLL);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICOMAdminCatalog::GetEventClassesForIID ( _bstr_t bstrIID, SAFEARRAY * * varCLSIDS, SAFEARRAY * * varProgIDs, SAFEARRAY * * varDescriptions ) {
    HRESULT _hr = raw_GetEventClassesForIID(bstrIID, varCLSIDS, varProgIDs, varDescriptions);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

//
// interface ICatalogObject wrapper method implementations
//

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

inline void ICatalogObject::PutValue ( _bstr_t bstrPropName, const _variant_t & retval ) {
    HRESULT _hr = put_Value(bstrPropName, retval);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _variant_t ICatalogObject::GetKey ( ) {
    VARIANT _result;
    VariantInit(&_result);
    HRESULT _hr = get_Key(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _variant_t(_result, false);
}

inline _variant_t ICatalogObject::GetName ( ) {
    VARIANT _result;
    VariantInit(&_result);
    HRESULT _hr = get_Name(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _variant_t(_result, false);
}

inline VARIANT_BOOL ICatalogObject::IsPropertyReadOnly ( _bstr_t bstrPropName ) {
    VARIANT_BOOL _result;
    HRESULT _hr = raw_IsPropertyReadOnly(bstrPropName, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline VARIANT_BOOL ICatalogObject::GetValid ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = get_Valid(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline VARIANT_BOOL ICatalogObject::IsPropertyWriteOnly ( _bstr_t bstrPropName ) {
    VARIANT_BOOL _result;
    HRESULT _hr = raw_IsPropertyWriteOnly(bstrPropName, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

//
// interface ICatalogCollection wrapper method implementations
//

inline IUnknownPtr ICatalogCollection::Get_NewEnum ( ) {
    IUnknown * _result;
    HRESULT _hr = get__NewEnum(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IUnknownPtr(_result, false);
}

inline IDispatchPtr ICatalogCollection::GetItem ( long lIndex ) {
    IDispatch * _result;
    HRESULT _hr = get_Item(lIndex, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

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

inline HRESULT ICatalogCollection::Remove ( long lIndex ) {
    HRESULT _hr = raw_Remove(lIndex);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline IDispatchPtr ICatalogCollection::Add ( ) {
    IDispatch * _result;
    HRESULT _hr = raw_Add(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline HRESULT ICatalogCollection::Populate ( ) {
    HRESULT _hr = raw_Populate();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline long ICatalogCollection::SaveChanges ( ) {
    long _result;
    HRESULT _hr = raw_SaveChanges(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline IDispatchPtr ICatalogCollection::GetCollection ( _bstr_t bstrCollName, const _variant_t & varObjectKey ) {
    IDispatch * _result;
    HRESULT _hr = raw_GetCollection(bstrCollName, varObjectKey, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline _variant_t ICatalogCollection::GetName ( ) {
    VARIANT _result;
    VariantInit(&_result);
    HRESULT _hr = get_Name(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _variant_t(_result, false);
}

inline VARIANT_BOOL ICatalogCollection::GetAddEnabled ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = get_AddEnabled(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline VARIANT_BOOL ICatalogCollection::GetRemoveEnabled ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = get_RemoveEnabled(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline IDispatchPtr ICatalogCollection::GetUtilInterface ( ) {
    IDispatch * _result;
    HRESULT _hr = raw_GetUtilInterface(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return IDispatchPtr(_result, false);
}

inline long ICatalogCollection::GetDataStoreMajorVersion ( ) {
    long _result;
    HRESULT _hr = get_DataStoreMajorVersion(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline long ICatalogCollection::GetDataStoreMinorVersion ( ) {
    long _result;
    HRESULT _hr = get_DataStoreMinorVersion(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline HRESULT ICatalogCollection::PopulateByKey ( SAFEARRAY * aKeys ) {
    HRESULT _hr = raw_PopulateByKey(aKeys);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ICatalogCollection::PopulateByQuery ( _bstr_t bstrQueryString, long lQueryType ) {
    HRESULT _hr = raw_PopulateByQuery(bstrQueryString, lQueryType);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

⌨️ 快捷键说明

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