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
January 2006
----- 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
23 participants
586 discussions
Start a n
N
ew thread
[weiden] 20593: Fixed uninitialized variable warning with GCC4
by weiden@svn.reactos.org
Fixed uninitialized variable warning with GCC4 Modified: trunk/reactos/ntoskrnl/include/internal/ex.h _____ Modified: trunk/reactos/ntoskrnl/include/internal/ex.h --- trunk/reactos/ntoskrnl/include/internal/ex.h 2006-01-05 22:18:31 UTC (rev 20592) +++ trunk/reactos/ntoskrnl/include/internal/ex.h 2006-01-05 22:24:28 UTC (rev 20593) @@ -17,9 +17,10 @@ /* Note: we only use a spinlock on SMP. On UP, we cli/sti intead */ #ifndef CONFIG_SMP -#define ExAcquireResourceLock(l, i) \ - UNREFERENCED_PARAMETER(*i); \ - Ke386DisableInterrupts(); +#define ExAcquireResourceLock(l, i) { \ + (void)i; \ + Ke386DisableInterrupts(); \ +} #define ExReleaseResourceLock(l, i) Ke386EnableInterrupts(); #else #define ExAcquireResourceLock(l, i) KeAcquireSpinLock(l, i);
19 years
1
0
0
0
[turner] 20592: en.rc not En.rc
by turner@svn.reactos.org
en.rc not En.rc Modified: trunk/reactos/subsys/system/servman/servman.rc _____ Modified: trunk/reactos/subsys/system/servman/servman.rc --- trunk/reactos/subsys/system/servman/servman.rc 2006-01-05 21:49:49 UTC (rev 20591) +++ trunk/reactos/subsys/system/servman/servman.rc 2006-01-05 22:18:31 UTC (rev 20592) @@ -12,5 +12,5 @@ IDI_SM_ICON ICON "res/applet.ico" -#include "En.rc" +#include "en.rc"
19 years
1
0
0
0
[ion] 20591: - God is a second-hand imitation of Gé. Fix for bug 1213.
by ion@svn.reactos.org
- God is a second-hand imitation of Gé. Fix for bug 1213. Modified: trunk/reactos/subsys/win32k/include/bitmaps.h _____ Modified: trunk/reactos/subsys/win32k/include/bitmaps.h --- trunk/reactos/subsys/win32k/include/bitmaps.h 2006-01-05 21:46:24 UTC (rev 20590) +++ trunk/reactos/subsys/win32k/include/bitmaps.h 2006-01-05 21:49:49 UTC (rev 20591) @@ -34,8 +34,8 @@ BOOL INTERNAL_CALL BITMAP_Cleanup(PVOID ObjectBody); BOOL INTERNAL_CALL BITMAPOBJ_InitBitsLock(BITMAPOBJ *pBMObj); -#define BITMAPOBJ_LockBitmapBits(pBMObj) ExAcquireFastMutex((pBMObj)->BitsLock) -#define BITMAPOBJ_UnlockBitmapBits(pBMObj) ExReleaseFastMutex((pBMObj)->BitsLock) +#define BITMAPOBJ_LockBitmapBits(pBMObj) ExEnterCriticalRegionAndAcquireFastMutexUnsafe((pBMObj)->BitsLock) +#define BITMAPOBJ_UnlockBitmapBits(pBMObj) ExReleaseFastMutexUnsafeAndLeaveCriticalRegion((pBMObj)->BitsLock) void INTERNAL_CALL BITMAPOBJ_CleanupBitsLock(BITMAPOBJ *pBMObj); INT FASTCALL BITMAPOBJ_GetWidthBytes (INT bmWidth, INT bpp);
19 years
1
0
0
0
[mbosma] 20590: Different output for !bug command on the other channels. (#winehackers, #samba-technical)
by mbosma@svn.reactos.org
Different output for !bug command on the other channels. (#winehackers, #samba-technical) Modified: trunk/irc/TechBot/TechBot/App.config Modified: trunk/irc/TechBot/TechBot/ServiceThread.cs Modified: trunk/irc/TechBot/TechBot.Console/App.config Modified: trunk/irc/TechBot/TechBot.Console/Main.cs Modified: trunk/irc/TechBot/TechBot.Library/BugCommand.cs Modified: trunk/irc/TechBot/TechBot.Library/IrcService.cs Modified: trunk/irc/TechBot/TechBot.Library/TechBotService.cs _____ Modified: trunk/irc/TechBot/TechBot/App.config --- trunk/irc/TechBot/TechBot/App.config 2006-01-05 21:32:52 UTC (rev 20589) +++ trunk/irc/TechBot/TechBot/App.config 2006-01-05 21:46:24 UTC (rev 20590) @@ -13,6 +13,8 @@ <add key="HresultXml" value="C:\IRC\TechBot\hresult.xml" /> <add key="WmXml" value="C:\IRC\TechBot\wm.xml" /> <add key="SvnCommand" value="svn co
svn://svn.reactos.org/trunk/reactos
" /> - <add key="BugUrl" value="
www.reactos.org/bugzilla/show_bug.cgi?id={0}
" /> + <add key="BugUrl" value="
http://www.reactos.org/bugzilla/show_bug.cgi?id={0}
" /> + <add key="WineBugUrl" value="
http://bugs.winehq.org/show_bug.cgi?id={0}
" /> + <add key="SambaBugUrl" value="
https://bugzilla.samba.org/show_bug.cgi?id={0}
" /> </appSettings> </configuration> _____ Modified: trunk/irc/TechBot/TechBot/ServiceThread.cs --- trunk/irc/TechBot/TechBot/ServiceThread.cs 2006-01-05 21:32:52 UTC (rev 20589) +++ trunk/irc/TechBot/TechBot/ServiceThread.cs 2006-01-05 21:46:24 UTC (rev 20590) @@ -19,7 +19,7 @@ private string WmXml; private string WinerrorXml; private string SvnCommand; - private string BugUrl; + private string BugUrl, WineBugUrl, SambaBugUrl; private EventLog eventLog; public ServiceThread(EventLog eventLog) @@ -42,6 +42,8 @@ WinerrorXml = ConfigurationSettings.AppSettings["WinerrorXml"]; SvnCommand = ConfigurationSettings.AppSettings["SvnCommand"]; BugUrl = ConfigurationSettings.AppSettings["BugUrl"]; + WineBugUrl = ConfigurationSettings.AppSettings["WineBugUrl"]; + SambaBugUrl = ConfigurationSettings.AppSettings["SambaBugUrl"]; } public void Run() @@ -61,7 +63,9 @@ HresultXml, WmXml, SvnCommand, - BugUrl); + BugUrl, + WineBugUrl, + SambaBugUrl); ircService.Run(); } _____ Modified: trunk/irc/TechBot/TechBot.Console/App.config --- trunk/irc/TechBot/TechBot.Console/App.config 2006-01-05 21:32:52 UTC (rev 20589) +++ trunk/irc/TechBot/TechBot.Console/App.config 2006-01-05 21:46:24 UTC (rev 20590) @@ -12,7 +12,9 @@ <add key="WinerrorXml" value="C:\IRC\TechBot\winerror.xml" /> <add key="HresultXml" value="C:\IRC\TechBot\hresult.xml" /> <add key="WmXml" value="C:\IRC\TechBot\wm.xml" /> - <add key="SvnCommand" value="svn co
svn://svn.reactos.com/trunk/reactos
" /> - <add key="BugUrl" value="
www.reactos.org/bugzilla/show_bug.cgi?id={0}
" /> + <add key="SvnCommand" value="svn co
svn://svn.reactos.org/trunk/reactos
" /> + <add key="BugUrl" value="
http://www.reactos.org/bugzilla/show_bug.cgi?id={0}
" /> + <add key="WineBugUrl" value="
http://bugs.winehq.org/show_bug.cgi?id={0}
" /> + <add key="SambaBugUrl" value="
https://bugzilla.samba.org/show_bug.cgi?id={0}
" /> </appSettings> </configuration> _____ Modified: trunk/irc/TechBot/TechBot.Console/Main.cs --- trunk/irc/TechBot/TechBot.Console/Main.cs 2006-01-05 21:32:52 UTC (rev 20589) +++ trunk/irc/TechBot/TechBot.Console/Main.cs 2006-01-05 21:46:24 UTC (rev 20590) @@ -182,6 +182,32 @@ } } + private static string WineBugUrl + { + get + { + string optionName = "WineBugUrl"; + string s = ConfigurationSettings.AppSettings[optionName]; + VerifyRequiredOption(optionName, + s); + return s; + } + } + + + private static string SambaBugUrl + { + get + { + string optionName = "SambaBugUrl"; + string s = ConfigurationSettings.AppSettings[optionName]; + VerifyRequiredOption(optionName, + s); + return s; + } + } + + private static void RunIrcService() { IrcService ircService = new IrcService(IRCServerHostName, @@ -196,7 +222,9 @@ HresultXml, WmXml, SvnCommand, - BugUrl); + BugUrl, + WineBugUrl, + SambaBugUrl); ircService.Run(); } @@ -217,7 +245,9 @@ HresultXml, WmXml, SvnCommand, - BugUrl); + BugUrl, + WineBugUrl, + SambaBugUrl); service.Run(); while (true) { _____ Modified: trunk/irc/TechBot/TechBot.Library/BugCommand.cs --- trunk/irc/TechBot/TechBot.Library/BugCommand.cs 2006-01-05 21:32:52 UTC (rev 20589) +++ trunk/irc/TechBot/TechBot.Library/BugCommand.cs 2006-01-05 21:46:24 UTC (rev 20590) @@ -5,13 +5,19 @@ public class BugCommand : BaseCommand, ICommand { private IServiceOutput serviceOutput; - private string bugUrl; + private string RosBugUrl; + private string WineBugUrl; + private string SambaBugUrl; public BugCommand(IServiceOutput serviceOutput, - string bugUrl) + string RosBugUrl, + string WineBugUrl, + string SambaBugUrl) { this.serviceOutput = serviceOutput; - this.bugUrl = bugUrl; + this.RosBugUrl = RosBugUrl; + this.WineBugUrl = WineBugUrl; + this.SambaBugUrl = SambaBugUrl; } public bool CanHandle(string commandName) @@ -41,7 +47,18 @@ bugText)); return; } + + string bugUrl = this.RosBugUrl; + if (context is ChannelMessageContext) + { + ChannelMessageContext channelContext = context as ChannelMessageContext; + if (channelContext.Channel.Name == "winehackers") + bugUrl = this.WineBugUrl; + else if (channelContext.Channel.Name == "samba-technical") + bugUrl = this.SambaBugUrl; + } + serviceOutput.WriteLine(context, String.Format(bugUrl, bug)); } _____ Modified: trunk/irc/TechBot/TechBot.Library/IrcService.cs --- trunk/irc/TechBot/TechBot.Library/IrcService.cs 2006-01-05 21:32:52 UTC (rev 20589) +++ trunk/irc/TechBot/TechBot.Library/IrcService.cs 2006-01-05 21:46:24 UTC (rev 20590) @@ -19,7 +19,7 @@ private string hresultXml; private string wmXml; private string svnCommand; - private string bugUrl; + private string bugUrl, WineBugUrl, SambaBugUrl; private IrcClient client; private ArrayList channels = new ArrayList(); /* IrcChannel */ private TechBotService service; @@ -37,7 +37,9 @@ string hresultXml, string wmXml, string svnCommand, - string bugUrl) + string BugUrl, + string WineBugUrl, + string SambaBugUrl) { this.hostname = hostname; this.port = port; @@ -54,7 +56,9 @@ this.hresultXml = hresultXml; this.wmXml = wmXml; this.svnCommand = svnCommand; - this.bugUrl = bugUrl; + this.bugUrl = BugUrl; + this.WineBugUrl = WineBugUrl; + this.SambaBugUrl = SambaBugUrl; } public void Run() @@ -67,7 +71,9 @@ hresultXml, wmXml, svnCommand, - bugUrl); + bugUrl, + WineBugUrl, + SambaBugUrl); service.Run(); client = new IrcClient(); _____ Modified: trunk/irc/TechBot/TechBot.Library/TechBotService.cs --- trunk/irc/TechBot/TechBot.Library/TechBotService.cs 2006-01-05 21:32:52 UTC (rev 20589) +++ trunk/irc/TechBot/TechBot.Library/TechBotService.cs 2006-01-05 21:46:24 UTC (rev 20590) @@ -17,7 +17,7 @@ private string hresultXml; private string wmXml; private string svnCommand; - private string bugUrl; + private string bugUrl, WineBugUrl, SambaBugUrl; private ArrayList commands = new ArrayList(); public TechBotService(IServiceOutput serviceOutput, @@ -28,7 +28,9 @@ string hresultXml, string wmXml, string svnCommand, - string bugUrl) + string bugUrl, + string WineBugUrl, + string SambaBugUrl) { this.serviceOutput = serviceOutput; this.chmPath = chmPath; @@ -39,6 +41,8 @@ this.wmXml = wmXml; this.svnCommand = svnCommand; this.bugUrl = bugUrl; + this.WineBugUrl = WineBugUrl; + this.SambaBugUrl = SambaBugUrl; } public void Run() @@ -63,7 +67,9 @@ commands.Add(new SvnCommand(serviceOutput, svnCommand)); commands.Add(new BugCommand(serviceOutput, - bugUrl)); + bugUrl, + WineBugUrl, + SambaBugUrl)); } public void InjectMessage(MessageContext context,
19 years
1
0
0
0
[turner] 20589: January 2006 Status Report
by turner@svn.reactos.org
January 2006 Status Report Added: trunk/press-media/Status Reports/ Added: trunk/press-media/Status Reports/January 2006/ Added: trunk/press-media/Status Reports/January 2006/ReactOS status report.doc Added: trunk/press-media/Status Reports/January 2006/ReactOS status report.pdf Added: trunk/press-media/Status Reports/January 2006/ReactOS status report.sxw Added: trunk/press-media/Status Reports/January 2006/ReactOS status report.xml _____ Added: trunk/press-media/Status Reports/January 2006/ReactOS status report.doc (Binary files differ) Property changes on: trunk/press-media/Status Reports/January 2006/ReactOS status report.doc ___________________________________________________________________ Name: svn:mime-type + application/octet-stream _____ Added: trunk/press-media/Status Reports/January 2006/ReactOS status report.pdf --- trunk/press-media/Status Reports/January 2006/ReactOS status report.pdf 2006-01-05 20:57:29 UTC (rev 20588) +++ trunk/press-media/Status Reports/January 2006/ReactOS status report.pdf 2006-01-05 21:32:52 UTC (rev 20589) @@ -0,0 +1,911 @@ +%PDF-1.4 +%?ñ???Â?f +2 0 obj +<< /Length 3 0 R + /Filter /FlateDecode +>> +stream +x£Ý\¦Ä¶Â¢_`?a«d½??@P?¾y?Ù?¶Êáh +47y²?Kó?#Z×?]$@!_Å-K"yHRVù_^_?wQù´Èø¥??°??a¨¹þ\?÷ç?´?.~?ÎÙ? §²§ePùN§o²Õ²´ù??·ó?Õ²fù´ò?ËÕ²?»/²[þo÷?}»?²è{?ßèU?²ÜÍÚóSÝvÐ¥5ßbw? ȪÐz5?»uomzÈ·ã¹uúÊ??¡}³&h?³ã^;àþ?)¸Ûû~2&²È½YY¡ÂthdC[0?ͬÎF[ g?¬ø? ¾á?^?Ö??^]?J÷"nøÙĸ4D +T^lâ??IÁ?½ÎIYiRaý!ì¦0í?pW+?i??LÿÚ^l?ÇZÑ?a?>mÐ6"ÐH4ùÐ_2ýêÔ=ó/Å#??½ øÈm?0M%2²f.N&Ì8ЪþÁR?ÙZMç¼¾3À¿d©¯oÂiÙ? ?¢è8??À²]?k£r?Ë? åÁýi¦¢?=~ë?ü?5,¬ÔÀhH{g2ÕE?Ñ]??9?òÀlÏötÀS¦ç?& ËC0íä{ZÚ1óiY$ie²ÈWÐÍØW2â?¦éä?~¨S·?~?@0?¨qü?^?¶õ¸H¡Fj³? ÀÕ8E²GDÖûíÜ([bÜ?Tå0?ü¬Û?JfJ??åÇ/hÄûiÝ??Þü ¼t+7AíäÜi+ÛýÊ+?mò!]Møª$aisfÆg,qÃñ-X¸>?(XC?:qdfdççѺf"?(ûýìY?" ÍÕp³&Î[G"Ü.:Þdá;½ZÈ¿ñÄÂ=?Y.õóíQ§×VHo¨LÇ?ì«?½?Aé³¢fõw? +2ÕªeH,í_,!??ÉwΩq?Òo¿UÜ|?û:~!< {u§¹àm,X0E§À?Ó;?îc{2?yÿà?¥? ï|q|KõÒ?«¼mï%÷D??çÏaõ/?ÖÙ9?wØ2Ã?}WÖ?(:?Dçç5?eÙ¶?±|+<£"¦?!?¬&=Ø÷ åJD'äo(* ß]d¨¢Ì$¸ÆCÓ-jú?Ã?³@ÒA @V?ìv±?ÄQ?o??=$BvÄç +ï¾Ö·f¬.?½FÆtDû$ãî{,¬?x*,??þ?%sö(a)+y.?<HT?ê\? +æ?è??DÎæb(?Ac?ò? `%Gª{dÜÞ_?o7Òéx\D1VCx¤ó¾3å¬4éì ,zæ:w?
19 years
1
0
0
0
[gedmurphy] 20588: Fix ugly toolbar colour
by gedmurphy@svn.reactos.org
Fix ugly toolbar colour Modified: trunk/reactos/subsys/system/servman/servman.c _____ Modified: trunk/reactos/subsys/system/servman/servman.c --- trunk/reactos/subsys/system/servman/servman.c 2006-01-05 20:13:06 UTC (rev 20587) +++ trunk/reactos/subsys/system/servman/servman.c 2006-01-05 20:57:29 UTC (rev 20588) @@ -571,7 +571,7 @@ wc.hInstance = hInstance; wc.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_SM_ICON)); wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_WINDOW); + wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); wc.lpszMenuName = MAKEINTRESOURCE(IDR_MAINMENU); wc.lpszClassName = ClassName; wc.hIconSm = (HICON)LoadImage(GetModuleHandle(NULL),
19 years
1
0
0
0
[gedmurphy] 20587: - Fix local xml file (thanks to Christoph for spotting this)
by gedmurphy@svn.reactos.org
- Fix local xml file (thanks to Christoph for spotting this) - Add to dir the build Modified: trunk/reactos/subsys/system/directory.xml Modified: trunk/reactos/subsys/system/servman/servman.xml _____ Modified: trunk/reactos/subsys/system/directory.xml --- trunk/reactos/subsys/system/directory.xml 2006-01-05 18:04:46 UTC (rev 20586) +++ trunk/reactos/subsys/system/directory.xml 2006-01-05 20:13:06 UTC (rev 20587) @@ -62,6 +62,9 @@ <directory name="services"> <xi:include href="services/services.xml" /> </directory> +<directory name="servman"> + <xi:include href="servman/servman.xml" /> +</directory> <directory name="setup"> <xi:include href="setup/setup.xml" /> </directory> _____ Modified: trunk/reactos/subsys/system/servman/servman.xml --- trunk/reactos/subsys/system/servman/servman.xml 2006-01-05 18:04:46 UTC (rev 20586) +++ trunk/reactos/subsys/system/servman/servman.xml 2006-01-05 20:13:06 UTC (rev 20587) @@ -1,5 +1,5 @@ <module name="servman" type="win32gui" installbase="system32" installname="servman.exe"> - <include base="msconfig">.</include> + <include base="servman">.</include> <define name="UNICODE" /> <define name="_UNICODE" /> <define name="__REACTOS__" />
19 years
1
0
0
0
[gedmurphy] 20586: - Start to put together a services.msc equivalent.
by gedmurphy@svn.reactos.org
- Start to put together a services.msc equivalent. - mmc.exe is probably a long way off, thus mmc snap-ins will be too. This will suffice until then. Most of the code should be transferable. Added: trunk/reactos/subsys/system/servman/ Added: trunk/reactos/subsys/system/servman/en.rc Added: trunk/reactos/subsys/system/servman/res/ Added: trunk/reactos/subsys/system/servman/res/applet.ico Added: trunk/reactos/subsys/system/servman/resource.h Added: trunk/reactos/subsys/system/servman/servman.c Added: trunk/reactos/subsys/system/servman/servman.rc Added: trunk/reactos/subsys/system/servman/servman.xml _____ Added: trunk/reactos/subsys/system/servman/en.rc --- trunk/reactos/subsys/system/servman/en.rc 2006-01-05 17:52:39 UTC (rev 20585) +++ trunk/reactos/subsys/system/servman/en.rc 2006-01-05 18:04:46 UTC (rev 20586) @@ -0,0 +1,62 @@ + +IDR_MAINMENU MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "E&xit",ID_FILE_EXIT + END + POPUP "Action" + BEGIN + MENUITEM "Start",ID_START + MENUITEM "Stop",ID_STOP + MENUITEM "Pause",ID_PAUSE + MENUITEM "Resume",ID_RESUME + MENUITEM "Restart",ID_RESTART + MENUITEM SEPARATOR + MENUITEM "Refresh",ID_REFRESH + MENUITEM SEPARATOR + MENUITEM "Properties",ID_PROP + END + POPUP "View" + BEGIN + MENUITEM "Customize",ID_VIEW_CUSTOMIZE + END + POPUP "Help" + BEGIN + MENUITEM "About",ID_HELP_ABOUT + END +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_FIRSTCOLUMN "Name" + IDS_SECONDCOLUMN "Description" + IDS_THIRDCOLUMN "Status" + IDS_FOURTHCOLUMN "Startup Type" + IDS_FITHCOLUMN "Log On As" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_SERVICES_STATUS_RUNNING "Started" + IDS_SERVICES_STATUS_STOPPED "Stopped" + IDS_SERVICES_YES "Yes" + IDS_SERVICES_UNKNOWN "Unknown" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_SERVICES_NUM_SERVICES "Num Services: %d" + IDB_START "res/start.bmp" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_TOOLTIP_PROP "Properties" + IDS_TOOLTIP_REFRESH "Refresh" + IDS_TOOLTIP_EXPORT "Export list" + IDS_TOOLTIP_START "Start service" + IDS_TOOLTIP_STOP "Stop service" + IDS_TOOLTIP_PAUSE "Pause service" + IDS_TOOLTIP_RESTART "Restart service" +END _____ Added: trunk/reactos/subsys/system/servman/res/applet.ico (Binary files differ) Property changes on: trunk/reactos/subsys/system/servman/res/applet.ico ___________________________________________________________________ Name: svn:mime-type + application/octet-stream _____ Added: trunk/reactos/subsys/system/servman/resource.h --- trunk/reactos/subsys/system/servman/resource.h 2006-01-05 17:52:39 UTC (rev 20585) +++ trunk/reactos/subsys/system/servman/resource.h 2006-01-05 18:04:46 UTC (rev 20586) @@ -0,0 +1,44 @@ +#define IDC_STATIC -1 + +#define IDC_SERVLIST 1000 +#define IDC_TOOLBAR 1001 +#define IDC_STATUSBAR 1002 + +#define ID_PROP 4010 +#define ID_REFRESH 4011 +#define ID_EXPORT 4012 + +#define ID_START 2000 +#define ID_STOP 2001 +#define ID_PAUSE 2002 +#define ID_RESUME 2003 +#define ID_RESTART 2004 + +#define IDR_MAINMENU 102 +#define ID_FILE_EXIT 4001 +#define ID_VIEW_CUSTOMIZE 4021 +#define ID_HELP_ABOUT 4031 + +#define IDS_FIRSTCOLUMN 1 +#define IDS_SECONDCOLUMN 2 +#define IDS_THIRDCOLUMN 3 +#define IDS_FOURTHCOLUMN 4 +#define IDS_FITHCOLUMN 5 + +#define IDS_TOOLTIP_PROP 6000 +#define IDS_TOOLTIP_REFRESH 6001 +#define IDS_TOOLTIP_EXPORT 6002 +#define IDS_TOOLTIP_START 6003 +#define IDS_TOOLTIP_STOP 6004 +#define IDS_TOOLTIP_PAUSE 6005 +#define IDS_TOOLTIP_RESTART 6006 + + +#define IDS_SERVICES_STATUS_RUNNING 5000 +#define IDS_SERVICES_STATUS_STOPPED 5001 +#define IDS_SERVICES_YES 5002 +#define IDS_SERVICES_UNKNOWN 5003 +#define IDS_SERVICES_NUM_SERVICES 5004 + +#define IDB_START 50 +#define IDI_SM_ICON 51 _____ Added: trunk/reactos/subsys/system/servman/servman.c --- trunk/reactos/subsys/system/servman/servman.c 2006-01-05 17:52:39 UTC (rev 20585) +++ trunk/reactos/subsys/system/servman/servman.c 2006-01-05 18:04:46 UTC (rev 20586) @@ -0,0 +1,620 @@ +#include <windows.h> +#include <stdio.h> +#include <tchar.h> +#include <commctrl.h> +#include "resource.h" + +const TCHAR ClassName[] = _T("ServiceManager"); + +HINSTANCE hInstance; +HWND hListView; +HWND hStatus; + + +void +GetServices ( void ) +{ + LV_ITEM item; + WORD wCodePage; + WORD wLangID; + SC_HANDLE ScHandle; + SC_HANDLE hService; + DWORD BytesNeeded = 0; + DWORD ResumeHandle = 0; + DWORD NumServices = 0; + DWORD dwHandle, dwLen; + size_t Index; + UINT BufLen; + TCHAR szStatus[128]; + TCHAR* lpData; + TCHAR* lpBuffer; + TCHAR szStrFileInfo[80]; + TCHAR FileName[MAX_PATH]; + TCHAR szNumServices[32]; + LPVOID pvData; + + LPSERVICE_FAILURE_ACTIONS pServiceFailureActions = NULL; + LPQUERY_SERVICE_CONFIG pServiceConfig = NULL; + ENUM_SERVICE_STATUS_PROCESS *pServiceStatus = NULL; + + ScHandle = OpenSCManager(NULL, NULL, SC_MANAGER_ENUMERATE_SERVICE); + if (ScHandle != INVALID_HANDLE_VALUE) + { + if (EnumServicesStatusEx(ScHandle, + SC_ENUM_PROCESS_INFO, + SERVICE_WIN32, + SERVICE_STATE_ALL, + (LPBYTE)pServiceStatus, + 0, &BytesNeeded, + &NumServices, + &ResumeHandle, + 0) == 0) + { + /* Call function again if required size was returned */ + if (GetLastError() == ERROR_MORE_DATA) + { + /* reserve memory for service info array */ + pServiceStatus = (ENUM_SERVICE_STATUS_PROCESS *) HeapAlloc(GetProcessHeap(), 0, BytesNeeded); + if (pServiceStatus == NULL) + return; + + /* fill array with service info */ + if (EnumServicesStatusEx(ScHandle, + SC_ENUM_PROCESS_INFO, + SERVICE_WIN32, + SERVICE_STATE_ALL, + (LPBYTE)pServiceStatus, + BytesNeeded, + &BytesNeeded, + &NumServices, + &ResumeHandle, + 0) == 0) + { + HeapFree(GetProcessHeap(), 0, pServiceStatus); + return; + } + } + else /* exit on failure */ + { + return; + } + } + + if (NumServices) + { + HICON hiconItem; // icon for list-view items + HIMAGELIST hSmall; // image list for other views + TCHAR buf[40]; + + /* Create the icon image lists */ + hSmall = ImageList_Create(GetSystemMetrics(SM_CXSMICON), + GetSystemMetrics(SM_CYSMICON), ILC_MASK, 1, 1); + + /* Add an icon to each image list */ + hiconItem = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SM_ICON)); + ImageList_AddIcon(hSmall, hiconItem); + DestroyIcon(hiconItem); + + ListView_SetImageList(hListView, hSmall, LVSIL_SMALL); + + /* set the number of services in the status bar */ + LoadString(hInstance, IDS_SERVICES_NUM_SERVICES, szNumServices, 32); + _stprintf(buf, szNumServices, NumServices); + SendMessage(hStatus, SB_SETTEXT, 0, (LPARAM)buf); + + for (Index = 0; Index < NumServices; Index++) + { + memset(&item, 0, sizeof(LV_ITEM)); + item.mask = LVIF_TEXT; + //item.iImage = 0; + item.pszText = pServiceStatus[Index].lpDisplayName; + item.iItem = ListView_GetItemCount(hListView); + item.lParam = 0; + item.iItem = ListView_InsertItem(hListView, &item); + + BytesNeeded = 0; + hService = OpenService(ScHandle, + pServiceStatus[Index].lpServiceName, + SC_MANAGER_CONNECT); + if (hService != INVALID_HANDLE_VALUE) + { + /* check if service is required by the system*/ + if (!QueryServiceConfig2(hService, + SERVICE_CONFIG_FAILURE_ACTIONS, + (LPBYTE)pServiceFailureActions, + 0, + &BytesNeeded)) + { + if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + pServiceFailureActions = (LPSERVICE_FAILURE_ACTIONS) + HeapAlloc(GetProcessHeap(), 0, BytesNeeded); + if (pServiceFailureActions == NULL) + return; + + if (!QueryServiceConfig2(hService, + SERVICE_CONFIG_FAILURE_ACTIONS, + (LPBYTE)pServiceFailureActions, + BytesNeeded, + &BytesNeeded)) + { + HeapFree(GetProcessHeap(), 0, pServiceFailureActions); + return; + } + } + else /* exit on failure */ + { + return; + } + } + if (pServiceFailureActions->cActions) + { + if (pServiceFailureActions->lpsaActions[0].Type == SC_ACTION_REBOOT) + { + LoadString(hInstance, IDS_SERVICES_YES, szStatus, 128); + item.pszText = szStatus; + item.iSubItem = 1; + SendMessage(hListView, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item); + } + } + + if (pServiceFailureActions != NULL) + { + HeapFree(GetProcessHeap(), 0, pServiceFailureActions); + pServiceFailureActions = NULL; + } + + /* get vendor of service binary */ + BytesNeeded = 0; + if (!QueryServiceConfig(hService, pServiceConfig, 0, &BytesNeeded)) + { + if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + pServiceConfig = (LPQUERY_SERVICE_CONFIG) + HeapAlloc(GetProcessHeap(), 0, BytesNeeded); + if (pServiceConfig == NULL) + return; + + if (!QueryServiceConfig(hService, + pServiceConfig, + BytesNeeded, + &BytesNeeded)) + { + HeapFree(GetProcessHeap(), 0, pServiceConfig); + return; + } + } + else /* exit on failure */ + { + return; + } + } + + memset(&FileName, 0, MAX_PATH); + if (_tcscspn(pServiceConfig->lpBinaryPathName, _T("\""))) + { + _tcsncpy(FileName, pServiceConfig->lpBinaryPathName, + _tcscspn(pServiceConfig->lpBinaryPathName, _T(" ")) ); + } + else + { + _tcscpy(FileName, pServiceConfig->lpBinaryPathName); + } + + HeapFree(GetProcessHeap(), 0, pServiceConfig); + pServiceConfig = NULL; + + dwLen = GetFileVersionInfoSize(FileName, &dwHandle); + if (dwLen) + { + lpData = (TCHAR*) HeapAlloc(GetProcessHeap(), 0, dwLen); + if (lpData == NULL) + return; + + if (!GetFileVersionInfo (FileName, dwHandle, dwLen, lpData)) { + HeapFree(GetProcessHeap(), 0, lpData); + return; + } + + if (VerQueryValue(lpData, _T("\\VarFileInfo\\Translation"), &pvData, (PUINT) &BufLen)) + { + wCodePage = LOWORD(*(DWORD*) pvData); + wLangID = HIWORD(*(DWORD*) pvData); + wsprintf(szStrFileInfo, _T("StringFileInfo\\%04X%04X\\CompanyName"), wCodePage, wLangID); + } + + if (VerQueryValue (lpData, szStrFileInfo, (LPVOID) &lpBuffer, (PUINT) &BufLen)) { + item.pszText = lpBuffer; + item.iSubItem = 2; + SendMessage(hListView, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item); + } + HeapFree(GetProcessHeap(), 0, lpData); + } + else + { + LoadString(hInstance, IDS_SERVICES_UNKNOWN, szStatus, 128); + item.pszText = szStatus; + item.iSubItem = 2; + SendMessage(hListView, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item); + } + CloseServiceHandle(hService); + } + + if (pServiceStatus[Index].ServiceStatusProcess.dwCurrentState == SERVICE_RUNNING) + { + LoadString(hInstance, IDS_SERVICES_STATUS_RUNNING, szStatus, 128); + item.pszText = szStatus; + item.iSubItem = 2; + SendMessage(hListView, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item); + } + else + { + item.pszText = '\0'; + item.iSubItem = 2; + SendMessage(hListView, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item); + } + + } + } + + HeapFree(GetProcessHeap(), 0, pServiceStatus); + CloseServiceHandle(ScHandle); + } + + +} + + + +LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch(msg) + { + case WM_CREATE: + { + //HFONT hfDefault; + + HWND hTool; + TBBUTTON tbb[7]; + TBADDBITMAP tbab; + + int statwidths[] = {110, -1}; + + TCHAR szTemp[256]; + + /* Create List View */ + LVCOLUMN lvc = { 0 }; + //LVITEM lv = { 0 }; + + //GetClientRect(hwnd, &rc); + hListView = CreateWindow(WC_LISTVIEW, + NULL, + WS_CHILD | WS_VISIBLE | LVS_REPORT | WS_BORDER | LVS_EDITLABELS, + 0, 0, 0, 0, /* sized via WM_SIZE */ + hwnd, + (HMENU) IDC_SERVLIST, + hInstance, + NULL); + + ListView_SetExtendedListViewStyle(hListView, LVS_EX_FULLROWSELECT | + /*LVS_EX_GRIDLINES |*/ LVS_EX_HEADERDRAGDROP); + + lvc.mask = LVCF_TEXT | LVCF_SUBITEM | LVCF_WIDTH | LVCF_FMT; + lvc.fmt = LVCFMT_LEFT; + + /* Add columns to the list-view (first column contains check box). */ + lvc.iSubItem = 0; + lvc.cx = 160; + LoadString(hInstance, IDS_FIRSTCOLUMN, szTemp, 256); + lvc.pszText = szTemp; + ListView_InsertColumn(hListView, 0, &lvc); + + lvc.iSubItem = 1; + lvc.cx = 150; + LoadString(hInstance, IDS_SECONDCOLUMN, szTemp, 256); + lvc.pszText = szTemp; + ListView_InsertColumn(hListView, 1, &lvc); + + lvc.iSubItem = 2; + lvc.cx = 80; + LoadString(hInstance, IDS_THIRDCOLUMN, szTemp, 256); + lvc.pszText = szTemp; + ListView_InsertColumn(hListView, 2, &lvc); + + lvc.iSubItem = 3; + lvc.cx = 80; + LoadString(hInstance, IDS_FOURTHCOLUMN, szTemp, 256); + lvc.pszText = szTemp; + ListView_InsertColumn(hListView, 3, &lvc); + + lvc.iSubItem = 4; + lvc.cx = 100; + LoadString(hInstance, IDS_FITHCOLUMN, szTemp, 256); + lvc.pszText = szTemp; + ListView_InsertColumn(hListView, 4, &lvc); + + // Create Toolbar + hTool = CreateWindowEx(0, + TOOLBARCLASSNAME, + NULL, + WS_CHILD | WS_VISIBLE | TBSTYLE_FLAT | TBSTYLE_TOOLTIPS, + 0, 0, 0, 0, + hwnd, + (HMENU)IDC_TOOLBAR, + hInstance, + NULL); + if(hTool == NULL) + MessageBox(hwnd, _T("Could not create tool bar."), _T("Error"), MB_OK | MB_ICONERROR); + + // Send the TB_BUTTONSTRUCTSIZE message, which is required for + // backward compatibility. + SendMessage(hTool, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0); + + tbab.hInst = HINST_COMMCTRL; + tbab.nID = IDB_STD_SMALL_COLOR; + SendMessage(hTool, TB_ADDBITMAP, 0, (LPARAM)&tbab); + + ZeroMemory(tbb, sizeof(tbb)); + tbb[0].iBitmap = STD_PROPERTIES; + tbb[0].fsState = TBSTATE_ENABLED; + tbb[0].fsStyle = TBSTYLE_BUTTON; + tbb[0].idCommand = ID_PROP; + tbb[1].iBitmap = STD_FILENEW; + tbb[1].fsState = TBSTATE_ENABLED; + tbb[1].fsStyle = TBSTYLE_BUTTON; + tbb[1].idCommand = ID_REFRESH; + tbb[2].iBitmap = STD_FILENEW; + tbb[2].fsState = TBSTATE_ENABLED; + tbb[2].fsStyle = TBSTYLE_BUTTON; + tbb[2].idCommand = ID_EXPORT; + /* seperator */ + tbb[3].iBitmap = STD_FILENEW; + tbb[3].fsState = TBSTATE_ENABLED; + tbb[3].fsStyle = TBSTYLE_BUTTON; + tbb[3].idCommand = ID_START; + tbb[4].iBitmap = STD_FILENEW; + tbb[4].fsState = TBSTATE_ENABLED; + tbb[4].fsStyle = TBSTYLE_BUTTON; + tbb[4].idCommand = ID_STOP; + tbb[5].iBitmap = STD_FILENEW; + tbb[5].fsState = TBSTATE_ENABLED; + tbb[5].fsStyle = TBSTYLE_BUTTON; + tbb[5].idCommand = ID_PAUSE; + tbb[6].iBitmap = STD_FILENEW; + tbb[6].fsState = TBSTATE_ENABLED; + tbb[6].fsStyle = TBSTYLE_BUTTON; + tbb[6].idCommand = ID_RESTART; + SendMessage(hTool, TB_ADDBUTTONS, sizeof(tbb)/sizeof(TBBUTTON), (LPARAM)&tbb); + + /* Create Status bar */ + hStatus = CreateWindowEx(0, + STATUSCLASSNAME, + NULL, + WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP, + 0, 0, 0, 0, + hwnd, + (HMENU)IDC_STATUSBAR, + hInstance, + NULL); + if(hStatus == NULL) + MessageBox(hwnd, _T("Could not create status bar."), _T("Error"), MB_OK | MB_ICONERROR); + + SendMessage(hStatus, SB_SETPARTS, sizeof(statwidths)/sizeof(int), (LPARAM)statwidths); + + /* populate the list view with all services */ + GetServices(); + } + break; + case WM_SIZE: + { + HWND hTool; + RECT rcTool; + int iToolHeight; + + HWND hStatus; + RECT rcStatus; + int iStatusHeight; + + HWND hListView; + int lvHeight; + RECT rcClient; + + /* Size toolbar and get height */ + hTool = GetDlgItem(hwnd, IDC_TOOLBAR); + SendMessage(hTool, TB_AUTOSIZE, 0, 0); + + GetWindowRect(hTool, &rcTool); + iToolHeight = rcTool.bottom - rcTool.top; + + /* Size status bar and get height */ + hStatus = GetDlgItem(hwnd, IDC_STATUSBAR); + SendMessage(hStatus, WM_SIZE, 0, 0); + + GetWindowRect(hStatus, &rcStatus); + iStatusHeight = rcStatus.bottom - rcStatus.top; + + /* Calculate remaining height and size list view */ + GetClientRect(hwnd, &rcClient); + + lvHeight = rcClient.bottom - iToolHeight - iStatusHeight; + + hListView = GetDlgItem(hwnd, IDC_SERVLIST); + SetWindowPos(hListView, NULL, 0, iToolHeight, rcClient.right, lvHeight, SWP_NOZORDER); + } + break; + + case WM_NOTIFY: + switch (((LPNMHDR) lParam)->code) + { + case TTN_GETDISPINFO: + { + LPTOOLTIPTEXT lpttt; + UINT idButton; + + lpttt = (LPTOOLTIPTEXT) lParam; + lpttt->hinst = hInstance; + + // Specify the resource identifier of the descriptive + // text for the given button. + idButton = lpttt->hdr.idFrom; + switch (idButton) + { + case ID_PROP: + lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_PROP); + break; + + case ID_REFRESH: + lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_REFRESH); + break; + + case ID_EXPORT: + lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_EXPORT); + break; + + case ID_START: + lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_START); + break; + + case ID_STOP: + lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_STOP); + break; + + case ID_PAUSE: + lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_PAUSE); + break; + + case ID_RESTART: + lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_RESTART); + break; + + } + } + break; + + // Process other notifications here. + + default: + break; + } + break; + + case WM_CLOSE: + DestroyWindow(hwnd); + break; + case WM_DESTROY: + PostQuitMessage(0); + break; + case WM_COMMAND: + switch(LOWORD(wParam)) + { + case ID_FILE_EXIT: + PostMessage(hwnd, WM_CLOSE, 0, 0); + break; + + case ID_START: + break; + + case ID_STOP: + break; + + case ID_PAUSE: + break; + + case ID_RESUME: + break; + + case ID_RESTART: + break; + + case ID_REFRESH: + break; + + case ID_PROP: + break; + + case ID_VIEW_CUSTOMIZE: + break; + + case ID_HELP_ABOUT: + break; + + case ID_EXPORT: + break; + + } + break; + default: + return DefWindowProc(hwnd, msg, wParam, lParam); + } + return 0; +} + + + +int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, + LPSTR lpCmdLine, int nCmdShow) +{ + WNDCLASSEX wc; + HWND hwnd; + MSG Msg; + BOOL bRet; + + hInstance = hThisInstance; + + InitCommonControls(); + + wc.cbSize = sizeof(WNDCLASSEX); + wc.style = 0; + wc.lpfnWndProc = WndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_SM_ICON)); + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hbrBackground = (HBRUSH)(COLOR_WINDOW); + wc.lpszMenuName = MAKEINTRESOURCE(IDR_MAINMENU); + wc.lpszClassName = ClassName; + wc.hIconSm = (HICON)LoadImage(GetModuleHandle(NULL), + MAKEINTRESOURCE(IDI_SM_ICON), IMAGE_ICON, 16, 16, 0); + + if(!RegisterClassEx(&wc)) + { + MessageBox(NULL, _T("Window Registration Failed!"), _T("Error!"), + MB_ICONEXCLAMATION | MB_OK); + return 0; + } + + hwnd = CreateWindowEx( + 0, + ClassName, + _T("ReactOS Service Manager"), + WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, + CW_USEDEFAULT, CW_USEDEFAULT, 700, 500, + NULL, NULL, hInstance, NULL); + + if(hwnd == NULL) + { + MessageBox(NULL, _T("Window Creation Failed!"), _T("Error!"), + MB_ICONEXCLAMATION | MB_OK); + return 0; + } + + ShowWindow(hwnd, nCmdShow); + UpdateWindow(hwnd); + + while( (bRet = GetMessage( &Msg, NULL, 0, 0 )) != 0) + { + if (bRet == -1) + { + /* handle the error and possibly exit */ + } + else + { + TranslateMessage(&Msg); + DispatchMessage(&Msg); + } + } + return Msg.wParam; +} + + _____ Added: trunk/reactos/subsys/system/servman/servman.rc --- trunk/reactos/subsys/system/servman/servman.rc 2006-01-05 17:52:39 UTC (rev 20585) +++ trunk/reactos/subsys/system/servman/servman.rc 2006-01-05 18:04:46 UTC (rev 20586) @@ -0,0 +1,16 @@ +#include <windows.h> +#include <commctrl.h> +#include "resource.h" + + +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Service Manager\0" +#define REACTOS_STR_INTERNAL_NAME "services\0" +#define REACTOS_STR_ORIGINAL_FILENAME "services.exe\0" +#include <reactos/version.rc> + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +IDI_SM_ICON ICON "res/applet.ico" + +#include "En.rc" + _____ Added: trunk/reactos/subsys/system/servman/servman.xml --- trunk/reactos/subsys/system/servman/servman.xml 2006-01-05 17:52:39 UTC (rev 20585) +++ trunk/reactos/subsys/system/servman/servman.xml 2006-01-05 18:04:46 UTC (rev 20586) @@ -0,0 +1,19 @@ +<module name="servman" type="win32gui" installbase="system32" installname="servman.exe"> + <include base="msconfig">.</include> + <define name="UNICODE" /> + <define name="_UNICODE" /> + <define name="__REACTOS__" /> + <define name="__USE_W32API" /> + <define name="_WIN32_IE">0x600</define> + <define name="_WIN32_WINNT">0x501</define> + <library>kernel32</library> + <library>user32</library> + <library>advapi32</library> + <library>version</library> + <library>comctl32</library> + <library>shell32</library> + <compilationunit name="unit.c"> + <file>servman.c</file> + </compilationunit> + <file>servman.rc</file> +</module>
19 years
1
0
0
0
[mbosma] 20585: Add !error command which checks NtStatus, Winerror and hResult.
by mbosma@svn.reactos.org
Add !error command which checks NtStatus, Winerror and hResult. Added: trunk/irc/TechBot/TechBot.Library/ErrorCommand.cs Modified: trunk/irc/TechBot/TechBot.Library/HresultCommand.cs Modified: trunk/irc/TechBot/TechBot.Library/NtStatusCommand.cs Modified: trunk/irc/TechBot/TechBot.Library/TechBot.Library.prjx Modified: trunk/irc/TechBot/TechBot.Library/TechBotService.cs Modified: trunk/irc/TechBot/TechBot.Library/WinerrorCommand.cs _____ Added: trunk/irc/TechBot/TechBot.Library/ErrorCommand.cs --- trunk/irc/TechBot/TechBot.Library/ErrorCommand.cs 2006-01-05 16:35:08 UTC (rev 20584) +++ trunk/irc/TechBot/TechBot.Library/ErrorCommand.cs 2006-01-05 17:52:39 UTC (rev 20585) @@ -0,0 +1,91 @@ +using System; +using System.Xml; + +namespace TechBot.Library +{ + public class ErrorCommand : BaseCommand, ICommand + { + private IServiceOutput serviceOutput; + private NtStatusCommand ntStatus; + private WinerrorCommand winerror; + private HresultCommand hresult; + + public ErrorCommand(IServiceOutput serviceOutput, string ntstatusXml, + string winerrorXml, string hresultXml) + { + this.serviceOutput = serviceOutput; + this.ntStatus = new NtStatusCommand(serviceOutput, + ntstatusXml); + this.winerror = new WinerrorCommand(serviceOutput, + winerrorXml); + this.hresult = new HresultCommand(serviceOutput, + hresultXml); + } + + public bool CanHandle(string commandName) + { + return CanHandle(commandName, + new string[] { "error" }); + } + + public void Handle(MessageContext context, + string commandName, + string parameters) + { + string errorText = parameters; + if (errorText.Equals(String.Empty)) + { + serviceOutput.WriteLine(context, + "Please provide an Error Code."); + return; + } + + NumberParser np = new NumberParser(); + long error = np.Parse(errorText); + if (np.Error) + { + serviceOutput.WriteLine(context, + String.Format("{0} is not a valid Error Code.", + errorText)); + return; + } + + string description = null; + if (winerror.GetWinerrorDescription(error) != null) + { + description = winerror.GetWinerrorDescription(error); + serviceOutput.WriteLine(context, + String.Format("{0} is {1}.", + error, + description)); + } + if (ntStatus.GetNtstatusDescription(error) != null) + { + description = ntStatus.GetNtstatusDescription(error); + serviceOutput.WriteLine(context, + String.Format("{0} is {1}.", + errorText, + description)); + } + if (hresult.GetHresultDescription(error) != null) + { + description = hresult.GetHresultDescription(error); + serviceOutput.WriteLine(context, + String.Format("{0} is {1}.", + errorText, + description)); + } + if(description == null) + { + serviceOutput.WriteLine(context, + String.Format("I don't know about Error Code {0}.", + errorText)); + } + } + + public string Help() + { + return "!error <value>"; + } + } +} _____ Modified: trunk/irc/TechBot/TechBot.Library/HresultCommand.cs --- trunk/irc/TechBot/TechBot.Library/HresultCommand.cs 2006-01-05 16:35:08 UTC (rev 20584) +++ trunk/irc/TechBot/TechBot.Library/HresultCommand.cs 2006-01-05 17:52:39 UTC (rev 20585) @@ -67,7 +67,7 @@ return "!hresult <value>"; } - private string GetHresultDescription(long hresult) + public string GetHresultDescription(long hresult) { XmlElement root = hresultXmlDocument.DocumentElement; XmlNode node = root.SelectSingleNode(String.Format("Hresult[@value='{0}']", _____ Modified: trunk/irc/TechBot/TechBot.Library/NtStatusCommand.cs --- trunk/irc/TechBot/TechBot.Library/NtStatusCommand.cs 2006-01-05 16:35:08 UTC (rev 20584) +++ trunk/irc/TechBot/TechBot.Library/NtStatusCommand.cs 2006-01-05 17:52:39 UTC (rev 20585) @@ -67,7 +67,7 @@ return "!ntstatus <value>"; } - private string GetNtstatusDescription(long ntstatus) + public string GetNtstatusDescription(long ntstatus) { XmlElement root = ntstatusXmlDocument.DocumentElement; XmlNode node = root.SelectSingleNode(String.Format("Ntstatus[@value='{0}']", _____ Modified: trunk/irc/TechBot/TechBot.Library/TechBot.Library.prjx --- trunk/irc/TechBot/TechBot.Library/TechBot.Library.prjx 2006-01-05 16:35:08 UTC (rev 20584) +++ trunk/irc/TechBot/TechBot.Library/TechBot.Library.prjx 2006-01-05 17:52:39 UTC (rev 20585) @@ -12,6 +12,7 @@ <File name=".\NumberParser.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\HresultCommand.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\WinerrorCommand.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> + <File name=".\ErrorCommand.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\SvnCommand.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\BugCommand.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\WmCommand.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> @@ -39,4 +40,4 @@ <Output directory="..\bin\Release" assembly="TechBot.Library" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" /> </Configuration> </Configurations> -</Project> \ No newline at end of file +</Project> _____ Modified: trunk/irc/TechBot/TechBot.Library/TechBotService.cs --- trunk/irc/TechBot/TechBot.Library/TechBotService.cs 2006-01-05 16:35:08 UTC (rev 20584) +++ trunk/irc/TechBot/TechBot.Library/TechBotService.cs 2006-01-05 17:52:39 UTC (rev 20585) @@ -54,6 +54,10 @@ winerrorXml)); commands.Add(new HresultCommand(serviceOutput, hresultXml)); + commands.Add(new ErrorCommand(serviceOutput, + ntstatusXml, + winerrorXml, + hresultXml)); commands.Add(new WmCommand(serviceOutput, wmXml)); commands.Add(new SvnCommand(serviceOutput, _____ Modified: trunk/irc/TechBot/TechBot.Library/WinerrorCommand.cs --- trunk/irc/TechBot/TechBot.Library/WinerrorCommand.cs 2006-01-05 16:35:08 UTC (rev 20584) +++ trunk/irc/TechBot/TechBot.Library/WinerrorCommand.cs 2006-01-05 17:52:39 UTC (rev 20585) @@ -67,7 +67,7 @@ return "!winerror <value>"; } - private string GetWinerrorDescription(long winerror) + public string GetWinerrorDescription(long winerror) { XmlElement root = winerrorXmlDocument.DocumentElement; XmlNode node = root.SelectSingleNode(String.Format("Winerror[@value='{0}']",
19 years
1
0
0
0
[royce] 20584: fix build in unspecified build environment - patch by Reuben Perelman <reub2000@earthlink.net>
by royce@svn.reactos.org
fix build in unspecified build environment - patch by Reuben Perelman <reub2000(a)earthlink.net> Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h _____ Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h 2006-01-05 16:32:49 UTC (rev 20583) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h 2006-01-05 16:35:08 UTC (rev 20584) @@ -88,7 +88,7 @@ std::string GetBasename ( const std::string& filename ) const; FileLocation* GetActualSourceFilename ( const FileLocation* fileLocation ) const; std::string GetExtraDependencies ( const std::string& filename ) const; - std::string MingwModuleHandler::GetCompilationUnitDependencies ( const CompilationUnit& compilationUnit ) const; + std::string GetCompilationUnitDependencies ( const CompilationUnit& compilationUnit ) const; std::string GetModuleArchiveFilename () const; bool IsGeneratedFile ( const File& file ) const; std::string GetImportLibraryDependency ( const Module& importedModule ); @@ -147,7 +147,7 @@ std::string GenerateGccIncludeParameters () const; std::string GenerateGccParameters () const; std::string GenerateNasmParameters () const; - std::string MingwModuleHandler::GetPrecompiledHeaderFilename () const; + std::string GetPrecompiledHeaderFilename () const; void GenerateGccCommand ( const FileLocation* sourceFileLocation, const std::string& extraDependencies, const std::string& cc,
19 years
1
0
0
0
← Newer
1
...
47
48
49
50
51
52
53
...
59
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
Results per page:
10
25
50
100
200