Correct tests involved with processing the LVIF_DI_SETITEM flag.
[wine] / dlls / crtdll / crtdll_main.c
1 /*
2  * Old C RunTime DLL - All functionality is provided by msvcrt.
3  *
4  * Copyright 2000 Jon Griffiths
5  */
6 #include "config.h"
7 #include "windef.h"
8 #include "winbase.h"
9 #include "debugtools.h"
10
11 DEFAULT_DEBUG_CHANNEL(crtdll);
12
13 /* from msvcrt */
14 extern void __getmainargs( int *argc, char ***argv, char ***envp,
15                            int expand_wildcards, int *new_mode );
16
17 /* The following data items are not exported from msvcrt */
18 unsigned int CRTDLL__basemajor_dll;
19 unsigned int CRTDLL__baseminor_dll;
20 unsigned int CRTDLL__baseversion_dll;
21 unsigned int CRTDLL__cpumode_dll;
22 unsigned int CRTDLL__osmajor_dll;
23 unsigned int CRTDLL__osminor_dll;
24 unsigned int CRTDLL__osmode_dll;
25 unsigned int CRTDLL__osversion_dll;
26
27 /*********************************************************************
28  *                  CRTDLL_MainInit  (CRTDLL.init)
29  */
30 BOOL WINAPI CRTDLL_Init(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
31 {
32   TRACE("(0x%08x,%ld,%p)\n",hinstDLL,fdwReason,lpvReserved);
33
34   if (fdwReason == DLL_PROCESS_ATTACH)
35   {
36     DWORD version = GetVersion();
37     CRTDLL__basemajor_dll   = (version >> 24) & 0xFF;
38     CRTDLL__baseminor_dll   = (version >> 16) & 0xFF;
39     CRTDLL__baseversion_dll = (version >> 16);
40     CRTDLL__cpumode_dll     = 1; /* FIXME */
41     CRTDLL__osmajor_dll     = (version>>8) & 0xFF;
42     CRTDLL__osminor_dll     = (version & 0xFF);
43     CRTDLL__osmode_dll      = 1; /* FIXME */
44     CRTDLL__osversion_dll   = (version & 0xFFFF);
45   }
46   return TRUE;
47 }
48
49
50 /*********************************************************************
51  *                  __GetMainArgs  (CRTDLL.@)
52  */
53 void __GetMainArgs( int *argc, char ***argv, char ***envp, int expand_wildcards )
54 {
55     int new_mode = 0;
56     __getmainargs( argc, argv, envp, expand_wildcards, &new_mode );
57 }