VBoxSharedFolders.cpp revision 11e0939bfc2448b5afb2efbd6ab43464de56effc
/* $Id$ */
/** @file
* VBoxSharedFolders - Handling for shared folders
*/
/*
* Copyright (C) 2010 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.
*/
#include "VBoxSharedFolders.h"
#include "VBoxTray.h"
#include "helpers.h"
#include <VBox/VBoxGuestLib.h>
int VBoxSharedFoldersAutoMount(void)
{
if (!RT_SUCCESS(rc))
else
{
if (pMappings)
{
&cMappings);
if (RT_SUCCESS(rc))
{
{
if ( RT_SUCCESS(rc)
&& *pszName)
{
char *pszShareName = NULL;
if (pszShareName)
{
/** @todo Figure out how to map the drives in a block (F,G,H, ...).
Save the mapping for later use. */
{
}
else
{
switch (dwErr)
{
case ERROR_ALREADY_ASSIGNED:
break;
default:
LogRel(("VBoxTray: Error while mounting shared folder \"%s\", error = %ld\n",
}
}
}
}
else
Log(("VBoxTray: Error while getting the shared folder name for root node = %u, rc = %Rrc\n",
}
}
else
}
else
rc = VERR_NO_MEMORY;
}
return rc;
}
int VBoxSharedFoldersAutoUnmount(void)
{
//WNetCancelConnection2(name, 0, 1 /* Force disconnect */);
return 0;
}