huatu_com.cpp

来自「我写的简明MATLAB与VC++混合编程例子」· C++ 代码 · 共 49 行

CPP
49
字号
#include "huatu_com.hpp"



#ifdef __cplusplus
extern "C" {
#endif
extern const unsigned char __MCC_component_public_data[];
extern const char *__MCC_component_name_data;
extern const char *__MCC_component_root_data;
extern const unsigned char __MCC_component_session_data[];
extern const char *__MCC_component_matlabpath_data[];
extern const int __MCC_component_matlabpath_data_count;
extern const char *__MCC_component_mcr_runtime_options[];
extern const int __MCC_component_mcr_runtime_option_count;
extern const char *__MCC_component_mcr_application_options[];
extern const int __MCC_component_mcr_application_option_count;
#ifdef __cplusplus
}
#endif



Chuatu::Chuatu()
{
    if (!mclInitializeComponentInstance(&m_hinst, __MCC_component_public_data,
                                        __MCC_component_name_data,
                                        __MCC_component_root_data,
                                        __MCC_component_session_data,
                                        __MCC_component_matlabpath_data,
                                        __MCC_component_matlabpath_data_count,
                                        __MCC_component_mcr_runtime_options,
                                        __MCC_component_mcr_runtime_option_count,
                                        true, COMObject, LibTarget,
                                        g_Module.getPath(), NULL, NULL))
        Error("Could not create MCR instance");
}
Chuatu::~Chuatu()
{
    if (m_hinst)
        mclTerminateInstance(&m_hinst);
}

HRESULT __stdcall Chuatu::huatu() {
    return( CallComFcn( "huatu", 0, 0, 0 ) );
}


⌨️ 快捷键说明

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