VirtualBox

source: vbox/trunk/src/VBox/Frontends/VBoxBFE/COMDefs.h@ 6603

Last change on this file since 6603 was 5999, checked in by vboxsync, 17 years ago

The Giant CDDL Dual-License Header Change.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/** @file
2 * VBox frontends: Basic Frontend (BFE):
3 * COM definitions
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 COMDefs_H
19#define COMDefs_H
20
21#ifdef RT_OS_WINDOWS
22# include <Windows.h>
23#endif
24#include <stdarg.h>
25#include <iprt/assert.h>
26
27/* This is a transitional file used to get rid of all COM
28 * definitions from COM/XPCOM. */
29
30#define COMGETTER(n) get_##n
31#define COMSETTER(n) put_##n
32
33#define NS_LIKELY(x) RT_LIKELY(x)
34#define NS_UNLIKELY(x) RT_UNLIKELY(x)
35
36#define NS_SUCCEEDED(_nsresult) (NS_LIKELY(!((_nsresult) & 0x80000000)))
37#define NS_FAILED(_nsresult) (NS_UNLIKELY((_nsresult) & 0x80000000))
38
39#define ATL_NO_VTABLE
40
41#ifndef RT_OS_WINDOWS
42 typedef unsigned long HRESULT;
43 typedef unsigned long ULONG; /// @todo 64-bit: ULONG is 32-bit.
44 typedef signed long LONG; /// @todo 64-bit: ULONG is 32-bit.
45 typedef unsigned short USHORT;
46 typedef bool BOOL;
47 typedef unsigned char BYTE;
48# define STDMETHODIMP unsigned long
49# define STDMETHOD(a) virtual unsigned long a
50# define S_OK 0
51
52# if ! defined(E_NOTIMPL)
53# define E_NOTIMPL ((unsigned long) 0x80004001L)
54# endif
55# define E_POINTER ((unsigned long) 0x80004003L)
56# define E_FAIL ((unsigned long) 0x80004005L)
57# define E_UNEXPECTED ((unsigned long) 0x8000ffffL)
58# define E_INVALIDARG ((unsigned long) 0x80070057L)
59
60# if ! defined(FALSE)
61# define FALSE false
62# endif
63
64# if ! defined(TRUE)
65# define TRUE true
66# endif
67
68# define SUCCEEDED NS_SUCCEEDED
69# define FAILED NS_FAILED
70#endif /* !RT_OS_WINDOWS */
71
72#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