如何将C#委托连接到boost :: signal

问题描述

我尝试以这种方式连接

TextStore

public class UpdateProfile:BaseModel
{

    public string firstName { get; set; }
    public string lastName { get; set; }
    public IFormFile Image { get; set; }
}

信号处理程序

typedef boost::signals2::signal<VOID(TextStore*,RECT*)> signal_GetCompExt;
signal_GetCompExt       m_sigGetCompExt;

连接信号

delegate VOID GetCompsitionExtDelegate(TextStore* textStore,RECT* rect);
VOID onGetCompsitionExt(TextStore* textStore,RECT* rect);

但它告诉我

using namespace System::Runtime::InteropServices;
    m_TextStore->m_sigGetCompExt.connect(reinterpret_cast<TextStore::signal_GetCompExt::slot_type*>(Marshal::GetFunctionPointerForDelegate(gcnew GetCompsitionExtDelegate(this,&AppWrapper::onGetCompsitionExt)).ToPointer()));

https://github.com/Windmill-City/libtf/blob/master/libtfWrapper/AppWrapper.cpp

在构建前设置Boost Root

路径:C2064 term does not evaluate to a function taking 2 arguments

BoostVersion boost_1_74_0

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)