ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2008
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
27 participants
747 discussions
Start a n
N
ew thread
[dreimer] 36293: ByeBye 2nd Path Dialog. Now the shortcuts get both the same path
by dreimer@svn.reactos.org
Author: dreimer Date: Wed Sep 17 14:48:50 2008 New Revision: 36293 URL:
http://svn.reactos.org/svn/reactos?rev=36293&view=rev
Log: ByeBye 2nd Path Dialog. Now the shortcuts get both the same path Removed: trunk/tools/RosBE/RosBE-Windows/RosSourceDir64.ini trunk/tools/RosBE/RosBE-Windows/RosSourceDir64.nsh Modified: trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi Modified: trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosBE64.…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi [iso-8859-1] Wed Sep 17 14:48:50 2008 @@ -33,7 +33,6 @@ !include "MUI2.nsh" !include "InstallOptions.nsh" !include "RosSourceDir.nsh" -!include "RosSourceDir64.nsh" !include "LogicLib.nsh" !include "x64.nsh" @@ -54,7 +53,6 @@ ${Endif} Call UninstallPrevious !insertmacro INSTALLOPTIONS_EXTRACT "RosSourceDir.ini" - !insertmacro INSTALLOPTIONS_EXTRACT "RosSourceDir64.ini" FunctionEnd ;; @@ -75,8 +73,6 @@ ;; var REACTOS_SOURCE_DIRECTORY !insertmacro CUSTOM_PAGE_ROSDIRECTORY -var REACTOS_SOURCE_DIRECTORY64 -!insertmacro CUSTOM_PAGE_ROSDIRECTORY64 ;; ;; Start menu page @@ -273,7 +269,7 @@ CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" SetOutPath $REACTOS_SOURCE_DIRECTORY CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\rosbe.ico" - SetOutPath $REACTOS_SOURCE_DIRECTORY64 + SetOutPath $REACTOS_SOURCE_DIRECTORY CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\ReactOS Build Environment 64-bit.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd" amd64' "$INSTDIR\rosbe.ico" SetOutPath $PROFILE CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Standard MinGW Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\MinGW.cmd"' "$INSTDIR\mingw.ico" @@ -293,7 +289,7 @@ ;; SetOutPath $REACTOS_SOURCE_DIRECTORY CreateShortCut "$DESKTOP\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\rosbe.ico" - SetOutPath $REACTOS_SOURCE_DIRECTORY64 + SetOutPath $REACTOS_SOURCE_DIRECTORY CreateShortCut "$DESKTOP\ReactOS Build Environment 64-bit.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd" amd64' "$INSTDIR\rosbe.ico" SetOutPath $PROFILE CreateShortCut "$DESKTOP\Standard MinGW Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\MinGW.cmd"' "$INSTDIR\mingw.ico" @@ -307,7 +303,7 @@ ;; SetOutPath $REACTOS_SOURCE_DIRECTORY CreateShortCut "$QUICKLAUNCH\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\rosbe.ico" - SetOutPath $REACTOS_SOURCE_DIRECTORY64 + SetOutPath $REACTOS_SOURCE_DIRECTORY CreateShortCut "$QUICKLAUNCH\ReactOS Build Environment 64-bit.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd" amd64' "$INSTDIR\rosbe.ico" SetOutPath $PROFILE CreateShortCut "$QUICKLAUNCH\Standard MinGW Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\MinGW.cmd"' "$INSTDIR\mingw.ico" Removed: trunk/tools/RosBE/RosBE-Windows/RosSourceDir64.ini URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosSourc…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/RosSourceDir64.ini [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/RosSourceDir64.ini (removed) @@ -1,26 +1,0 @@ -[Settings] -NumFields=3 - -[Field 1] -Type=Groupbox -Text=ReactOS 64 Bit Source Directory -Left=0 -Right=-1 -Top=72 -Bottom=109 - -[Field 2] -Type=DirRequest -State= -Left=10 -Right=-10 -Top=86 -Bottom=99 - -[Field 3] -Type=Label -Text=Select the directory where the ReactOS 64 Bit Sources are located or will be checked out to later. -Left=0 -Right=-1 -Top=6 -Bottom=32 Removed: trunk/tools/RosBE/RosBE-Windows/RosSourceDir64.nsh URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosSourc…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/RosSourceDir64.nsh [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/RosSourceDir64.nsh (removed) @@ -1,16 +1,0 @@ -!macro CUSTOM_PAGE_ROSDIRECTORY64 - PageEx custom - Caption "" - PageCallBacks "RosDir64.show" "RosDir64.leave" - PageExEnd - - Function RosDir64.show - !insertmacro MUI_HEADER_TEXT "Select ReactOS 64 Bit Source Location" "Select the directory where the ReactOS 64 Bit sources are located or will be checked out to later." - !insertmacro INSTALLOPTIONS_WRITE "RosSourceDir64.ini" "Field 2" "State" "$PROFILE\reactos" - !insertmacro INSTALLOPTIONS_DISPLAY "RosSourceDir64.ini" - FunctionEnd - - Function RosDir64.leave - !insertmacro INSTALLOPTIONS_READ $REACTOS_SOURCE_DIRECTORY64 "RosSourceDir64.ini" "Field 2" "State" - FunctionEnd -!macroend
16 years, 3 months
1
0
0
0
[janderwald] 36292: - Use Ged's time updating code from ncpa module - Periodically refresh timer for status dialog - Make property sheet modal
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Sep 17 14:44:05 2008 New Revision: 36292 URL:
http://svn.reactos.org/svn/reactos?rev=36292&view=rev
Log: - Use Ged's time updating code from ncpa module - Periodically refresh timer for status dialog - Make property sheet modal Modified: trunk/reactos/dll/win32/netshell/lang/de-DE.rc trunk/reactos/dll/win32/netshell/lanstatusui.c trunk/reactos/dll/win32/netshell/resource.h 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 Sep 17 14:44:05 2008 @@ -83,5 +83,6 @@ IDS_FORMAT_KBIT "%u KBit/s" IDS_FORMAT_MBIT "%u MBit/s" IDS_FORMAT_GBIT "%u GBit/s" - + IDS_DURATION_DAY "%d Tag %s" + IDS_DURATION_DAYS "%d Tage %s" 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 Sep 17 14:44:05 2008 @@ -25,37 +25,57 @@ { INetConnection *pNet; HWND hwndDlg; + DWORD dwAdapterIndex; + UINT_PTR nIDEvent; DWORD dwInOctets; DWORD dwOutOctets; }LANSTATUSUI_CONTEXT; VOID -UpdateLanStatusUIDlg(HWND hwndDlg, MIB_IFROW * IfEntry) +UpdateLanStatusUIDlg(HWND hwndDlg, LANSTATUSUI_CONTEXT * pContext) { WCHAR szFormat[MAX_PATH] = {0}; WCHAR szBuffer[MAX_PATH] = {0}; - - if (IfEntry->dwSpeed < 1000) + MIB_IFROW IfEntry; + SYSTEMTIME TimeConnected; + DWORD DurationSeconds; + WCHAR Buffer[100]; + WCHAR DayBuffer[30]; + WCHAR LocBuffer[50]; +#if 0 + ULONGLONG Ticks; +#else + DWORD Ticks; +#endif + + ZeroMemory(&IfEntry, sizeof(IfEntry)); + IfEntry.dwIndex = pContext->dwAdapterIndex; + if(GetIfEntry(&IfEntry) != NO_ERROR) + { + return; + } + + if (IfEntry.dwSpeed < 1000) { if (LoadStringW(netshell_hInstance, IDS_FORMAT_BIT, szFormat, sizeof(szFormat)/sizeof(WCHAR))) { - swprintf(szBuffer, szFormat, IfEntry->dwSpeed); + swprintf(szBuffer, szFormat, IfEntry.dwSpeed); SendDlgItemMessageW(hwndDlg, IDC_SPEED, WM_SETTEXT, 0, (LPARAM)szBuffer); } } - else if (IfEntry->dwSpeed < 1000000) + else if (IfEntry.dwSpeed < 1000000) { if (LoadStringW(netshell_hInstance, IDS_FORMAT_KBIT, szFormat, sizeof(szFormat)/sizeof(WCHAR))) { - swprintf(szBuffer, szFormat, IfEntry->dwSpeed/1000); + swprintf(szBuffer, szFormat, IfEntry.dwSpeed/1000); SendDlgItemMessageW(hwndDlg, IDC_SPEED, WM_SETTEXT, 0, (LPARAM)szBuffer); } } - else if (IfEntry->dwSpeed < 1000000000) + else if (IfEntry.dwSpeed < 1000000000) { if (LoadStringW(netshell_hInstance, IDS_FORMAT_MBIT, szFormat, sizeof(szFormat)/sizeof(WCHAR))) { - swprintf(szBuffer, szFormat, IfEntry->dwSpeed/1000000); + swprintf(szBuffer, szFormat, IfEntry.dwSpeed/1000000); SendDlgItemMessageW(hwndDlg, IDC_SPEED, WM_SETTEXT, 0, (LPARAM)szBuffer); } } @@ -63,37 +83,71 @@ { if (LoadStringW(netshell_hInstance, IDS_FORMAT_KBIT, szFormat, sizeof(szFormat)/sizeof(WCHAR))) { - swprintf(szBuffer, szFormat, IfEntry->dwSpeed/1000000000); + swprintf(szBuffer, szFormat, IfEntry.dwSpeed/1000000000); SendDlgItemMessageW(hwndDlg, IDC_SPEED, WM_SETTEXT, 0, (LPARAM)szBuffer); } } - if (StrFormatByteSizeW(IfEntry->dwInOctets, szBuffer, sizeof(szFormat)/sizeof(WCHAR))) + if (StrFormatByteSizeW(IfEntry.dwInOctets, szBuffer, sizeof(szFormat)/sizeof(WCHAR))) { SendDlgItemMessageW(hwndDlg, IDC_RECEIVED, WM_SETTEXT, 0, (LPARAM)szBuffer); } - if (StrFormatByteSizeW(IfEntry->dwOutOctets, szBuffer, sizeof(szFormat)/sizeof(WCHAR))) + if (StrFormatByteSizeW(IfEntry.dwOutOctets, szBuffer, sizeof(szFormat)/sizeof(WCHAR))) { SendDlgItemMessageW(hwndDlg, IDC_SEND, WM_SETTEXT, 0, (LPARAM)szBuffer); } //FIXME //set duration - -} +#if 0 + Ticks = GetTickCount64(); +#else + Ticks = GetTickCount(); +#endif + + DurationSeconds = Ticks / 1000; + TimeConnected.wSecond = (DurationSeconds % 60); + TimeConnected.wMinute = (DurationSeconds / 60) % 60; + TimeConnected.wHour = (DurationSeconds / (60 * 60)) % 24; + TimeConnected.wDay = DurationSeconds / (60 * 60 * 24); + + if (!GetTimeFormatW(LOCALE_USER_DEFAULT, 0, &TimeConnected, L"HH':'mm':'ss", LocBuffer, sizeof(LocBuffer) / sizeof(LocBuffer[0]))) + return; + + if (!TimeConnected.wDay) + { + SendDlgItemMessageW(hwndDlg, IDC_DURATION, WM_SETTEXT, 0, (LPARAM)LocBuffer); + } + else + { + if (TimeConnected.wDay == 1) + { + if (!LoadStringW(netshell_hInstance, IDS_DURATION_DAY, DayBuffer, sizeof(DayBuffer) / sizeof(DayBuffer[0]))) + DayBuffer[0] = L'\0'; + } + else + { + if (!LoadStringW(netshell_hInstance, IDS_DURATION_DAYS, DayBuffer, sizeof(DayBuffer) / sizeof(DayBuffer[0]))) + DayBuffer[0] = L'\0'; + } + swprintf(Buffer, DayBuffer, TimeConnected.wDay, LocBuffer); + SendDlgItemMessageW(hwndDlg, IDC_DURATION, WM_SETTEXT, 0, (LPARAM)Buffer); + } + +} + VOID -InitializeLANStatusUiDlg(HWND hwndDlg, INetConnection * pNet) +InitializeLANStatusUiDlg(HWND hwndDlg, LANSTATUSUI_CONTEXT * pContext) { WCHAR szBuffer[MAX_PATH] = {0}; NETCON_PROPERTIES * pProperties = NULL; - MIB_IFROW IfEntry; DWORD dwSize, dwAdapterIndex, dwResult; LPOLESTR pStr; IP_ADAPTER_INFO * pAdapterInfo; - if (INetConnection_GetProperties(pNet, &pProperties) != NOERROR) + if (INetConnection_GetProperties(pContext->pNet, &pProperties) != NOERROR) return; if (pProperties->Status == NCS_DISCONNECTED) @@ -145,18 +199,11 @@ return; } CoTaskMemFree(pStr); - - /* get detailed adapter info */ - ZeroMemory(&IfEntry, sizeof(IfEntry)); - IfEntry.dwIndex = dwAdapterIndex; - if(GetIfEntry(&IfEntry) != NO_ERROR) - { - CoTaskMemFree(pAdapterInfo); - return; - } - - UpdateLanStatusUIDlg(hwndDlg, &IfEntry); - + pContext->dwAdapterIndex = dwAdapterIndex; + + /* update adapter info */ + UpdateLanStatusUIDlg(hwndDlg, pContext); + pContext->nIDEvent = SetTimer(hwndDlg, 0xFABC, 1000, NULL); CoTaskMemFree(pAdapterInfo); } @@ -178,7 +225,8 @@ case WM_INITDIALOG: page = (PROPSHEETPAGE*)lParam; pContext = (LANSTATUSUI_CONTEXT*)page->lParam; - InitializeLANStatusUiDlg(hwndDlg, pContext->pNet); + pContext->hwndDlg = GetParent(hwndDlg); + InitializeLANStatusUiDlg(hwndDlg, pContext); SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pContext); return TRUE; case WM_COMMAND: @@ -203,9 +251,17 @@ if (lppsn->hdr.code == PSN_APPLY || lppsn->hdr.code == PSN_RESET) { pContext = (LANSTATUSUI_CONTEXT*)GetWindowLongPtr(hwndDlg, DWLP_USER); - DestroyWindow(pContext->hwndDlg); + KillTimer(hwndDlg, pContext->nIDEvent); + SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR); pContext->hwndDlg = NULL; return PSNRET_NOERROR; + } + break; + case WM_TIMER: + pContext = (LANSTATUSUI_CONTEXT*)GetWindowLongPtr(hwndDlg, DWLP_USER); + if (wParam == (WPARAM)pContext->nIDEvent) + { + UpdateLanStatusUIDlg(hwndDlg, pContext); } break; } @@ -225,7 +281,7 @@ ZeroMemory(&pinfo, sizeof(PROPSHEETHEADERW)); ZeroMemory(hppages, sizeof(hppages)); pinfo.dwSize = sizeof(PROPSHEETHEADERW); - pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW | PSH_MODELESS; + pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW; pinfo.u3.phpage = hppages; pinfo.hwndParent = hwndDlg; 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 Sep 17 14:44:05 2008 @@ -68,4 +68,6 @@ #define IDS_FORMAT_MBIT 10201 #define IDS_FORMAT_KBIT 10202 #define IDS_FORMAT_GBIT 10203 +#define IDS_DURATION_DAY 10204 +#define IDS_DURATION_DAYS 10205
16 years, 3 months
1
0
0
0
[fireball] 36291: - ObQueryNameString can return STATUS_INFO_LENGTH_MISMATCH, so make sure SeInitializeProcessAuditName supports that along with BUFFER_OVERFLOW and BUFFER_TOO_SMALL, which an Ob query name procedure could return. - ObQueryNameString can return STATUS_INFO_LENGTH_MISMATCH, take this into account and report a proper buffer length to the caller in IopQueryNameFile.
by fireball@svn.reactos.org
Author: fireball Date: Wed Sep 17 13:38:14 2008 New Revision: 36291 URL:
http://svn.reactos.org/svn/reactos?rev=36291&view=rev
Log: - ObQueryNameString can return STATUS_INFO_LENGTH_MISMATCH, so make sure SeInitializeProcessAuditName supports that along with BUFFER_OVERFLOW and BUFFER_TOO_SMALL, which an Ob query name procedure could return. - ObQueryNameString can return STATUS_INFO_LENGTH_MISMATCH, take this into account and report a proper buffer length to the caller in IopQueryNameFile. Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c trunk/reactos/ntoskrnl/se/audit.c Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/file.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/file.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/file.c [iso-8859-1] Wed Sep 17 13:38:14 2008 @@ -1283,6 +1283,7 @@ PFILE_NAME_INFORMATION LocalFileInfo; PFILE_OBJECT FileObject = (PFILE_OBJECT)ObjectBody; ULONG LocalReturnLength, FileLength; + BOOLEAN LengthMismatch = FALSE; NTSTATUS Status; PWCHAR p; IOTRACE(IO_FILE_DEBUG, "ObjectBody: %p\n", ObjectBody); @@ -1303,7 +1304,7 @@ LocalInfo, Length, &LocalReturnLength); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && (Status != STATUS_INFO_LENGTH_MISMATCH)) { /* Free the buffer and fail */ ExFreePool(LocalInfo); @@ -1326,9 +1327,13 @@ /* Check if this already filled our buffer */ if (LocalReturnLength > Length) { - /* Free the buffer and fail */ - ExFreePool(LocalInfo); - return STATUS_BUFFER_OVERFLOW; + /* Set the length mismatch to true, so that we can return + * the proper buffer size to the caller later + */ + LengthMismatch = TRUE; + + /* Save the initial buffer length value */ + *ReturnLength = LocalReturnLength; } /* Now get the file name buffer and check the length needed */ @@ -1340,7 +1345,7 @@ /* Query the File name */ Status = IoQueryFileInformation(FileObject, FileNameInformation, - FileLength, + LengthMismatch ? Length : FileLength, LocalFileInfo, &LocalReturnLength); if (NT_ERROR(Status)) @@ -1351,7 +1356,23 @@ } /* ROS HACK. VFAT SUCKS */ - if (NT_WARNING(Status)) LocalReturnLength = FileLength; + if (NT_WARNING(Status)) + { + DPRINT("Status 0x%08x, LRN 0x%x, FileLength 0x%x\n", Status, + LocalReturnLength, FileLength); + LocalReturnLength = FileLength; + } + + /* If the provided buffer is too small, return the required size */ + if (LengthMismatch) + { + /* Add the required length */ + *ReturnLength += LocalFileInfo->FileNameLength; + + /* Free the allocated buffer and return failure */ + ExFreePool(LocalInfo); + return STATUS_BUFFER_OVERFLOW; + } /* Now calculate the new lengths left */ FileLength = LocalReturnLength - Modified: trunk/reactos/ntoskrnl/se/audit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/audit.c?rev=36…
============================================================================== --- trunk/reactos/ntoskrnl/se/audit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/audit.c [iso-8859-1] Wed Sep 17 13:38:14 2008 @@ -62,7 +62,8 @@ sizeof(LocalNameInfo), &ReturnLength); if (((Status == STATUS_BUFFER_OVERFLOW) || - (Status == STATUS_BUFFER_TOO_SMALL)) && + (Status == STATUS_BUFFER_TOO_SMALL) || + (Status == STATUS_INFO_LENGTH_MISMATCH)) && (ReturnLength != sizeof(LocalNameInfo))) { /* Allocate required size */
16 years, 3 months
1
0
0
0
[janderwald] 36290: - Use updated icons - Only load Taskbar Notifications once
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Sep 17 11:53:05 2008 New Revision: 36290 URL:
http://svn.reactos.org/svn/reactos?rev=36290&view=rev
Log: - Use updated icons - Only load Taskbar Notifications once Added: trunk/reactos/dll/win32/netshell/res/neterror.ico (with props) trunk/reactos/dll/win32/netshell/res/netidle.ico (with props) trunk/reactos/dll/win32/netshell/res/netoff.ico (with props) trunk/reactos/dll/win32/netshell/res/netrec.ico (with props) trunk/reactos/dll/win32/netshell/res/nettrans.ico (with props) trunk/reactos/dll/win32/netshell/res/nettrrec.ico (with props) Removed: trunk/reactos/dll/win32/netshell/res/network-error.png trunk/reactos/dll/win32/netshell/res/network-idle.png trunk/reactos/dll/win32/netshell/res/network-offline.png trunk/reactos/dll/win32/netshell/res/network-receive.png trunk/reactos/dll/win32/netshell/res/network-transmit-receive.png trunk/reactos/dll/win32/netshell/res/network-transmit.png Modified: trunk/reactos/dll/win32/netshell/lanstatusui.c trunk/reactos/dll/win32/netshell/netshell.rc trunk/reactos/dll/win32/netshell/resource.h 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 Sep 17 11:53:05 2008 @@ -315,6 +315,9 @@ ULONG Index; NOTIFICATION_ITEM * pItem, *pLast = NULL; + if (This->pHead) + return S_OK; + /* get an instance to of IConnectionManager */ hr = INetConnectionManager_Constructor(NULL, &IID_INetConnectionManager, (LPVOID*)&INetConMan); if (FAILED(hr)) @@ -348,7 +351,7 @@ nid.u.uVersion = 3; nid.uCallbackMessage = WM_SHOWSTATUSDLG; nid.hWnd = hwndDlg; - nid.hIcon = LoadIcon(netshell_hInstance, MAKEINTRESOURCE(IDI_SHELL_NETWORK_FOLDER)); //FIXME + nid.hIcon = LoadIcon(netshell_hInstance, MAKEINTRESOURCE(IDI_NET_IDLE)); hr = INetConnection_GetProperties(INetCon, &pProps); if (SUCCEEDED(hr)) { Modified: trunk/reactos/dll/win32/netshell/netshell.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/netshel…
============================================================================== --- trunk/reactos/dll/win32/netshell/netshell.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netshell/netshell.rc [iso-8859-1] Wed Sep 17 11:53:05 2008 @@ -16,6 +16,12 @@ IDI_SHELL_NETWORK_FOLDER ICON "res/netshell.ico" +IDI_NET_ERROR ICON "res/neterror.ico" +IDI_NET_IDLE ICON "res/netidle.ico" +IDI_NET_OFF ICON "res/netoff.ico" +IDI_NET_REC ICON "res/netrec.ico" +IDI_NET_TRANS ICON "res/nettrans.ico" +IDI_NET_TRANSREC ICON "res/nettrrec.ico" #include "lang/bg-BG.rc" #include "lang/de-DE.rc" Added: trunk/reactos/dll/win32/netshell/res/neterror.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/netshell/res/neterror.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/netshell/res/netidle.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/netshell/res/netidle.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/netshell/res/netoff.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/netshell/res/netoff.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/netshell/res/netrec.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/netshell/res/netrec.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/netshell/res/nettrans.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/netshell/res/nettrans.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/netshell/res/nettrrec.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/netshell/res/nettrrec.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Removed: trunk/reactos/dll/win32/netshell/res/network-error.png URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Removed: trunk/reactos/dll/win32/netshell/res/network-idle.png URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Removed: trunk/reactos/dll/win32/netshell/res/network-offline.png URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Removed: trunk/reactos/dll/win32/netshell/res/network-receive.png URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Removed: trunk/reactos/dll/win32/netshell/res/network-transmit-receive.png URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Removed: trunk/reactos/dll/win32/netshell/res/network-transmit.png URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - 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 Sep 17 11:53:05 2008 @@ -5,6 +5,12 @@ #define IDI_HORIZONTAL 101 #define IDI_NETSTAT 102 #define IDI_VERTICAL 103 +#define IDI_NET_ERROR 104 +#define IDI_NET_IDLE 105 +#define IDI_NET_OFF 106 +#define IDI_NET_REC 107 +#define IDI_NET_TRANS 108 +#define IDI_NET_TRANSREC 109 /* dialogs */ #define IDD_NETPROPERTIES 400
16 years, 3 months
1
0
0
0
[cwittich] 36289: add icons for netshell (from tango project)
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Sep 17 11:35:56 2008 New Revision: 36289 URL:
http://svn.reactos.org/svn/reactos?rev=36289&view=rev
Log: add icons for netshell (from tango project) Added: trunk/reactos/dll/win32/netshell/res/network-error.png (with props) trunk/reactos/dll/win32/netshell/res/network-idle.png (with props) trunk/reactos/dll/win32/netshell/res/network-offline.png (with props) trunk/reactos/dll/win32/netshell/res/network-receive.png (with props) trunk/reactos/dll/win32/netshell/res/network-transmit-receive.png (with props) trunk/reactos/dll/win32/netshell/res/network-transmit.png (with props) Added: trunk/reactos/dll/win32/netshell/res/network-error.png URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/netshell/res/network-error.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/netshell/res/network-idle.png URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/netshell/res/network-idle.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/netshell/res/network-offline.png URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/netshell/res/network-offline.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/netshell/res/network-receive.png URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/netshell/res/network-receive.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/netshell/res/network-transmit-receive.png URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/netshell/res/network-transmit-receive.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/netshell/res/network-transmit.png URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/res/net…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/netshell/res/network-transmit.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream
16 years, 3 months
1
0
0
0
[janderwald] 36288: - Initialize members
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Sep 17 11:19:35 2008 New Revision: 36288 URL:
http://svn.reactos.org/svn/reactos?rev=36288&view=rev
Log: - Initialize members Modified: trunk/reactos/dll/win32/netshell/connectmanager.c Modified: trunk/reactos/dll/win32/netshell/connectmanager.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/connect…
============================================================================== --- trunk/reactos/dll/win32/netshell/connectmanager.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netshell/connectmanager.c [iso-8859-1] Wed Sep 17 11:19:35 2008 @@ -689,6 +689,8 @@ sf->ref = 1; sf->lpVtbl = &vt_NetConnectionManager; sf->lpVtblNetConnection = &vt_EnumNetConnection; + sf->pHead = NULL; + sf->pCurrent = NULL; if (!SUCCEEDED (INetConnectionManager_QueryInterface ((INetConnectionManager*)sf, riid, ppv)))
16 years, 3 months
1
0
0
0
[janderwald] 36287: - Preload NetworkConnection Taskbar Notification - Use Notification as a singleton - Execute the status dialog by using the NetCfgInstanceId of the connection
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Sep 17 10:20:04 2008 New Revision: 36287 URL:
http://svn.reactos.org/svn/reactos?rev=36287&view=rev
Log: - Preload NetworkConnection Taskbar Notification - Use Notification as a singleton - Execute the status dialog by using the NetCfgInstanceId of the connection Modified: trunk/reactos/dll/win32/netshell/lanstatusui.c trunk/reactos/dll/win32/netshell/precomp.h trunk/reactos/dll/win32/netshell/shfldr_netconnect.c 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 Sep 17 10:20:04 2008 @@ -5,17 +5,28 @@ // IID B722BCCB-4E68-101B-A2BC-00AA00404770 #define WM_SHOWSTATUSDLG (WM_USER+10) + +typedef struct tagNotificationItem +{ + struct tagNotificationItem *pNext; + CLSID guidItem; + HWND hwndDlg; +}NOTIFICATION_ITEM; + typedef struct { IOleCommandTarget * lpVtbl; INetConnectionManager * lpNetMan; LONG ref; + NOTIFICATION_ITEM * pHead; }ILanStatusImpl, *LPILanStatusImpl; typedef struct { INetConnection *pNet; HWND hwndDlg; + DWORD dwInOctets; + DWORD dwOutOctets; }LANSTATUSUI_CONTEXT; VOID @@ -290,7 +301,7 @@ } static HRESULT -InitializeNetConnectTray( +InitializeNetTaskbarNotifications( ILanStatusImpl * This) { NOTIFYICONDATAW nid; @@ -302,6 +313,7 @@ HRESULT hr; ULONG Count; ULONG Index; + NOTIFICATION_ITEM * pItem, *pLast = NULL; /* get an instance to of IConnectionManager */ hr = INetConnectionManager_Constructor(NULL, &IID_INetConnectionManager, (LPVOID*)&INetConMan); @@ -321,6 +333,11 @@ hr = IEnumNetConnection_Next(IEnumCon, 1, &INetCon, &Count); if (hr == S_OK) { + pItem = (NOTIFICATION_ITEM*)CoTaskMemAlloc(sizeof(NOTIFICATION_ITEM)); + if (!pItem) + break; + pItem->pNext = NULL; + hwndDlg = CreateDialogParamW(netshell_hInstance, MAKEINTRESOURCEW(IDD_STATUS), NULL, LANStatusDlg, (LPARAM)INetCon); if (hwndDlg) { @@ -335,13 +352,28 @@ hr = INetConnection_GetProperties(INetCon, &pProps); if (SUCCEEDED(hr)) { + CopyMemory(&pItem->guidItem, &pProps->guidId, sizeof(GUID)); + pItem->hwndDlg = hwndDlg; if (!(pProps->dwCharacter & NCCF_SHOW_ICON)) { nid.dwState = NIS_HIDDEN; } } + if (Shell_NotifyIconW(NIM_ADD, &nid)) + { + if (pLast) + pLast->pNext = pItem; + else + This->pHead = pItem; + + pLast = pItem; Index++; + } + else + { + CoTaskMemFree(pItem); + } } } }while(hr == S_OK); @@ -349,6 +381,26 @@ This->lpNetMan = INetConMan; IEnumNetConnection_Release(IEnumCon); return S_OK; +} + +HRESULT +ShowStatusDialogByCLSID( + ILanStatusImpl * This, + const GUID *pguidCmdGroup) +{ + NOTIFICATION_ITEM * pItem; + + pItem = This->pHead; + while(pItem) + { + if (IsEqualGUID(&pItem->guidItem, pguidCmdGroup)) + { + SendMessageW(pItem->hwndDlg, WM_SHOWSTATUSDLG, 0, WM_LBUTTONDOWN); + return S_OK; + } + pItem = pItem->pNext; + } + return E_FAIL; } static HRESULT @@ -390,6 +442,7 @@ IOleCommandTarget_fnRelease( IOleCommandTarget * iface) { +#if 0 ILanStatusImpl * This = (ILanStatusImpl*)iface; ULONG refCount = InterlockedDecrement(&This->ref); @@ -398,6 +451,9 @@ CoTaskMemFree (This); } return refCount; +#else + return 1; +#endif } static @@ -410,7 +466,6 @@ OLECMD *prgCmds, OLECMDTEXT *pCmdText) { - MessageBoxW(NULL, L"222222222222222222222", L"IOleCommandTarget_fnQueryStatus", MB_OK); MessageBoxW(NULL, pCmdText->rgwz, L"IOleCommandTarget_fnQueryStatus", MB_OK); return E_NOTIMPL; } @@ -432,7 +487,12 @@ { if (IsEqualIID(pguidCmdGroup, &CGID_ShellServiceObject)) { - return InitializeNetConnectTray(This); + return InitializeNetTaskbarNotifications(This); + } + else + { + /* invoke status dialog */ + return ShowStatusDialogByCLSID(This, pguidCmdGroup); } } return S_OK; @@ -452,6 +512,7 @@ HRESULT WINAPI LanConnectStatusUI_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) { ILanStatusImpl * This; + static ILanStatusImpl *cached_This = NULL; if (!ppv) return E_POINTER; @@ -466,15 +527,13 @@ This->ref = 1; This->lpVtbl = (IOleCommandTarget*)&vt_OleCommandTarget; This->lpNetMan = NULL; - - if (FAILED(IOleCommandTarget_fnQueryInterface ((IOleCommandTarget*)This, riid, ppv))) - { - IOleCommandTarget_Release((IUnknown*)This); - return E_NOINTERFACE; - } - IOleCommandTarget_Release((IUnknown*)This); - return S_OK; -} - - - + This->pHead = NULL; + + if (InterlockedCompareExchangePointer((void *)&cached_This, This, NULL) != NULL) + { + CoTaskMemFree(This); + } + + return IOleCommandTarget_fnQueryInterface ((IOleCommandTarget*)cached_This, riid, ppv); +} + 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 Sep 17 10:20:04 2008 @@ -77,6 +77,7 @@ extern HINSTANCE netshell_hInstance; extern const GUID CLSID_NetworkConnections; extern const GUID CLSID_LANConnectUI; +extern const GUID CLSID_LanConnectStatusUI; extern const GUID GUID_DEVCLASS_NET; Modified: trunk/reactos/dll/win32/netshell/shfldr_netconnect.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/shfldr_…
============================================================================== --- trunk/reactos/dll/win32/netshell/shfldr_netconnect.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netshell/shfldr_netconnect.c [iso-8859-1] Wed Sep 17 10:20:04 2008 @@ -37,6 +37,7 @@ /* both paths are parsible from the desktop */ LPITEMIDLIST pidlRoot; /* absolute pidl */ LPCITEMIDLIST apidl; /* currently focused font item */ + IOleCommandTarget * lpOleCmd; } IGenericSFImpl, *LPIGenericSFImpl; @@ -749,6 +750,27 @@ } HRESULT +ShowNetConnectionStatus( + IGenericSFImpl * This, + INetConnection * pNetConnect, + HWND hwnd) +{ + NETCON_PROPERTIES * pProperties; + HRESULT hr; + + if (!This->lpOleCmd) + return E_FAIL; + + if (INetConnection_GetProperties(pNetConnect, &pProperties) != NOERROR) + return E_FAIL; + + hr = IOleCommandTarget_Exec(This->lpOleCmd, &pProperties->guidId, 2, OLECMDEXECOPT_DODEFAULT, NULL, NULL); + + NcFreeNetconProperties(pProperties); + return hr; +} + +HRESULT ShowNetConnectionProperties( INetConnection * pNetConnect, HWND hwnd) @@ -810,7 +832,6 @@ { IGenericSFImpl * This = impl_from_IContextMenu2(iface); VALUEStruct * val; - HRESULT hr = S_OK; val = _ILGetValueStruct(This->apidl); @@ -819,13 +840,7 @@ if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_STATUS)) { -#if 0 - if (pProperties->MediaType == NCM_LAN) - { - hr = ShowLANConnectionStatusDialog(pProperties); - } -#endif - return hr; + return ShowNetConnectionStatus(This, val->pItem, lpcmi->hwnd); } else if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_PROPERTIES)) { @@ -977,6 +992,7 @@ HRESULT WINAPI ISF_NetConnect_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) { IGenericSFImpl *sf; + HRESULT hr; if (!ppv) return E_POINTER; @@ -991,6 +1007,14 @@ sf->lpVtbl = &vt_ShellFolder2; sf->lpVtblPersistFolder2 = &vt_PersistFolder2; sf->lpVtblContextMenu = &vt_ContextMenu2; + + hr = CoCreateInstance(&CLSID_LanConnectStatusUI, NULL, CLSCTX_INPROC_SERVER, &IID_IOleCommandTarget, (LPVOID*)&sf->lpOleCmd); + if (FAILED(hr)) + sf->lpOleCmd = NULL; + else + IOleCommandTarget_Exec(sf->lpOleCmd, &CGID_ShellServiceObject, 2, OLECMDEXECOPT_DODEFAULT, NULL, NULL); + + sf->pidlRoot = _ILCreateNetConnect(); /* my qualified pidl */ if (!SUCCEEDED (IShellFolder2_QueryInterface ((IShellFolder2*)sf, riid, ppv)))
16 years, 3 months
1
0
0
0
[dreimer] 36286: Start of a seperate Installer for 32 bit only and 32 bit plus the other arches.
by dreimer@svn.reactos.org
Author: dreimer Date: Wed Sep 17 09:03:48 2008 New Revision: 36286 URL:
http://svn.reactos.org/svn/reactos?rev=36286&view=rev
Log: Start of a seperate Installer for 32 bit only and 32 bit plus the other arches. Added: trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi (with props) Modified: trunk/tools/RosBE/RosBE-Windows/RosBE.nsi Modified: trunk/tools/RosBE/RosBE-Windows/RosBE.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosBE.ns…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/RosBE.nsi [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/RosBE.nsi [iso-8859-1] Wed Sep 17 09:03:48 2008 @@ -33,7 +33,6 @@ !include "MUI2.nsh" !include "InstallOptions.nsh" !include "RosSourceDir.nsh" -!include "RosSourceDir64.nsh" !include "LogicLib.nsh" !include "x64.nsh" @@ -54,7 +53,6 @@ ${Endif} Call UninstallPrevious !insertmacro INSTALLOPTIONS_EXTRACT "RosSourceDir.ini" - !insertmacro INSTALLOPTIONS_EXTRACT "RosSourceDir64.ini" FunctionEnd ;; @@ -75,8 +73,6 @@ ;; var REACTOS_SOURCE_DIRECTORY !insertmacro CUSTOM_PAGE_ROSDIRECTORY -var REACTOS_SOURCE_DIRECTORY64 -!insertmacro CUSTOM_PAGE_ROSDIRECTORY64 ;; ;; Start menu page @@ -120,7 +116,6 @@ File /r Root\changelog.txt File /r Root\LICENSE.txt File /r Root\MinGW.cmd - File /r Root\charch.cmd File /r Root\MinGW.mac File /r Root\Build.cmd File /r Root\chdefgcc.cmd @@ -273,8 +268,6 @@ CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" SetOutPath $REACTOS_SOURCE_DIRECTORY CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\rosbe.ico" - SetOutPath $REACTOS_SOURCE_DIRECTORY64 - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\ReactOS Build Environment 64-bit.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd" amd64' "$INSTDIR\rosbe.ico" SetOutPath $PROFILE CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Standard MinGW Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\MinGW.cmd"' "$INSTDIR\mingw.ico" SetOutPath $INSTDIR @@ -293,8 +286,6 @@ ;; SetOutPath $REACTOS_SOURCE_DIRECTORY CreateShortCut "$DESKTOP\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\rosbe.ico" - SetOutPath $REACTOS_SOURCE_DIRECTORY64 - CreateShortCut "$DESKTOP\ReactOS Build Environment 64-bit.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd" amd64' "$INSTDIR\rosbe.ico" SetOutPath $PROFILE CreateShortCut "$DESKTOP\Standard MinGW Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\MinGW.cmd"' "$INSTDIR\mingw.ico" SectionEnd @@ -307,8 +298,6 @@ ;; SetOutPath $REACTOS_SOURCE_DIRECTORY CreateShortCut "$QUICKLAUNCH\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\rosbe.ico" - SetOutPath $REACTOS_SOURCE_DIRECTORY64 - CreateShortCut "$QUICKLAUNCH\ReactOS Build Environment 64-bit.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd" amd64' "$INSTDIR\rosbe.ico" SetOutPath $PROFILE CreateShortCut "$QUICKLAUNCH\Standard MinGW Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\MinGW.cmd"' "$INSTDIR\mingw.ico" SectionEnd @@ -385,12 +374,8 @@ RMDir /REBOOTOK "$INSTDIR" IfFileExists "$DESKTOP\ReactOS Build Environment.lnk" 0 +2 Delete /REBOOTOK "$DESKTOP\ReactOS Build Environment.lnk" - IfFileExists "$DESKTOP\ReactOS Build Environment 64-bit.lnk" 0 +2 - Delete /REBOOTOK "$DESKTOP\ReactOS Build Environment 64-bit.lnk" IfFileExists "$QUICKLAUNCH\ReactOS Build Environment.lnk" 0 +2 Delete /REBOOTOK "$QUICKLAUNCH\ReactOS Build Environment.lnk" - IfFileExists "$QUICKLAUNCH\ReactOS Build Environment 64-bit.lnk" 0 +2 - Delete /REBOOTOK "$QUICKLAUNCH\ReactOS Build Environment 64-bit.lnk" IfFileExists "$DESKTOP\Standard MinGW Build Environment.lnk" 0 +2 Delete /REBOOTOK "$DESKTOP\Standard MinGW Build Environment.lnk" IfFileExists "$QUICKLAUNCH\Standard MinGW Build Environment.lnk" 0 +2 Added: trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosBE64.…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi (added) +++ trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi [iso-8859-1] Wed Sep 17 09:03:48 2008 @@ -1,0 +1,468 @@ +!define PRODUCT_NAME "ReactOS Build Environment for Windows" +!define PRODUCT_VERSION "1.3" +!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\RosBE.cmd" +!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" +!define PRODUCT_UNINST_ROOT_KEY "HKCU" +!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir" + +;; +;; Basic installer options +;; +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +OutFile "RosBE-${PRODUCT_VERSION}.exe" +InstallDirRegKey HKCU "${PRODUCT_DIR_REGKEY}" "" +ShowInstDetails show +ShowUnInstDetails show + +;; +;; Add version/product information metadata to the installation file. +;; +VIAddVersionKey /LANG=1033 "FileVersion" "1.3.0.0" +VIAddVersionKey /LANG=1033 "ProductVersion" "${PRODUCT_VERSION}" +VIAddVersionKey /LANG=1033 "ProductName" "${PRODUCT_NAME}" +VIAddVersionKey /LANG=1033 "Comments" "This installer was written by Peter Ward and Daniel Reimer using Nullsoft Scriptable Install System (
http://nsis.sourceforge.net/
)" +VIAddVersionKey /LANG=1033 "CompanyName" "ReactOS Team" +VIAddVersionKey /LANG=1033 "LegalTrademarks" "Copyright © 2008 ReactOS Team" +VIAddVersionKey /LANG=1033 "LegalCopyright" "Copyright © 2008 ReactOS Team" +VIAddVersionKey /LANG=1033 "FileDescription" "${PRODUCT_NAME} Setup" +VIProductVersion "1.2.0.0" + +CRCCheck force +SetCompressor /FINAL /SOLID lzma + +!include "MUI2.nsh" +!include "InstallOptions.nsh" +!include "RosSourceDir.nsh" +!include "RosSourceDir64.nsh" +!include "LogicLib.nsh" +!include "x64.nsh" + +;; +;; Read our custom page ini, remove previous version and make sure only +;; one instance of the installer is running. +;; +Function .onInit + System::Call 'kernel32::CreateMutexA(i 0, i 0, t "RosBE-v${PRODUCT_VERSION}-Installer") i .r1 ?e' + Pop $R0 + StrCmp $R0 0 +3 + MessageBox MB_OK|MB_ICONEXCLAMATION "The ${PRODUCT_NAME} v${PRODUCT_VERSION} installer is already running." + Abort + ${If} ${RunningX64} + StrCpy $INSTDIR "$PROGRAMFILES64\RosBE" + ${Else} + StrCpy $INSTDIR "$PROGRAMFILES\RosBE" + ${Endif} + Call UninstallPrevious + !insertmacro INSTALLOPTIONS_EXTRACT "RosSourceDir.ini" + !insertmacro INSTALLOPTIONS_EXTRACT "RosSourceDir64.ini" +FunctionEnd + +;; +;; MUI Settings +;; +!define MUI_ABORTWARNING +!define MUI_ICON "Icons\rosbe.ico" +!define MUI_UNICON "Icons\uninstall.ico" +!define MUI_COMPONENTSPAGE_NODESC + +!define MUI_WELCOMEPAGE_TITLE_3LINES +!insertmacro MUI_PAGE_WELCOME +;!insertmacro MUI_PAGE_LICENSE "Root\License.txt" +!insertmacro MUI_PAGE_DIRECTORY + +;; +;; ReactOS Source Directory Pages +;; +var REACTOS_SOURCE_DIRECTORY +!insertmacro CUSTOM_PAGE_ROSDIRECTORY +var REACTOS_SOURCE_DIRECTORY64 +!insertmacro CUSTOM_PAGE_ROSDIRECTORY64 + +;; +;; Start menu page +;; +var ICONS_GROUP +!define MUI_STARTMENUPAGE_NODISABLE +!define MUI_STARTMENUPAGE_DEFAULTFOLDER "ReactOS Build Environment" +!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" +!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" +!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}" +!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP + +!insertmacro MUI_PAGE_COMPONENTS + +!insertmacro MUI_PAGE_INSTFILES + +!define MUI_FINISHPAGE_TITLE_3LINES +!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.pdf" +!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED +!insertmacro MUI_PAGE_FINISH + +;; +;; Uninstaller pages +;; +!insertmacro MUI_UNPAGE_INSTFILES + +;; +;; Language and reserve files +;; +ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll" +!insertmacro MUI_LANGUAGE "English" + +Section -BaseFiles SEC01 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Icons\mingw.ico + File /r Icons\rosbe.ico + File /r Root\README.pdf + File /r Root\RosBE.mac + File /r Root\changelog.txt + File /r Root\LICENSE.txt + File /r Root\MinGW.cmd + File /r Root\charch.cmd + File /r Root\MinGW.mac + File /r Root\Build.cmd + File /r Root\chdefgcc.cmd + File /r Root\Clean.cmd + File /r Root\Help.cmd + File /r Root\RosBE.cmd + File /r Root\rosbe-gcc-env.cmd + File /r Root\TimeDate.cmd + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Components\Tools\buildtime.exe + File /r Components\Tools\chknewer.exe + File /r Components\Tools\cpucount.exe + File /r Components\Tools\flash.exe + File /r Components\Tools\getdate.exe + File /r Components\Tools\rquote.exe + File /r Components\Tools\tee.exe +SectionEnd + +Section -MinGWGCCNASM SEC02 + SetOutPath "$INSTDIR\4.1.3" + SetOverwrite try + File /r Components\4.1.3\*.* +SectionEnd + +Section "RosBE Configurator (options)" SEC03 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\options.cmd + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Components\Tools\options.exe + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" + SetOutPath $INSTDIR + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Options.lnk" \ + "$INSTDIR\Tools\options.exe" + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section "Subversion Tools (svn, ssvn)" SEC04 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\sSVN.cmd + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Components\Tools\svn.exe + File /r Components\Tools\intl3_svn.dll + File /r Components\Tools\libapr.dll + File /r Components\Tools\libeay32.dll + File /r Components\Tools\ssleay32.dll + File /r Components\Tools\libaprutil.dll + File /r Components\Tools\libdb44.dll + File /r Components\Tools\libapriconv.dll + File /r Components\Tools\libsasl.dll + File /r Components\Tools\libsvn_client-1.dll + File /r Components\Tools\libsvn_delta-1.dll + File /r Components\Tools\libsvn_diff-1.dll + File /r Components\Tools\libsvn_fs-1.dll + File /r Components\Tools\libsvn_ra-1.dll + File /r Components\Tools\libsvn_repos-1.dll + File /r Components\Tools\libsvn_subr-1.dll + File /r Components\Tools\libsvn_wc-1.dll + SetOutPath "$INSTDIR\Tools\licenses" + SetOverwrite try + File /r Components\Tools\licenses\*.* +SectionEnd + +Section "Shortcut Tool (scut)" SEC05 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\scut.cmd + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Components\Tools\scut.exe +SectionEnd + +Section "ccache - Compiler Cache" SEC06 + SetShellVarContext current + SetOutPath "$INSTDIR\4.1.3\bin" + SetOverwrite try + File /r Components\Tools\ccache.exe +SectionEnd + +Section "GDB - The GNU Project Debugger" SEC07 + SetShellVarContext current + SetOutPath "$INSTDIR\4.1.3\bin" + SetOverwrite try + File /r Components\Tools\gdb.exe + File /r Components\Tools\gdbserver.exe +SectionEnd + +Section "relAddr2Line Tool" SEC08 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\reladdr2line.cmd + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Components\Tools\echoh.exe + File /r Components\Tools\raddr2line.exe + File /r Components\Tools\chkslash.exe +SectionEnd + +Section "Other Tools (chdefdir and config)" SEC09 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\chdefdir.cmd + File /r Root\Config.cmd +SectionEnd + +Section "PowerShell RosBE Version" SEC10 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\sSVN.cmd + File /r Components\Powershell\Build.ps1 + File /r Components\Powershell\Clean.ps1 + File /r Components\Powershell\Help.ps1 + File /r Components\Powershell\MinGW.ps1 + File /r Components\Powershell\RosBE.ps1 + File /r Components\Powershell\rosbe-gcc-env.ps1 +SectionEnd + +Section "Update Script" SEC11 + SetShellVarContext current + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Components\Tools\wget.exe + File /r Components\Tools\libintl3.dll + File /r Components\Tools\libeay32.dll + File /r Components\Tools\ssleay32.dll + File /r Components\Tools\libiconv2.dll + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\update.cmd +SectionEnd + +Section -StartMenuShortcuts SEC12 + SetShellVarContext current + + ;; + ;; Add our start menu shortcuts. + ;; + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" + SetOutPath $REACTOS_SOURCE_DIRECTORY + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\rosbe.ico" + SetOutPath $REACTOS_SOURCE_DIRECTORY64 + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\ReactOS Build Environment 64-bit.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd" amd64' "$INSTDIR\rosbe.ico" + SetOutPath $PROFILE + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Standard MinGW Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\MinGW.cmd"' "$INSTDIR\mingw.ico" + SetOutPath $INSTDIR + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall RosBE.lnk" \ + "$INSTDIR\Uninstall-${PRODUCT_VERSION}.exe" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Readme.lnk" \ + "$INSTDIR\README.pdf" + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section /o "Desktop Shortcuts" SEC13 + SetShellVarContext current + + ;; + ;; Add our desktop shortcuts. + ;; + SetOutPath $REACTOS_SOURCE_DIRECTORY + CreateShortCut "$DESKTOP\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\rosbe.ico" + SetOutPath $REACTOS_SOURCE_DIRECTORY64 + CreateShortCut "$DESKTOP\ReactOS Build Environment 64-bit.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd" amd64' "$INSTDIR\rosbe.ico" + SetOutPath $PROFILE + CreateShortCut "$DESKTOP\Standard MinGW Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\MinGW.cmd"' "$INSTDIR\mingw.ico" +SectionEnd + +Section /o "Quick Launch Shortcuts" SEC14 + SetShellVarContext current + + ;; + ;; Add our quick launch shortcuts. + ;; + SetOutPath $REACTOS_SOURCE_DIRECTORY + CreateShortCut "$QUICKLAUNCH\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\rosbe.ico" + SetOutPath $REACTOS_SOURCE_DIRECTORY64 + CreateShortCut "$QUICKLAUNCH\ReactOS Build Environment 64-bit.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd" amd64' "$INSTDIR\rosbe.ico" + SetOutPath $PROFILE + CreateShortCut "$QUICKLAUNCH\Standard MinGW Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\MinGW.cmd"' "$INSTDIR\mingw.ico" +SectionEnd + +Section -Post SEC15 + WriteUninstaller "$INSTDIR\Uninstall-${PRODUCT_VERSION}.exe" + WriteRegStr HKCU "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\RosBE.cmd" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\Uninstall-${PRODUCT_VERSION}.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" +SectionEnd + +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK \ + "ReactOS Build Environment was successfully removed from your computer." +FunctionEnd + +Function un.onInit + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 \ + "Are you sure you want to completely remove ReactOS Build Environment and all of its components?" \ + IDYES +2 + Abort +FunctionEnd + +Section Uninstall + !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP + SetShellVarContext current + + ;; + ;; Clean up installed files. + ;; + RMDir /r /REBOOTOK "$INSTDIR\4.1.3" + RMDir /r /REBOOTOK "$INSTDIR\Tools" + RMDir /r /REBOOTOK "$SMPROGRAMS\$ICONS_GROUP" + IfFileExists "$PROFILE\RosBE\." 0 +2 + RMDir /r /REBOOTOK "$PROFILE\RosBE" + IfFileExists "$APPDATA\RosBE\." 0 +2 + RMDir /r /REBOOTOK "$APPDATA\RosBE" + Delete /REBOOTOK "$INSTDIR\Build.cmd" + Delete /REBOOTOK "$INSTDIR\Build.ps1" + Delete /REBOOTOK "$INSTDIR\charch.cmd" + Delete /REBOOTOK "$INSTDIR\chdefdir.cmd" + Delete /REBOOTOK "$INSTDIR\chdefgcc.cmd" + Delete /REBOOTOK "$INSTDIR\Clean.cmd" + Delete /REBOOTOK "$INSTDIR\Clean.ps1" + Delete /REBOOTOK "$INSTDIR\Config.cmd" + Delete /REBOOTOK "$INSTDIR\Help.cmd" + Delete /REBOOTOK "$INSTDIR\Help.ps1" + Delete /REBOOTOK "$INSTDIR\MinGW.cmd" + Delete /REBOOTOK "$INSTDIR\MinGW.ps1" + Delete /REBOOTOK "$INSTDIR\options.cmd" + Delete /REBOOTOK "$INSTDIR\reladdr2line.cmd" + Delete /REBOOTOK "$INSTDIR\RosBE.cmd" + Delete /REBOOTOK "$INSTDIR\RosBE.ps1" + Delete /REBOOTOK "$INSTDIR\rosbe-gcc-env.cmd" + Delete /REBOOTOK "$INSTDIR\rosbe-gcc-env.ps1" + Delete /REBOOTOK "$INSTDIR\scut.cmd" + Delete /REBOOTOK "$INSTDIR\sSVN.cmd" + Delete /REBOOTOK "$INSTDIR\TimeDate.cmd" + Delete /REBOOTOK "$INSTDIR\update.cmd" + Delete /REBOOTOK "$INSTDIR\README.pdf" + Delete /REBOOTOK "$INSTDIR\rosbe.ico" + Delete /REBOOTOK "$INSTDIR\mingw.ico" + Delete /REBOOTOK "$INSTDIR\uninstall.ico" + Delete /REBOOTOK "$INSTDIR\MinGW.mac" + Delete /REBOOTOK "$INSTDIR\RosBE.mac" + Delete /REBOOTOK "$INSTDIR\ChangeLog.txt" + Delete /REBOOTOK "$INSTDIR\LICENSE.txt" + Delete /REBOOTOK "$INSTDIR\srclist.txt" + Delete /REBOOTOK "$INSTDIR\config.rbuild" + Delete /REBOOTOK "$INSTDIR\Uninstall-${PRODUCT_VERSION}.exe" + ;; Whoever dares to change this back into: RMDir /r /REBOOTOK "$INSTDIR" will be KILLED!!! + RMDir /REBOOTOK "$INSTDIR" + IfFileExists "$DESKTOP\ReactOS Build Environment.lnk" 0 +2 + Delete /REBOOTOK "$DESKTOP\ReactOS Build Environment.lnk" + IfFileExists "$DESKTOP\ReactOS Build Environment 64-bit.lnk" 0 +2 + Delete /REBOOTOK "$DESKTOP\ReactOS Build Environment 64-bit.lnk" + IfFileExists "$QUICKLAUNCH\ReactOS Build Environment.lnk" 0 +2 + Delete /REBOOTOK "$QUICKLAUNCH\ReactOS Build Environment.lnk" + IfFileExists "$QUICKLAUNCH\ReactOS Build Environment 64-bit.lnk" 0 +2 + Delete /REBOOTOK "$QUICKLAUNCH\ReactOS Build Environment 64-bit.lnk" + IfFileExists "$DESKTOP\Standard MinGW Build Environment.lnk" 0 +2 + Delete /REBOOTOK "$DESKTOP\Standard MinGW Build Environment.lnk" + IfFileExists "$QUICKLAUNCH\Standard MinGW Build Environment.lnk" 0 +2 + Delete /REBOOTOK "$QUICKLAUNCH\Standard MinGW Build Environment.lnk" + + ;; + ;; Clean up the registry. + ;; + DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" + DeleteRegKey HKCU "${PRODUCT_DIR_REGKEY}" + SetAutoClose true +SectionEnd + +Function UninstallPrevious + ReadRegStr $R0 HKCU \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ + "UninstallString" + ReadRegStr $R1 HKCU \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ + "DisplayVersion" + ${If} $R1 == "${PRODUCT_VERSION}" + messageBox MB_OK|MB_ICONEXCLAMATION \ + "You already have the ${PRODUCT_NAME} v${PRODUCT_VERSION} installed. Please manually uninstall the ${PRODUCT_NAME} v${PRODUCT_VERSION} if you want to reinstall." + Quit + ${EndIf} + ${If} $R0 == "" + ReadRegStr $R0 HKLM \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\ReactOS Build Environment" \ + "UninstallString" + ReadRegStr $R1 HKLM \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\ReactOS Build Environment" \ + "DisplayVersion" + ${If} $R0 == "" + Return + ${EndIf} + ${EndIf} + MessageBox MB_YESNO|MB_ICONQUESTION \ + "A previous version of the ${PRODUCT_NAME} was found. You must uninstall it before installing this version.$\n$\nDo you want to do that now?" \ + IDNO UninstallPrevious_no \ + IDYES UninstallPrevious_yes + Abort + UninstallPrevious_no: + Quit + UninstallPrevious_yes: + Var /global PREVIOUSINSTDIR + Push $R0 + Call GetParent + Pop $PREVIOUSINSTDIR + ExecWait '$R0 _?=$PREVIOUSINSTDIR' +FunctionEnd + +Function GetParent + Exch $R0 + Push $R1 + Push $R2 + Push $R3 + + StrCpy $R1 0 + StrLen $R2 $R0 + + loop: + IntOp $R1 $R1 + 1 + IntCmp $R1 $R2 get 0 get + StrCpy $R3 $R0 1 -$R1 + StrCmp $R3 "\" get + Goto loop + + get: + StrCpy $R0 $R0 -$R1 + + Pop $R3 + Pop $R2 + Pop $R1 + Exch $R0 +FunctionEnd Propchange: trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi ------------------------------------------------------------------------------ svn:eol-style = native
16 years, 3 months
1
0
0
0
[cwittich] 36285: fix a kernel32 environ winetest
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Sep 17 09:03:05 2008 New Revision: 36285 URL:
http://svn.reactos.org/svn/reactos?rev=36285&view=rev
Log: fix a kernel32 environ winetest Modified: trunk/reactos/dll/win32/kernel32/misc/env.c Modified: trunk/reactos/dll/win32/kernel32/misc/env.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/en…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/env.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/env.c [iso-8859-1] Wed Sep 17 09:03:05 2008 @@ -425,6 +425,10 @@ return 0; } + /* make sure we don't overflow the maximum ANSI_STRING size */ + if (nSize > 0x7fff) + nSize = 0x7fff; + Destination.Length = 0; Destination.MaximumLength = (USHORT)nSize; Destination.Buffer = lpDst; @@ -491,6 +495,10 @@ RtlInitUnicodeString (&Source, (LPWSTR)lpSrc); + /* make sure we don't overflow the maximum UNICODE_STRING size */ + if (nSize > 0x7fff) + nSize = 0x7fff; + Destination.Length = 0; Destination.MaximumLength = (USHORT)nSize * sizeof(WCHAR); Destination.Buffer = lpDst;
16 years, 3 months
1
0
0
0
[janderwald] 36284: - Check for null in IConnection_Constructor - Implement INetConnectionConnectUi interface - Add a dialog which serves a proxy dialog - Add tray icons for connection which want to displayed in the tray - Start implement network connection status dialog
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Sep 17 08:58:48 2008 New Revision: 36284 URL:
http://svn.reactos.org/svn/reactos?rev=36284&view=rev
Log: - Check for null in IConnection_Constructor - Implement INetConnectionConnectUi interface - Add a dialog which serves a proxy dialog - Add tray icons for connection which want to displayed in the tray - Start implement network connection status dialog Modified: trunk/reactos/dll/win32/netshell/connectmanager.c trunk/reactos/dll/win32/netshell/lanconnectui.c trunk/reactos/dll/win32/netshell/lang/de-DE.rc trunk/reactos/dll/win32/netshell/lanstatusui.c trunk/reactos/dll/win32/netshell/precomp.h trunk/reactos/dll/win32/netshell/resource.h trunk/reactos/dll/win32/netshell/shfldr_netconnect.c Modified: trunk/reactos/dll/win32/netshell/connectmanager.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/connect…
============================================================================== --- trunk/reactos/dll/win32/netshell/connectmanager.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netshell/connectmanager.c [iso-8859-1] Wed Sep 17 08:58:48 2008 @@ -301,13 +301,19 @@ CopyMemory(&This->Props, &pItem->Props, sizeof(NETCON_PROPERTIES)); - This->Props.pszwName = CoTaskMemAlloc((wcslen(pItem->Props.pszwName)+1)*sizeof(WCHAR)); - if (This->Props.pszwName) - wcscpy(This->Props.pszwName, pItem->Props.pszwName); - - This->Props.pszwDeviceName = CoTaskMemAlloc((wcslen(pItem->Props.pszwDeviceName)+1)*sizeof(WCHAR)); - if (This->Props.pszwDeviceName) - wcscpy(This->Props.pszwDeviceName, pItem->Props.pszwDeviceName); + if (pItem->Props.pszwName) + { + This->Props.pszwName = CoTaskMemAlloc((wcslen(pItem->Props.pszwName)+1)*sizeof(WCHAR)); + if (This->Props.pszwName) + wcscpy(This->Props.pszwName, pItem->Props.pszwName); + } + + if (pItem->Props.pszwDeviceName) + { + This->Props.pszwDeviceName = CoTaskMemAlloc((wcslen(pItem->Props.pszwDeviceName)+1)*sizeof(WCHAR)); + if (This->Props.pszwDeviceName) + wcscpy(This->Props.pszwDeviceName, pItem->Props.pszwDeviceName); + } *ppv = (INetConnection *)This; @@ -449,7 +455,7 @@ IEnumNetConnection_fnClone }; -static + BOOL GetAdapterIndexFromNetCfgInstanceId(PIP_ADAPTER_INFO pAdapterInfo, LPWSTR szNetCfg, PDWORD pIndex) { @@ -473,7 +479,6 @@ } return FALSE; } - static BOOL @@ -543,6 +548,7 @@ dwIndex = 0; do { + ZeroMemory(&DevInfo, sizeof(SP_DEVINFO_DATA)); DevInfo.cbSize = sizeof(DevInfo); @@ -566,9 +572,10 @@ break; } RegCloseKey(hSubKey); + /* get the current adapter index from NetCfgInstanceId */ if (!GetAdapterIndexFromNetCfgInstanceId(pAdapterInfo, szNetCfg, &dwAdapterIndex)) - break; + continue; /* get detailed adapter info */ ZeroMemory(&IfEntry, sizeof(IfEntry)); 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 Sep 17 08:58:48 2008 @@ -24,6 +24,7 @@ { INetConnectionPropertyUi2 *lpVtbl; INetLanConnectionUiInfo * lpLanConUiInfoVtbl; + INetConnectionConnectUi * lpNetConnectionConnectUi; INetConnection * pCon; INetCfgLock *NCfgLock; INetCfg * pNCfg; @@ -35,6 +36,12 @@ { return (LPINetConnectionPropertyUiImpl)((char *)iface - FIELD_OFFSET(INetConnectionPropertyUiImpl, lpLanConUiInfoVtbl)); } + +static LPINetConnectionPropertyUiImpl __inline impl_from_NetConnectionConnectUi(INetConnectionConnectUi *iface) +{ + return (LPINetConnectionPropertyUiImpl)((char *)iface - FIELD_OFFSET(INetConnectionPropertyUiImpl, lpNetConnectionConnectUi)); +} + HPROPSHEETPAGE InitializePropertySheetPage(LPWSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle) @@ -389,7 +396,7 @@ REFIID iid, LPVOID * ppvObj) { - //LPOLESTR pStr; + LPOLESTR pStr; INetConnectionPropertyUiImpl * This = (INetConnectionPropertyUiImpl*)iface; *ppvObj = NULL; @@ -407,9 +414,16 @@ IUnknown_AddRef(iface); return S_OK; } - //StringFromCLSID(iid, &pStr); - //MessageBoxW(NULL, pStr, L"INetConnectionPropertyUi_fnQueryInterface", MB_OK); - //CoTaskMemFree(pStr); + else if (IsEqualIID(iid, &IID_INetConnectionConnectUi)) + { + *ppvObj = &This->lpNetConnectionConnectUi; + IUnknown_AddRef(iface); + return S_OK; + } + + StringFromCLSID(iid, &pStr); + MessageBoxW(NULL, pStr, L"INetConnectionPropertyUi_fnQueryInterface", MB_OK); + CoTaskMemFree(pStr); return E_NOINTERFACE; } @@ -587,6 +601,109 @@ INetLanConnectionUiInfo_fnRelease, INetLanConnectionUiInfo_fnGetDeviceGuid, }; + +static +HRESULT +STDCALL +INetConnectionConnectUi_fnQueryInterface( + INetConnectionConnectUi * iface, + REFIID iid, + LPVOID * ppvObj) +{ + INetConnectionPropertyUiImpl * This = impl_from_NetConnectionConnectUi(iface); + return INetConnectionPropertyUi_QueryInterface((INetConnectionPropertyUi*)This, iid, ppvObj); +} + +static +ULONG +STDCALL +INetConnectionConnectUi_fnAddRef( + INetConnectionConnectUi * iface) +{ + INetConnectionPropertyUiImpl * This = impl_from_NetConnectionConnectUi(iface); + return INetConnectionPropertyUi_AddRef((INetConnectionPropertyUi*)This); +} + +static +ULONG +STDCALL +INetConnectionConnectUi_fnRelease( + INetConnectionConnectUi * iface) +{ + INetConnectionPropertyUiImpl * This = impl_from_NetConnectionConnectUi(iface); + return INetConnectionPropertyUi_Release((INetConnectionPropertyUi*)This); +} + +static +HRESULT +STDCALL +INetConnectionConnectUi_fnSetConnection( + INetConnectionConnectUi * iface, + INetConnection* pCon) +{ + INetConnectionPropertyUiImpl * This = impl_from_NetConnectionConnectUi(iface); + if (This->pCon) + INetConnection_Release(This->pCon); + + if (!pCon) + return E_POINTER; + + This->pCon = pCon; + INetConnection_AddRef(pCon); + return S_OK; +} + +static +HRESULT +STDCALL +INetConnectionConnectUi_fnConnect( + INetConnectionConnectUi * iface, + HWND hwndParent, + DWORD dwFlags) +{ + INetConnectionPropertyUiImpl * This = impl_from_NetConnectionConnectUi(iface); + + if (!This->pCon) + return E_POINTER; //FIXME + + + if (dwFlags & NCUC_NO_UI) + { + return INetConnection_Connect(This->pCon); + } + + return E_FAIL; +} + +static +HRESULT +STDCALL +INetConnectionConnectUi_fnDisconnect( + INetConnectionConnectUi * iface, + HWND hwndParent, + DWORD dwFlags) +{ + WCHAR szBuffer[100]; + swprintf(szBuffer, L"INetConnectionConnectUi_fnDisconnect flags %x\n", dwFlags); + MessageBoxW(NULL, szBuffer, NULL, MB_OK); + + return S_OK; +} + + +static const INetConnectionConnectUiVtbl vt_NetConnectionConnectUi = +{ + INetConnectionConnectUi_fnQueryInterface, + INetConnectionConnectUi_fnAddRef, + INetConnectionConnectUi_fnRelease, + INetConnectionConnectUi_fnSetConnection, + INetConnectionConnectUi_fnConnect, + INetConnectionConnectUi_fnDisconnect, + +}; + + + HRESULT WINAPI LanConnectUI_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) { INetConnectionPropertyUiImpl * This; @@ -608,6 +725,7 @@ This->pProperties = NULL; This->lpVtbl = (INetConnectionPropertyUi2*)&vt_NetConnectionPropertyUi; This->lpLanConUiInfoVtbl = (INetLanConnectionUiInfo*)&vt_NetLanConnectionUiInfo; + This->lpNetConnectionConnectUi = (INetConnectionConnectUi*)&vt_NetConnectionConnectUi; if (!SUCCEEDED (INetConnectionPropertyUi2_fnQueryInterface ((INetConnectionPropertyUi2*)This, riid, ppv))) { 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 Sep 17 08:58:48 2008 @@ -19,8 +19,15 @@ CHECKBOX "&Benachrichtigen, wenn diese Verbindung eingeschränkte oder\nkeine Konnektivität besitzt", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 24, BS_AUTOCHECKBOX | WS_TABSTOP END -IDD_NETSTATUS DIALOGEX DISCARDABLE 0, 0, 200,180 -STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +IDD_STATUS DIALOGEX DISCARDABLE 0, 0, 200, 280 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Allgemein" +FONT 8, "MS Shell Dlg" +BEGIN +END + +IDD_LAN_NETSTATUS DIALOGEX DISCARDABLE 0, 0, 200, 180 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Allgemein" FONT 8, "MS Shell Dlg" BEGIN @@ -71,4 +78,10 @@ IDS_NET_DELETE "Löschen" IDS_NET_RENAME "Umbenennen" IDS_NET_PROPERTIES "Eigenschaften" + + IDS_FORMAT_BIT "%u Bit/s" + IDS_FORMAT_KBIT "%u KBit/s" + IDS_FORMAT_MBIT "%u MBit/s" + IDS_FORMAT_GBIT "%u GBit/s" + 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 Sep 17 08:58:48 2008 @@ -1,35 +1,355 @@ #include <precomp.h> - /// CLSID /// HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{7007ACCF-3202-11D1-AAD2-00805FC1270E} // IID B722BCCB-4E68-101B-A2BC-00AA00404770 + +#define WM_SHOWSTATUSDLG (WM_USER+10) typedef struct { IOleCommandTarget * lpVtbl; + INetConnectionManager * lpNetMan; LONG ref; }ILanStatusImpl, *LPILanStatusImpl; +typedef struct +{ + INetConnection *pNet; + HWND hwndDlg; +}LANSTATUSUI_CONTEXT; + +VOID +UpdateLanStatusUIDlg(HWND hwndDlg, MIB_IFROW * IfEntry) +{ + WCHAR szFormat[MAX_PATH] = {0}; + WCHAR szBuffer[MAX_PATH] = {0}; + + if (IfEntry->dwSpeed < 1000) + { + if (LoadStringW(netshell_hInstance, IDS_FORMAT_BIT, szFormat, sizeof(szFormat)/sizeof(WCHAR))) + { + swprintf(szBuffer, szFormat, IfEntry->dwSpeed); + SendDlgItemMessageW(hwndDlg, IDC_SPEED, WM_SETTEXT, 0, (LPARAM)szBuffer); + } + } + else if (IfEntry->dwSpeed < 1000000) + { + if (LoadStringW(netshell_hInstance, IDS_FORMAT_KBIT, szFormat, sizeof(szFormat)/sizeof(WCHAR))) + { + swprintf(szBuffer, szFormat, IfEntry->dwSpeed/1000); + SendDlgItemMessageW(hwndDlg, IDC_SPEED, WM_SETTEXT, 0, (LPARAM)szBuffer); + } + } + else if (IfEntry->dwSpeed < 1000000000) + { + if (LoadStringW(netshell_hInstance, IDS_FORMAT_MBIT, szFormat, sizeof(szFormat)/sizeof(WCHAR))) + { + swprintf(szBuffer, szFormat, IfEntry->dwSpeed/1000000); + SendDlgItemMessageW(hwndDlg, IDC_SPEED, WM_SETTEXT, 0, (LPARAM)szBuffer); + } + } + else + { + if (LoadStringW(netshell_hInstance, IDS_FORMAT_KBIT, szFormat, sizeof(szFormat)/sizeof(WCHAR))) + { + swprintf(szBuffer, szFormat, IfEntry->dwSpeed/1000000000); + SendDlgItemMessageW(hwndDlg, IDC_SPEED, WM_SETTEXT, 0, (LPARAM)szBuffer); + } + } + + if (StrFormatByteSizeW(IfEntry->dwInOctets, szBuffer, sizeof(szFormat)/sizeof(WCHAR))) + { + SendDlgItemMessageW(hwndDlg, IDC_RECEIVED, WM_SETTEXT, 0, (LPARAM)szBuffer); + } + + if (StrFormatByteSizeW(IfEntry->dwOutOctets, szBuffer, sizeof(szFormat)/sizeof(WCHAR))) + { + SendDlgItemMessageW(hwndDlg, IDC_SEND, WM_SETTEXT, 0, (LPARAM)szBuffer); + } + + //FIXME + //set duration + +} + +VOID +InitializeLANStatusUiDlg(HWND hwndDlg, INetConnection * pNet) +{ + WCHAR szBuffer[MAX_PATH] = {0}; + NETCON_PROPERTIES * pProperties = NULL; + MIB_IFROW IfEntry; + DWORD dwSize, dwAdapterIndex, dwResult; + LPOLESTR pStr; + IP_ADAPTER_INFO * pAdapterInfo; + + if (INetConnection_GetProperties(pNet, &pProperties) != NOERROR) + return; + + if (pProperties->Status == NCS_DISCONNECTED) + LoadStringW(netshell_hInstance, IDS_STATUS_UNREACHABLE, szBuffer, MAX_PATH); + else if (pProperties->Status == NCS_MEDIA_DISCONNECTED) + LoadStringW(netshell_hInstance, IDS_STATUS_DISCONNECTED, szBuffer, MAX_PATH); + else if (pProperties->Status == NCS_CONNECTING) + LoadStringW(netshell_hInstance, IDS_STATUS_CONNECTING, szBuffer, MAX_PATH); + else if (pProperties->Status == NCS_CONNECTED) + LoadStringW(netshell_hInstance, IDS_STATUS_CONNECTED, szBuffer, MAX_PATH); + + 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); + + /* get detailed adapter info */ + ZeroMemory(&IfEntry, sizeof(IfEntry)); + IfEntry.dwIndex = dwAdapterIndex; + if(GetIfEntry(&IfEntry) != NO_ERROR) + { + CoTaskMemFree(pAdapterInfo); + return; + } + + UpdateLanStatusUIDlg(hwndDlg, &IfEntry); + + CoTaskMemFree(pAdapterInfo); +} INT_PTR CALLBACK -LANStatusUIDlg( +LANStatusUiDlg( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) { + PROPSHEETPAGE *page; + LANSTATUSUI_CONTEXT * pContext; + LPPSHNOTIFY lppsn; + switch(uMsg) { case WM_INITDIALOG: + page = (PROPSHEETPAGE*)lParam; + pContext = (LANSTATUSUI_CONTEXT*)page->lParam; + InitializeLANStatusUiDlg(hwndDlg, pContext->pNet); + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pContext); return TRUE; + case WM_COMMAND: + pContext = (LANSTATUSUI_CONTEXT*)GetWindowLongPtr(hwndDlg, DWLP_USER); + if (LOWORD(wParam) == IDC_STATUS_PROPERTIES) + { + //FIXME + // show net connection property dialog + // + if (pContext) + ShowNetConnectionProperties(pContext->pNet, pContext->hwndDlg); + break; + } + else if (LOWORD(wParam) == IDC_ENDISABLE) + { + //FIXME + // disable network adapter + break; + } + case WM_NOTIFY: + lppsn = (LPPSHNOTIFY) lParam; + if (lppsn->hdr.code == PSN_APPLY || lppsn->hdr.code == PSN_RESET) + { + pContext = (LANSTATUSUI_CONTEXT*)GetWindowLongPtr(hwndDlg, DWLP_USER); + DestroyWindow(pContext->hwndDlg); + pContext->hwndDlg = NULL; + return PSNRET_NOERROR; + } + break; } return FALSE; } - - +VOID +ShowStatusPropertyDialog( + LANSTATUSUI_CONTEXT * pContext, + HWND hwndDlg) +{ + HPROPSHEETPAGE hppages[2]; + PROPSHEETHEADERW pinfo; + NETCON_PROPERTIES * pProperties = NULL; + HWND hwnd; + + ZeroMemory(&pinfo, sizeof(PROPSHEETHEADERW)); + ZeroMemory(hppages, sizeof(hppages)); + pinfo.dwSize = sizeof(PROPSHEETHEADERW); + pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW | PSH_MODELESS; + pinfo.u3.phpage = hppages; + pinfo.hwndParent = hwndDlg; + + if (INetConnection_GetProperties(pContext->pNet, &pProperties) == NOERROR) + { + if (pProperties->pszwName) + { + pinfo.pszCaption = pProperties->pszwName; + pinfo.dwFlags |= PSH_PROPTITLE; + } + + if (pProperties->MediaType == NCM_LAN) + { + hppages[0] = InitializePropertySheetPage(MAKEINTRESOURCEW(IDD_LAN_NETSTATUS), LANStatusUiDlg, (LPARAM)pContext, NULL); + if (hppages[0]) + pinfo.nPages++; + + if (pinfo.nPages) + { + hwnd = (HWND)PropertySheetW(&pinfo); + if (hwnd) + { + pContext->hwndDlg = hwnd; + } + } + } + NcFreeNetconProperties(pProperties); + } +} + +INT_PTR +CALLBACK +LANStatusDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + LANSTATUSUI_CONTEXT * pContext; + + switch(uMsg) + { + case WM_INITDIALOG: + pContext = (LANSTATUSUI_CONTEXT*)CoTaskMemAlloc(sizeof(LANSTATUSUI_CONTEXT)); + if (!pContext) + return FALSE; + pContext->hwndDlg = NULL; + pContext->pNet = (INetConnection*)lParam; + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pContext); + return TRUE; + case WM_SHOWSTATUSDLG: + if (LOWORD(lParam) == WM_LBUTTONDOWN) + { + pContext = (LANSTATUSUI_CONTEXT*)GetWindowLongPtr(hwndDlg, DWLP_USER); + if (!pContext) + break; + + if (pContext->hwndDlg) + { + ShowWindow(pContext->hwndDlg, SW_SHOW); + BringWindowToTop(pContext->hwndDlg); + } + else + { + ShowStatusPropertyDialog(pContext, hwndDlg); + } + break; + } + break; + } + return FALSE; +} +static +HRESULT +InitializeNetConnectTray( + ILanStatusImpl * This) +{ + NOTIFYICONDATAW nid; + HWND hwndDlg; + INetConnectionManager * INetConMan; + IEnumNetConnection * IEnumCon; + INetConnection * INetCon; + NETCON_PROPERTIES* pProps; + HRESULT hr; + ULONG Count; + ULONG Index; + + /* get an instance to of IConnectionManager */ + hr = INetConnectionManager_Constructor(NULL, &IID_INetConnectionManager, (LPVOID*)&INetConMan); + if (FAILED(hr)) + return hr; + + hr = INetConnectionManager_EnumConnections(INetConMan, NCME_DEFAULT, &IEnumCon); + if (FAILED(hr)) + { + INetConnectionManager_Release(INetConMan); + return hr; + } + + Index = 1; + do + { + hr = IEnumNetConnection_Next(IEnumCon, 1, &INetCon, &Count); + if (hr == S_OK) + { + hwndDlg = CreateDialogParamW(netshell_hInstance, MAKEINTRESOURCEW(IDD_STATUS), NULL, LANStatusDlg, (LPARAM)INetCon); + if (hwndDlg) + { + ZeroMemory(&nid, sizeof(nid)); + nid.cbSize = sizeof(nid); + nid.uID = Index++; + nid.uFlags = NIF_ICON | NIF_MESSAGE; + nid.u.uVersion = 3; + nid.uCallbackMessage = WM_SHOWSTATUSDLG; + nid.hWnd = hwndDlg; + nid.hIcon = LoadIcon(netshell_hInstance, MAKEINTRESOURCE(IDI_SHELL_NETWORK_FOLDER)); //FIXME + hr = INetConnection_GetProperties(INetCon, &pProps); + if (SUCCEEDED(hr)) + { + if (!(pProps->dwCharacter & NCCF_SHOW_ICON)) + { + nid.dwState = NIS_HIDDEN; + } + } + if (Shell_NotifyIconW(NIM_ADD, &nid)) + Index++; + } + } + }while(hr == S_OK); + + This->lpNetMan = INetConMan; + IEnumNetConnection_Release(IEnumCon); + return S_OK; +} static HRESULT WINAPI @@ -48,7 +368,7 @@ IUnknown_AddRef(iface); return S_OK; } - + MessageBoxW(NULL, L"IOleCommandTarget_fnQueryInterface", NULL, MB_OK); return E_NOINTERFACE; } @@ -90,7 +410,8 @@ OLECMD *prgCmds, OLECMDTEXT *pCmdText) { - MessageBoxW(NULL, L"IOleCommandTarget_fnQueryStatus", NULL, MB_OK); + MessageBoxW(NULL, L"222222222222222222222", L"IOleCommandTarget_fnQueryStatus", MB_OK); + MessageBoxW(NULL, pCmdText->rgwz, L"IOleCommandTarget_fnQueryStatus", MB_OK); return E_NOTIMPL; } @@ -105,24 +426,13 @@ VARIANT *pvaIn, VARIANT *pvaOut) { - NOTIFYICONDATA nid; - HWND hwndDlg; - //ILanStatusImpl * This = (ILanStatusImpl*)iface; - - hwndDlg = CreateDialogW(netshell_hInstance, MAKEINTRESOURCEW(IDD_NETSTATUS), NULL, LANStatusUIDlg); + ILanStatusImpl * This = (ILanStatusImpl*)iface; + if (pguidCmdGroup) { if (IsEqualIID(pguidCmdGroup, &CGID_ShellServiceObject)) { - nid.cbSize = sizeof(nid); - nid.uID = 100; - nid.uFlags = NIF_ICON; - nid.u.uVersion = NOTIFYICON_VERSION; - nid.hWnd = hwndDlg; - nid.hIcon = LoadIcon(netshell_hInstance, MAKEINTRESOURCE(IDI_SHELL_NETWORK_FOLDER)); - - Shell_NotifyIcon(NIM_ADD, &nid); - return S_OK; + return InitializeNetConnectTray(This); } } return S_OK; @@ -155,13 +465,13 @@ This->ref = 1; This->lpVtbl = (IOleCommandTarget*)&vt_OleCommandTarget; - - if (!SUCCEEDED (IOleCommandTarget_fnQueryInterface ((IOleCommandTarget*)This, riid, ppv))) + This->lpNetMan = NULL; + + if (FAILED(IOleCommandTarget_fnQueryInterface ((IOleCommandTarget*)This, riid, ppv))) { IOleCommandTarget_Release((IUnknown*)This); return E_NOINTERFACE; } - IOleCommandTarget_Release((IUnknown*)This); return S_OK; } 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 Sep 17 08:58:48 2008 @@ -81,6 +81,7 @@ /* shfldr_netconnect.c */ +HRESULT ShowNetConnectionProperties(INetConnection * pNetConnect, HWND hwnd); HRESULT WINAPI ISF_NetConnect_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); /* enumlist.c */ @@ -96,8 +97,10 @@ /* connectmanager.c */ HRESULT WINAPI INetConnectionManager_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); +BOOL GetAdapterIndexFromNetCfgInstanceId(PIP_ADAPTER_INFO pAdapterInfo, LPWSTR szNetCfg, PDWORD pIndex); /* lanconnectui.c */ +HPROPSHEETPAGE InitializePropertySheetPage(LPWSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle); HRESULT WINAPI LanConnectUI_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); /* lanstatusui.c */ 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 Sep 17 08:58:48 2008 @@ -8,7 +8,9 @@ /* dialogs */ #define IDD_NETPROPERTIES 400 -#define IDD_NETSTATUS 401 +#define IDD_LAN_NETSTATUS 401 +#define IDD_STATUS 402 + /* dialog controls */ #define IDC_NETCARDNAME 1000 @@ -55,3 +57,9 @@ #define IDS_NET_DELETE 10105 #define IDS_NET_RENAME 10106 #define IDS_NET_PROPERTIES 10107 + +#define IDS_FORMAT_BIT 10200 +#define IDS_FORMAT_MBIT 10201 +#define IDS_FORMAT_KBIT 10202 +#define IDS_FORMAT_GBIT 10203 + Modified: trunk/reactos/dll/win32/netshell/shfldr_netconnect.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/shfldr_…
============================================================================== --- trunk/reactos/dll/win32/netshell/shfldr_netconnect.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netshell/shfldr_netconnect.c [iso-8859-1] Wed Sep 17 08:58:48 2008 @@ -745,30 +745,76 @@ pinfo->u3.phpage[pinfo->nPages++] = hPage; return TRUE; } - return FALSE; -} + return FALSE; +} + +HRESULT +ShowNetConnectionProperties( + INetConnection * pNetConnect, + HWND hwnd) +{ + HRESULT hr; + CLSID ClassID; + PROPSHEETHEADERW pinfo; + HPROPSHEETPAGE hppages[MAX_PROPERTY_SHEET_PAGE]; + INetConnectionPropertyUi * pNCP; + NETCON_PROPERTIES * pProperties; + + if (INetConnection_GetProperties(pNetConnect, &pProperties) != NOERROR) + return E_FAIL; + + hr = INetConnection_GetUiObjectClassId(pNetConnect, &ClassID); + if (FAILED(hr)) + { + NcFreeNetconProperties(pProperties); + return hr; + } + + hr = CoCreateInstance(&ClassID, NULL, CLSCTX_INPROC_SERVER, &IID_INetConnectionPropertyUi, (LPVOID)&pNCP); + if (FAILED(hr)) + { + NcFreeNetconProperties(pProperties); + return hr; + } + + hr = INetConnectionPropertyUi_SetConnection(pNCP, pNetConnect); + if (SUCCEEDED(hr)) + { + ZeroMemory(&pinfo, sizeof(PROPSHEETHEADERW)); + ZeroMemory(hppages, sizeof(hppages)); + pinfo.dwSize = sizeof(PROPSHEETHEADERW); + pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW; + pinfo.u3.phpage = hppages; + pinfo.hwndParent = hwnd; + + pinfo.pszCaption = pProperties->pszwName; + hr = INetConnectionPropertyUi_AddPages(pNCP, hwnd, PropSheetExCallback, (LPARAM)&pinfo); + if (SUCCEEDED(hr)) + { + if(PropertySheetW(&pinfo) < 0) + hr = E_FAIL; + } + } + INetConnectionPropertyUi_Release(pNCP); + NcFreeNetconProperties(pProperties); + return hr; +} + /************************************************************************** * ISF_NetConnect_IContextMenu_InvokeCommand() */ static HRESULT WINAPI ISF_NetConnect_IContextMenu2_InvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) + IContextMenu2 *iface, + LPCMINVOKECOMMANDINFO lpcmi) { IGenericSFImpl * This = impl_from_IContextMenu2(iface); VALUEStruct * val; - NETCON_PROPERTIES * pProperties; HRESULT hr = S_OK; - PROPSHEETHEADERW pinfo; - CLSID ClassID; - HPROPSHEETPAGE hppages[MAX_PROPERTY_SHEET_PAGE]; - INetConnectionPropertyUi * pNCP; + val = _ILGetValueStruct(This->apidl); if (!val) - return E_FAIL; - - if (INetConnection_GetProperties((INetConnection*)val->pItem, &pProperties) != NOERROR) return E_FAIL; if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_STATUS)) @@ -777,44 +823,14 @@ if (pProperties->MediaType == NCM_LAN) { hr = ShowLANConnectionStatusDialog(pProperties); - NcFreeNetconProperties(pProperties); } #endif return hr; } else if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_PROPERTIES)) { - hr = INetConnection_GetUiObjectClassId(val->pItem, &ClassID); - if (SUCCEEDED(hr)) - { - /* FIXME perform version checks */ - hr = CoCreateInstance(&ClassID, NULL, CLSCTX_INPROC_SERVER, &IID_INetConnectionPropertyUi, (LPVOID)&pNCP); - if (SUCCEEDED(hr)) - { - hr = INetConnectionPropertyUi_SetConnection(pNCP, val->pItem); - if (SUCCEEDED(hr)) - { - ZeroMemory(&pinfo, sizeof(PROPSHEETHEADERW)); - ZeroMemory(hppages, sizeof(hppages)); - pinfo.dwSize = sizeof(PROPSHEETHEADERW); - pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW; - pinfo.u3.phpage = hppages; - pinfo.hwndParent = lpcmi->hwnd; - - pinfo.pszCaption = pProperties->pszwName; - hr = INetConnectionPropertyUi_AddPages(pNCP, lpcmi->hwnd, PropSheetExCallback, (LPARAM)&pinfo); - if (SUCCEEDED(hr)) - { - if(PropertySheetW(&pinfo) < 0) - hr = E_FAIL; - } - } - INetConnectionPropertyUi_Release(pNCP); - } - - } - NcFreeNetconProperties(pProperties); - return hr; + /* FIXME perform version checks */ + return ShowNetConnectionProperties(val->pItem, lpcmi->hwnd); } return S_OK;
16 years, 3 months
1
0
0
0
← Newer
1
...
29
30
31
32
33
34
35
...
75
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Results per page:
10
25
50
100
200