]> git.saurik.com Git - wxWidgets.git/blame - src/msw/winestub.c
Disable final failing wxWebView test. It fails on the buildbot but not locally.
[wxWidgets.git] / src / msw / winestub.c
CommitLineData
39c9d5ac 1/****************************************************************************
80fdcdb9 2 * Name: src/msw/winestub.cpp
39c9d5ac
RR
3 * Purpose: wxWINE module mapping main() to WinMain()
4 * Author: Robert Roebling
5 * Created: 04/01/98
6 * RCS-ID: $Id$
7 * Copyright: (c) Robert Roebling
526954c5 8 * Licence: wxWindows licence
39c9d5ac
RR
9 *****************************************************************************/
10
11#include <string.h>
12#include "winuser.h"
13#include "xmalloc.h"
14
15extern int PASCAL WinMain( HINSTANCE, HINSTANCE, LPSTR, int );
16extern HINSTANCE MAIN_WinelibInit( int *argc, char *argv[] );
17
18/* Most Windows C/C++ compilers use something like this to */
19/* access argc and argv globally: */
20int _ARGC;
21char **_ARGV;
22
23int main( int argc, char *argv [] )
24{
25 HINSTANCE hInstance;
26 LPSTR lpszCmdParam;
27 int i, len = 0;
28 _ARGC = argc;
29 _ARGV = (char **)argv;
30
31 if (!(hInstance = MAIN_WinelibInit( &argc, argv ))) return 0;
32
33 /* Alloc szCmdParam */
34 for (i = 1; i < argc; i++) len += strlen(argv[i]) + 1;
35 lpszCmdParam = (LPSTR) xmalloc(len + 1);
36 /* Concatenate arguments */
37 if (argc > 1) strcpy(lpszCmdParam, argv[1]);
38 else lpszCmdParam[0] = '\0';
39 for (i = 2; i < argc; i++) strcat(strcat(lpszCmdParam, " "), argv[i]);
40
41 return WinMain (hInstance, /* hInstance */
27d2dbbc
WS
42 0, /* hPrevInstance */
43 lpszCmdParam, /* lpszCmdParam */
44 SW_NORMAL); /* nCmdShow */
39c9d5ac 45}