VirtualBox

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

Last change on this file since 428 was 1, checked in by vboxsync, 55 years ago

import

  • 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 InnoTek Systemberatung 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 __WIN__
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 __WIN__
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# define STDMETHODIMP unsigned long
52# define STDMETHOD(a) virtual unsigned long a
53# define S_OK 0
54
55# if ! defined(E_NOTIMPL)
56# define E_NOTIMPL ((unsigned long) 0x80004001L)
57# endif
58# define E_POINTER ((unsigned long) 0x80004003L)
59# define E_FAIL ((unsigned long) 0x80004005L)
60# define E_UNEXPECTED ((unsigned long) 0x8000ffffL)
61# define E_INVALIDARG ((unsigned long) 0x80070057L)
62
63# if ! defined(FALSE)
64# define FALSE false
65# endif
66
67# if ! defined(TRUE)
68# define TRUE true
69# endif
70
71# define SUCCEEDED NS_SUCCEEDED
72# define FAILED NS_FAILED
73#endif /* !__WIN__ */
74
75#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