COMDefs.h revision e64031e20c39650a7bc902a3e1aba613b9415dee
/** @file
* VBox frontends: Basic Frontend (BFE):
* COM definitions
*/
/*
* Copyright (C) 2006-2007 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef COMDefs_H
#define COMDefs_H
#ifdef RT_OS_WINDOWS
# include <Windows.h>
#endif
#include <stdarg.h>
/* This is a transitional file used to get rid of all COM
#define NS_UNLIKELY(x) RT_UNLIKELY(x)
#define ATL_NO_VTABLE
#define DECLARE_CLASSFACTORY(a)
#define DECLARE_CLASSFACTORY_SINGLETON(a)
#define DECLARE_REGISTRY_RESOURCEID(a)
#define DECLARE_NOT_AGGREGATABLE(a)
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
#define BEGIN_COM_MAP(a)
#define COM_INTERFACE_ENTRY(a)
#define COM_INTERFACE_ENTRY2(a,b)
#define END_COM_MAP()
#ifndef RT_OS_WINDOWS
typedef unsigned long HRESULT;
typedef unsigned long ULONG; /// @todo 64-bit: ULONG is 32-bit.
typedef signed long LONG; /// @todo 64-bit: ULONG is 32-bit.
typedef unsigned short USHORT;
typedef bool BOOL;
typedef unsigned char BYTE;
# define STDMETHODIMP unsigned long
# define S_OK 0
# if ! defined(E_NOTIMPL)
# define E_NOTIMPL ((unsigned long) 0x80004001L)
# endif
# define E_POINTER ((unsigned long) 0x80004003L)
# define E_FAIL ((unsigned long) 0x80004005L)
# define E_UNEXPECTED ((unsigned long) 0x8000ffffL)
# define E_INVALIDARG ((unsigned long) 0x80070057L)
#define E_ACCESSDENIED ((unsigned long) 0x80070005L)
# if ! defined(FALSE)
# define FALSE false
# endif
# if ! defined(TRUE)
# define TRUE true
# endif
# define SUCCEEDED NS_SUCCEEDED
#define ComSafeArrayAsInParam(aArray) \
#else /* !RT_OS_WINDOWS */
#endif /* !RT_OS_WINDOWS */
{
T t;
T *raw() { return &t; }
};
}
#endif