| _WinMain (int argc, char *argv []) |
| char filename [4096], *module_name, *resource_file; |
| HANDLE hTaskMain, hInstance; |
| if ((module_name = strchr (argv [0], '/')) == NULL){ |
| printf ("Error: Can't determine base name for resource loading\n"); |
| resource_file = malloc (strlen (++module_name) + 5); |
| strcpy (resource_file, module_name); |
| strcat (resource_file, ".dll"); |
| hInstance = LoadImage (resource_file, 0, 0); |
| USER_InitApp( hInstance ); |
| hTaskMain = CreateNewTask (1); /* This is not correct */ |
| ret_val = WinMain (hInstance, /* hInstance */ |
| SW_NORMAL); /* nCmdShow */ |