ErrorInfo.cpp revision b7a72a250fddd0d378b2133d85df85fedd4c83fc
/** @file
*
* ErrorInfo class definition
*/
/*
* Copyright (C) 2006 InnoTek Systemberatung GmbH
*
* 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 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.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*/
#if defined (__WIN__)
#else // !defined (__WIN__)
#include <nsIServiceManager.h>
#include <nsIExceptionService.h>
#include <nsCOMPtr.h>
#include <nsIInterfaceInfo.h>
#include <nsIInterfaceInfoManager.h>
#endif // !defined (__WIN__)
#include "VBox/com/VirtualBox.h"
#include "VBox/com/ErrorInfo.h"
/**
* Resolves a given interface ID to a string containint interface name.
* If, for some reason, the given IID cannot be resolved to a name,
* a NULL string is returned. A non-NULL interface name must be freed
* using SysFreeString().
*/
{
if (!name)
return;
#if defined (__WIN__)
{
if (rc == ERROR_SUCCESS)
{
if (rc == ERROR_SUCCESS)
{
// determine the size and type
{
// query the value to BSTR
if (rc != ERROR_SUCCESS)
{
SysFreeString (*name);
}
}
}
}
}
#else
if (NS_SUCCEEDED (rv))
{
if (NS_SUCCEEDED (rv))
{
{
{
}
}
}
}
#endif
}
namespace com
{
// IErrorInfo class
////////////////////////////////////////////////////////////////////////////////
{
#if defined (__WIN__)
{
if (!mIsFullAvailable)
{
bool gotSomething = false;
if (gotSomething)
mIsBasicAvailable = true;
}
}
#else // !defined (__WIN__)
if (NS_SUCCEEDED (rc))
{
if (NS_SUCCEEDED (rc))
{
{
if (!mIsFullAvailable)
{
bool gotSomething = false;
if (NS_SUCCEEDED (rc))
if (gotSomething)
mIsBasicAvailable = true;
}
// set the exception to NULL (to emulate Win32 behavior)
}
}
}
AssertComRC (rc);
#endif // !defined (__WIN__)
}
{
Assert (i);
if (!i)
return;
#if defined (__WIN__)
{
init();
}
#else // !defined (__WIN__)
init();
#endif // !defined (__WIN__)
if (mIsBasicAvailable)
{
mCalleeIID = iid;
}
}
{
if (!info)
return;
bool gotSomething = false;
if (gotSomething)
mIsFullAvailable = mIsBasicAvailable = true;
}
{
}
{
aPrefix = "";
if (mIsFullAvailable || mIsBasicAvailable)
{
}
}
// IErrorInfo class
////////////////////////////////////////////////////////////////////////////////
ErrorInfo (true)
{
if (!progress)
return;
}
}; // namespace com