VBoxDispCm.cpp revision c80170800394cbf2746e3136b41886c2d11617ae
/** @file
*
* VBoxVideo Display D3D User mode dll
*
* Copyright (C) 2010 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 "VBoxDispD3DCmn.h"
#include "VBoxDispD3D.h"
#include "../../../include/VBoxDisplay.h"
typedef struct VBOXDISPCM_SESSION
{
bool bQueryMp;
typedef struct VBOXDISPCM_MGR
{
/* the cm is one per process */
static VBOXDISPCM_MGR g_pVBoxCmMgr;
{
if (bRc)
{
return S_OK;
}
return hr;
}
{
FALSE, /* BOOL bManualReset */
FALSE, /* BOOL bInitialState */
NULL /* LPCTSTR lpName */
);
if (hEvent)
{
return S_OK;
}
return hr;
}
{
}
{
}
{
}
{
return hr;
}
{
return hr;
}
{
Info.enmType = VBOXDISPMODE_IS_3D(pDevice->pAdapter) ? VBOXWDDM_CONTEXT_TYPE_CUSTOM_3D : VBOXWDDM_CONTEXT_TYPE_CUSTOM_2D;
{
}
else
{
exit(1);
}
return hr;
}
HRESULT vboxDispCmSessionCtxDestroy(PVBOXDISPCM_SESSION pSession, PVBOXWDDMDISP_DEVICE pDevice, PVBOXWDDMDISP_CONTEXT pContext)
{
{
}
return hr;
}
{
}
static HRESULT vboxDispCmSessionCmdQueryData(PVBOXDISPCM_SESSION pSession, PVBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD pCmd, uint32_t cbCmd)
{
/* lock to ensure the context is not destroyed */
/* use any context for identifying the kernel CmSession. We're using the first one */
PVBOXWDDMDISP_CONTEXT pContext = RTListGetFirst(&pSession->CtxList, VBOXWDDMDISP_CONTEXT, ListNode);
if (pContext)
{
{
}
else
{
exit(1);
}
}
else
{
}
return hr;
}
HRESULT vboxDispCmSessionCmdGet(PVBOXDISPCM_SESSION pSession, PVBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD pCmd, uint32_t cbCmd, DWORD dwMilliseconds)
{
if (cbCmd < sizeof (VBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD))
return E_INVALIDARG;
do
{
{
{
return hr;
}
}
switch(dwResult)
{
case WAIT_OBJECT_0:
{
break; /* <- query commands */
}
case WAIT_TIMEOUT:
{
return WAIT_TIMEOUT;
}
default:
Assert(0);
return E_FAIL;
}
} while (1);
/* should never be here */
Assert(0);
return E_FAIL;
}
HRESULT vboxDispCmCmdGet(PVBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD pCmd, uint32_t cbCmd, DWORD dwMilliseconds)
{
}
{
/* use any context for identifying the kernel CmSession. We're using the first one */
PVBOXWDDMDISP_CONTEXT pContext = RTListGetFirst(&pSession->CtxList, VBOXWDDMDISP_CONTEXT, ListNode);
if (pContext)
{
}
}