IN HWND hWnd)
{
BOOL ret;
+ UNICODE_STRING TcpipServicePath = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Tcpip");
/* Install TCP/IP protocol */
ret = InstallInfSection(
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...) */
HKEY hNetworkKey = NULL;
HKEY hLinkageKey = NULL;
HKEY hConnectionKey = NULL;
- DWORD dwShowIcon, dwLength;
+ DWORD dwShowIcon, dwLength, dwValue;
/* Get Instance ID */
if (SetupDiGetDeviceInstanceIdW(DeviceInfoSet, DeviceInfoData, NULL, 0, &dwLength))
DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc);
goto cleanup;
}
+ dwValue = 1;
+ rc = RegSetValueExW(hKey, L"EnableDHCP", 0, REG_DWORD, (const BYTE*)&dwValue, sizeof(DWORD));
+ if (rc != ERROR_SUCCESS)
+ {
+ DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc);
+ goto cleanup;
+ }
RegCloseKey(hKey);
hKey = NULL;