void main() { FILE *fp; int r; char str[32] = {0}; printf("初始化进程启动中(stack = %p)...\n", &fp); y_process_create("NES", "0:\\os\\i386\\nes.exe 0:\\os\\i386\\90.nes"); }
void main() { FILE *fp; printf("初始化进程启动中(stack = %p), stderr = %p...\n", &fp, stderr); y_process_create("NES", "0:\\os\\i386\\baxi startup"); //y_process_create("NES", "0:\\os\\i386\\nes.exe 0:\\os\\i386\\90.nes"); /* Startup service */ //startup_services(); printf("\npreparing message loop.\n"); y_message_loop(); }
static bool handle_exe(char * cmdline) { y_handle process; unsigned long ret = 1234; /* Cmdline 一般保存的是用户的直接输入,启动一个程序时没有绝对路径,因此加上 */ char str[128]; //TODO: 获取合适的路径 memset(str, 0, sizeof(str)); strcat(str, "0:/os/Systemi386/"); strcat(str, cmdline); if ((process = y_process_create(cmdline, str)) == Y_INVALID_HANDLE) { return false; } y_process_wait_exit(process, &ret); return true; }