VirtualBox

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

Last change on this file since 8366 was 8155, checked in by vboxsync, 17 years ago

The Big Sun Rebranding Header Change

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1/* $Id: VBGLR3Internal.h 8155 2008-04-18 15:16:47Z vboxsync $ */
2/** @file
3 * VBoxGuestR3Lib - Ring-3 support library for the guest additions, Internal header.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21
22#ifndef ___VBGLR3Internal_h
23#define ___VBGLR3Internal_h
24
25#include <VBox/VBoxGuest.h>
26
27__BEGIN_DECLS
28
29int vbglR3DoIOCtl(unsigned iFunction, void *pvData, size_t cbData);
30int vbglR3GRAlloc(VMMDevRequestHeader **ppReq, uint32_t cb, VMMDevRequestType enmReqType);
31int vbglR3GRPerform(VMMDevRequestHeader *pReq);
32void vbglR3GRFree(VMMDevRequestHeader *pReq);
33
34
35
36DECLINLINE(void) VbglHGCMParmUInt32Set(HGCMFunctionParameter *pParm, uint32_t u32)
37{
38 pParm->type = VMMDevHGCMParmType_32bit;
39 pParm->u.value64 = 0; /* init unused bits to 0 */
40 pParm->u.value32 = u32;
41}
42
43
44DECLINLINE(int) VbglHGCMParmUInt32Get(HGCMFunctionParameter *pParm, uint32_t *pu32)
45{
46 if (pParm->type == VMMDevHGCMParmType_32bit)
47 {
48 *pu32 = pParm->u.value32;
49 return VINF_SUCCESS;
50 }
51 return VERR_INVALID_PARAMETER;
52}
53
54
55DECLINLINE(void) VbglHGCMParmPtrSet(HGCMFunctionParameter *pParm, void *pv, uint32_t cb)
56{
57 pParm->type = VMMDevHGCMParmType_LinAddr;
58 pParm->u.Pointer.size = cb;
59 pParm->u.Pointer.u.linearAddr = (vmmDevHypPtr)pv;
60}
61
62__END_DECLS
63
64#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