Commit 74dec7a0 authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Call ExitProcess() after WinMain() returns.

parent 7b81ed4a
/* Sample winestub.c file for compiling programs with libwine.so. */ /* Sample winestub.c file for compiling programs with libwine.so. */
#include <string.h> #include <string.h>
#include "winbase.h"
#include "winuser.h" #include "winuser.h"
#include "xmalloc.h" #include "xmalloc.h"
...@@ -22,7 +23,7 @@ int main( int argc, char *argv [] ) ...@@ -22,7 +23,7 @@ int main( int argc, char *argv [] )
{ {
HINSTANCE hInstance; HINSTANCE hInstance;
LPSTR lpszCmdParam; LPSTR lpszCmdParam;
int i, len = 0; int i, len = 0, retv;
_ARGC = argc; _ARGC = argc;
_ARGV = (char **)argv; _ARGV = (char **)argv;
...@@ -36,8 +37,11 @@ int main( int argc, char *argv [] ) ...@@ -36,8 +37,11 @@ int main( int argc, char *argv [] )
else lpszCmdParam[0] = '\0'; else lpszCmdParam[0] = '\0';
for (i = 2; i < argc; i++) strcat(strcat(lpszCmdParam, " "), argv[i]); for (i = 2; i < argc; i++) strcat(strcat(lpszCmdParam, " "), argv[i]);
return WinMain (hInstance, /* hInstance */ retv = WinMain (hInstance, /* hInstance */
0, /* hPrevInstance */ 0, /* hPrevInstance */
lpszCmdParam, /* lpszCmdParam */ lpszCmdParam, /* lpszCmdParam */
SW_NORMAL); /* nCmdShow */ SW_NORMAL); /* nCmdShow */
ExitProcess( retv );
return retv;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment