[NETCFGX]

- Start the TCP/IP driver after we install a network adapter
- This fixes the major bug that blocks Live CD networking but we still have some DHCP issues (DHCP starts and fails before the NIC and TCP/IP has been installed) and some other adapter detection issues that I need to look into but this is a good first step

svn path=/trunk/; revision=48188
This commit is contained in:
Cameron Gutman 2010-07-22 18:29:35 +00:00
parent 23c3e742d9
commit 9a28440154
2 changed files with 15 additions and 0 deletions

View file

@ -290,6 +290,7 @@ InstallAdditionalServices(
IN HWND hWnd)
{
BOOL ret;
UNICODE_STRING TcpipServicePath = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Tcpip");
/* Install TCP/IP protocol */
ret = InstallInfSection(
@ -302,6 +303,17 @@ InstallAdditionalServices(
DPRINT("InstallInfSection() failed with error 0x%lx\n", GetLastError());
return GetLastError();
}
else if (ret)
{
/* Start the TCP/IP driver */
ret = NtLoadDriver(&TcpipServicePath);
if (ret)
{
/* This isn't really fatal but we want to warn anyway */
DPRINT1("NtLoadDriver(TCPIP) failed with NTSTATUS 0x%lx\n", (NTSTATUS)ret);
}
}
/* You can add here more clients (SMB...) and services (DHCP server...) */

View file

@ -5,7 +5,10 @@
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#define WIN32_NO_STATUS
#include <windows.h>
#define NTOS_MODE_USER
#include <ndk/ntndk.h>
#include <netcfgx.h>
#include <setupapi.h>
#include <stdio.h>