VBoxMPCr.cpp revision 2721dfb0e330d57ba888311520f5a343c64e7cef
/* $Id$ */
/** @file
* VBox WDDM Miniport driver
*/
/*
* Copyright (C) 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 "VBoxMPWddm.h"
#include "VBoxMPCr.h"
#include <cr_protocol.h>
{
if (pCrCtlCon->cCrCtlRefs++)
return VINF_ALREADY_INITIALIZED;
if (RT_SUCCESS(rc))
{
return VINF_SUCCESS;
}
--pCrCtlCon->cCrCtlRefs;
return rc;
}
{
if (--pCrCtlCon->cCrCtlRefs)
{
return VINF_SUCCESS;
}
if (RT_SUCCESS(rc))
{
return VINF_SUCCESS;
}
++pCrCtlCon->cCrCtlRefs;
return rc;
}
static int vboxMpCrCtlConSetVersion(PVBOXMP_CRCTLCON pCrCtlCon, uint32_t u32ClientID, uint32_t vMajor, uint32_t vMinor)
{
int rc;
if (RT_FAILURE(rc))
{
return rc;
}
{
}
return VINF_SUCCESS;
}
{
int rc;
if (RT_FAILURE(rc))
{
return rc;
}
{
}
return VINF_SUCCESS;
}
{
if (RT_SUCCESS(rc))
{
if (RT_SUCCESS(rc))
{
if (RT_SUCCESS(rc))
{
if (RT_SUCCESS(rc))
{
return VINF_SUCCESS;
}
else
{
}
}
else
{
}
}
else
{
}
}
else
{
}
*pu32ClientID = 0;
return rc;
}
{
if (RT_SUCCESS(rc))
{
return VINF_SUCCESS;
}
else
{
}
return rc;
}
{
if (RT_SUCCESS(rc))
return VINF_SUCCESS;
return rc;
}
int VBoxMpCrCtlConCallUserData(PVBOXMP_CRCTLCON pCrCtlCon, VBoxGuestHGCMCallInfo *pData, uint32_t cbData)
{
if (RT_SUCCESS(rc))
return VINF_SUCCESS;
return rc;
}
bool VBoxMpCrCtlConIs3DSupported()
{
VBOXMP_CRCTLCON CrCtlCon = {0};
uint32_t u32ClientID = 0;
int rc = VBoxMpCrCtlConConnect(&CrCtlCon, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR, &u32ClientID);
if (RT_FAILURE(rc))
{
LOGREL(("VBoxMpCrCtlConConnect failed with rc(%d), 3D not supported!"));
return false;
}
if (RT_FAILURE(rc))
WARN(("VBoxMpCrCtlConDisconnect failed, ignoring.."));
return true;
}