VirtualBox

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

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

replace underscore symbols in VBoxBFE/ and VBoxSDL/

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 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 as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 */
21
22#ifndef COMDefs_H
23#define COMDefs_H
24
25#ifdef RT_OS_WINDOWS
26# include <Windows.h>
27#endif
28#include <stdarg.h>
29#include <iprt/assert.h>
30
31/* This is a transitional file used to get rid of all COM
32 * definitions from COM/XPCOM. */
33
34#define COMGETTER(n) get_##n
35#define COMSETTER(n) put_##n
36
37#define NS_LIKELY(x) RT_LIKELY(x)
38#define NS_UNLIKELY(x) RT_UNLIKELY(x)
39
40#define NS_SUCCEEDED(_nsresult) (NS_LIKELY(!((_nsresult) & 0x80000000)))
41#define NS_FAILED(_nsresult) (NS_UNLIKELY((_nsresult) & 0x80000000))
42
43#define ATL_NO_VTABLE
44
45#ifndef RT_OS_WINDOWS
46 typedef unsigned long HRESULT;
47 typedef unsigned long ULONG; /// @todo 64-bit: ULONG is 32-bit.
48 typedef signed long LONG; /// @todo 64-bit: ULONG is 32-bit.
49 typedef unsigned short USHORT;
50 typedef bool BOOL;
51 typedef unsigned char BYTE;
52# define STDMETHODIMP unsigned long
53# define STDMETHOD(a) virtual unsigned long a
54# define S_OK 0
55
56# if ! defined(E_NOTIMPL)
57# define E_NOTIMPL ((unsigned long) 0x80004001L)
58# endif
59# define E_POINTER ((unsigned long) 0x80004003L)
60# define E_FAIL ((unsigned long) 0x80004005L)
61# define E_UNEXPECTED ((unsigned long) 0x8000ffffL)
62# define E_INVALIDARG ((unsigned long) 0x80070057L)
63
64# if ! defined(FALSE)
65# define FALSE false
66# endif
67
68# if ! defined(TRUE)
69# define TRUE true
70# endif
71
72# define SUCCEEDED NS_SUCCEEDED
73# define FAILED NS_FAILED
74#endif /* !RT_OS_WINDOWS */
75
76#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