/* $Id$ */
/** @file
* VBox Miniport utils
*/
/*
* Copyright (C) 2011-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include "VBoxMPUtils.h"
#ifdef VBOX_XPDM_MINIPORT
# include <ntddk.h>
#endif
#include <VBox/VBoxGuestLib.h>
#ifdef DEBUG_misha
/* specifies whether the vboxVDbgBreakF should break in the debugger
* windbg seems to have some issues when there is a lot ( >32) of sw breakpoints defined
* to simplify things we just insert breaks for the case of intensive debugging WDDM driver*/
#ifndef VBOX_WDDM_WIN8
int g_bVBoxVDbgBreakF = 0;
int g_bVBoxVDbgBreakFv = 0;
#else
int g_bVBoxVDbgBreakF = 0;
int g_bVBoxVDbgBreakFv = 0;
#endif
#endif
/*Returns the windows version we're running on*/
{
if (s_WinVersion != WINVERSION_UNKNOWN)
return s_WinVersion;
if (major > 6)
{
/* Everything newer than Windows 8.1, i.e. Windows 10 with major == 10. */
}
else if (major == 6)
{
if (minor >= 4)
else if (minor == 3)
else if (minor == 2)
else if (minor == 1)
else if (minor == 0)
}
else if (major == 5)
else if (major == 4)
else
WARN(("NT4 required!"));
return s_WinVersion;
}
{
int rc;
LOGF_ENTER();
rc = VbglGRAlloc((VMMDevRequestHeader**)&req, sizeof(VMMDevGetHeightReductionRequest), VMMDevReq_GetHeightReduction);
if (RT_FAILURE(rc))
{
}
else
{
if (RT_SUCCESS(rc))
{
}
else
{
}
}
LOGF_LEAVE();
return retHeight;
}
{
int rc = VbglGRAlloc((VMMDevRequestHeader**)&req2, sizeof(VMMDevVideoModeSupportedRequest2), VMMDevReq_VideoModeSupported2);
if (RT_FAILURE(rc))
{
/* Most likely the VBoxGuest driver is not loaded.
* To get at least the video working, report the mode as supported.
*/
}
else
{
if (RT_SUCCESS(rc))
{
}
else
{
/* Retry using old interface. */
if (RT_SUCCESS(rc))
{
}
else
{
}
}
}
return bRC;
}
{
LOGF_ENTER();
int rc = VbglGRAlloc ((VMMDevRequestHeader **)&req, sizeof (VMMDevDisplayChangeRequest2), VMMDevReq_GetDisplayChangeRequest2);
if (RT_FAILURE(rc))
{
}
else
{
if (RT_SUCCESS(rc))
{
if (xres)
if (yres)
if (bpp)
if (pDisplayId)
}
else
{
}
}
LOGF_LEAVE();
return bRC;
}
{
int rc = VbglGRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevReqMouseStatus), VMMDevReq_GetMouseStatus);
if (RT_FAILURE(rc))
{
}
else
{
if (RT_SUCCESS(rc))
{
{
if (pPosX)
{
}
if (pPosY)
{
}
}
}
else
{
}
}
return bRC;
}
/* Returns if the host wants us to take absolute pointer coordinates. */
bool VBoxQueryHostWantsAbsolute()
{
}
{
{
return FALSE;
}
}