/* $Id$ */
/** @file
* VBoxSF - OS/2 Shared Folders, Initialization.
*/
/*
* Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "VBoxSFInternal.h"
#include <VBox/VBoxGuestLib.h>
#include <iprt/initterm.h>
/*******************************************************************************
* Global Variables *
*******************************************************************************/
/* from VBoxSFA.asm */
extern RTFAR16 g_fpfnDevHlp;
extern VBOXGUESTOS2IDCCONNECT g_VBoxGuestIDC;
/**
* 32-bit Ring-0 init routine.
*
* This is called the first time somebody tries to use the IFS.
* It will initialize IPRT, Vbgl and whatever else is required.
*
* The caller will do the necessary AttachDD and calling of the 16 bit
* IDC to initialize the g_VBoxGuestIDC global. Perhaps we should move
* this bit to VbglInit? It's just that it's so much simpler to do it
* while we're on the way here...
*
*/
DECLASM(void)
VBoxSFR0Init(void)
{
Log(("VBoxSFR0Init: g_fpfnDevHlp=%lx u32Version=%RX32 u32Session=%RX32 pfnServiceEP=%p g_u32Info=%u (%#x)\n",
g_fpfnDevHlp, g_VBoxGuestIDC.u32Version, g_VBoxGuestIDC.u32Session, g_VBoxGuestIDC.pfnServiceEP, g_u32Info, g_u32Info));
/*
* Start by initializing IPRT.
*/
{
if (RT_SUCCESS(rc))
{
if (RT_SUCCESS(rc))
{
#ifndef DONT_LOCK_SEGMENTS
/*
* Lock the 32-bit segments in memory.
*/
#endif
Log(("VBoxSFR0Init: completed successfully\n"));
return;
}
}
}
else
LogRel(("VBoxSF: Failed to connect to VBoxGuest.sys.\n"));
}