Stub for VerifyVersionInfoW.
[wine] / misc / version.c
1 /*
2  * Windows and DOS version functions
3  *
4  * Copyright 1997 Alexandre Julliard
5  * Copyright 1997 Marcus Meissner
6  * Copyright 1998 Patrik Stridvall
7  * Copyright 1998 Andreas Mohr
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22  */
23
24 #include <string.h>
25 #include <stdlib.h>
26 #include <stdio.h>
27 #include "windef.h"
28 #include "winbase.h"
29 #include "wingdi.h"
30 #include "winuser.h"
31 #include "wine/winbase16.h"
32 #include "module.h"
33 #include "options.h"
34 #include "wine/debug.h"
35 #include "winerror.h"
36
37 WINE_DEFAULT_DEBUG_CHANNEL(ver);
38
39 typedef enum
40 {
41     WIN20,   /* Windows 2.0 */
42     WIN30,   /* Windows 3.0 */
43     WIN31,   /* Windows 3.1 */
44     WIN95,   /* Windows 95 */
45     WIN98,   /* Windows 98 */
46     WINME,   /* Windows Me */
47     NT351,   /* Windows NT 3.51 */
48     NT40,    /* Windows NT 4.0 */
49     NT2K,    /* Windows 2000 */
50     WINXP,   /* Windows XP */
51     NB_WINDOWS_VERSIONS
52 } WINDOWS_VERSION;
53
54 typedef struct
55 {
56     LONG             getVersion16; 
57     LONG             getVersion32;
58     OSVERSIONINFOA getVersionEx;
59 } VERSION_DATA;
60
61 /* FIXME: compare values below with original and fix */
62 static VERSION_DATA VersionData[NB_WINDOWS_VERSIONS] =
63 {
64     /* WIN20 FIXME: verify values */
65     {
66         MAKELONG( 0x0002, 0x0303 ), /* assume DOS 3.3 */
67         MAKELONG( 0x0003, 0x8000 ),
68         {
69             sizeof(OSVERSIONINFOA), 2, 0, 0,
70             VER_PLATFORM_WIN32s, "Win32s 1.3" 
71         }
72     },
73     /* WIN30 FIXME: verify values */
74     {
75         MAKELONG( 0x0003, 0x0500 ), /* assume DOS 5.00 */
76         MAKELONG( 0x0003, 0x8000 ),
77         {
78             sizeof(OSVERSIONINFOA), 3, 0, 0,
79             VER_PLATFORM_WIN32s, "Win32s 1.3" 
80         }
81     },
82     /* WIN31 */
83     {
84         MAKELONG( 0x0a03, 0x0616 ), /* DOS 6.22 */
85         MAKELONG( 0x0a03, 0x8000 ),
86         {
87             sizeof(OSVERSIONINFOA), 3, 10, 0,
88             VER_PLATFORM_WIN32s, "Win32s 1.3" 
89         }
90     },
91     /* WIN95 */
92     {
93         0x07005F03,
94         0xC0000004,
95         {
96             /* Win95:       4, 0, 0x40003B6, ""
97              * Win95sp1:    4, 0, 0x40003B6, " A " (according to doc)
98              * Win95osr2:   4, 0, 0x4000457, " B " (according to doc)
99              * Win95osr2.1: 4, 3, 0x40304BC, " B " (according to doc)
100              * Win95osr2.5: 4, 3, 0x40304BE, " C " (according to doc)
101              * Win95a/b can be discerned via regkey SubVersionNumber
102              * See also:
103              * http://support.microsoft.com/support/kb/articles/q158/2/38.asp
104              */
105             sizeof(OSVERSIONINFOA), 4, 0, 0x40003B6,
106             VER_PLATFORM_WIN32_WINDOWS, ""
107         }
108     },
109     /* WIN98 */
110     {
111         0x070A5F03,
112         0xC0000A04,
113         {
114             /* Win98:   4, 10, 0x40A07CE, " "
115              * Win98SE: 4, 10, 0x40A08AE, " A "
116              */
117             sizeof(OSVERSIONINFOA), 4, 10, 0x40A07CE,
118             VER_PLATFORM_WIN32_WINDOWS, " "
119         }
120     },
121     /* WINME */
122     {
123         0x07005F03, /* Assuming DOS 7 like the other Win9x */
124         0xC0005A04,
125         {
126             sizeof(OSVERSIONINFOA), 4, 90, 0x45A0BB8,
127             VER_PLATFORM_WIN32_WINDOWS, " "
128         }
129     },
130     /* NT351 */
131     {
132         0x05000A03,
133         0x04213303,
134         {
135             sizeof(OSVERSIONINFOA), 3, 51, 0x421,
136             VER_PLATFORM_WIN32_NT, "Service Pack 2"
137         }
138     },
139     /* NT40 */
140     {
141         0x05000A03,
142         0x05650004,
143         {
144             sizeof(OSVERSIONINFOA), 4, 0, 0x565,
145             VER_PLATFORM_WIN32_NT, "Service Pack 6"
146         }
147     },
148     /* NT2K */
149     {
150         0x05005F03,
151         0x08930005,
152         {
153             sizeof(OSVERSIONINFOA), 5, 0, 0x893,
154             VER_PLATFORM_WIN32_NT, "Service Pack 2"
155         }
156     },
157     /* WINXP */
158     {
159         0x05005F03, /* Assuming DOS 5 like the other NT */
160         0x0A280105,
161         {
162             sizeof(OSVERSIONINFOA), 5, 1, 0xA28,
163             VER_PLATFORM_WIN32_NT, ""
164         }
165     }
166 };
167
168 static const char *WinVersionNames[NB_WINDOWS_VERSIONS] =
169 { /* no spaces in here ! */
170     "win20",
171     "win30",
172     "win31",
173     "win95",
174     "win98",
175     "winme",
176     "nt351",
177     "nt40",
178     "win2000,win2k,nt2k,nt2000",
179     "winxp"
180 };
181
182 /* if one of the following dlls is importing ntdll the windows
183 version autodetection switches wine to unicode (nt 3.51 or 4.0) */
184 static char * special_dlls[] =
185 {
186         "COMDLG32",
187         "COMCTL32",
188         "SHELL32",
189         "OLE32",
190         "RPCRT4",
191         NULL
192 };
193
194 /* the current version has not been autodetected but forced via cmdline */
195 static BOOL versionForced = FALSE;
196 static WINDOWS_VERSION defaultWinVersion = WIN31;
197
198 /**********************************************************************
199  *         VERSION_ParseWinVersion
200  */
201 void VERSION_ParseWinVersion( const char *arg )
202 {
203     int i, len;
204     const char *pCurr, *p;
205     for (i = 0; i < NB_WINDOWS_VERSIONS; i++)
206     {
207         pCurr = WinVersionNames[i];
208         /* iterate through all winver aliases separated by comma */
209         do {
210             p = strchr(pCurr, ',');
211             len = p ? (int)p - (int)pCurr : strlen(pCurr);
212             if ( (!strncmp( pCurr, arg, len )) && (arg[len] == '\0') )
213             {
214                 defaultWinVersion = (WINDOWS_VERSION)i;
215                 versionForced = TRUE;
216                 return;
217             }
218             pCurr = p+1;
219         } while (p);
220     }
221     MESSAGE("Invalid winver value '%s' specified.\n", arg );
222     MESSAGE("Valid versions are:" );
223     for (i = 0; i < NB_WINDOWS_VERSIONS; i++)
224     {
225         /* only list the first, "official" alias in case of aliases */
226         pCurr = WinVersionNames[i];
227         p = strchr(pCurr, ',');
228         len = (p) ? (int)p - (int)pCurr : strlen(pCurr);
229
230         MESSAGE(" '%.*s'%c", len, pCurr,
231                 (i == NB_WINDOWS_VERSIONS - 1) ? '\n' : ',' );
232     }
233     ExitProcess(1);
234 }
235
236
237 /**********************************************************************
238  *         VERSION_ParseDosVersion
239  */
240 void VERSION_ParseDosVersion( const char *arg )
241 {
242     int hi, lo;
243     if (sscanf( arg, "%d.%d", &hi, &lo ) == 2)
244     {
245         VersionData[WIN31].getVersion16 =
246             MAKELONG(LOWORD(VersionData[WIN31].getVersion16),
247                      (hi<<8) + lo);
248     }
249     else
250     {
251         MESSAGE("--dosver: Wrong version format. Use \"--dosver x.xx\"\n");
252         ExitProcess(1);
253     }
254 }
255
256 /**********************************************************************
257  *      VERSION_GetSystemDLLVersion
258  *
259  * This function tries to figure out if a given (native) dll comes from
260  * win95/98 or winnt. Since all values in the OptionalHeader are not a 
261  * usable hint, we test if a dll imports the ntdll.
262  * This is at least working for all system dlls like comctl32, comdlg32 and
263  * shell32.
264  * If you have a better idea to figure this out...
265  */
266 static DWORD VERSION_GetSystemDLLVersion( HMODULE hmod )
267 {
268     IMAGE_DATA_DIRECTORY *dir = PE_HEADER(hmod)->OptionalHeader.DataDirectory
269                                 + IMAGE_DIRECTORY_ENTRY_IMPORT;
270     if (dir->Size && dir->VirtualAddress)
271     {
272         IMAGE_IMPORT_DESCRIPTOR *pe_imp = (IMAGE_IMPORT_DESCRIPTOR *)((char *)hmod + dir->VirtualAddress);
273         for ( ; pe_imp->Name; pe_imp++)
274         {
275             char * name = (char *)hmod + (unsigned int)pe_imp->Name;
276             TRACE("%s\n", name);
277             
278             if (!strncasecmp(name, "ntdll", 5))
279             {
280               if (3 == PE_HEADER(hmod)->OptionalHeader.MajorOperatingSystemVersion)
281                 return NT351;
282               else
283                 return NT40;
284             }
285         }
286     }
287     return WIN95;
288 }
289 /**********************************************************************
290  *      VERSION_GetLinkedDllVersion
291  *
292  * Some version data (not reliable!):
293  * linker/OS/image/subsys
294  *
295  * x.xx/1.00/0.00/3.10  Win32s          (any version ?)
296  * 2.39/1.00/0.00/3.10  Win32s          freecell.exe (any version)
297  * 2.50/1.00/4.00/4.00  Win32s 1.30     winhlp32.exe    
298  * 2.60/3.51/3.51/3.51  NT351SP5        system dlls 
299  * 2.60/3.51/3.51/4.00  NT351SP5        comctl32 dll
300  * 2.xx/1.00/0.00/4.00  Win95           system files
301  * x.xx/4.00/0.00/4.00  Win95           most applications
302  * 3.10/4.00/0.00/4.00  Win98           notepad
303  * x.xx/5.00/5.00/4.00  Win98           system dlls
304  * x.xx/4.00/4.00/4.00  NT 4            most apps
305  * 5.12/5.00/5.00/4.00  NT4+IE5         comctl32.dll
306  * 5.12/5.00/5.00/4.00  Win98           calc
307  * x.xx/5.00/5.00/4.00  win95/win98/NT4 IE5 files
308  */
309 DWORD VERSION_GetLinkedDllVersion(void)
310 {
311         WINE_MODREF *wm;
312         DWORD WinVersion = NB_WINDOWS_VERSIONS;
313         PIMAGE_OPTIONAL_HEADER ophd;
314
315         /* First check the native dlls provided. These have to be
316         from one windows version */
317         for ( wm = MODULE_modref_list; wm; wm=wm->next )
318         {
319           ophd = &(PE_HEADER(wm->module)->OptionalHeader);
320
321           TRACE("%s: %02x.%02x/%02x.%02x/%02x.%02x/%02x.%02x\n",
322             wm->modname,
323             ophd->MajorLinkerVersion, ophd->MinorLinkerVersion,
324             ophd->MajorOperatingSystemVersion, ophd->MinorOperatingSystemVersion,
325             ophd->MajorImageVersion, ophd->MinorImageVersion,
326             ophd->MajorSubsystemVersion, ophd->MinorSubsystemVersion);
327
328           /* test if it is an external (native) dll */
329           if (!(wm->flags & WINE_MODREF_INTERNAL))
330           {
331             int i;
332             for (i = 0; special_dlls[i]; i++)
333             {
334               /* test if it is a special dll */
335               if (!strncasecmp(wm->modname, special_dlls[i], strlen(special_dlls[i]) ))
336               {
337                 DWORD DllVersion = VERSION_GetSystemDLLVersion(wm->module);
338                 if (WinVersion == NB_WINDOWS_VERSIONS) 
339                   WinVersion = DllVersion;
340                 else {
341                   if (WinVersion != DllVersion) {
342                     ERR("You mixed system dlls from different windows versions! Expect a crash! (%s: expected version '%s', but is '%s')\n",
343                         wm->modname,
344                         VersionData[WinVersion].getVersionEx.szCSDVersion,
345                         VersionData[DllVersion].getVersionEx.szCSDVersion);
346                     return WIN31; /* this may let the exe exiting */
347                   }
348                 }
349                 break;
350               }
351             }
352           }
353         }
354         
355         if(WinVersion != NB_WINDOWS_VERSIONS) return WinVersion;
356         
357         /* we are using no external system dlls, look at the exe */
358         ophd = &(PE_HEADER(GetModuleHandleA(NULL))->OptionalHeader);
359         
360         TRACE("%02x.%02x/%02x.%02x/%02x.%02x/%02x.%02x\n",
361             ophd->MajorLinkerVersion, ophd->MinorLinkerVersion,
362             ophd->MajorOperatingSystemVersion, ophd->MinorOperatingSystemVersion,
363             ophd->MajorImageVersion, ophd->MinorImageVersion,
364             ophd->MajorSubsystemVersion, ophd->MinorSubsystemVersion);
365
366         /* special nt 3.51 */
367         if (3 == ophd->MajorOperatingSystemVersion && 51 == ophd->MinorOperatingSystemVersion)
368         {
369             return NT351;
370         }
371
372         /* the MajorSubsystemVersion is the only usable sign */
373         if (ophd->MajorSubsystemVersion < 4)
374         {
375           if ( ophd->MajorOperatingSystemVersion == 1 
376             && ophd->MinorOperatingSystemVersion == 0)
377           {
378             return WIN31; /* win32s */
379           }
380           
381           if (ophd->Subsystem == IMAGE_SUBSYSTEM_WINDOWS_CUI)
382             return NT351; /* FIXME: NT 3.1, not tested */
383           else
384             return WIN95;
385         }       
386
387         return WIN95;
388 }
389
390 /**********************************************************************
391  *         VERSION_GetVersion
392  *
393  * WARNING !!!
394  * Don't call this function too early during the Wine init,
395  * as pdb->exe_modref (required by VERSION_GetImageVersion()) might still
396  * be NULL in such cases, which causes the winver to ALWAYS be detected
397  * as WIN31.
398  * And as we cache the winver once it has been determined, this is bad.
399  * This can happen much easier than you might think, as this function
400  * is called by EVERY GetVersion*() API !
401  *
402  */
403 static WINDOWS_VERSION VERSION_GetVersion(void)
404 {
405     static WORD winver = 0xffff;
406
407     if (winver == 0xffff) /* to be determined */
408     {
409         WINDOWS_VERSION retver;
410           
411         if (versionForced) /* user has overridden any sensible checks */
412             winver = defaultWinVersion;
413         else
414         {
415             retver = VERSION_GetLinkedDllVersion();
416
417             /* cache determined value, but do not store in case of WIN31 */
418             if (retver != WIN31) winver = retver;
419
420             return retver;
421         }
422     }
423
424     return winver;
425 }
426
427
428 /***********************************************************************
429  *         GetVersion   (KERNEL.3)
430  */
431 LONG WINAPI GetVersion16(void)
432 {
433     WINDOWS_VERSION ver = VERSION_GetVersion();
434     return VersionData[ver].getVersion16;
435 }
436
437
438 /***********************************************************************
439  *         GetVersion   (KERNEL32.@)
440  */
441 LONG WINAPI GetVersion(void)
442 {
443     WINDOWS_VERSION ver = VERSION_GetVersion();
444     return VersionData[ver].getVersion32;
445 }
446
447
448 /***********************************************************************
449  *         GetVersionEx   (KERNEL.149)
450  */
451 BOOL16 WINAPI GetVersionEx16(OSVERSIONINFO16 *v)
452 {
453     WINDOWS_VERSION ver = VERSION_GetVersion();
454     if (v->dwOSVersionInfoSize < sizeof(OSVERSIONINFO16))
455     {
456         WARN("wrong OSVERSIONINFO size from app\n");
457         SetLastError(ERROR_INSUFFICIENT_BUFFER);
458         return FALSE;
459     }
460     v->dwMajorVersion = VersionData[ver].getVersionEx.dwMajorVersion;
461     v->dwMinorVersion = VersionData[ver].getVersionEx.dwMinorVersion;
462     v->dwBuildNumber  = VersionData[ver].getVersionEx.dwBuildNumber;
463     v->dwPlatformId   = VersionData[ver].getVersionEx.dwPlatformId;
464     strcpy( v->szCSDVersion, VersionData[ver].getVersionEx.szCSDVersion );
465     return TRUE;
466 }
467
468
469 /***********************************************************************
470  *         GetVersionExA   (KERNEL32.@)
471  */
472 BOOL WINAPI GetVersionExA(OSVERSIONINFOA *v)
473 {
474     WINDOWS_VERSION ver = VERSION_GetVersion();
475     if (v->dwOSVersionInfoSize < sizeof(OSVERSIONINFOA))
476     {
477         WARN("wrong OSVERSIONINFO size from app (got: %ld, expected: %d)\n",
478                         v->dwOSVersionInfoSize, sizeof(OSVERSIONINFOA));
479         SetLastError(ERROR_INSUFFICIENT_BUFFER);
480         return FALSE;
481     }
482     v->dwMajorVersion = VersionData[ver].getVersionEx.dwMajorVersion;
483     v->dwMinorVersion = VersionData[ver].getVersionEx.dwMinorVersion;
484     v->dwBuildNumber  = VersionData[ver].getVersionEx.dwBuildNumber;
485     v->dwPlatformId   = VersionData[ver].getVersionEx.dwPlatformId;
486     strcpy( v->szCSDVersion, VersionData[ver].getVersionEx.szCSDVersion );
487     return TRUE;
488 }
489
490
491 /***********************************************************************
492  *         GetVersionExW   (KERNEL32.@)
493  */
494 BOOL WINAPI GetVersionExW(OSVERSIONINFOW *v)
495 {
496     WINDOWS_VERSION ver = VERSION_GetVersion();
497
498     if (v->dwOSVersionInfoSize < sizeof(OSVERSIONINFOW))
499     {
500         WARN("wrong OSVERSIONINFO size from app (got: %ld, expected: %d)\n",
501                         v->dwOSVersionInfoSize, sizeof(OSVERSIONINFOW));
502         SetLastError(ERROR_INSUFFICIENT_BUFFER);
503         return FALSE;
504     }
505     v->dwMajorVersion = VersionData[ver].getVersionEx.dwMajorVersion;
506     v->dwMinorVersion = VersionData[ver].getVersionEx.dwMinorVersion;
507     v->dwBuildNumber  = VersionData[ver].getVersionEx.dwBuildNumber;
508     v->dwPlatformId   = VersionData[ver].getVersionEx.dwPlatformId;
509     MultiByteToWideChar( CP_ACP, 0, VersionData[ver].getVersionEx.szCSDVersion, -1,
510                          v->szCSDVersion, sizeof(v->szCSDVersion)/sizeof(WCHAR) );
511     return TRUE;
512 }
513
514
515
516 /******************************************************************************
517  *        VerifyVersionInfoW   (KERNEL32.@)
518  */
519 BOOL WINAPI VerifyVersionInfoW( /* LPOSVERSIONINFOEXW */ LPVOID lpVersionInfo, DWORD dwTypeMask,
520                                 DWORDLONG dwlConditionMask)
521 {
522     FIXME("%p %lu %llx\n", lpVersionInfo, dwTypeMask, dwlConditionMask);
523     return TRUE;
524 }
525
526
527 /***********************************************************************
528  *          GetWinFlags   (KERNEL.132)
529  */
530 DWORD WINAPI GetWinFlags16(void)
531 {
532   static const long cpuflags[5] =
533     { WF_CPU086, WF_CPU186, WF_CPU286, WF_CPU386, WF_CPU486 };
534   SYSTEM_INFO si;
535   OSVERSIONINFOA ovi;
536   DWORD result;
537
538   GetSystemInfo(&si);
539
540   /* There doesn't seem to be any Pentium flag.  */
541   result = cpuflags[min(si.wProcessorLevel, 4)] | WF_ENHANCED | WF_PMODE | WF_80x87 | WF_PAGING;
542   if (si.wProcessorLevel >= 4) result |= WF_HASCPUID;
543   ovi.dwOSVersionInfoSize = sizeof(ovi);
544   GetVersionExA(&ovi);
545   if (ovi.dwPlatformId == VER_PLATFORM_WIN32_NT)
546       result |= WF_WIN32WOW; /* undocumented WF_WINNT */
547   return result;
548 }
549
550
551 #if 0
552 /* Not used at this time. This is here for documentation only */
553
554 /* WINDEBUGINFO flags values */
555 #define WDI_OPTIONS         0x0001
556 #define WDI_FILTER          0x0002
557 #define WDI_ALLOCBREAK      0x0004
558
559 /* dwOptions values */
560 #define DBO_CHECKHEAP       0x0001
561 #define DBO_BUFFERFILL      0x0004
562 #define DBO_DISABLEGPTRAPPING 0x0010
563 #define DBO_CHECKFREE       0x0020
564
565 #define DBO_SILENT          0x8000
566
567 #define DBO_TRACEBREAK      0x2000
568 #define DBO_WARNINGBREAK    0x1000
569 #define DBO_NOERRORBREAK    0x0800
570 #define DBO_NOFATALBREAK    0x0400
571 #define DBO_INT3BREAK       0x0100
572
573 /* DebugOutput flags values */
574 #define DBF_TRACE           0x0000
575 #define DBF_WARNING         0x4000
576 #define DBF_ERROR           0x8000
577 #define DBF_FATAL           0xc000
578
579 /* dwFilter values */
580 #define DBF_KERNEL          0x1000
581 #define DBF_KRN_MEMMAN      0x0001
582 #define DBF_KRN_LOADMODULE  0x0002
583 #define DBF_KRN_SEGMENTLOAD 0x0004
584 #define DBF_USER            0x0800
585 #define DBF_GDI             0x0400
586 #define DBF_MMSYSTEM        0x0040
587 #define DBF_PENWIN          0x0020
588 #define DBF_APPLICATION     0x0008
589 #define DBF_DRIVER          0x0010
590
591 #endif /* NOLOGERROR */
592
593
594 /***********************************************************************
595  *          GetWinDebugInfo   (KERNEL.355)
596  */
597 BOOL16 WINAPI GetWinDebugInfo16(WINDEBUGINFO16 *lpwdi, UINT16 flags)
598 {
599     FIXME("(%8lx,%d): stub returning 0\n",
600           (unsigned long)lpwdi, flags);
601     /* 0 means not in debugging mode/version */
602     /* Can this type of debugging be used in wine ? */
603     /* Constants: WDI_OPTIONS WDI_FILTER WDI_ALLOCBREAK */
604     return 0;
605 }
606
607
608 /***********************************************************************
609  *          SetWinDebugInfo   (KERNEL.356)
610  */
611 BOOL16 WINAPI SetWinDebugInfo16(WINDEBUGINFO16 *lpwdi)
612 {
613     FIXME("(%8lx): stub returning 0\n", (unsigned long)lpwdi);
614     /* 0 means not in debugging mode/version */
615     /* Can this type of debugging be used in wine ? */
616     /* Constants: WDI_OPTIONS WDI_FILTER WDI_ALLOCBREAK */
617     return 0;
618 }
619
620
621 /***********************************************************************
622  *           K329                    (KERNEL.329)
623  *
624  * TODO:
625  * Should fill lpBuffer only if DBO_BUFFERFILL has been set by SetWinDebugInfo()
626  */
627 void WINAPI DebugFillBuffer(LPSTR lpBuffer, WORD wBytes)
628 {
629         memset(lpBuffer, DBGFILL_BUFFER, wBytes);
630 }
631
632 /***********************************************************************
633  *           DiagQuery                          (KERNEL.339)
634  *
635  * returns TRUE if Win called with "/b" (bootlog.txt)
636  */
637 BOOL16 WINAPI DiagQuery16()
638 {
639         /* perhaps implement a Wine "/b" command line flag sometime ? */
640         return FALSE;
641 }
642
643 /***********************************************************************
644  *           DiagOutput                         (KERNEL.340)
645  *
646  * writes a debug string into <windir>\bootlog.txt
647  */
648 void WINAPI DiagOutput16(LPCSTR str)
649 {
650         /* FIXME */
651         DPRINTF("DIAGOUTPUT:%s\n", debugstr_a(str));
652 }