1 | /* $Id: SUPR0IdcClientInternal.h 20366 2009-06-08 00:21:10Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VirtualBox Support Driver - Internal header for the IDC client library.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2008 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 | * The contents of this file may alternatively be used under the terms
|
---|
18 | * of the Common Development and Distribution License Version 1.0
|
---|
19 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | * CDDL are applicable instead of those of the GPL.
|
---|
22 | *
|
---|
23 | * You may elect to license modified versions of this file under the
|
---|
24 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | *
|
---|
26 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
27 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
28 | * additional information or have any questions.
|
---|
29 | */
|
---|
30 |
|
---|
31 | #ifndef ___SUPR0IdcClientInternal_h__
|
---|
32 | #define ___SUPR0IdcClientInternal_h__
|
---|
33 |
|
---|
34 | #include <VBox/types.h>
|
---|
35 | #include <iprt/assert.h>
|
---|
36 |
|
---|
37 | #ifdef RT_OS_WINDOWS
|
---|
38 | # if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
|
---|
39 | # include <iprt/asm.h>
|
---|
40 | # define _InterlockedExchange _InterlockedExchange_StupidDDKVsCompilerCrap
|
---|
41 | # define _InterlockedExchangeAdd _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
|
---|
42 | # define _InterlockedCompareExchange _InterlockedCompareExchange_StupidDDKVsCompilerCrap
|
---|
43 | # define _InterlockedAddLargeStatistic _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
|
---|
44 | # pragma warning(disable : 4163)
|
---|
45 | RT_BEGIN_DECLS
|
---|
46 | # include <ntddk.h>
|
---|
47 | RT_END_DECLS
|
---|
48 | # pragma warning(default : 4163)
|
---|
49 | # undef _InterlockedExchange
|
---|
50 | # undef _InterlockedExchangeAdd
|
---|
51 | # undef _InterlockedCompareExchange
|
---|
52 | # undef _InterlockedAddLargeStatistic
|
---|
53 | # else
|
---|
54 | RT_BEGIN_DECLS
|
---|
55 | # include <ntddk.h>
|
---|
56 | RT_END_DECLS
|
---|
57 | # endif
|
---|
58 | #endif /* RT_OS_WINDOWS */
|
---|
59 |
|
---|
60 |
|
---|
61 | /**
|
---|
62 | * The hidden part of SUPDRVIDCHANDLE.
|
---|
63 | */
|
---|
64 | struct SUPDRVIDCHANDLEPRIVATE
|
---|
65 | {
|
---|
66 | /** Pointer to the session handle. */
|
---|
67 | PSUPDRVSESSION pSession;
|
---|
68 | # ifdef RT_OS_WINDOWS
|
---|
69 | /** Pointer to the NT device object. */
|
---|
70 | PDEVICE_OBJECT pDeviceObject;
|
---|
71 | /** Pointer to the NT file object. */
|
---|
72 | PFILE_OBJECT pFileObject;
|
---|
73 | # endif
|
---|
74 | };
|
---|
75 | /** Indicate that the structure is present. */
|
---|
76 | #define SUPDRVIDCHANDLEPRIVATE_DECLARED 1
|
---|
77 |
|
---|
78 | #include <VBox/sup.h>
|
---|
79 | #include "SUPDrvIDC.h"
|
---|
80 | AssertCompile(RT_SIZEOFMEMB(SUPDRVIDCHANDLE, apvPadding) >= sizeof(struct SUPDRVIDCHANDLEPRIVATE));
|
---|
81 |
|
---|
82 | RT_BEGIN_DECLS
|
---|
83 | PSUPDRVIDCHANDLE supR0IdcGetHandleFromSession(PSUPDRVSESSION pSession);
|
---|
84 | int VBOXCALL supR0IdcNativeOpen(PSUPDRVIDCHANDLE pHandle, PSUPDRVIDCREQCONNECT pReq);
|
---|
85 | int VBOXCALL supR0IdcNativeClose(PSUPDRVIDCHANDLE pHandle, PSUPDRVIDCREQHDR pReq);
|
---|
86 | int VBOXCALL supR0IdcNativeCall(PSUPDRVIDCHANDLE pHandle, uint32_t iReq, PSUPDRVIDCREQHDR pReq);
|
---|
87 | RT_END_DECLS
|
---|
88 |
|
---|
89 | #endif
|
---|
90 |
|
---|