Wrapper.h revision 521114694b1ff46f514becb37c72dbf1f2dd7714
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * VirtualBox COM: API wrapper helpers
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * Copyright (C) 2012-2013 Oracle Corporation
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * available from http://www.virtualbox.org. This file is free software;
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * you can redistribute it and/or modify it under the terms of the GNU
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * General Public License (GPL) as published by the Free Software
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * Checks that the given pointer to an output argument is valid and throws
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * E_POINTER + extended error info otherwise.
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync * @param arg Pointer argument.
76f5d3db08b007661ae4af93200838d24683af52vboxsync tr("Output argument %s points to invalid memory location (%p)"), \
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync } while (0)
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync#else // !VBOX_WITH_XPCOM
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync#endif // !VBOX_WITH_XPCOM
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync ArrayBSTROutConverter(ComSafeArrayOut(BSTR, aDst)) :
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync#else // !VBOX_WITH_XPCOM
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync#endif // !VBOX_WITH_XPCOM
6b9316bfe743cc7d2ee00d925f4ab455bc224e86vboxsync#else // !VBOX_WITH_XPCOM
0c9573129c50b7f9f4ea54e61417c2ed06bb8ebavboxsync#endif // !VBOX_WITH_XPCOM
fbf482cad760a830bc8789ad639162019954ba80vboxsync ArrayBSTRInConverter(ComSafeArrayIn(IN_BSTR, aSrc))
fbf482cad760a830bc8789ad639162019954ba80vboxsync com::SafeArray<BSTR> inArray(ComSafeArrayInArg(aSrc));
3455d9b135d41903504b9be3f4eeaa038f6ee03avboxsync#else // !VBOX_WITH_XPCOM
7fa9b0ac0a9faf4aedbd3b53aa0cb2b81be99ee6vboxsync#endif // !VBOX_WITH_XPCOM
8a99522dee886d4ed00c8cd18788e9e722febd71vboxsync ArrayUuidOutConverter(ComSafeArrayOut(BSTR, aDst)) :
8a99522dee886d4ed00c8cd18788e9e722febd71vboxsync#else // !VBOX_WITH_XPCOM
badc6d0a88e64de11285f73127a7e1651b69a00bvboxsync#endif // !VBOX_WITH_XPCOM
return mArray;
#ifdef VBOX_WITH_XPCOM
if (mDst)
return mPtr;
A **mDst;
return mSrc;
#ifdef VBOX_WITH_XPCOM
#ifdef VBOX_WITH_XPCOM
if (mDst)
return mArray;
#ifdef VBOX_WITH_XPCOM
A **mDst;
return mArray;
#ifdef VBOX_WITH_XPCOM
#ifdef VBOX_WITH_XPCOM
if (mDst)
return mArray;
#ifdef VBOX_WITH_XPCOM
A **mDst;
return mArray;