#include "stdafx.h" #include "ShopEH.h" #include "atlbase.h" CShopEH::CShopEH(void) { ::InitializeCriticalSection(&m_cs); } CShopEH::~CShopEH(void) { ::DeleteCriticalSection(&m_cs); } void CShopEH::OnNetConnect(bool success, DWORD error) { if(success) AfxMessageBox(_T("OnConnect succeed")); else AfxMessageBox(_T("OnConnect fali")); } void CShopEH::OnNetSend(int size) { //AfxMessageBox("OnSend"); } void CShopEH::OnNetClose(DWORD error) { WriteLog("OnNetClose\r\n"); AfxMessageBox(_T("OnClose")); } void CShopEH::OnInquireSalesZoneScriptVersion( unsigned short SalesZone, unsigned short Year, unsigned short YearIdentity, long ResultCode) { CString strMsg; strMsg.Format(_T("OnInquireSalesZoneScriptVersion:%d.%d.%d, ResultCode:%d\r\n"), SalesZone, Year, YearIdentity, ResultCode); WriteLog((LPSTR)(LPCTSTR)strMsg); AfxMessageBox(strMsg); } void CShopEH::OnInquireBannerZoneScriptVersion( unsigned short BannerZone, unsigned short Year, unsigned short YearIdentity, long ResultCode) { CString strMsg; strMsg.Format(_T("OnInquireBannerZoneScriptVersion:%d.%d.%d, ResultCode:%d\r\n"), BannerZone, Year, YearIdentity, ResultCode); WriteLog((LPSTR)(LPCTSTR)strMsg); AfxMessageBox(strMsg); } void CShopEH::OnInquireCash( DWORD AccountSeq, double CashSum, double PointSum, double MileageSum, int DetailCount, ShopProtocol::STCashDetail Detail[], long ResultCode) { CString strMsg, strDetail; strMsg.Format(_T("OnInquireCash\r\nAccountSeq:%d, CashSum:%f, PointSum:%f, MileageSum:%f, ResultCode:%d, \r\ndetail information:\r\n"), AccountSeq, CashSum, PointSum, MileageSum, ResultCode); USES_CONVERSION; for (int i=0 ; i