void CTestOcxDlg::IPRequestDataTcpGW(short sCmd, LPCTSTR strRequestData,
long* plStatus, BSTR* pstrAnswerData)
{
CString str;
str.Format( "Recv IPRequestData, cmd=%d data=%s.
return:status=%d,data=%s",
sCmd, strRequestData, m_iStatus, m_strData );
*plStatus = m_iStatus;
*pstrAnswerData = m_strData.AllocSysString();
m_log.AddString( str );
}
第二段
void CTestOcxDlg::OnBnClickedStartflow()
{
UpdateData();
long l = m_oTcpGW.PutUInt( "ServiceType", 0 );
l = m_oTcpGW.PutUShort( "FlowType", m_uiFlowType );
l = m_oTcpGW.PutUInt( "StationNo", 0 );
l = m_oTcpGW.PutString( "Caller", "02085521717" );
l = m_oTcpGW.PutString( "Called", "02085521717" );
l = m_oTcpGW.PutString( "OrigCaller", "02085521717" );
l = m_oTcpGW.PutString( "OrigCalled", "02085521717" );
l = m_oTcpGW.PutString( "AccountTelephone", "02085521717" );
l = m_oTcpGW.PutByte( "ConcurrentLimit", 0 );
l = m_oTcpGW.PutString( "Operator", "123" );
l = m_oTcpGW.PutString( "ServiceItemNumber", "a123" );
l = m_oTcpGW.PutString( "UserAccount", "1233" );
l = m_oTcpGW.PutInt( "UserAccountKind", 0 );
l = m_oTcpGW.PutUShort( "UserAccountProperty", 0 );
l = m_oTcpGW.PutFloat( "UserAccountBalance", 0.0 );
l = m_oTcpGW.PutFloat( "UserAccountOverdraft", 0.0 );
l = m_oTcpGW.PutFloat( "UserAccountMonthLimit", 0.0 );
l = m_oTcpGW.PutUInt( "BureauID", 0 );
l = m_oTcpGW.SendMsg( "CmdStartRemoteFlow", 0, 0, 0 );
CString str;
Str.Format("Start Remote Flow [%d]", m_uiFlowType );
m_log.AddString(str);
}
3 个解决方案
#1
#2
关注/./关注!~~~~~~~~~~~~~~~~~~~
#3
BEGIN_EVENTSINK_MAP(CTestOcxDlg, CDialog)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 1,
AuthenEventTcpGW, VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 3,
ClosedEventTcpGW, VTS_NONE)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 2,
ConnectEventTcpGW, VTS_NONE)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 4,
ConnectFailedEventTcpGW, VTS_NONE)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 5,
MsgArriveEventTcpGW, VTS_BSTR VTS_I4 VTS_I4 VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 7,
StartTraceFlowEventTcpGW, VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 8,
StopTraceFlowEventTcpGWl, VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 9,
TraceFlowInfoEventTcpGW, VTS_BSTR VTS_BSTR VTS_BSTR)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 10,
IPRequestDataTcpGW, VTS_I2 VTS_BSTR VTS_PI4 VTS_PBSTR)
END_EVENTSINK_MAP()
这段转成VB又是怎么样的?谢谢大家了
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 1,
AuthenEventTcpGW, VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 3,
ClosedEventTcpGW, VTS_NONE)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 2,
ConnectEventTcpGW, VTS_NONE)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 4,
ConnectFailedEventTcpGW, VTS_NONE)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 5,
MsgArriveEventTcpGW, VTS_BSTR VTS_I4 VTS_I4 VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 7,
StartTraceFlowEventTcpGW, VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 8,
StopTraceFlowEventTcpGWl, VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 9,
TraceFlowInfoEventTcpGW, VTS_BSTR VTS_BSTR VTS_BSTR)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 10,
IPRequestDataTcpGW, VTS_I2 VTS_BSTR VTS_PI4 VTS_PBSTR)
END_EVENTSINK_MAP()
这段转成VB又是怎么样的?谢谢大家了
#1
#2
关注/./关注!~~~~~~~~~~~~~~~~~~~
#3
BEGIN_EVENTSINK_MAP(CTestOcxDlg, CDialog)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 1,
AuthenEventTcpGW, VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 3,
ClosedEventTcpGW, VTS_NONE)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 2,
ConnectEventTcpGW, VTS_NONE)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 4,
ConnectFailedEventTcpGW, VTS_NONE)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 5,
MsgArriveEventTcpGW, VTS_BSTR VTS_I4 VTS_I4 VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 7,
StartTraceFlowEventTcpGW, VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 8,
StopTraceFlowEventTcpGWl, VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 9,
TraceFlowInfoEventTcpGW, VTS_BSTR VTS_BSTR VTS_BSTR)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 10,
IPRequestDataTcpGW, VTS_I2 VTS_BSTR VTS_PI4 VTS_PBSTR)
END_EVENTSINK_MAP()
这段转成VB又是怎么样的?谢谢大家了
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 1,
AuthenEventTcpGW, VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 3,
ClosedEventTcpGW, VTS_NONE)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 2,
ConnectEventTcpGW, VTS_NONE)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 4,
ConnectFailedEventTcpGW, VTS_NONE)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 5,
MsgArriveEventTcpGW, VTS_BSTR VTS_I4 VTS_I4 VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 7,
StartTraceFlowEventTcpGW, VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 8,
StopTraceFlowEventTcpGWl, VTS_I4)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 9,
TraceFlowInfoEventTcpGW, VTS_BSTR VTS_BSTR VTS_BSTR)
ON_EVENT(CTestOcxDlg, IDC_TCPGWMODULECTRL, 10,
IPRequestDataTcpGW, VTS_I2 VTS_BSTR VTS_PI4 VTS_PBSTR)
END_EVENTSINK_MAP()
这段转成VB又是怎么样的?谢谢大家了