APPENDIX
//
//Read
//
void CVCDlg::OnRead()
{
long lRet; short sData[5]; CString szMessage;
//
lRet = m_actEasyIf. ReadDeviceBlock2 ( "D0", 5, sData ); if ( lRet == 0) {
szMessage. Format (
sData[0], sData[1], sData[2], sData[3], sData[4] ); MessageBox ( szMessage );
} else {
szMessage. Format ( "Read Error: %x", lRet ); MessageBox ( szMessage )
}
}
//
//Disconnection
//
void CVCDlg::OnOpen()
{
long lRet;
CString szMessage;
//Disconnection
lRet = m_actEasyIF. Close(); if ( lRet == 0) {
MessageBox ( "The disconnection was successful" )
} else {
szMessage. Format ( "Disconnection Error: %x", lRet ); MessageBox ( szMessage )
}
}
App. - 29 | App. - 29 |