Author: janderwald
Date: Wed Oct 15 12:20:55 2008
New Revision: 36762
URL:
http://svn.reactos.org/svn/reactos?rev=36762&view=rev
Log:
- Implement Advanced Status IP Information Dialog
- Import language strings from netcfgx
- Add icon group (32x32)
- ncpa is now a candidate for deletion
Modified:
trunk/reactos/dll/win32/netshell/lanconnectui.c
trunk/reactos/dll/win32/netshell/lang/bg-BG.rc
trunk/reactos/dll/win32/netshell/lang/cs-CZ.rc
trunk/reactos/dll/win32/netshell/lang/da-DK.rc
trunk/reactos/dll/win32/netshell/lang/de-DE.rc
trunk/reactos/dll/win32/netshell/lang/el-GR.rc
trunk/reactos/dll/win32/netshell/lang/en-US.rc
trunk/reactos/dll/win32/netshell/lang/es-ES.rc
trunk/reactos/dll/win32/netshell/lang/fr-FR.rc
trunk/reactos/dll/win32/netshell/lang/hu-HU.rc
trunk/reactos/dll/win32/netshell/lang/id-ID.rc
trunk/reactos/dll/win32/netshell/lang/it-IT.rc
trunk/reactos/dll/win32/netshell/lang/ja-JP.rc
trunk/reactos/dll/win32/netshell/lang/nl-NL.rc
trunk/reactos/dll/win32/netshell/lang/no-NO.rc
trunk/reactos/dll/win32/netshell/lang/pl-PL.rc
trunk/reactos/dll/win32/netshell/lang/ru-RU.rc
trunk/reactos/dll/win32/netshell/lang/sk-SK.rc
trunk/reactos/dll/win32/netshell/lang/sv-SE.rc
trunk/reactos/dll/win32/netshell/lang/uk-UA.rc
trunk/reactos/dll/win32/netshell/lang/zh-CN.rc
trunk/reactos/dll/win32/netshell/lanstatusui.c
trunk/reactos/dll/win32/netshell/netshell.rbuild
trunk/reactos/dll/win32/netshell/precomp.h
trunk/reactos/dll/win32/netshell/res/neterror.ico
trunk/reactos/dll/win32/netshell/res/netidle.ico
trunk/reactos/dll/win32/netshell/res/netoff.ico
trunk/reactos/dll/win32/netshell/res/netrec.ico
trunk/reactos/dll/win32/netshell/res/nettrans.ico
trunk/reactos/dll/win32/netshell/res/nettrrec.ico
trunk/reactos/dll/win32/netshell/resource.h
Modified: trunk/reactos/dll/win32/netshell/lanconnectui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lanconn…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lanconnectui.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lanconnectui.c [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -284,7 +284,6 @@
pItem = (PNET_ITEM)lvItem.lParam;
pNCfgComp = (INetCfgComponent*) pItem->pNCfgComp;
-
hr = INetCfgComponent_RaisePropertyUi(pNCfgComp, GetParent(hwndDlg),
NCRP_QUERY_PROPERTY_UI, (IUnknown*)This);
if (SUCCEEDED(hr))
{
Modified: trunk/reactos/dll/win32/netshell/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/bg…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/bg-BG.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -101,4 +101,6 @@
IDS_FORMAT_GBIT "%u ÃÁ/ñ"
IDS_DURATION_DAY "%d äåí %s"
IDS_DURATION_DAYS "%d äíè %s"
+ IDS_ASSIGNED_DHCP "Çàäàäåíî îò DHCP"
+ IDS_ASSIGNED_MANUAL "Ðú÷íî íàñòðîåíî"
END
Modified: trunk/reactos/dll/win32/netshell/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/cs…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/cs-CZ.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -98,5 +98,7 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Pøiøazeno DHCP"
+ IDS_ASSIGNED_MANUAL "Ruènì nastaveno"
END
Modified: trunk/reactos/dll/win32/netshell/lang/da-DK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/da…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/da-DK.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/da-DK.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -98,6 +98,8 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Assigned by DHCP"
+ IDS_ASSIGNED_MANUAL "Manually configured"
END
Modified: trunk/reactos/dll/win32/netshell/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/de…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/de-DE.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -101,4 +101,6 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Tag %s"
IDS_DURATION_DAYS "%d Tage %s"
+ IDS_ASSIGNED_DHCP "Von DHCP zugewiesen"
+ IDS_ASSIGNED_MANUAL "Manuell konfiguriert"
END
Modified: trunk/reactos/dll/win32/netshell/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/el…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/el-GR.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -98,5 +98,7 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Ïñßóôçêå áðü ôï DHCP"
+ IDS_ASSIGNED_MANUAL "Ïñßóôçêå ÷åéñïêßíçôá"
END
Modified: trunk/reactos/dll/win32/netshell/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/en…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/en-US.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -100,5 +100,7 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Assigned by DHCP"
+ IDS_ASSIGNED_MANUAL "Manually configured"
END
Modified: trunk/reactos/dll/win32/netshell/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/es…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/es-ES.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -94,5 +94,7 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Día %s"
IDS_DURATION_DAYS "%d Días %s"
+ IDS_ASSIGNED_DHCP "Asignado por DHCP"
+ IDS_ASSIGNED_MANUAL "Configurado manualmente"
END
Modified: trunk/reactos/dll/win32/netshell/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/fr…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/fr-FR.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -98,4 +98,6 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Assignée par DHCP"
+ IDS_ASSIGNED_MANUAL "Configurée manuellement"
END
Modified: trunk/reactos/dll/win32/netshell/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/hu…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/hu-HU.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/hu-HU.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -99,4 +99,6 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Assigned by DHCP"
+ IDS_ASSIGNED_MANUAL "Manually configured"
END
Modified: trunk/reactos/dll/win32/netshell/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/id…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/id-ID.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/id-ID.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -98,4 +98,6 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Assigned by DHCP"
+ IDS_ASSIGNED_MANUAL "Manually configured"
END
Modified: trunk/reactos/dll/win32/netshell/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/it…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/it-IT.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -104,5 +104,7 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Assegnato da DHCP"
+ IDS_ASSIGNED_MANUAL "Configurato manualmente"
END
Modified: trunk/reactos/dll/win32/netshell/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/ja…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/ja-JP.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -98,4 +98,6 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Assigned by DHCP"
+ IDS_ASSIGNED_MANUAL "Manually configured"
END
Modified: trunk/reactos/dll/win32/netshell/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/nl…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/nl-NL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/nl-NL.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -98,6 +98,8 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Assigned by DHCP"
+ IDS_ASSIGNED_MANUAL "Manually configured"
END
Modified: trunk/reactos/dll/win32/netshell/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/no…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/no-NO.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -103,5 +103,7 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d dag %s"
IDS_DURATION_DAYS "%d dager %s"
+ IDS_ASSIGNED_DHCP "Tilordnet av DHCP"
+ IDS_ASSIGNED_MANUAL "Manuelt konfigurert"
END
Modified: trunk/reactos/dll/win32/netshell/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/pl…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/pl-PL.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -99,5 +99,7 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Przydzielony przez DHCP"
+ IDS_ASSIGNED_MANUAL "Ustawiony rêcznie"
END
Modified: trunk/reactos/dll/win32/netshell/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/ru…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/ru-RU.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -99,4 +99,6 @@
IDS_FORMAT_GBIT "%u ÃÁàéò/s"
IDS_DURATION_DAY "%d Äåíü %s"
IDS_DURATION_DAYS "%d Äíåé %s"
+ IDS_ASSIGNED_DHCP "Ïðèñâîåí DHCP"
+ IDS_ASSIGNED_MANUAL "Íàñòðîåí âðó÷íóþ"
END
Modified: trunk/reactos/dll/win32/netshell/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/sk…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/sk-SK.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -105,4 +105,6 @@
IDS_FORMAT_GBIT "%u GBitov/s"
IDS_DURATION_DAY "%d deò %s"
IDS_DURATION_DAYS "%d dní %s"
+ IDS_ASSIGNED_DHCP "Pridelená DHCP serverom"
+ IDS_ASSIGNED_MANUAL "Nakonfigurovaná manuálne"
END
Modified: trunk/reactos/dll/win32/netshell/lang/sv-SE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/sv…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/sv-SE.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/sv-SE.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -99,4 +99,6 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Assigned by DHCP"
+ IDS_ASSIGNED_MANUAL "Manually configured"
END
Modified: trunk/reactos/dll/win32/netshell/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/uk…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/uk-UA.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -101,4 +101,6 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Íàäàíî DHCP"
+ IDS_ASSIGNED_MANUAL "Íàëàøòîâàíî âðó÷íó"
END
Modified: trunk/reactos/dll/win32/netshell/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/zh…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lang/zh-CN.rc [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -98,4 +98,6 @@
IDS_FORMAT_GBIT "%u GBit/s"
IDS_DURATION_DAY "%d Day %s"
IDS_DURATION_DAYS "%d Days %s"
+ IDS_ASSIGNED_DHCP "Assigned by DHCP"
+ IDS_ASSIGNED_MANUAL "Manually configured"
END
Modified: trunk/reactos/dll/win32/netshell/lanstatusui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lanstat…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lanstatusui.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lanstatusui.c [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -30,8 +30,12 @@
HWND hwndDlg; /* status dialog window */
DWORD dwAdapterIndex;
UINT_PTR nIDEvent;
+ UINT DHCPEnabled;
DWORD dwInOctets;
DWORD dwOutOctets;
+ DWORD IpAddress;
+ DWORD SubnetMask;
+ DWORD Gateway;
UINT uID;
UINT Status;
}LANSTATUSUI_CONTEXT;
@@ -260,10 +264,7 @@
InitializeLANStatusUiDlg(HWND hwndDlg, LANSTATUSUI_CONTEXT * pContext)
{
WCHAR szBuffer[MAX_PATH] = {0};
- NETCON_PROPERTIES * pProperties = NULL;
- DWORD dwSize, dwAdapterIndex, dwResult;
- LPOLESTR pStr;
- IP_ADAPTER_INFO * pAdapterInfo;
+ NETCON_PROPERTIES * pProperties;
if (INetConnection_GetProperties(pContext->pNet, &pProperties) != NOERROR)
return;
@@ -279,52 +280,13 @@
SendDlgItemMessageW(hwndDlg, IDC_STATUS, WM_SETTEXT, 0, (LPARAM)szBuffer);
- if (FAILED(StringFromCLSID(&pProperties->guidId, &pStr)))
- {
- NcFreeNetconProperties(pProperties);
- return;
- }
- NcFreeNetconProperties(pProperties);
-
- /* get the IfTable */
- dwSize = 0;
- dwResult = GetAdaptersInfo(NULL, &dwSize);
- if (dwResult!= ERROR_BUFFER_OVERFLOW)
- {
- CoTaskMemFree(pStr);
- return;
- }
-
- pAdapterInfo = (PIP_ADAPTER_INFO)CoTaskMemAlloc(dwSize);
- if (!pAdapterInfo)
- {
- CoTaskMemFree(pAdapterInfo);
- CoTaskMemFree(pStr);
- return;
- }
-
- if (GetAdaptersInfo(pAdapterInfo, &dwSize) != NO_ERROR)
- {
- CoTaskMemFree(pAdapterInfo);
- CoTaskMemFree(pStr);
- return;
- }
-
- if (!GetAdapterIndexFromNetCfgInstanceId(pAdapterInfo, pStr, &dwAdapterIndex))
- {
- CoTaskMemFree(pAdapterInfo);
- CoTaskMemFree(pStr);
- return;
- }
- CoTaskMemFree(pStr);
- pContext->dwAdapterIndex = dwAdapterIndex;
pContext->dwInOctets = 0;
pContext->dwOutOctets = 0;
/* update adapter info */
pContext->Status = -1;
UpdateLanStatus(hwndDlg, pContext);
- CoTaskMemFree(pAdapterInfo);
+ NcFreeNetconProperties(pProperties);
}
INT_PTR
@@ -336,8 +298,11 @@
LPARAM lParam
)
{
+ WCHAR szBuffer[100] = {0};
PROPSHEETPAGE *page;
LANSTATUSUI_CONTEXT * pContext;
+ DWORD dwIpAddr;
+
switch(uMsg)
{
@@ -345,6 +310,31 @@
page = (PROPSHEETPAGE*)lParam;
pContext = (LANSTATUSUI_CONTEXT*)page->lParam;
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pContext);
+ if (pContext->DHCPEnabled)
+ LoadStringW(netshell_hInstance, IDS_ASSIGNED_DHCP, szBuffer,
sizeof(szBuffer)/sizeof(WCHAR));
+ else
+ LoadStringW(netshell_hInstance, IDS_ASSIGNED_MANUAL, szBuffer,
sizeof(szBuffer)/sizeof(WCHAR));
+
+ szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0';
+ SendDlgItemMessageW(hwndDlg, IDC_DETAILSTYPE, WM_SETTEXT, 0,
(LPARAM)szBuffer);
+
+
+ dwIpAddr = ntohl(pContext->IpAddress);
+ swprintf(szBuffer, L"%u.%u.%u.%u", FIRST_IPADDRESS(dwIpAddr),
SECOND_IPADDRESS(dwIpAddr),
+ THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
+ SendDlgItemMessageW(hwndDlg, IDC_DETAILSIP, WM_SETTEXT, 0,
(LPARAM)szBuffer);
+
+ dwIpAddr = ntohl(pContext->SubnetMask);
+ swprintf(szBuffer, L"%u.%u.%u.%u", FIRST_IPADDRESS(dwIpAddr),
SECOND_IPADDRESS(dwIpAddr),
+ THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
+ SendDlgItemMessageW(hwndDlg, IDC_DETAILSSUBNET, WM_SETTEXT, 0,
(LPARAM)szBuffer);
+
+ dwIpAddr = ntohl(pContext->Gateway);
+ swprintf(szBuffer, L"%u.%u.%u.%u", FIRST_IPADDRESS(dwIpAddr),
SECOND_IPADDRESS(dwIpAddr),
+ THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
+ SendDlgItemMessageW(hwndDlg, IDC_DETAILSGATEWAY, WM_SETTEXT, 0,
(LPARAM)szBuffer);
+
+
return TRUE;
default:
break;
@@ -406,6 +396,65 @@
}
VOID
+InitializePropertyDialog(
+ LANSTATUSUI_CONTEXT * pContext,
+ NETCON_PROPERTIES * pProperties)
+{
+ DWORD dwSize, dwAdapterIndex, dwResult;
+ LPOLESTR pStr;
+ IP_ADAPTER_INFO * pAdapterInfo, *pCurAdapter;
+
+ if (FAILED(StringFromCLSID(&pProperties->guidId, &pStr)))
+ {
+ return;
+ }
+
+ /* get the IfTable */
+ dwSize = 0;
+ dwResult = GetAdaptersInfo(NULL, &dwSize);
+ if (dwResult!= ERROR_BUFFER_OVERFLOW)
+ {
+ CoTaskMemFree(pStr);
+ return;
+ }
+
+ pAdapterInfo = (PIP_ADAPTER_INFO)CoTaskMemAlloc(dwSize);
+ if (!pAdapterInfo)
+ {
+ CoTaskMemFree(pAdapterInfo);
+ CoTaskMemFree(pStr);
+ return;
+ }
+
+ if (GetAdaptersInfo(pAdapterInfo, &dwSize) != NO_ERROR)
+ {
+ CoTaskMemFree(pAdapterInfo);
+ CoTaskMemFree(pStr);
+ return;
+ }
+
+ if (!GetAdapterIndexFromNetCfgInstanceId(pAdapterInfo, pStr, &dwAdapterIndex))
+ {
+ CoTaskMemFree(pAdapterInfo);
+ CoTaskMemFree(pStr);
+ return;
+ }
+
+ pCurAdapter = pAdapterInfo;
+ while(pCurAdapter->Index != dwAdapterIndex)
+ pCurAdapter = pCurAdapter->Next;
+
+
+ pContext->IpAddress = inet_addr(pCurAdapter->IpAddressList.IpAddress.String);
+ pContext->SubnetMask = inet_addr(pCurAdapter->IpAddressList.IpMask.String);
+ pContext->Gateway = inet_addr(pCurAdapter->GatewayList.IpAddress.String);
+ pContext->DHCPEnabled = pCurAdapter->DhcpEnabled;
+ CoTaskMemFree(pStr);
+ CoTaskMemFree(pAdapterInfo);
+ pContext->dwAdapterIndex = dwAdapterIndex;
+}
+
+VOID
ShowStatusPropertyDialog(
LANSTATUSUI_CONTEXT * pContext,
HWND hwndDlg)
@@ -428,7 +477,7 @@
pinfo.pszCaption = pProperties->pszwName;
pinfo.dwFlags |= PSH_PROPTITLE;
}
-
+ InitializePropertyDialog(pContext, pProperties);
if (pProperties->MediaType == NCM_LAN && pProperties->Status ==
NCS_CONNECTED)
{
hppages[0] = InitializePropertySheetPage(MAKEINTRESOURCEW(IDD_LAN_NETSTATUS),
LANStatusUiDlg, (LPARAM)pContext, NULL);
@@ -449,6 +498,7 @@
{
ShowNetConnectionProperties(pContext->pNet, pContext->hwndDlg);
}
+
NcFreeNetconProperties(pProperties);
}
}
Modified: trunk/reactos/dll/win32/netshell/netshell.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/netshel…
==============================================================================
--- trunk/reactos/dll/win32/netshell/netshell.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/netshell.rbuild [iso-8859-1] Wed Oct 15 12:20:55
2008
@@ -17,6 +17,7 @@
<library>uuid</library>
<library>advapi32</library>
<library>setupapi</library>
+ <library>ws2_32</library>
<library>comctl32</library>
<pch>precomp.h</pch>
<file>netshell.c</file>
Modified: trunk/reactos/dll/win32/netshell/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/precomp…
==============================================================================
--- trunk/reactos/dll/win32/netshell/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/precomp.h [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -14,7 +14,7 @@
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
-
+#include <winsock2.h>
#include <windows.h>
#include <shlguid.h>
Modified: trunk/reactos/dll/win32/netshell/res/neterror.ico
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
==============================================================================
Binary files - no diff available.
Modified: trunk/reactos/dll/win32/netshell/res/netidle.ico
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
==============================================================================
Binary files - no diff available.
Modified: trunk/reactos/dll/win32/netshell/res/netoff.ico
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
==============================================================================
Binary files - no diff available.
Modified: trunk/reactos/dll/win32/netshell/res/netrec.ico
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
==============================================================================
Binary files - no diff available.
Modified: trunk/reactos/dll/win32/netshell/res/nettrans.ico
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
==============================================================================
Binary files - no diff available.
Modified: trunk/reactos/dll/win32/netshell/res/nettrrec.ico
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
==============================================================================
Binary files - no diff available.
Modified: trunk/reactos/dll/win32/netshell/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/resourc…
==============================================================================
--- trunk/reactos/dll/win32/netshell/resource.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/resource.h [iso-8859-1] Wed Oct 15 12:20:55 2008
@@ -78,4 +78,6 @@
#define IDS_FORMAT_GBIT 10203
#define IDS_DURATION_DAY 10204
#define IDS_DURATION_DAYS 10205
+#define IDS_ASSIGNED_DHCP 10206
+#define IDS_ASSIGNED_MANUAL 10207