16 const char *ifname =
NULL;
22 ptr->LeaseObtained = 0;
23 ptr->LeaseExpires = 0;
24 strcpy(
ptr->DhcpServer.IpAddress.String,
"");
31 L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces",
56 if (
ptr->DhcpEnabled != 0)
70 L"LeaseTerminatesTime",
78 dwSize =
sizeof(
ptr->DhcpServer.IpAddress.String);
83 (
PBYTE)&
ptr->DhcpServer.IpAddress.String,
86 strcpy(
ptr->DhcpServer.IpAddress.String,
"");
#define RegCloseKey(hKey)
DWORD getDhcpInfoForAdapter(DWORD AdapterIndex, PIP_ADAPTER_INFO ptr)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
const char * getInterfaceNameByIndex(DWORD index)
void consumeInterfaceName(const char *ifname)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define HKEY_LOCAL_MACHINE