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

📄 comacrsrvr.tli

📁 介绍控制器运动的例子
💻 TLI
📖 第 1 页 / 共 3 页
字号:
// Created by Microsoft (R) C/C++ Compiler Version 12.00.9782.0 (355ece9d).
//
// ComACRsrvr.tli
//
// Wrapper implementations for Win32 type library ..\ComACRsrvr.tlb
// compiler-generated file created 04/13/05 at 22:05:09 - DO NOT EDIT!

#pragma once

//
// interface IUtility wrapper method implementations
//

inline _bstr_t IUtility::GetbstrVersion ( ) {
    BSTR _result;
    HRESULT _hr = get_bstrVersion(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline long IUtility::GetnPort ( ) {
    long _result;
    HRESULT _hr = get_nPort(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void IUtility::PutnPort ( long pVal ) {
    HRESULT _hr = put_nPort(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long IUtility::GetnBPS ( ) {
    long _result;
    HRESULT _hr = get_nBPS(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void IUtility::PutnBPS ( long pVal ) {
    HRESULT _hr = put_nBPS(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t IUtility::GetbstrIP ( ) {
    BSTR _result;
    HRESULT _hr = get_bstrIP(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void IUtility::PutbstrIP ( _bstr_t pVal ) {
    HRESULT _hr = put_bstrIP(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long IUtility::GetnBus ( ) {
    long _result;
    HRESULT _hr = get_nBus(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void IUtility::PutnBus ( long pVal ) {
    HRESULT _hr = put_nBus(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline VARIANT_BOOL IUtility::GetisOffline ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = get_isOffline(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline VARIANT_BOOL IUtility::GetbOnConnectTest ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = get_bOnConnectTest(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void IUtility::PutbOnConnectTest ( VARIANT_BOOL pVal ) {
    HRESULT _hr = put_bOnConnectTest(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long IUtility::GetnCard ( ) {
    long _result;
    HRESULT _hr = get_nCard(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline HRESULT IUtility::Disconnect ( ) {
    HRESULT _hr = raw_Disconnect();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT IUtility::Connect ( long nTransport, long nIndex ) {
    HRESULT _hr = raw_Connect(nTransport, nIndex);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline _variant_t IUtility::FindACR ( long nTransport ) {
    VARIANT _result;
    VariantInit(&_result);
    HRESULT _hr = raw_FindACR(nTransport, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _variant_t(_result, false);
}

inline HRESULT IUtility::DownloadOS ( long nDevice, _bstr_t bstrFile ) {
    HRESULT _hr = raw_DownloadOS(nDevice, bstrFile);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline long IUtility::GetStatusDL ( long * nTotal, long * nBytes ) {
    long _result;
    HRESULT _hr = raw_GetStatusDL(nTotal, nBytes, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline HRESULT IUtility::StopDownload ( ) {
    HRESULT _hr = raw_StopDownload();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT IUtility::DownloadFile ( _bstr_t bstrPrg, _bstr_t bstrFile ) {
    HRESULT _hr = raw_DownloadFile(bstrPrg, bstrFile);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT IUtility::UploadFile ( _bstr_t bstrPrg, _bstr_t bstrFile ) {
    HRESULT _hr = raw_UploadFile(bstrPrg, bstrFile);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline VARIANT_BOOL IUtility::TestConnect ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = raw_TestConnect(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline long IUtility::DeviceIoControl ( long dwloControlCode, long * saBuffer ) {
    long _result;
    HRESULT _hr = raw_DeviceIoControl(dwloControlCode, saBuffer, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline long IUtility::DeviceIoControl2 ( long dwloControlCode, long * saBuffer, long * saBuffer2 ) {
    long _result;
    HRESULT _hr = raw_DeviceIoControl2(dwloControlCode, saBuffer, saBuffer2, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline HRESULT IUtility::SetWatchdog ( long nInterval, long nRetries ) {
    HRESULT _hr = raw_SetWatchdog(nInterval, nRetries);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

//
// dispinterface _ITerminalEvents wrapper method implementations
//

inline HRESULT _ITerminalEvents::DataWaiting ( ) {
    HRESULT _result;
    _com_dispatch_method(this, 0x1, DISPATCH_METHOD, VT_ERROR, (void*)&_result, NULL);
    return _result;
}

//
// interface ITerminal wrapper method implementations
//

inline _bstr_t ITerminal::GetbstrVersion ( ) {
    BSTR _result;
    HRESULT _hr = get_bstrVersion(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline long ITerminal::GetnPort ( ) {
    long _result;
    HRESULT _hr = get_nPort(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void ITerminal::PutnPort ( long pVal ) {
    HRESULT _hr = put_nPort(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long ITerminal::GetnBPS ( ) {
    long _result;
    HRESULT _hr = get_nBPS(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void ITerminal::PutnBPS ( long pVal ) {
    HRESULT _hr = put_nBPS(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t ITerminal::GetbstrIP ( ) {
    BSTR _result;
    HRESULT _hr = get_bstrIP(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void ITerminal::PutbstrIP ( _bstr_t pVal ) {
    HRESULT _hr = put_bstrIP(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long ITerminal::GetnBus ( ) {
    long _result;
    HRESULT _hr = get_nBus(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void ITerminal::PutnBus ( long pVal ) {
    HRESULT _hr = put_nBus(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline VARIANT_BOOL ITerminal::GetisOffline ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = get_isOffline(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline long ITerminal::GetnDataWaitRate ( ) {
    long _result;
    HRESULT _hr = get_nDataWaitRate(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void ITerminal::PutnDataWaitRate ( long pVal ) {
    HRESULT _hr = put_nDataWaitRate(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline VARIANT_BOOL ITerminal::GetbOnConnectTest ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = get_bOnConnectTest(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void ITerminal::PutbOnConnectTest ( VARIANT_BOOL pVal ) {
    HRESULT _hr = put_bOnConnectTest(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long ITerminal::GetnCard ( ) {
    long _result;
    HRESULT _hr = get_nCard(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline HRESULT ITerminal::Disconnect ( ) {
    HRESULT _hr = raw_Disconnect();
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline HRESULT ITerminal::Connect ( long nTransport, long nIndex ) {
    HRESULT _hr = raw_Connect(nTransport, nIndex);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline _bstr_t ITerminal::Read ( ) {
    BSTR _result;
    HRESULT _hr = raw_Read(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline HRESULT ITerminal::Write ( _bstr_t send ) {
    HRESULT _hr = raw_Write(send);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

inline VARIANT_BOOL ITerminal::TestConnect ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = raw_TestConnect(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline HRESULT ITerminal::SetWatchdog ( long nInterval, long nRetries ) {
    HRESULT _hr = raw_SetWatchdog(nInterval, nRetries);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
}

//
// interface IConfig wrapper method implementations
//

inline _bstr_t IConfig::GetbstrVersion ( ) {
    BSTR _result;
    HRESULT _hr = get_bstrVersion(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline long IConfig::GetnPort ( ) {
    long _result;
    HRESULT _hr = get_nPort(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void IConfig::PutnPort ( long pVal ) {
    HRESULT _hr = put_nPort(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long IConfig::GetnBPS ( ) {
    long _result;
    HRESULT _hr = get_nBPS(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void IConfig::PutnBPS ( long pVal ) {
    HRESULT _hr = put_nBPS(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t IConfig::GetbstrIP ( ) {
    BSTR _result;
    HRESULT _hr = get_bstrIP(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void IConfig::PutbstrIP ( _bstr_t pVal ) {
    HRESULT _hr = put_bstrIP(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long IConfig::GetnBus ( ) {
    long _result;
    HRESULT _hr = get_nBus(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void IConfig::PutnBus ( long pVal ) {
    HRESULT _hr = put_nBus(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline VARIANT_BOOL IConfig::GetisOffline ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = get_isOffline(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline VARIANT_BOOL IConfig::GetbComment ( ) {
    VARIANT_BOOL _result;
    HRESULT _hr = get_bComment(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void IConfig::PutbComment ( VARIANT_BOOL pVal ) {
    HRESULT _hr = put_bComment(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline _bstr_t IConfig::GetbstrPartNbr ( ) {
    BSTR _result;
    HRESULT _hr = get_bstrPartNbr(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _bstr_t(_result, false);
}

inline void IConfig::PutbstrPartNbr ( _bstr_t pVal ) {
    HRESULT _hr = put_bstrPartNbr(pVal);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

inline long IConfig::GetnDimP ( ) {
    long _result;
    HRESULT _hr = get_nDimP(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

inline void IConfig::PutnDimP ( long pVal ) {
    HRESULT _hr = put_nDimP(pVal);

⌨️ 快捷键说明

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