[CMAKE]
[reactos.git] / reactos / base / setup / vmwinst / vmwinst.c
index 4d2f0e5..3079ef2 100644 (file)
  * PROGRAMMERS: Thomas Weidenmueller (w3seek@users.sourceforge.net)
  *              Klemens Friedl (frik85@hotmail.com)
  */
-#include <windows.h>
-#include <commctrl.h>
+
+#include <stdarg.h>
+#include <windef.h>
+#include <winbase.h>
+#include <winreg.h>
+#include <wingdi.h>
+#include <winuser.h>
 #include <newdev.h>
-#include <stdio.h>
-#include <string.h>
 #include <pseh/pseh2.h>
-#include "vmwinst.h"
 #include <debug.h>
 
+#include "vmwinst.h"
+
 extern VOID CALLBACK InstallHinfSectionW(HWND hwnd, HINSTANCE ModuleHandle,
                                          PCWSTR CmdLineBuffer, INT nCmdShow);
 
@@ -92,14 +96,14 @@ DetectVMware(int *Version)
                }
 #elif defined(_MSC_VER) && defined(_M_AMD64)
     DPRINT1("DetectVMware stub\n");
-    return FALSE;
+    _SEH2_YIELD(return FALSE);
 #else
 #error TODO
 #endif
        }
        _SEH2_EXCEPT(_SEH2_GetExceptionCode() == EXCEPTION_PRIV_INSTRUCTION ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
        {
-               return FALSE;
+               _SEH2_YIELD(return FALSE);
        }
        _SEH2_END;
 
@@ -169,14 +173,16 @@ CenterWindow(HWND hWnd)
 static BOOL
 IsVMwareCDInDrive(WCHAR *Drv)
 {
+#if CHECKDRIVETYPE
     static WCHAR Drive[4] = L"X:\\";
+#endif
     WCHAR Current;
 
     *Drv = L'\0';
     for(Current = 'C'; Current <= 'Z'; Current++)
     {
-        Drive[0] = Current;
 #if CHECKDRIVETYPE
+        Drive[0] = Current;
         if(GetDriveType(Drive) == DRIVE_CDROM)
         {
 #endif