/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/src/msw/winestub.c
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/src/msw/winestub.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (9 years, 11 months ago) by william
File MIME type: text/plain
File size: 1443 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 /****************************************************************************
2 * Name: winestub.cpp
3 * Purpose: wxWINE module mapping main() to WinMain()
4 * Author: Robert Roebling
5 * Created: 04/01/98
6 * RCS-ID: $Id: winestub.c 29038 2004-09-07 11:11:05Z ABX $
7 * Copyright: (c) Robert Roebling
8 * Licence: wxWidgets Licence
9 *****************************************************************************/
10
11 #include <string.h>
12 #include "winuser.h"
13 #include "xmalloc.h"
14
15 extern int PASCAL WinMain( HINSTANCE, HINSTANCE, LPSTR, int );
16 extern 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: */
20 int _ARGC;
21 char **_ARGV;
22
23 int 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 */
42 0, /* hPrevInstance */
43 lpszCmdParam, /* lpszCmdParam */
44 SW_NORMAL); /* nCmdShow */
45 }

  ViewVC Help
Powered by ViewVC 1.1.22