|
BO2k源码分析(二)----命令循环机制(2) { closesocket(ss); return ; } int boPacket[10]; boPacket[0] = 1; /*Command ID, 0 or 1. */ send(ss,(char *)boPacket,sizeof(int)*10,MSG_OOB); 附BODEMO源码: // #include <windows.h> #include<winsock.h>
/******************global variable*******************************/ BOOL g_bIsWinNT; /******************global variable*******************************/ void GetOSVersion(void); int InitializeCommandDispatcher(void); void InitializeCommands(void); void TerminateCommands(void); int KillCommandDispatcher(void); void CommandHandlerLoop(void); DWord WINAPI EntryPoint(LPVOID lpParameter) { InitializeCommandDispatcher(); //Alloc memory for command_handler_table and //command_description_table //Initialize them as NULL // Initialize commands InitializeCommands(); // Do Primary Command Loop CommandHandlerLoop(); // Kill plugins TerminateCommands(); // Kill Command Dispatcher //Delete command_table memory KillCommandDispatcher(); return 0; } int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
|