Init.cpp revision 9c958c210f765aa65b53ff01b534adc81e3423cd
/** @file
*
* VBoxGuestLib - A support library for VirtualBox guest additions:
* Library initialization
*/
/*
* 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.
*/
#include <VBox/VBoxGuestLib.h>
#define VBGL_DECL_DATA
#include "VBGLInternal.h"
#ifndef VBGL_VBOXGUEST
static int vbglQueryVMMDevPort (void)
{
int rc = VINF_SUCCESS;
if (VBOX_SUCCESS(rc))
{
if (VBOX_SUCCESS (rc))
{
}
}
return rc;
}
#endif
int VbglEnter (void)
{
int rc;
#ifndef VBGL_VBOXGUEST
{
}
#endif
// dprintf(("VbglEnter: rc = %d\n", rc));
return rc;
}
int vbglInitCommon (void)
{
int rc = VINF_SUCCESS;
rc = VbglPhysHeapInit ();
if (VBOX_SUCCESS(rc))
{
/* other subsystems, none yet */
;
}
return rc;
}
DECLVBGL(void) vbglTerminateCommon (void)
{
return;
}
#ifdef VBGL_VBOXGUEST
{
int rc = VINF_SUCCESS;
{
/* Initialization is already in process. */
return rc;
}
rc = vbglInitCommon ();
if (VBOX_SUCCESS(rc))
{
}
else
{
}
return rc;
}
DECLVBGL(void) VbglTerminate (void)
{
return;
}
#else /* !VBGL_VBOXGUEST */
{
int rc = VINF_SUCCESS;
{
/* Initialization is already in process. */
return rc;
}
rc = vbglInitCommon ();
if (VBOX_SUCCESS(rc))
{
/* Obtain VMMDev port via IOCTL to VBoxGuest main driver. */
#ifdef VBOX_HGCM
rc = vbglHGCMInit ();
#endif
if (VBOX_FAILURE(rc))
{
}
}
return rc;
}
DECLVBGL(void) VbglTerminate (void)
{
#ifdef VBOX_HGCM
#endif
return;
}
#endif /* !VBGL_VBOXGUEST */