NetAdpInstall.cpp revision e64031e20c39650a7bc902a3e1aba613b9415dee
/* $Id$ */
/** @file
* NetAdpInstall - VBoxNetAdp installer command line tool
*/
/*
* Copyright (C) 2009 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 <vbox/WinNetConfig.h>
#include <stdio.h>
#define VBOX_NETADP_INF L".\\VBoxNetAdp.inf"
{
}
static int InstallNetAdp()
{
int r = 1;
{
#ifndef DEBUG_misha
printf("not implemented yet, please use device manager for Host-Only net interface installation.. sorry :( \n");
#else
/* this installs the Net Adp from the pre-installed driver package,
* it does NOT install the new driver package, so the installation might use old drivers
* or fail in case no NetAdp package is currently installed
* the code is here for debugging NetAdp installation only */
printf("adding host-only interface..\n");
WinEr = GetLastError();
if(WinEr == ERROR_SUCCESS)
{
{
{
/* ip returned by VBoxNetCfgWinGenHostOnlyNetworkNetworkIp is a network ip,
* i.e. 192.168.xxx.0, assign 192.168.xxx.1 for the hostonly adapter */
{
}
else
{
r = 0;
}
}
else
{
}
}
else
{
}
}
else
{
}
#endif
}
else
{
}
return r;
}
{
return InstallNetAdp();
}