CMsgLogin成员
_IApplicationPtr m_pMainApp;
//传入接口实例w
void CMsgLogin::SetAppDispatch(LPDISPATCH pInst)
{
m_pMainApp=pInst;return;
}
//调用客户端的方法ym
void CMsgLogin::CallApplication()
{
// TODO: Add your dispatch handler code here
_IMessageMonitorPtr pMessageMonitor;
pMessageMonitor=NULL;
if(m_pMainApp!=NULL)
{
pMessageMonitor=m_pMainApp->GetMessageMonitor();
if(pMessageMonitor!=NULL)
pMessageMonitor->AddNew("",false,"","",
"","");
}
}
//在客端调CallApplication能成功,可在服务端调用CallApplication出错,怎么办?d
_IApplicationPtr m_pMainApp;
//传入接口实例w
void CMsgLogin::SetAppDispatch(LPDISPATCH pInst)
{
m_pMainApp=pInst;return;
}
//调用客户端的方法ym
void CMsgLogin::CallApplication()
{
// TODO: Add your dispatch handler code here
_IMessageMonitorPtr pMessageMonitor;
pMessageMonitor=NULL;
if(m_pMainApp!=NULL)
{
pMessageMonitor=m_pMainApp->GetMessageMonitor();
if(pMessageMonitor!=NULL)
pMessageMonitor->AddNew("",false,"","",
"","");
}
}
//在客端调CallApplication能成功,可在服务端调用CallApplication出错,怎么办?d
我看见你传入的IDispatch* , 而接收的是_IApplicationPtr ,由于是智能指针,它会帮你查询_IApplication 接口 , 如果你的服务与客户是有边界的,而且你也没有提供 _IApplication 的 PROXY/STUB DLLS 这个调用就会失败