3 * Utility program: Manually trigger the removal of the DOSNTAST driver.
4 * (C) 2011-2012 Jonathan Campbell.
5 * Hackipedia DOS library.
7 * This code is licensed under the LGPL.
8 * <insert LGPL legal text here>
10 * If a program using DOSNTAST fails to unload the driver, it will remain resident.
11 * This program allows you to remove it manually if that happens. */
25 #include <hw/cpu/cpu.h>
26 #include <hw/dos/dos.h>
27 #include <hw/dos/doswin.h>
28 #include <hw/dos/dosbox.h>
29 #include <hw/dos/dosntvdm.h>
32 # define WINFCON_STOCK_WIN_MAIN
33 # include <hw/dos/winfcon.h>
37 /* probe_dos() and detect_windows() should NOT auto-load the DOSNTAST driver.
38 * we're going to unload it if resident. */
39 lib_dos_option.dont_load_dosntast=1;
42 printf("DOS version %x.%02u\n",dos_version>>8,dos_version&0xFF);
43 printf(" Method: '%s'\n",dos_version_method);
45 if (detect_windows()) {
46 printf("I am running under Windows.\n");
47 printf(" Mode: %s\n",windows_mode_str(windows_mode));
48 printf(" Ver: %x.%u\n",windows_version>>8,windows_version&0xFF);
49 printf(" Method: '%s'\n",windows_version_method);
50 if (windows_emulation != WINEMU_NONE)
51 printf(" Emulation: '%s'\n",windows_emulation_str(windows_emulation));
52 if (windows_emulation_comment_str != NULL)
53 printf(" Emulation comment: '%s'\n",windows_emulation_comment_str);
56 printf("Not running under Windows or OS/2\n");
59 #if defined(NTVDM_CLIENT) && !defined(TARGET_WINDOWS)
60 if (ntvdm_dosntast_handle != DOSNTAST_HANDLE_UNASSIGNED) {
61 printf("DOSNTAST.VDD driver was loaded (handle=%u), unloading...\n",ntvdm_dosntast_handle);
62 ntvdm_dosntast_unload();