📄 emu850.cpp
字号:
/*
*****DO NOT EDIT THIS FILE!!*****
this file is used by simulator,
will not compiled and linked with final
target-dependent executable image.
*/
#include <windows.h>
#include <WINSOCK.H>
BOOL WINAPI StartEmu(void * pFunAdd, int nOption);
BOOL WINAPI InitEmu(void* pFunInt);
void WINAPI UInvalidateView();
void WINAPI USendMsgToSpy(void *pMsg);
void WINAPI UShowErrorMsgBox(void);
extern int LibInit();
extern int LibGetFunAdd(void);
extern int main();
typedef struct _main_int{
int (*pMain)();
}EMUMAININT;
EMUMAININT MainFun;
/** \brief Start up WinSock
*/
int StartUpWinSock(void)
{
WORD wVersionRequested;
WSADATA wsaData;
int err = 0;
wVersionRequested = MAKEWORD(1, 1);
err = WSAStartup(wVersionRequested, &wsaData);
if (err != 0) {
/* Tell the user that we could not find a usable */
/* WinSock DLL. */
return err;
}
/* Confirm that the WinSock DLL supports 1.1.*/
/* Note that if the DLL supports versions greater */
/* than 1.1 in addition to 1.1, it will still return */
/* 1.1 in wVersion since that is the version we */
/* requested. */
if (LOBYTE(wsaData.wVersion) != 1 ||
HIBYTE(wsaData.wVersion) != 1) {
/* Tell the user that we could not find a usable */
/* WinSock DLL. */
WSACleanup();
}
return err;
}
void CleanUpWinSock(void)
{
/* Call WinSock API to clean up */
WSACleanup();
}
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
void *pFunAdd = (void *)LibGetFunAdd();
InitEmu(pFunAdd);
LibInit();
MainFun.pMain = main;
StartUpWinSock();
StartEmu(&MainFun, 0);
CleanUpWinSock();
return 0;
}
extern "C" void _UInvalidateView()
{
UInvalidateView();
}
void RefreshPage(void)
{
UInvalidateView();
}
void _USendMsgToSpy(void *pMsg)
{
USendMsgToSpy(pMsg);
}
void _UShowErrorMsgBox(void)
{
UShowErrorMsgBox();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -