diff --git a/dlls/crtdll/crtdll.spec b/dlls/crtdll/crtdll.spec index 1eaf0e95b40..87bf5baac4a 100644 --- a/dlls/crtdll/crtdll.spec +++ b/dlls/crtdll/crtdll.spec @@ -30,7 +30,7 @@ debug_channels (crtdll) @ forward _CItanh msvcrt._CItanh @ forward _HUGE_dll msvcrt._HUGE @ forward _XcptFilter msvcrt._XcptFilter -@ forward __GetMainArgs msvcrt.__getmainargs +@ cdecl __GetMainArgs(ptr ptr ptr long) __GetMainArgs @ forward __argc_dll msvcrt.__argc @ forward __argv_dll msvcrt.__argv @ forward __dllonexit msvcrt.__dllonexit diff --git a/dlls/crtdll/crtdll_main.c b/dlls/crtdll/crtdll_main.c index a84d1e4b14c..96bb702aa73 100644 --- a/dlls/crtdll/crtdll_main.c +++ b/dlls/crtdll/crtdll_main.c @@ -10,6 +10,10 @@ DEFAULT_DEBUG_CHANNEL(crtdll); +/* from msvcrt */ +extern void __cdecl __getmainargs( int *argc, char ***argv, char **environ, + int expand_wildcards, void *_startupinfo ); + /* The following data items are not exported from msvcrt */ unsigned int CRTDLL__basemajor_dll; unsigned int CRTDLL__baseminor_dll; @@ -41,3 +45,12 @@ BOOL WINAPI CRTDLL_Init(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) } return TRUE; } + + +/********************************************************************* + * __GetMainArgs (CRTDLL.@) + */ +void __cdecl __GetMainArgs( int *argc, char ***argv, char **environ, int expand_wildcards ) +{ + __getmainargs( argc, argv, environ, expand_wildcards, NULL ); +}