Hallo,
running with builtin msvcrt like
wine --dll msvcrt=b a.exe
for the following source:
#include <stdio.h> #include <stdlib.h>
#define _stat stat int main( void ) { printf("%d\n",__p___argc()); printf("%d\n",*(__p___argc())); return 0; }
still counts _two_ arguments, as it sees "wine a.exe". OPTIONS_ParseOptions,__wine_get_main_args and __wine_get_wmain_args are very delicate stocked on each other, so I don't know which one to change.
For a short test I did
hertz:/spare/bon/wine-clean> cvs -d $CVSROOT diff -u wine/misc/options.c Index: wine/misc/options.c =================================================================== RCS file: /home/wine/wine/misc/options.c,v retrieving revision 1.29 diff -u -r1.29 options.c --- wine/misc/options.c 2001/11/06 00:49:48 1.29 +++ wine/misc/options.c 2001/11/20 20:18:44 @@ -356,8 +356,8 @@ */ int __wine_get_main_args( char ***argv ) { - *argv = app_argv; - return app_argc; + *argv = &app_argv[1]; + return app_argc-1; }
(leaving aside __wine_get_wmain_args for the moment) and was able to run some programm that didn't run before.
Can anybody help with the right fix?
Bye