VirtualBox

source: vbox/trunk/src/VBox/Additions/common/VBoxGuestLib/VBGLR3Internal.h@ 7249

Last change on this file since 7249 was 6470, checked in by vboxsync, 17 years ago

Back to private naming convention.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1/* $Id: VBGLR3Internal.h 6470 2008-01-24 07:09:56Z vboxsync $ */
2/** @file
3 * VBoxGuestR3Lib - Ring-3 support library for the guest additions, Internal header.
4 */
5
6/*
7 * Copyright (C) 2006-2007 innotek GmbH
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 ___VBGLR3Internal_h
19#define ___VBGLR3Internal_h
20
21#include <VBox/VBoxGuest.h>
22
23__BEGIN_DECLS
24
25int vbglR3DoIOCtl(unsigned iFunction, void *pvData, size_t cbData);
26int vbglR3GRAlloc(VMMDevRequestHeader **ppReq, uint32_t cb, VMMDevRequestType enmReqType);
27int vbglR3GRPerform(VMMDevRequestHeader *pReq);
28void vbglR3GRFree(VMMDevRequestHeader *pReq);
29
30
31
32DECLINLINE(void) VbglHGCMParmUInt32Set(HGCMFunctionParameter *pParm, uint32_t u32)
33{
34 pParm->type = VMMDevHGCMParmType_32bit;
35 pParm->u.value32 = u32;
36}
37
38
39DECLINLINE(int) VbglHGCMParmUInt32Get(HGCMFunctionParameter *pParm, uint32_t *pu32)
40{
41 if (pParm->type == VMMDevHGCMParmType_32bit)
42 {
43 *pu32 = pParm->u.value32;
44 return VINF_SUCCESS;
45 }
46 return VERR_INVALID_PARAMETER;
47}
48
49
50DECLINLINE(void) VbglHGCMParmPtrSet(HGCMFunctionParameter *pParm, void *pv, uint32_t cb)
51{
52 pParm->type = VMMDevHGCMParmType_LinAddr;
53 pParm->u.Pointer.size = cb;
54 pParm->u.Pointer.u.linearAddr = (vmmDevHypPtr)pv;
55}
56
57__END_DECLS
58
59#endif
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