Release 951226
[wine/multimedia.git] / library / winmain.c
blobf132725674ea3bb1a2ac187a43a64f874f724555
1 #include <stdio.h>
2 #include <string.h>
3 #include <malloc.h>
4 #include "windows.h"
5 #include "wine.h"
7 extern int MAIN_Init(void);
8 extern BOOL WIDGETS_Init(void);
9 extern BOOL WIN_CreateDesktopWindow(void);
10 extern int PASCAL WinMain(HINSTANCE,HINSTANCE,LPSTR,int);
11 extern void TASK_Reschedule(void);
12 extern int USER_InitApp(HINSTANCE);
14 char* progname=NULL;
16 int _WinMain (int argc, char *argv [])
18 HINSTANCE hInstance;
20 progname=*argv;
21 if(!MAIN_Init()) return 0; /* JBP: Needed for DosDrives[] structure, etc. */
22 hInstance = WinExec( *argv, SW_SHOWNORMAL );
23 TASK_Reschedule();
24 USER_InitApp( hInstance );
25 /* Perform global initialisations that need a task context */
26 if (!WIDGETS_Init()) return -1;
27 if (!WIN_CreateDesktopWindow()) return -1;
29 return WinMain (hInstance, /* hInstance */
30 0, /* hPrevInstance */
31 "", /* lpszCmdParam */
32 SW_NORMAL); /* nCmdShow */