com.cpp revision e64031e20c39650a7bc902a3e1aba613b9415dee
/* $Id$ */
/** @file
* MS COM / XPCOM Abstraction Layer
*/
/*
* 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.
*/
#if !defined (VBOX_WITH_XPCOM)
# include <objbase.h>
#else /* !defined (VBOX_WITH_XPCOM) */
# include <stdlib.h>
# include <nsCOMPtr.h>
# include <nsIServiceManagerUtils.h>
# include <nsIInterfaceInfo.h>
# include <nsIInterfaceInfoManager.h>
#endif /* !defined (VBOX_WITH_XPCOM) */
#ifdef RT_OS_DARWIN
# define VBOX_USER_HOME_SUFFIX "Library/VirtualBox"
#else
# define VBOX_USER_HOME_SUFFIX ".VirtualBox"
#endif
#include "Logging.h"
namespace com
{
{
if (!aName)
return;
#if !defined(VBOX_WITH_XPCOM)
{
0, KEY_QUERY_VALUE, &ifaceKey);
if (rc == ERROR_SUCCESS)
{
if (rc == ERROR_SUCCESS)
{
/* determine the size and type */
{
/* query the value to BSTR */
if (rc != ERROR_SUCCESS)
{
}
}
}
}
}
#else /* !defined (VBOX_WITH_XPCOM) */
if (NS_SUCCEEDED(rv))
{
if (NS_SUCCEEDED(rv))
{
{
{
}
}
}
}
#endif /* !defined (VBOX_WITH_XPCOM) */
}
{
/* start with null */
*aDir = 0;
char szTmp[RTPATH_MAX];
{
if (RT_SUCCESS(vrc))
{
/* get the full path name */
}
else
{
/* compose the config directory (full path) */
/** @todo r=bird: RTPathUserHome doesn't necessarily return a full (abs) path
* like the comment above seems to indicate. */
if (RT_SUCCESS(vrc))
}
/* ensure the home directory exists */
if (RT_SUCCESS(vrc))
if (!RTDirExists(aDir))
}
return vrc;
}
/* static */
#if defined (VBOX_WITH_XPCOM)
/* static */
#endif /* (VBOX_WITH_XPCOM) */
/**
* Used by ComPtr and friends to log details about reference counting.
* @param pcszFormat
*/
void LogRef(const char *pcszFormat, ...)
{
char *pszNewMsg;
}
} /* namespace com */