VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPCm.h@ 85817

Last change on this file since 85817 was 85121, checked in by vboxsync, 5 years ago

iprt/cdefs.h: Refactored the typedef use of DECLCALLBACK as well as DECLCALLBACKMEMBER to wrap the whole expression, similar to the DECLR?CALLBACKMEMBER macros. This allows adding a throw() at the end when compiling with the VC++ compiler to indicate that the callbacks won't throw anything, so we can stop supressing the C5039 warning about passing functions that can potential throw C++ exceptions to extern C code that can't necessarily cope with such (unwind,++). Introduced a few _EX variations that allows specifying different/no calling convention too, as that's handy when dynamically resolving host APIs. Fixed numerous places missing DECLCALLBACK and such. Left two angry @todos regarding use of CreateThread. bugref:9794

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/* $Id: VBoxMPCm.h 85121 2020-07-08 19:33:26Z vboxsync $ */
2/** @file
3 * VBox WDDM Miniport driver
4 */
5
6/*
7 * Copyright (C) 2011-2020 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef GA_INCLUDED_SRC_WINNT_Graphics_Video_mp_wddm_VBoxMPCm_h
19#define GA_INCLUDED_SRC_WINNT_Graphics_Video_mp_wddm_VBoxMPCm_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24typedef struct VBOXVIDEOCM_MGR
25{
26 KSPIN_LOCK SynchLock;
27 /* session list */
28 LIST_ENTRY SessionList;
29} VBOXVIDEOCM_MGR, *PVBOXVIDEOCM_MGR;
30
31typedef struct VBOXVIDEOCM_CTX
32{
33 LIST_ENTRY SessionEntry;
34 struct VBOXVIDEOCM_SESSION *pSession;
35 uint64_t u64UmData;
36 VBOXWDDM_HTABLE AllocTable;
37} VBOXVIDEOCM_CTX, *PVBOXVIDEOCM_CTX;
38
39void vboxVideoCmCtxInitEmpty(PVBOXVIDEOCM_CTX pContext);
40
41NTSTATUS vboxVideoCmCtxAdd(PVBOXVIDEOCM_MGR pMgr, PVBOXVIDEOCM_CTX pContext, HANDLE hUmEvent, uint64_t u64UmData);
42NTSTATUS vboxVideoCmCtxRemove(PVBOXVIDEOCM_MGR pMgr, PVBOXVIDEOCM_CTX pContext);
43NTSTATUS vboxVideoCmInit(PVBOXVIDEOCM_MGR pMgr);
44NTSTATUS vboxVideoCmTerm(PVBOXVIDEOCM_MGR pMgr);
45NTSTATUS vboxVideoCmSignalEvents(PVBOXVIDEOCM_MGR pMgr);
46
47NTSTATUS vboxVideoCmCmdSubmitCompleteEvent(PVBOXVIDEOCM_CTX pContext, PKEVENT pEvent);
48void* vboxVideoCmCmdCreate(PVBOXVIDEOCM_CTX pContext, uint32_t cbSize);
49void* vboxVideoCmCmdReinitForContext(void *pvCmd, PVBOXVIDEOCM_CTX pContext);
50void vboxVideoCmCmdRetain(void *pvCmd);
51void vboxVideoCmCmdRelease(void *pvCmd);
52#define VBOXVIDEOCM_SUBMITSIZE_DEFAULT (~0UL)
53void vboxVideoCmCmdSubmit(void *pvCmd, uint32_t cbSize);
54
55#define VBOXVIDEOCMCMDVISITOR_RETURN_BREAK 0x00000001
56#define VBOXVIDEOCMCMDVISITOR_RETURN_RMCMD 0x00000002
57typedef DECLCALLBACKTYPE(UINT, FNVBOXVIDEOCMCMDVISITOR,(PVBOXVIDEOCM_CTX pContext, PVOID pvCmd, uint32_t cbCmd, PVOID pvVisitor));
58typedef FNVBOXVIDEOCMCMDVISITOR *PFNVBOXVIDEOCMCMDVISITOR;
59NTSTATUS vboxVideoCmCmdVisit(PVBOXVIDEOCM_CTX pContext, BOOLEAN bEntireSession, PFNVBOXVIDEOCMCMDVISITOR pfnVisitor, PVOID pvVisitor);
60
61NTSTATUS vboxVideoCmEscape(PVBOXVIDEOCM_CTX pContext, PVBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD pCmd, uint32_t cbCmd);
62
63#endif /* !GA_INCLUDED_SRC_WINNT_Graphics_Video_mp_wddm_VBoxMPCm_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette