1 | /* $Id: SUPR0IdcClientInternal.h 10258 2008-07-04 23:31:26Z 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 | __BEGIN_DECLS
|
---|
45 | # include <ntddk.h>
|
---|
46 | __END_DECLS
|
---|
47 | # undef _InterlockedExchange
|
---|
48 | # undef _InterlockedExchangeAdd
|
---|
49 | # undef _InterlockedCompareExchange
|
---|
50 | # undef _InterlockedAddLargeStatistic
|
---|
51 | # else
|
---|
52 | __BEGIN_DECLS
|
---|
53 | # include <ntddk.h>
|
---|
54 | __END_DECLS
|
---|
55 | # endif
|
---|
56 | #endif /* RT_OS_WINDOWS */
|
---|
57 |
|
---|
58 |
|
---|
59 | /**
|
---|
60 | * The hidden part of SUPDRVIDCHANDLE.
|
---|
61 | */
|
---|
62 | struct SUPDRVIDCHANDLEPRIVATE
|
---|
63 | {
|
---|
64 | /** Pointer to the session handle. */
|
---|
65 | PSUPDRVSESSION pSession;
|
---|
66 | # ifdef RT_OS_WINDOWS
|
---|
67 | /** Pointer to the NT device object. */
|
---|
68 | PDEVICE_OBJECT pDeviceObject;
|
---|
69 | /** Pointer to the NT file object. */
|
---|
70 | PFILE_OBJECT pFileObject;
|
---|
71 | # endif
|
---|
72 | };
|
---|
73 | /** Indicate that the structure is present. */
|
---|
74 | #define SUPDRVIDCHANDLEPRIVATE_DECLARED 1
|
---|
75 |
|
---|
76 | #include <VBox/sup.h>
|
---|
77 | #include "SUPDrvIDC.h"
|
---|
78 | AssertCompile(RT_SIZEOFMEMB(SUPDRVIDCHANDLE, apvPadding) >= sizeof(struct SUPDRVIDCHANDLEPRIVATE));
|
---|
79 |
|
---|
80 | __BEGIN_DECLS
|
---|
81 | PSUPDRVIDCHANDLE supR0IdcGetHandleFromSession(PSUPDRVSESSION pSession);
|
---|
82 | int VBOXCALL supR0IdcNativeOpen(PSUPDRVIDCHANDLE pHandle, PSUPDRVIDCREQCONNECT pReq);
|
---|
83 | int VBOXCALL supR0IdcNativeClose(PSUPDRVIDCHANDLE pHandle, PSUPDRVIDCREQHDR pReq);
|
---|
84 | int VBOXCALL supR0IdcNativeCall(PSUPDRVIDCHANDLE pHandle, uint32_t iReq, PSUPDRVIDCREQHDR pReq);
|
---|
85 | __END_DECLS
|
---|
86 |
|
---|
87 | #endif
|
---|
88 |
|
---|