VBoxMPUtils.h revision b82914bc22e128708efefbaf9c93540dbc1711da
/* $Id$ */
/** @file
* VBox Miniport common utils header
*/
/*
* Copyright (C) 2011 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.
*/
#ifndef VBOXMPUTILS_H
#define VBOXMPUTILS_H
/*Sanity check*/
#if defined(VBOX_XPDM_MINIPORT)==defined(VBOX_WDDM_MINIPORT)
#endif
#define LOG_GROUP LOG_GROUP_DRV_MINIPORT
#define VBOX_VIDEO_LOG_NAME "VBoxMP"
#ifdef VBOX_WDDM_MINIPORT
# ifndef VBOX_WDDM_MINIPORT_WITH_FLOW_LOGGING
# define VBOX_VIDEO_LOGFLOW_LOGGER(_m) do {} while (0)
# endif
#endif
#include "common/VBoxVideoLog.h"
#ifdef VBOX_XPDM_MINIPORT
# include <dderror.h>
# include <devioctl.h>
#else
# ifdef PAGE_SIZE
# endif
# ifdef PAGE_SHIFT
# endif
# define VBOX_WITH_WORKAROUND_MISSING_PACK
# endif
# include <ntddk.h>
# pragma warning(default : 4163)
# pragma pack()
# pragma warning(default : 4103)
# endif
# else
# include <ntddk.h>
# endif
# include <dispmprt.h>
# include <ntddvdeo.h>
# include <dderror.h>
#endif
/*Windows version identifier*/
typedef enum
{
UNKNOWN_WINVERSION = 0,
WINNT4 = 1,
WIN2K = 2,
WINXP = 3,
WINVISTA = 4,
WIN7 = 5,
WIN8 = 6
bool VBoxQueryHostWantsAbsolute();
#define VBOXMP_WARN_VPS_NOBP(_vps) \
{ \
}
#define VBOXMP_WARN_VPS(_vps) \
{ \
}
#define VBOXMP_CHECK_VPS_BREAK(_vps) \
{ \
break; \
}
#ifdef DEBUG_misha
/* specifies whether the vboxVDbgBreakF should break in the debugger
* windbg seems to have some issues when there is a lot ( >~50) of sw breakpoints defined
* to simplify things we just insert breaks for the case of intensive debugging WDDM driver*/
extern int g_bVBoxVDbgBreakF;
extern int g_bVBoxVDbgBreakFv;
#else
#define vboxVDbgBreakF() do { } while (0)
#define vboxVDbgBreakFv() do { } while (0)
#endif
#endif /*VBOXMPUTILS_H*/