gusucode.com > 通用协议编解码模块C#源码程序 > 通用协议编解码模块/codec_src/Codec_src/Test/CodecTest/CodecTest.cpp
// CodecTest.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "CodecTest.h" #include "EnumTableTest.h" #include "MsgBlockTest.h" #include "LIntfTest.h" #include <conio.h> #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // The one and only application object CWinApp theApp; using namespace std; int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) { int nRetCode = 0; // initialize MFC and print and error on failure if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0)) { cerr << _T("Fatal Error: MFC initialization failed") << endl; nRetCode = 1; } else { EnumTableTest(); MsgBlockTest(); LIntfTest(); ::getch(); } return nRetCode; } UINT g_nIndent = 0; TCHAR g_szIndent[401] = ""; void IncreaseIndent() { g_nIndent ++; } void DecreaseIndent() { g_nIndent --; } LPCTSTR GetIndent() { int n; for (n = 0; n < g_nIndent * 4; n++) g_szIndent[n] = ' '; g_szIndent[n] = '\0'; return g_szIndent; } void PrintIndent() { cout << GetIndent(); }