- 以下是在emulator下调试时的代码路径。
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hParent,TCHAR* Cmd,int CmdShow)
{Context();
HMODULE Module;
SetCursor(LoadCursor(NULL, IDC_WAIT));
Module = Load(T("interface.plg"));
if (Module)
{
void (*Main)(const tchar_t* Name,const tchar_t* Version,int Id,const tchar_t* CmdLine);
*(FARPROC*)&Main = GetProcAddress(Module,TWIN("Main"));
if (!Main)
*(FARPROC*)&Main = GetProcAddress(Module,TWIN (" _Main@16"));
if (Main)
Main(ProgramName,ProgramVersion,ProgramId,Cmd);
FreeLibrary(Module);
}SetCursor(LoadCursor(NULL, IDC_ARROW));
}}
-
Debug Setting.
为了使用EVC调试程序(player_ce3.exe)需要对project进行一些设置,Debug--> additional dll --> 加入本地的在exe中调用的dll(不要写remote端的dll), such as: c:\opensourcestudy\tcpmp\emulatordbg\common.dll.
- 一些分析。
common\win32\Node_win32.c
//==== Get the value from the registe table and set it to the Data.
static bool_t LoadValue(HKEY Key,int Id,void* Data,int Size,int Type)
//==== FOURCCBE Force to use the asicc encode instead of unicode.
#define FOURCCBE(a,b,c,d) \
(((uint8_t)(a) << 24) | ((uint8_t)(b) << 16) | \
((uint8_t)(c) << 8) | ((uint8_t)(d) << 0))
#define FOURCCLE(a,b,c,d) \
(((uint8_t)(a) << 0) | ((uint8_t)(b) << 8) | \
((uint8_t)(c) << 16) | ((uint8_t)(d)<< 24))
#ifdef IS_BIG_ENDIAN
#define FOURCC(a,b,c,d) FOURCCBE(a,b,c,d)
#else
#define FOURCC(a,b,c,d) FOURCCLE(a,b,c,d)
#endif

