|

楼主 |
发表于 2020-5-21 22:20:23
|
显示全部楼层
搞定了 用创建线程来 模拟 对应的 OS的任务
//比如 WINMAIN函数里面 先创建这个任务
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
DWORD ThreadID;
CreateThread(NULL,
0,
ThreadFunc,
(LPVOID)1,
0,
& ThreadID);
return SIM_GUI_App(hInstance, lpCmdLine);
}
任务原型
DWORD WINAPI ThreadFunc(LPVOID N) {
/* Execute the target application to be simulated */
//MainTask();
static unsigned Var = 0;
while (1)
{
APPW_SetVarData(ID_VAR_ButtonFoce,Var++);
Sleep(100);
}
return 0;
}
|
|