Removed old FF_ code.
[wine/hacks.git] / dlls / crtdll / crtdll_main.c
blob75b51abf7f1b19a606f68fd8532829acb3f38013
1 /*
2 * Old C RunTime DLL - All functionality is provided by msvcrt.
4 * Copyright 2000 Jon Griffiths
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #include "config.h"
21 #include "windef.h"
22 #include "winbase.h"
23 #include "wine/debug.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(crtdll);
27 /* from msvcrt */
28 extern void __getmainargs( int *argc, char ***argv, char ***envp,
29 int expand_wildcards, int *new_mode );
31 /* The following data items are not exported from msvcrt */
32 unsigned int CRTDLL__basemajor_dll;
33 unsigned int CRTDLL__baseminor_dll;
34 unsigned int CRTDLL__baseversion_dll;
35 unsigned int CRTDLL__cpumode_dll;
36 unsigned int CRTDLL__osmajor_dll;
37 unsigned int CRTDLL__osminor_dll;
38 unsigned int CRTDLL__osmode_dll;
39 unsigned int CRTDLL__osversion_dll;
41 /*********************************************************************
42 * CRTDLL_MainInit (CRTDLL.init)
44 BOOL WINAPI CRTDLL_Init(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
46 TRACE("(0x%08x,%ld,%p)\n",hinstDLL,fdwReason,lpvReserved);
48 if (fdwReason == DLL_PROCESS_ATTACH)
50 DWORD version = GetVersion();
51 CRTDLL__basemajor_dll = (version >> 24) & 0xFF;
52 CRTDLL__baseminor_dll = (version >> 16) & 0xFF;
53 CRTDLL__baseversion_dll = (version >> 16);
54 CRTDLL__cpumode_dll = 1; /* FIXME */
55 CRTDLL__osmajor_dll = (version>>8) & 0xFF;
56 CRTDLL__osminor_dll = (version & 0xFF);
57 CRTDLL__osmode_dll = 1; /* FIXME */
58 CRTDLL__osversion_dll = (version & 0xFFFF);
60 return TRUE;
64 /*********************************************************************
65 * __GetMainArgs (CRTDLL.@)
67 void __GetMainArgs( int *argc, char ***argv, char ***envp, int expand_wildcards )
69 int new_mode = 0;
70 __getmainargs( argc, argv, envp, expand_wildcards, &new_mode );