69 const INetCfgComponentPropertyUi *
lpVtbl;
135 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
175 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
179 if (pPort->MaxNum == 65536)
195 if (Num > pPort->MaxNum || Num == 0)
197 if (pPort->MaxNum == 65536)
207 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
216 li.pszText = szBuffer;
295 for(iIndex = 0; iIndex < iCount; iIndex++)
300 li.pszText = szBuffer;
301 li.cchTextMax =
sizeof(szBuffer) /
sizeof(
WCHAR);
346 Port.MaxNum = MaxItem;
347 Port.hDlgCtrl = hDlgCtrl;
470 if (pContext->pCurrentConfig->pFilter)
472 CoTaskMemFree(pContext->pCurrentConfig->pFilter->szTCPAllowedPorts);
473 CoTaskMemFree(pContext->pCurrentConfig->pFilter->szUDPAllowedPorts);
474 CoTaskMemFree(pContext->pCurrentConfig->pFilter->szRawIPAllowedProtocols);
477 pContext->pCurrentConfig->pFilter = pFilter;
612 lc.
fmt = LVCFMT_FIXED_WIDTH;
635 li.iItem = itemCount;
637 dwIpAddr =
pAddr->IpAddress;
641 li.pszText = szBuffer;
647 dwIpAddr =
pAddr->u.Subnetmask;
661 li.pszText = szBuffer;
682 if (
This->pCurrentConfig->DhcpEnabled)
688 li.pszText = szBuffer;
739 if (pGwSettings->
bAdd)
743 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
753 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
816 if (!pGwSettings->
bAdd)
851 li.pszText = pGwSettings->
szIP;
856 li.pszText = szBuffer;
900 if (pIpSettings->
bAdd)
904 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
913 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
957 else if (!pIpSettings->
bAdd)
1005 if (!pSettings->
bAdd)
1010 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
1020 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
1039 if (pSettings->Suffix)
1069 UINT iItemCount, iIndex;
1075 for (iIndex = 0; iIndex < iItemCount; iIndex++)
1099 li.pszText = pIpSettings->
szIP;
1144 while((pNext =
wcschr(pNext,
L'.')))
1148 dwIpAddr |= (Val <<
Index * 8);
1153 dwIpAddr |=
_wtoi(pLast);
1183 pNext =
pAddr->Next;
1196 li.pszText = szBuffer;
1198 li.iSubItem = SubIndex;
1221 for(iIndex = 0; iIndex < iCount; iIndex++)
1230 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
1235 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
1272 WCHAR szBuffer[200];
1299 (!
This->pCurrentConfig->DhcpEnabled);
1353 li.pszText = Ip.szIP;
1359 li.pszText = Ip.szMask;
1383 li.pszText = Ip.szIP;
1385 li.pszText = Ip.szMask;
1406 li.pszText =
Gw.szIP;
1414 li.pszText = szBuffer;
1421 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
1423 li.pszText = szBuffer;
1450 li.pszText =
Gw.szIP;
1456 li.pszText = szBuffer;
1463 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
1465 li.pszText = szBuffer;
1492 WCHAR szBuffer[100];
1501 if (!pSettings->
bAdd)
1505 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
1515 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
1533 if (pSettings->
bAdd)
1538 if (!pSettings->
bAdd)
1569 WCHAR szBuffer[200];
1578 dwIpAddr =
pAddr->IpAddress;
1587 if (!
This->pCurrentConfig->pDNS)
1590 if (
This->pCurrentConfig->pDNS->RegisterAdapterName)
1595 if (
This->pCurrentConfig->pDNS->RegistrationEnabled)
1598 if (
This->pCurrentConfig->pDNS->szDomain[0])
1601 if (
This->pCurrentConfig->pDNS->UseDomainNameDevolution)
1604 if (!
This->pCurrentConfig->pDNS->szSearchList || (
wcslen(
This->pCurrentConfig->pDNS->szSearchList) == 0))
1612 pList =
This->pCurrentConfig->pDNS->szSearchList;
1653 if (lResult < lCount -1)
1678 WCHAR szBuffer[100];
1706 if (lResult + 1 < lCount)
1720 LPWSTR pszSearchList, pItem;
1723 if (!iCount || iCount ==
LB_ERR)
1728 for (iIndex = 0; iIndex < iCount; iIndex++)
1741 pItem = pszSearchList;
1742 for (iIndex = 0; iIndex < iCount; iIndex++)
1752 if (iIndex != iCount -1)
1759 return pszSearchList;
1775 if (!iCount || iCount ==
LB_ERR)
1781 for(iIndex = 0; iIndex < iCount; iIndex++)
1800 This->pCurrentConfig->AutoconfigActive =
FALSE;
1818 WCHAR szSuffix[100];
1819 WCHAR szFormat[200];
1820 WCHAR szBuffer[300];
1846 szSuffix[(
sizeof(szSuffix)/
sizeof(
WCHAR))-1] =
L'\0';
1851 szFormat[(
sizeof(szFormat)/
sizeof(
WCHAR))-1] =
L'\0';
1852 swprintf(szBuffer, szFormat, szSuffix);
1854 szFormat[(
sizeof(szFormat)/
sizeof(
WCHAR))-1] =
L'\0';
1856 szFormat[0] =
L'\0';
1869 if (!
This->pCurrentConfig->pDNS)
1876 This->pCurrentConfig->pDNS->szSearchList =
NULL;
1878 This->pCurrentConfig->pDNS->UseDomainNameDevolution =
TRUE;
1880 This->pCurrentConfig->pDNS->UseDomainNameDevolution =
FALSE;
1885 This->pCurrentConfig->pDNS->szSearchList =
NULL;
1886 This->pCurrentConfig->pDNS->UseDomainNameDevolution =
FALSE;
1892 This->pCurrentConfig->pDNS->RegisterAdapterName =
TRUE;
1894 This->pCurrentConfig->pDNS->RegistrationEnabled =
TRUE;
1896 This->pCurrentConfig->pDNS->RegistrationEnabled =
FALSE;
1900 This->pCurrentConfig->pDNS->RegisterAdapterName =
FALSE;
1901 This->pCurrentConfig->pDNS->RegistrationEnabled =
FALSE;
2060 Suffix.
Suffix[lLength] =
L'\0';
2107 WCHAR szBuffer[100];
2115 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
2117 szBuffer[0] =
L'\0';
2123 pinfo.u3.
phpage = hppages;
2179 This->pCurrentConfig->DhcpEnabled =
FALSE;
2189 if (!
This->pCurrentConfig->Ip)
2192 if (!
This->pCurrentConfig->Ip)
2196 This->pCurrentConfig->Ip->IpAddress = dwIpAddr;
2220 This->pCurrentConfig->Ip->u.Subnetmask = dwIpAddr;
2224 This->pCurrentConfig->DhcpEnabled =
TRUE;
2229 if (!
This->pCurrentConfig->Gw)
2232 if (!
This->pCurrentConfig->Gw)
2237 This->pCurrentConfig->Gw->IpAddress = dwIpAddr;
2241 if (
This->pCurrentConfig->Gw)
2243 IP_ADDR * pNextGw =
This->pCurrentConfig->Gw->Next;
2245 This->pCurrentConfig->Gw = pNextGw;
2252 This->pCurrentConfig->AutoconfigActive =
FALSE;
2255 if (!
This->pCurrentConfig->Ns)
2258 if (!
This->pCurrentConfig->Ns)
2262 This->pCurrentConfig->Ns->IpAddress = dwIpAddr;
2264 else if (
This->pCurrentConfig->Ns)
2269 This->pCurrentConfig->Ns = pTemp;
2276 if (!
This->pCurrentConfig->Ns || bSkip)
2278 if (!
This->pCurrentConfig->Ns)
2281 if (!
This->pCurrentConfig->Ns)
2285 This->pCurrentConfig->Ns->IpAddress = dwIpAddr;
2287 else if (!
This->pCurrentConfig->Ns->Next)
2290 if (!
This->pCurrentConfig->Ns->Next)
2293 This->pCurrentConfig->Ns->Next->IpAddress = dwIpAddr;
2297 This->pCurrentConfig->Ns->Next->IpAddress = dwIpAddr;
2302 if (
This->pCurrentConfig->Ns &&
This->pCurrentConfig->Ns->Next)
2304 if (
This->pCurrentConfig->Ns->Next->Next)
2306 IP_ADDR *pTemp =
This->pCurrentConfig->Ns->Next->Next;
2308 This->pCurrentConfig->Ns->Next = pTemp;
2313 This->pCurrentConfig->Ns->Next =
NULL;
2320 This->pCurrentConfig->AutoconfigActive =
TRUE;
2367 if (pCurSettings->
Ip)
2393 if (pCurSettings->
Ns)
2396 if (pCurSettings->
Ns->
Next)
2450 if (szMetric && szMetric[0] !=
L'\0')
2453 szMetric +=
wcslen(szMetric) + 1;
2463 pCurrent = pCurrent->
Next;
2493 if (
This->pCurrentConfig)
2602 INetCfgComponentPropertyUi * iface,
2637 INetCfgComponentPropertyUi * iface)
2648 INetCfgComponentPropertyUi * iface)
2663 INetCfgComponentPropertyUi * iface,
2666 INetLanConnectionUiInfo * pLanInfo;
2685 INetCfgComponentPropertyUi * iface,
2702 WCHAR szBuffer[200];
2708 if (!
This->pCurrentConfig->pDNS)
2716 swprintf(szBuffer,
L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\%s", pStr);
2724 dwSize =
sizeof(
This->pCurrentConfig->pDNS->szDomain);
2739 if (
This->pCurrentConfig->pDNS->szSearchList)
2744 This->pCurrentConfig->pDNS->szSearchList =
NULL;
2781 WCHAR szBuffer[200];
2790 This->pCurrentConfig->pFilter = pFilter;
2808 swprintf(szBuffer,
L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\%s", pStr);
2837 if (
This->pCurrentConfig)
2866 pCurrentAdapter = pInfo;
2868 while(pCurrentAdapter)
2870 szBuffer[0] =
L'\0';
2873 szBuffer[(
sizeof(szBuffer)/
sizeof(
WCHAR))-1] =
L'\0';
2880 pCurrentAdapter = pCurrentAdapter->
Next;
2898 This->pCurrentConfig = pCurSettings;
2900 pCurSettings->
Index = pCurrentAdapter->
Index;
2931 if (!
Info.AutoconfigActive)
2952 INetCfgComponentPropertyUi * iface,
2954 BYTE **pahpspPrivate,
2968 if (
This->pCurrentConfig->DhcpEnabled)
2994 *pahpspPrivate = (
BYTE*)hppages;
2995 *pcPages = NumPages;
3003 INetCfgComponentPropertyUi * iface,
3013 INetCfgComponentPropertyUi * iface)
3023 INetCfgComponentPropertyUi * iface)
3049 INetCfgComponentControl * iface,
3060 INetCfgComponentControl * iface)
3069 INetCfgComponentControl * iface)
3078 INetCfgComponentControl * iface,
3079 INetCfgComponent *pIComp,
3085 This->pNCfg = pINetCfg;
3086 This->pNComp = pIComp;
3121 pTemp = pTemp->
Next;
3161 pStr +=
wcslen(pStr) + 1;
3163 pTemp = pTemp->
Next;
3174 INetCfgComponentControl * iface)
3179 WCHAR szBuffer[200];
3182 DWORD DhcpApiVersion;
3186 pCurrentConfig =
This->pCurrentConfig;
3191 This->pCurrentConfig = pCurrentConfig;
3194 pOldConfig =
This->pCurrentConfig;
3195 This->pCurrentConfig = pCurrentConfig;
3202 if (pCurrentConfig->
pDNS)
3219 swprintf(szBuffer,
L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\%s", pStr);
3224 if (pCurrentConfig->
pDNS)
3270 if (pIpForwardTable)
3309 pCurrentConfig->
Index,
3334 if (pIpForwardTable)
3352 if (pCurrentConfig->
Gw)
3410 INetCfgComponentControl * iface,
3411 INetCfgPnpReconfigCallback *pICallback)
3420 INetCfgComponentControl * iface)
PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER pAddr
VOID InsertColumnToListView(HWND hDlgCtrl, UINT ResId, UINT SubItem, UINT Size)
DWORD WINAPI CreateIpForwardEntry(PMIB_IPFORWARDROW pRoute)
_In_ ULONG _In_ ULONG _In_ ULONG Length
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
#define FIRST_IPADDRESS(x)
INT_PTR CALLBACK TcpipAddDNSDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
DWORD UseDomainNameDevolution
DWORD WINAPI DeleteIpForwardEntry(PMIB_IPFORWARDROW pRoute)
VOID MoveItem(HWND hDlgCtrl, INT pos)
static VOID AddItem(HWND hwndDlg, HWND hDlgCtrl, UINT MaxItem, UINT ResId)
HRESULT WINAPI INetCfgComponentControl_fnQueryInterface(INetCfgComponentControl *iface, REFIID iid, LPVOID *ppvObj)
VOID InitializeTcpipAdvancedIpDlg(HWND hwndDlg, TcpipConfNotifyImpl *This)
struct _PSHNOTIFY * LPPSHNOTIFY
HRESULT WINAPI INetCfgComponentPropertyUi_fnCancelProperties(INetCfgComponentPropertyUi *iface)
UINT GetIpAddressFromStringW(WCHAR *szBuffer)
VOID RemoveItem(HWND hDlgCtrl)
#define ERROR_BUFFER_OVERFLOW
BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
VOID DisplayError(UINT ResTxt, UINT ResTitle, UINT Type)
#define IDD_TCPIP_ADVDNS_DLG
static const INetCfgComponentPropertyUiVtbl vt_NetCfgComponentPropertyUi
HRESULT WINAPI INetCfgComponentControl_fnApplyPnpChanges(INetCfgComponentControl *iface, INetCfgPnpReconfigCallback *pICallback)
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
static __inline LPTcpipConfNotifyImpl impl_from_INetCfgComponentControl(INetCfgComponentControl *iface)
IP_ADDRESS_STRING IpAddress
struct _IP_ADDR_STRING * Next
LPWSTR GetListViewEntries(HWND hDlgCtrl)
#define FOURTH_IPADDRESS(x)
#define IDC_TOPPRIMSUFFIX
EXTERN_C const IID IID_INetLanConnectionUiInfo
HRESULT WINAPI INetCfgComponentControl_fnInitialize(INetCfgComponentControl *iface, INetCfgComponent *pIComp, INetCfg *pINetCfg, BOOL fInstalling)
IN PVOID IN PVOID IN USHORT IN USHORT Size
TcpFilterSettings * StoreTcpipFilterSettings(HWND hwndDlg)
TcpFilterSettings * pFilter
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL GetGWListEntry(HWND hDlgCtrl, INT Index, TcpipGwSettings *pGwSettings)
#define SendDlgItemMessage
DWORD EnableSecurityFilters
struct _PROPSHEETHEADERW PROPSHEETHEADERW
HRESULT Initialize(TcpipConfNotifyImpl *This)
HRESULT WINAPI INetCfgComponentPropertyUi_fnValidateProperties(INetCfgComponentPropertyUi *iface, HWND hwndDlg)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
HRESULT WINAPI INetCfgComponentPropertyUi_fnSetContext(INetCfgComponentPropertyUi *iface, IUnknown *pUnkReserved)
INT_PTR CALLBACK TcpipAltConfDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
VOID DeleteItemFromList(HWND hDlgCtrl)
#define IDS_NO_SUBMASK_SET
#define INetLanConnectionUiInfo_GetDeviceGuid(p, a)
char AdapterName[MAX_ADAPTER_NAME_LENGTH+4]
#define SECOND_IPADDRESS(x)
#define THIRD_IPADDRESS(x)
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
struct tagNMIPADDRESS * LPNMIPADDRESS
#define INetCfgComponentPropertyUi_AddRef(p)
LONG WINAPI RegCloseKey(HKEY hKey)
DWORD RegistrationEnabled
static void AddButton(HWND hwndToolBar, int nImage, int nCommand)
static const WCHAR szText[]
#define LVM_INSERTCOLUMNW
VOID LaunchAdvancedTcpipSettings(HWND hwndDlg, TcpipConfNotifyImpl *This)
struct _PSP * HPROPSHEETPAGE
#define IDD_TCPIP_ADVIP_DLG
LPWSTR CreateFilterList(HWND hDlgCtrl, LPDWORD Size)
INetCfgComponent * pNComp
ULONG WINAPI INetCfgComponentControl_fnAddRef(INetCfgComponentControl *iface)
struct _PROPSHEETPAGEW PROPSHEETPAGEW
UINT WINAPI GetDlgItemInt(_In_ HWND, _In_ int, _Out_opt_ PBOOL, _In_ BOOL)
HRESULT CopyIpAddrString(IP_ADDR_STRING *pSrc, IP_ADDR **pTarget, COPY_TYPE Type, LPWSTR szMetric)
#define ListView_DeleteItem(hwnd, i)
#define ListView_GetItemCount(hwnd)
#define IDC_DNSSUFFIXDOWN
HRESULT WINAPI INetCfgComponentPropertyUi_fnQueryInterface(INetCfgComponentPropertyUi *iface, REFIID iid, LPVOID *ppvObj)
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
#define INetCfgComponentPropertyUi_Release(p)
#define IDS_TCPFILTERDESC
#define IDC_TCP_ALLOW_ALL
#define IDS_NO_IPADDR_SET
#define IDS_DOMAIN_SUFFIX
IF_INDEX dwForwardIfIndex
HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage)
LPWSTR LoadTcpFilterSettingsFromRegistry(HKEY hKey, LPCWSTR szName, LPDWORD Size)
EXTERN_C const IID IID_INetCfgComponentPropertyUi
HPROPSHEETPAGE InitializePropertySheetPage(LPWSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle)
VOID InsertIpAddressToListView(HWND hDlgCtrl, IP_ADDR *pAddr, BOOL bSubMask)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
const INetCfgComponentPropertyUi * lpVtbl
HINSTANCE netcfgx_hInstance
DWORD WINAPI AddIPAddress(IPAddr Address, IPMask Netmask, DWORD IfIndex, PULONG NteContext, PULONG NteInstance)
INT_PTR CALLBACK TcpipAdvancedOptDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
TcpipAdvancedDNSDlgSettings * pDNS
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
VOID InitFilterListBox(LPWSTR pData, HWND hwndDlg, HWND hDlgCtrl, UINT AllowButton, UINT RestrictButton, UINT AddButton, UINT DelButton)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDD_TCPIP_BASIC_DLG
#define PropSheet_Changed(d, w)
_In_ WDFCOLLECTION _In_ ULONG Index
struct _IP_PER_ADAPTER_INFO IP_PER_ADAPTER_INFO
DWORD WINAPI GetPerAdapterInfo(ULONG IfIndex, PIP_PER_ADAPTER_INFO pPerAdapterInfo, PULONG pOutBufLen)
#define IDD_TCPIPADDIP_DLG
ULONG WINAPI INetCfgComponentPropertyUi_fnRelease(INetCfgComponentPropertyUi *iface)
static LPWSTR CreateMultiSzString(IP_ADDR *pAddr, COPY_TYPE Type, LPDWORD Size, BOOL bComma)
MIB_IPFORWARDROW table[1]
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
struct _IP_PER_ADAPTER_INFO * PIP_PER_ADAPTER_INFO
DWORD APIENTRY DhcpStaticRefreshParams(DWORD AdapterIndex, DWORD Address, DWORD Netmask)
TCHAR szTitle[MAX_LOADSTRING]
#define IDC_DNSSUFFIXLIST
#define IDD_TCPIP_PORT_DLG