com.cpp revision ca847843b2752c41c31589bfc878629cc7db7040
/* $Id$ */
/** @file
* MS COM / XPCOM Abstraction Layer
*/
/*
* Copyright (C) 2006-2007 Sun Microsystems, Inc.
*
* 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.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#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
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 */
sizeof (TCHAR) + 1);
if (rc != ERROR_SUCCESS)
{
SysFreeString (*aName);
}
}
}
}
}
#else /* !defined (VBOX_WITH_XPCOM) */
if (NS_SUCCEEDED(rv))
{
if (NS_SUCCEEDED(rv))
{
{
{
}
}
}
}
#endif /* !defined (VBOX_WITH_XPCOM) */
}
{
/* start with null */
*aDir = 0;
char path [RTPATH_MAX];
int vrc = VINF_SUCCESS;
if (VBoxUserHome)
{
/* get the full path name */
char *VBoxUserHomeUtf8 = NULL;
if (RT_SUCCESS(vrc))
{
if (RT_SUCCESS(vrc))
{
else
}
}
}
else
{
/* compose the config directory (full path) */
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, ...)
{
}
} /* namespace com */