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 2007
----- 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
19 participants
589 discussions
Start a n
N
ew thread
[gedmurphy] 29018: - rewrite the Control code - smooth the progress bar movement - clean up various other bits
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Sep 12 17:50:51 2007 New Revision: 29018 URL:
http://svn.reactos.org/svn/reactos?rev=29018&view=rev
Log: - rewrite the Control code - smooth the progress bar movement - clean up various other bits Modified: trunk/reactos/base/applications/mscutils/servman/about.c trunk/reactos/base/applications/mscutils/servman/control.c trunk/reactos/base/applications/mscutils/servman/lang/bg-BG.rc trunk/reactos/base/applications/mscutils/servman/lang/de-DE.rc trunk/reactos/base/applications/mscutils/servman/lang/en-US.rc trunk/reactos/base/applications/mscutils/servman/lang/fr-FR.rc trunk/reactos/base/applications/mscutils/servman/lang/id-ID.rc trunk/reactos/base/applications/mscutils/servman/lang/it-IT.rc trunk/reactos/base/applications/mscutils/servman/lang/pl-PL.rc trunk/reactos/base/applications/mscutils/servman/lang/ru-RU.rc trunk/reactos/base/applications/mscutils/servman/lang/th-TH.rc trunk/reactos/base/applications/mscutils/servman/lang/uk-UA.rc trunk/reactos/base/applications/mscutils/servman/progress.c trunk/reactos/base/applications/mscutils/servman/start.c Modified: trunk/reactos/base/applications/mscutils/servman/about.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/about.c (original) +++ trunk/reactos/base/applications/mscutils/servman/about.c Wed Sep 12 17:50:51 2007 @@ -12,43 +12,33 @@ BOOL CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { - HWND hLicenseEditWnd; - HICON hIcon = NULL; - TCHAR strLicense[700]; - switch (message) { case WM_INITDIALOG: - - hIcon = (HICON)LoadImage(hInstance, - MAKEINTRESOURCE(IDI_SM_ICON), - IMAGE_ICON, - 16, - 16, - 0); - if (hIcon) - { - SendMessage(hDlg, - WM_SETICON, - ICON_SMALL, - (LPARAM)hIcon); - DestroyIcon(hIcon); - } + { + HWND hLicenseEditWnd; hLicenseEditWnd = GetDlgItem(hDlg, IDC_LICENSE_EDIT); if (hLicenseEditWnd) { - LoadString(hInstance, - IDS_LICENSE, - strLicense, - sizeof(strLicense) / sizeof(TCHAR)); + LPTSTR lpString; - SetWindowText(hLicenseEditWnd, - strLicense); + if (AllocAndLoadString(&lpString, + hInstance, + IDS_LICENSE)) + { + SetWindowText(hLicenseEditWnd, + lpString); + + HeapFree(GetProcessHeap(), + 0, + lpString); + } } return TRUE; + } case WM_COMMAND: Modified: trunk/reactos/base/applications/mscutils/servman/control.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/control.c (original) +++ trunk/reactos/base/applications/mscutils/servman/control.c Wed Sep 12 17:50:51 2007 @@ -18,117 +18,99 @@ SC_HANDLE hSc; SERVICE_STATUS_PROCESS ServiceStatus; SERVICE_STATUS Status; - LVITEM item; DWORD BytesNeeded = 0; - DWORD dwStartTickCount, dwOldCheckPoint; + BOOL bRet = FALSE; + BOOL bDispErr = TRUE; - item.mask = LVIF_PARAM; - item.iItem = Info->SelectedItem; - SendMessage(Info->hListView, - LVM_GETITEM, - 0, - (LPARAM)&item); - - /* open handle to the SCM */ hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); - if (hSCManager == NULL) + if (hSCManager != NULL) { - GetError(); - return FALSE; - } + hSc = OpenService(hSCManager, + Info->pCurrentService->lpServiceName, + SERVICE_ALL_ACCESS); + if (hSc != NULL) + { + if (ControlService(hSc, + Control, + &Status)) + { + bDispErr = FALSE; - /* open handle to the service */ - hSc = OpenService(hSCManager, - Info->pCurrentService->lpServiceName, - SC_MANAGER_ALL_ACCESS); - if (hSc == NULL) - { - GetError(); - return FALSE; - } + if (QueryServiceStatusEx(hSc, + SC_STATUS_PROCESS_INFO, + (LPBYTE)&ServiceStatus, + sizeof(SERVICE_STATUS_PROCESS), + &BytesNeeded)) + { + DWORD dwStartTickCount = GetTickCount(); + DWORD dwOldCheckPoint = ServiceStatus.dwCheckPoint; + DWORD dwMaxWait = 2000 * 60; // wait for 2 mins - /* process requested action */ - if (! ControlService(hSc, - Control, - &Status)) - { - GetError(); - CloseServiceHandle(hSc); - return FALSE; - } + IncrementProgressBar(hProgDlg); - /* query the state of the service */ - if (! QueryServiceStatusEx(hSc, - SC_STATUS_PROCESS_INFO, - (LPBYTE)&ServiceStatus, - sizeof(SERVICE_STATUS_PROCESS), - &BytesNeeded)) - { - GetError(); - return FALSE; - } + while (ServiceStatus.dwCurrentState != Control) + { + DWORD dwWaitTime = ServiceStatus.dwWaitHint / 10; - /* Save the tick count and initial checkpoint. */ - dwStartTickCount = GetTickCount(); - dwOldCheckPoint = ServiceStatus.dwCheckPoint; + if (!QueryServiceStatusEx(hSc, + SC_STATUS_PROCESS_INFO, + (LPBYTE)&ServiceStatus, + sizeof(SERVICE_STATUS_PROCESS), + &BytesNeeded)) + { + break; + } - /* loop whilst service is not running */ - /* FIXME: needs more control adding. 'Loop' is temparary */ - while (ServiceStatus.dwCurrentState != Control) - { - DWORD dwWaitTime; + if (ServiceStatus.dwCheckPoint > dwOldCheckPoint) + { + /* The service is making progress, increment the progress bar */ + IncrementProgressBar(hProgDlg); + dwStartTickCount = GetTickCount(); + dwOldCheckPoint = ServiceStatus.dwCheckPoint; + } + else + { + if(GetTickCount() >= dwStartTickCount + dwMaxWait) + { + /* give up */ + break; + } + } - dwWaitTime = ServiceStatus.dwWaitHint / 10; + if(dwWaitTime < 200) + dwWaitTime = 200; + else if (dwWaitTime > 10000) + dwWaitTime = 10000; - if (dwWaitTime < 500) - dwWaitTime = 500; - else if (dwWaitTime > 5000) - dwWaitTime = 5000; - - IncrementProgressBar(hProgDlg); - - /* wait before checking status */ - Sleep(dwWaitTime); - - /* check status again */ - if (! QueryServiceStatusEx(hSc, - SC_STATUS_PROCESS_INFO, - (LPBYTE)&ServiceStatus, - sizeof(SERVICE_STATUS_PROCESS), - &BytesNeeded)) - { - GetError(); - return FALSE; + Sleep(dwWaitTime); + } + } + } + + CloseServiceHandle(hSc); } - if (ServiceStatus.dwCheckPoint > dwOldCheckPoint) - { - IncrementProgressBar(hProgDlg); - dwStartTickCount = GetTickCount(); - dwOldCheckPoint = ServiceStatus.dwCheckPoint; - } - else - { - if(GetTickCount() - dwStartTickCount > ServiceStatus.dwWaitHint) - { - /* No progress made within the wait hint */ - break; - } - } + CloseServiceHandle(hSCManager); } - - CloseServiceHandle(hSc); if (ServiceStatus.dwCurrentState == Control) { CompleteProgressBar(hProgDlg); - Sleep(1000); - return TRUE; + Sleep(500); + bRet = TRUE; } else - return FALSE; + { + if (bDispErr) + GetError(); + else + DisplayString(_T("The service failed to start")); + } + + return bRet; + } @@ -146,7 +128,7 @@ hProgDlg, SERVICE_CONTROL_STOP); - SendMessage(hProgDlg, WM_DESTROY, 0, 0); + DestroyWindow(hProgDlg); } return ret; @@ -166,7 +148,7 @@ hProgDlg, SERVICE_CONTROL_PAUSE); - SendMessage(hProgDlg, WM_DESTROY, 0, 0); + DestroyWindow(hProgDlg); } return ret; @@ -186,7 +168,7 @@ hProgDlg, SERVICE_CONTROL_CONTINUE); - SendMessage(hProgDlg, WM_DESTROY, 0, 0); + DestroyWindow(hProgDlg); } return ret; Modified: trunk/reactos/base/applications/mscutils/servman/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/lang/bg-BG.rc (original) +++ trunk/reactos/base/applications/mscutils/servman/lang/bg-BG.rc Wed Sep 12 17:50:51 2007 @@ -68,7 +68,7 @@ FONT 8, "MS Shell Dlg",0,0 STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Service Manager v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 130, 26 + LTEXT "Service Manager v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 135, 26 PUSHBUTTON "Close", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -162,7 +162,7 @@ IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 CAPTION "Óïðàâëåíèå íà óñëóãèòå" FONT 8, "MS Shell Dlg",0,0 -STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW BEGIN CONTROL "", IDC_SERVCON_PROGRESS, "msctls_progress32", 0x50000000, 8, 46, 238, 13 Modified: trunk/reactos/base/applications/mscutils/servman/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/lang/de-DE.rc (original) +++ trunk/reactos/base/applications/mscutils/servman/lang/de-DE.rc Wed Sep 12 17:50:51 2007 @@ -68,7 +68,7 @@ FONT 8, "MS Shell Dlg",0,0 STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Dienst-Manager v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 130, 26 + LTEXT "Dienst-Manager v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 135, 26 PUSHBUTTON "Schließen", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -159,7 +159,7 @@ IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 CAPTION "Dienststeuerung" FONT 8, "MS Shell Dlg",0,0 -STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW BEGIN CONTROL "", IDC_SERVCON_PROGRESS, "msctls_progress32", 0x50000000, 8, 46, 238, 13 Modified: trunk/reactos/base/applications/mscutils/servman/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/lang/en-US.rc (original) +++ trunk/reactos/base/applications/mscutils/servman/lang/en-US.rc Wed Sep 12 17:50:51 2007 @@ -68,7 +68,7 @@ FONT 8, "MS Shell Dlg",0,0 STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Service Manager v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 130, 26 + LTEXT "Service Manager v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 135, 26 PUSHBUTTON "Close", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -159,7 +159,7 @@ IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 CAPTION "Service Control" FONT 8, "MS Shell Dlg",0,0 -STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW BEGIN CONTROL "", IDC_SERVCON_PROGRESS, "msctls_progress32", 0x50000000, 8, 46, 238, 13 Modified: trunk/reactos/base/applications/mscutils/servman/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/lang/fr-FR.rc (original) +++ trunk/reactos/base/applications/mscutils/servman/lang/fr-FR.rc Wed Sep 12 17:50:51 2007 @@ -69,7 +69,7 @@ FONT 8, "MS Shell Dlg",0,0 STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Gestionnaire de services v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 130, 26 + LTEXT "Gestionnaire de services v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 135, 26 PUSHBUTTON "Fermer", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -160,7 +160,7 @@ IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 CAPTION "Contrôle du Service" FONT 8, "MS Shell Dlg",0,0 -STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW BEGIN CONTROL "", IDC_SERVCON_PROGRESS, "msctls_progress32", 0x50000000, 8, 46, 238, 13 Modified: trunk/reactos/base/applications/mscutils/servman/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/lang/id-ID.rc (original) +++ trunk/reactos/base/applications/mscutils/servman/lang/id-ID.rc Wed Sep 12 17:50:51 2007 @@ -68,7 +68,7 @@ FONT 8, "MS Shell Dlg",0,0 STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Manajer Layanan v0.8\nHak Cipta (C) 2005-2007\noleh Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 130, 26 + LTEXT "Manajer Layanan v0.8\nHak Cipta (C) 2005-2007\noleh Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 135, 26 PUSHBUTTON "Tutup", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -159,7 +159,7 @@ IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 CAPTION "Kontrol Layanan" FONT 8, "MS Shell Dlg",0,0 -STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW BEGIN CONTROL "", IDC_SERVCON_PROGRESS, "msctls_progress32", 0x50000000, 8, 46, 238, 13 Modified: trunk/reactos/base/applications/mscutils/servman/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/lang/it-IT.rc (original) +++ trunk/reactos/base/applications/mscutils/servman/lang/it-IT.rc Wed Sep 12 17:50:51 2007 @@ -68,7 +68,7 @@ FONT 8, "MS Shell Dlg",0,0 STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Gestione Servizi v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)gmail.com)", IDC_STATIC, 48, 7, 130, 26 + LTEXT "Gestione Servizi v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)gmail.com)", IDC_STATIC, 48, 7, 135, 26 PUSHBUTTON "Chiudi", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -159,7 +159,7 @@ IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 CAPTION "Service Control" FONT 8, "MS Shell Dlg",0,0 -STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW BEGIN CONTROL "", IDC_SERVCON_PROGRESS, "msctls_progress32", 0x50000000, 8, 46, 238, 13 Modified: trunk/reactos/base/applications/mscutils/servman/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/lang/pl-PL.rc (original) +++ trunk/reactos/base/applications/mscutils/servman/lang/pl-PL.rc Wed Sep 12 17:50:51 2007 @@ -75,7 +75,7 @@ FONT 8, "MS Shell Dlg",0,0 STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Service Manager v0.5.1\nCopyright (C) 2005-2006\nby Ged Murphy (gedmurphy(a)gmail.com)", IDC_STATIC, 48, 7, 130, 26 + LTEXT "Service Manager v0.5.1\nCopyright (C) 2005-2006\nby Ged Murphy (gedmurphy(a)gmail.com)", IDC_STATIC, 48, 7, 135, 26 PUSHBUTTON "Zamknij", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -165,7 +165,7 @@ IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 CAPTION "Us³uga kontrolna" FONT 8, "MS Shell Dlg",0,0 -STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW BEGIN CONTROL "", IDC_SERVCON_PROGRESS, "msctls_progress32", 0x50000000, 8, 46, 238, 13 Modified: trunk/reactos/base/applications/mscutils/servman/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/lang/ru-RU.rc (original) +++ trunk/reactos/base/applications/mscutils/servman/lang/ru-RU.rc Wed Sep 12 17:50:51 2007 @@ -67,7 +67,7 @@ FONT 8, "MS Shell Dlg",0,0 STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Ìåíåäæåð ñëóæá v0.8\nCopyright (C) 2005-2007\nîò Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 130, 30 + LTEXT "Ìåíåäæåð ñëóæá v0.8\nCopyright (C) 2005-2007\nîò Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 135, 26 PUSHBUTTON "Çàêðûòü", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -158,7 +158,7 @@ IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 CAPTION "Óïðàâëåíèå ñëóæáàìè" FONT 8, "MS Shell Dlg",0,0 -STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW BEGIN CONTROL "",IDC_SERVCON_PROGRESS,"msctls_progress32",0x50000000,8,46,238,13 Modified: trunk/reactos/base/applications/mscutils/servman/lang/th-TH.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/lang/th-TH.rc (original) +++ trunk/reactos/base/applications/mscutils/servman/lang/th-TH.rc Wed Sep 12 17:50:51 2007 @@ -77,7 +77,7 @@ FONT 8, "MS Shell Dlg",0,0 STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "â»Ãá¡ÃÁ¡ÒúÃÔ¡ÒèѴ¡Òà ÃØè¹ 0.8\nÅÔ¢ÊÔ·¸Ôì (C) 2005-2007\nâ´Â à¡é´ àÁÍÃì¿Õè (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 130, 26 + LTEXT "â»Ãá¡ÃÁ¡ÒúÃÔ¡ÒèѴ¡Òà ÃØè¹ 0.8\nÅÔ¢ÊÔ·¸Ôì (C) 2005-2007\nâ´Â à¡é´ àÁÍÃì¿Õè (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 135, 26 PUSHBUTTON "»Ô´", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -168,7 +168,7 @@ IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 CAPTION "µÑǤǺ¤ØÁºÃÔ¡ÒÃ" FONT 8, "MS Shell Dlg",0,0 -STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW BEGIN CONTROL "", IDC_SERVCON_PROGRESS, "msctls_progress32", 0x50000000, 8, 46, 238, 13 Modified: trunk/reactos/base/applications/mscutils/servman/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/lang/uk-UA.rc (original) +++ trunk/reactos/base/applications/mscutils/servman/lang/uk-UA.rc Wed Sep 12 17:50:51 2007 @@ -76,7 +76,7 @@ FONT 8, "MS Shell Dlg",0,0 STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Äèñïåò÷åð êåðóâàííÿ ñëóæáàìè v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 130, 26 + LTEXT "Äèñïåò÷åð êåðóâàííÿ ñëóæáàìè v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy(a)reactos.org)", IDC_STATIC, 48, 7, 135, 26 PUSHBUTTON "Çàêðèòè", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -167,7 +167,7 @@ IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 CAPTION "Óïðàâë³ííÿ ñëóæáàìè" FONT 8, "MS Shell Dlg",0,0 -STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW BEGIN CONTROL "", IDC_SERVCON_PROGRESS, "msctls_progress32", 0x50000000, 8, 46, 238, 13 Modified: trunk/reactos/base/applications/mscutils/servman/progress.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/progress.c (original) +++ trunk/reactos/base/applications/mscutils/servman/progress.c Wed Sep 12 17:50:51 2007 @@ -9,7 +9,7 @@ #include "precomp.h" -#define PROGRESSRANGE 8 +#define PROGRESSRANGE 20 VOID CompleteProgressBar(HWND hProgDlg) @@ -21,10 +21,21 @@ if (hProgBar) { - SendMessage(hProgBar, - PBM_DELTAPOS, - PROGRESSRANGE, - 0); + INT pos = 0; + + pos = SendMessage(hProgBar, + PBM_GETPOS, + 0, + 0); + + for (; pos <= PROGRESSRANGE; pos++) + { + SendMessage(hProgBar, + PBM_DELTAPOS, + pos, + 0); + Sleep(15); + } } } @@ -82,10 +93,6 @@ } break; - case WM_DESTROY: - DestroyWindow(hDlg); - break; - default: return FALSE; } @@ -109,9 +116,6 @@ (DLGPROC)ProgressDialogProc); if (hProgDlg != NULL) { - ShowWindow(hProgDlg, - SW_SHOW); - /* write the info to the progress dialog */ LoadString(hInstance, Event, Modified: trunk/reactos/base/applications/mscutils/servman/start.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/start.c (original) +++ trunk/reactos/base/applications/mscutils/servman/start.c Wed Sep 12 17:50:51 2007 @@ -18,6 +18,7 @@ SERVICE_STATUS_PROCESS ServiceStatus; DWORD BytesNeeded = 0; BOOL bRet = FALSE; + BOOL bDispErr = TRUE; hSCManager = OpenSCManager(NULL, NULL, @@ -33,6 +34,8 @@ 0, NULL)) { + bDispErr = FALSE; + if (QueryServiceStatusEx(hSc, SC_STATUS_PROCESS_INFO, (LPBYTE)&ServiceStatus, @@ -41,19 +44,13 @@ { DWORD dwStartTickCount = GetTickCount(); DWORD dwOldCheckPoint = ServiceStatus.dwCheckPoint; + DWORD dwMaxWait = 2000 * 60; // wait for 2 mins + + IncrementProgressBar(hProgDlg); while (ServiceStatus.dwCurrentState != SERVICE_RUNNING) { DWORD dwWaitTime = ServiceStatus.dwWaitHint / 10; - - if(dwWaitTime < 1000) - dwWaitTime = 500; - else if (dwWaitTime > 10000) - dwWaitTime = 10000; - - IncrementProgressBar(hProgDlg); - Sleep(dwWaitTime ); - IncrementProgressBar(hProgDlg); if (!QueryServiceStatusEx(hSc, SC_STATUS_PROCESS_INFO, @@ -73,12 +70,19 @@ } else { - if(GetTickCount() - dwStartTickCount > ServiceStatus.dwWaitHint) + if(GetTickCount() >= dwStartTickCount + dwMaxWait) { - /* No progress made within the wait hint */ + /* give up */ break; } } + + if(dwWaitTime < 200) + dwWaitTime = 200; + else if (dwWaitTime > 10000) + dwWaitTime = 10000; + + Sleep(dwWaitTime); } } } @@ -92,11 +96,16 @@ if (ServiceStatus.dwCurrentState == SERVICE_RUNNING) { CompleteProgressBar(hProgDlg); - Sleep(1000); + Sleep(500); bRet = TRUE; } else - GetError(); + { + if (bDispErr) + GetError(); + else + DisplayString(_T("The service failed to start")); + } return bRet; } @@ -114,13 +123,12 @@ if (hProgDlg) { + IncrementProgressBar(hProgDlg); + bRet = DoStartService(Info, hProgDlg); - SendMessage(hProgDlg, - WM_DESTROY, - 0, - 0); + DestroyWindow(hProgDlg); } return bRet;
17 years, 3 months
1
0
0
0
[gedmurphy] 29017: Use the handle for ControlService too. This allows me to start and stop my test service (but tcpsvcs hangs on stop)
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Sep 12 13:27:33 2007 New Revision: 29017 URL:
http://svn.reactos.org/svn/reactos?rev=29017&view=rev
Log: Use the handle for ControlService too. This allows me to start and stop my test service (but tcpsvcs hangs on stop) Modified: trunk/reactos/base/system/services/database.c Modified: trunk/reactos/base/system/services/database.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/datab…
============================================================================== --- trunk/reactos/base/system/services/database.c (original) +++ trunk/reactos/base/system/services/database.c Wed Sep 12 13:27:33 2007 @@ -581,7 +581,7 @@ return ERROR_NOT_ENOUGH_MEMORY; ControlPacket->dwControl = dwControl; - + ControlPacket->hClient = Service->hClient; ControlPacket->dwSize = TotalLength; wcscpy(&ControlPacket->szArguments[0], Service->lpServiceName);
17 years, 3 months
1
0
0
0
[gedmurphy] 29016: silence a couple of debug messages I missed
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Sep 12 13:08:11 2007 New Revision: 29016 URL:
http://svn.reactos.org/svn/reactos?rev=29016&view=rev
Log: silence a couple of debug messages I missed Modified: trunk/reactos/base/system/services/database.c Modified: trunk/reactos/base/system/services/database.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/datab…
============================================================================== --- trunk/reactos/base/system/services/database.c (original) +++ trunk/reactos/base/system/services/database.c Wed Sep 12 13:08:11 2007 @@ -133,7 +133,7 @@ if (CurrentService->hClient == Handle) { - DPRINT1("Found service: '%S'\n", CurrentService->lpDisplayName); + DPRINT("Found service: '%S'\n", CurrentService->lpDisplayName); return CurrentService; } @@ -620,7 +620,7 @@ PWSTR Ptr; DWORD Count; - DPRINT1("ScmSendStartCommand() called\n"); + DPRINT("ScmSendStartCommand() called\n"); /* Calculate the total length of the start command line */ TotalLength = wcslen(Service->lpServiceName) + 1;
17 years, 3 months
1
0
0
0
[gedmurphy] 29015: add a client handle to the private interface
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Sep 12 12:47:06 2007 New Revision: 29015 URL:
http://svn.reactos.org/svn/reactos?rev=29015&view=rev
Log: add a client handle to the private interface Modified: trunk/reactos/include/reactos/services/services.h Modified: trunk/reactos/include/reactos/services/services.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/services/s…
============================================================================== --- trunk/reactos/include/reactos/services/services.h (original) +++ trunk/reactos/include/reactos/services/services.h Wed Sep 12 12:47:06 2007 @@ -11,9 +11,12 @@ #define SERVICE_CONTROL_START 0 +typedef DWORD CLIENT_HANDLE; + typedef struct _SCM_CONTROL_PACKET { DWORD dwControl; + CLIENT_HANDLE hClient; DWORD dwSize; WCHAR szArguments[1]; } SCM_CONTROL_PACKET, *PSCM_CONTROL_PACKET;
17 years, 3 months
1
0
0
0
[gedmurphy] 29014: - Share a client service handle with the SCM and use it to identify services. - This fixes the problem where a service name created via CreateService (reg key name) can be different than the one supplied in the call to StartServiceCtrlDispatcher. Windows can still start services in this situation, previously we would fail to find the right service.
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Sep 12 12:46:00 2007 New Revision: 29014 URL:
http://svn.reactos.org/svn/reactos?rev=29014&view=rev
Log: - Share a client service handle with the SCM and use it to identify services. - This fixes the problem where a service name created via CreateService (reg key name) can be different than the one supplied in the call to StartServiceCtrlDispatcher. Windows can still start services in this situation, previously we would fail to find the right service. Modified: trunk/reactos/dll/win32/advapi32/service/sctrl.c Modified: trunk/reactos/dll/win32/advapi32/service/sctrl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
============================================================================== --- trunk/reactos/dll/win32/advapi32/service/sctrl.c (original) +++ trunk/reactos/dll/win32/advapi32/service/sctrl.c Wed Sep 12 12:46:00 2007 @@ -1,14 +1,13 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/advapi32/service/sctrl.c - * PURPOSE: Service control manager functions - * PROGRAMMER: Emanuele Aliberti - * UPDATE HISTORY: - * 19990413 EA created - * 19990515 EA - */ +/* + * PROJECT: ReactOS advapi32 + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll/win32/advapi32/service/sctrl.c + * PURPOSE: Service control manager functions + * COPYRIGHT: Copyright 1999 Emanuele Aliberti + * Copyright 2007 Ged Murphy <gedmurphy(a)reactos.org> + * + */ + /* INCLUDES ******************************************************************/ @@ -24,7 +23,7 @@ typedef struct _ACTIVE_SERVICE { - SERVICE_STATUS_HANDLE hServiceStatus; + CLIENT_HANDLE hService; UNICODE_STRING ServiceName; union { @@ -226,18 +225,17 @@ return ERROR_FAILED_SERVICE_CONTROLLER_CONNECT; } - /* HACK: send the SERVICE_STATUS_HANDLE handle */ + /* Share the SERVICE_HANDLE handle with the SCM */ WriteFile(*hPipe, - (DWORD *)&lpActiveServices->hServiceStatus, - sizeof(SERVICE_STATUS_HANDLE), + (DWORD *)&lpActiveServices->hService, + sizeof(CLIENT_HANDLE), &dwBytesWritten, NULL); - DPRINT("Sent SERVICE_STATUS_HANDLE handle %lu\n", lpActiveServices->hServiceStatus); + DPRINT("Sent SERVICE_HANDLE %lu\n", lpActiveServices->hService); return ERROR_SUCCESS; } - static DWORD @@ -248,12 +246,16 @@ DWORD ThreadId; DPRINT("ScStartService() called\n"); + DPRINT("client handle: %lu\n", ControlPacket->hClient); DPRINT("Size: %lu\n", ControlPacket->dwSize); DPRINT("Service: %S\n", &ControlPacket->szArguments[0]); - lpService = ScLookupServiceByServiceName(&ControlPacket->szArguments[0]); + lpService = (PACTIVE_SERVICE)ControlPacket->hClient; if (lpService == NULL) + { + DPRINT1("Service not found\n"); return ERROR_SERVICE_DOES_NOT_EXIST; + } lpService->Arguments = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, @@ -291,18 +293,19 @@ DPRINT("Size: %lu\n", ControlPacket->dwSize); DPRINT("Service: %S\n", &ControlPacket->szArguments[0]); - lpService = ScLookupServiceByServiceName(&ControlPacket->szArguments[0]); + lpService = (PACTIVE_SERVICE)ControlPacket->hClient; if (lpService == NULL) + { + DPRINT1("Service not found\n"); return ERROR_SERVICE_DOES_NOT_EXIST; + } if (lpService->HandlerFunction) { - DPRINT("Calling HandlerFunction with %lu\n", ControlPacket->dwControl); (lpService->HandlerFunction)(ControlPacket->dwControl); } else if (lpService->HandlerFunctionEx) { - DPRINT("Calling HandlerFunctionEx with %lu\n", ControlPacket->dwControl); /* FIXME: send correct params */ (lpService->HandlerFunctionEx)(ControlPacket->dwControl, 0, NULL, NULL); } @@ -333,8 +336,8 @@ DPRINT("ScDispatcherLoop() called\n"); ControlPacket = HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, - 1024); + HEAP_ZERO_MEMORY, + 1024); if (ControlPacket == NULL) return FALSE; @@ -433,9 +436,9 @@ Service->HandlerFunction = lpHandlerProc; Service->HandlerFunctionEx = NULL; - DPRINT("RegisterServiceCtrlHandler returning %lu\n", Service->hServiceStatus); - - return Service->hServiceStatus; + DPRINT("RegisterServiceCtrlHandler returning %lu\n", Service->hService); + + return (SERVICE_STATUS_HANDLE)Service->hService; } @@ -482,7 +485,6 @@ { PACTIVE_SERVICE Service; - /* FIXME: WinXP can start services with incorrect names */ Service = ScLookupServiceByServiceName(lpServiceName); if (Service == NULL) { @@ -493,9 +495,9 @@ Service->HandlerFunctionEx = lpHandlerProc; Service->HandlerContext = lpContext; - DPRINT("RegisterServiceCtrlHandlerEx returning %lu", Service->hServiceStatus); - - return Service->hServiceStatus; + DPRINT("RegisterServiceCtrlHandlerEx returning %lu", Service->hService); + + return (SERVICE_STATUS_HANDLE)Service->hService; } @@ -551,7 +553,7 @@ /********************************************************************** * StartServiceCtrlDispatcherA * - * @unimplemented + * @implemented */ BOOL STDCALL StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRYA lpServiceStartTable) @@ -584,7 +586,7 @@ RtlCreateUnicodeStringFromAsciiz(&lpActiveServices[i].ServiceName, lpServiceStartTable[i].lpServiceName); lpActiveServices[i].Main.lpFuncA = lpServiceStartTable[i].lpServiceProc; - lpActiveServices[i].hServiceStatus = (SERVICE_STATUS_HANDLE)&lpActiveServices[i]; + lpActiveServices[i].hService = (CLIENT_HANDLE)&lpActiveServices[i]; lpActiveServices[i].bUnicode = FALSE; } @@ -629,7 +631,7 @@ /********************************************************************** * StartServiceCtrlDispatcherW * - * @unimplemented + * @implemented */ BOOL STDCALL StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRYW lpServiceStartTable) @@ -662,7 +664,7 @@ RtlCreateUnicodeString(&lpActiveServices[i].ServiceName, lpServiceStartTable[i].lpServiceName); lpActiveServices[i].Main.lpFuncW = lpServiceStartTable[i].lpServiceProc; - lpActiveServices[i].hServiceStatus = (SERVICE_STATUS_HANDLE)&lpActiveServices[i]; + lpActiveServices[i].hService = (CLIENT_HANDLE)&lpActiveServices[i]; lpActiveServices[i].bUnicode = TRUE; }
17 years, 3 months
1
0
0
0
[gedmurphy] 29013: Receive a client service handle from advapi32 so we can get a permenant link between the SCM and the service
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Sep 12 12:41:00 2007 New Revision: 29013 URL:
http://svn.reactos.org/svn/reactos?rev=29013&view=rev
Log: Receive a client service handle from advapi32 so we can get a permenant link between the SCM and the service Modified: trunk/reactos/base/system/services/database.c trunk/reactos/base/system/services/rpcserver.c trunk/reactos/base/system/services/services.h Modified: trunk/reactos/base/system/services/database.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/datab…
============================================================================== --- trunk/reactos/base/system/services/database.c (original) +++ trunk/reactos/base/system/services/database.c Wed Sep 12 12:41:00 2007 @@ -116,12 +116,12 @@ PSERVICE -ScmGetServiceEntryByServiceStatusHandle(ULONG Handle) +ScmGetServiceEntryByClientHandle(ULONG Handle) { PLIST_ENTRY ServiceEntry; PSERVICE CurrentService; - DPRINT("ScmGetServiceEntryByServiceStatusHandle() called\n"); + DPRINT("ScmGetServiceEntryByClientHandle() called\n"); DPRINT("looking for %lu\n", Handle); ServiceEntry = ServiceListHead.Flink; @@ -131,7 +131,7 @@ SERVICE, ServiceListEntry); - if (CurrentService->hServiceStatus == Handle) + if (CurrentService->hClient == Handle) { DPRINT1("Found service: '%S'\n", CurrentService->lpDisplayName); return CurrentService; @@ -640,13 +640,14 @@ DPRINT("ArgsLength: %ld TotalLength: %ld\n", ArgsLength, TotalLength); /* Allocate a control packet */ - ControlPacket = (SCM_CONTROL_PACKET*) HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, - sizeof(SCM_CONTROL_PACKET) + (TotalLength - 1) * sizeof(WCHAR)); + ControlPacket = (SCM_CONTROL_PACKET*)HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + sizeof(SCM_CONTROL_PACKET) + (TotalLength - 1) * sizeof(WCHAR)); if (ControlPacket == NULL) return ERROR_NOT_ENOUGH_MEMORY; ControlPacket->dwControl = SERVICE_CONTROL_START; + ControlPacket->hClient = Service->hClient; ControlPacket->dwSize = TotalLength; Ptr = &ControlPacket->szArguments[0]; wcscpy(Ptr, Service->lpServiceName); @@ -793,7 +794,7 @@ /* Read SERVICE_STATUS_HANDLE from pipe */ if (!ReadFile(Service->ControlPipeHandle, - (LPVOID)&Service->hServiceStatus, + (LPVOID)&Service->hClient, sizeof(DWORD), &dwRead, NULL)) @@ -804,8 +805,7 @@ } else { - DPRINT("Received service status %lu\n", Service->hServiceStatus); - DPRINT("calling ScmSendStartCommand on %S\n", Service->lpDisplayName); + DPRINT("Received service status %lu\n", Service->hClient); /* Send start command */ dwError = ScmSendStartCommand(Service, lpArgs); Modified: trunk/reactos/base/system/services/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
============================================================================== --- trunk/reactos/base/system/services/rpcserver.c (original) +++ trunk/reactos/base/system/services/rpcserver.c Wed Sep 12 12:41:00 2007 @@ -717,7 +717,7 @@ if (ScmShutdown) return ERROR_SHUTDOWN_IN_PROGRESS; - lpService = ScmGetServiceEntryByServiceStatusHandle((ULONG)hServiceStatus); + lpService = ScmGetServiceEntryByClientHandle((ULONG)hServiceStatus); if (lpService == NULL) { DPRINT1("lpService == NULL!\n"); Modified: trunk/reactos/base/system/services/services.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/servi…
============================================================================== --- trunk/reactos/base/system/services/services.h (original) +++ trunk/reactos/base/system/services/services.h Wed Sep 12 12:41:00 2007 @@ -41,7 +41,7 @@ BOOL bDeleted; DWORD dwResumeCount; - SERVICE_STATUS_HANDLE hServiceStatus; + CLIENT_HANDLE hClient; SERVICE_STATUS Status; DWORD dwStartType; DWORD dwErrorControl; @@ -105,7 +105,7 @@ PSERVICE ScmGetServiceEntryByName(LPWSTR lpServiceName); PSERVICE ScmGetServiceEntryByDisplayName(LPWSTR lpDisplayName); PSERVICE ScmGetServiceEntryByResumeCount(DWORD dwResumeCount); -PSERVICE ScmGetServiceEntryByServiceStatusHandle(ULONG ThreadId); +PSERVICE ScmGetServiceEntryByClientHandle(ULONG ThreadId); DWORD ScmCreateNewServiceRecord(LPWSTR lpServiceName, PSERVICE *lpServiceRecord); DWORD ScmMarkServiceForDelete(PSERVICE pService);
17 years, 3 months
1
0
0
0
[hpoussin] 29012: Cleanup GetDirectory(), GetFilename() and GetExtension() usage
by hpoussin@svn.reactos.org
Author: hpoussin Date: Wed Sep 12 11:04:32 2007 New Revision: 29012 URL:
http://svn.reactos.org/svn/reactos?rev=29012&view=rev
Log: Cleanup GetDirectory(), GetFilename() and GetExtension() usage Modified: trunk/reactos/tools/rbuild/automaticdependency.cpp trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp trunk/reactos/tools/rbuild/backend/msbuild/msbuild.cpp trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp trunk/reactos/tools/rbuild/compilationunit.cpp trunk/reactos/tools/rbuild/module.cpp trunk/reactos/tools/rbuild/rbuild.h trunk/reactos/tools/rbuild/testsupportcode.cpp trunk/reactos/tools/rbuild/wineresource.cpp Modified: trunk/reactos/tools/rbuild/automaticdependency.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/automaticdepe…
============================================================================== --- trunk/reactos/tools/rbuild/automaticdependency.cpp (original) +++ trunk/reactos/tools/rbuild/automaticdependency.cpp Wed Sep 12 11:04:32 2007 @@ -26,6 +26,18 @@ using std::string; using std::vector; using std::map; + +static std::string +GetExtension ( const std::string& filename ) +{ + size_t index = filename.find_last_of ( '/' ); + if (index == string::npos) index = 0; + string tmp = filename.substr( index, filename.size() - index ); + size_t ext_index = tmp.find_last_of( '.' ); + if (ext_index != string::npos) + return filename.substr ( index + ext_index, filename.size() ); + return ""; +} SourceFile::SourceFile ( AutomaticDependency* automaticDependency, const Module& module, @@ -409,17 +421,6 @@ return false; } -string -AutomaticDependency::GetFilename ( const string& filename ) -{ - size_t index = filename.find_last_of ( cSep ); - if (index == string::npos) - return filename; - else - return filename.substr ( index + 1, - filename.length () - index - 1); -} - void AutomaticDependency::GetIncludeDirectories ( vector<Include*>& includes, const Module& module, Modified: trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/codeb…
============================================================================== --- trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp (original) +++ trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp Wed Sep 12 11:04:32 2007 @@ -101,6 +101,18 @@ } } +static std::string +GetExtension ( const std::string& filename ) +{ + size_t index = filename.find_last_of ( '/' ); + if (index == string::npos) index = 0; + string tmp = filename.substr( index, filename.size() - index ); + size_t ext_index = tmp.find_last_of( '.' ); + if (ext_index != string::npos) + return filename.substr ( index + ext_index, filename.size() ); + return ""; +} + static bool FileExists(string &filename) { ifstream file(filename.c_str()); @@ -342,7 +354,7 @@ string path_basedir = module.GetPathToBaseDir (); string intenv = Environment::GetIntermediatePath (); string outenv = Environment::GetOutputPath (); - string module_type = GetExtension(module.output->name); + string module_type = GetExtension(*module.output); string cbproj_path = module.output->relative_path; string CompilerVar; string baseaddr; Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp Wed Sep 12 11:04:32 2007 @@ -266,7 +266,7 @@ { string filename = file->name; - string extension = GetExtension ( filename ); + string extension = GetExtension ( *file ); if ( extension == ".spec" || extension == ".SPEC" ) { string basename = GetBasename ( filename ); @@ -305,7 +305,7 @@ MingwModuleHandler::GetExtraDependencies ( const FileLocation *file ) const { - string extension = GetExtension ( file->name ); + string extension = GetExtension ( *file ); if ( extension == ".idl" || extension == ".IDL" ) { if ( (module.type == RpcServer) || (module.type == RpcClient) ) @@ -349,7 +349,7 @@ bool MingwModuleHandler::IsGeneratedFile ( const File& file ) const { - string extension = GetExtension ( file.file.name ); + string extension = GetExtension ( file.file ); return ( extension == ".spec" || extension == ".SPEC" ); } @@ -486,10 +486,9 @@ const FileLocation* sourceFile, string_list* pclean_files ) const { - string sourceFilename = sourceFile->name; DirectoryLocation destination_directory; string newExtension; - string extension = GetExtension ( sourceFilename ); + string extension = GetExtension ( *sourceFile ); if ( extension == ".rc" || extension == ".RC" ) newExtension = ".coff"; else if ( extension == ".spec" || extension == ".SPEC" ) @@ -1353,8 +1352,7 @@ const string& widlflagsMacro ) { const FileLocation* sourceFile = compilationUnit.GetFilename (); - string filename = backend->GetFullName ( *sourceFile ); - string extension = GetExtension ( filename ); + string extension = GetExtension ( *sourceFile ); if ( extension == ".c" || extension == ".C" ) { GenerateGccCommand ( sourceFile, @@ -1419,7 +1417,7 @@ __LINE__, "Unsupported filename extension '%s' in file '%s'", extension.c_str (), - filename.c_str () ); + backend->GetFullName ( *sourceFile ).c_str () ); } void @@ -1465,10 +1463,9 @@ fprintf ( fMakefile, "ifeq ($(ROS_BUILDNOSTRIP),yes)\n" ); - string filename = module.output->name; FileLocation nostripFilename ( OutputDirectory, module.output->relative_path, - GetBasename ( filename ) + ".nostrip" + GetExtension ( filename ) ); + GetBasename ( module.output->name ) + ".nostrip" + GetExtension ( *module.output ) ); CLEAN_FILE ( nostripFilename ); OutputCopyCommand ( *module.output, nostripFilename ); @@ -1881,7 +1878,7 @@ { CompilationUnit& compilationUnit = *library.importedModule->non_if_data.compilationUnits[j]; const FileLocation* sourceFile = compilationUnit.GetFilename (); - string extension = GetExtension ( sourceFile->name ); + string extension = GetExtension ( *sourceFile ); if ( extension == ".idl" || extension == ".IDL" ) { string basename = GetBasename ( sourceFile->name ); @@ -1921,7 +1918,7 @@ { CompilationUnit& compilationUnit = *compilationUnits[i]; const FileLocation* sourceFile = compilationUnit.GetFilename (); - string extension = GetExtension ( sourceFile->name ); + string extension = GetExtension ( *sourceFile ); if ( extension == ".spec" || extension == ".SPEC" ) GetSpecObjectDependencies ( s, sourceFile ); } @@ -2300,7 +2297,7 @@ { CompilationUnit& compilationUnit = *compilationUnits[i]; const FileLocation* sourceFile = compilationUnit.GetFilename (); - string extension = GetExtension ( sourceFile->name ); + string extension = GetExtension ( *sourceFile ); if ( extension == ".spec" || extension == ".SPEC" ) GetSpecObjectDependencies ( dependencies, sourceFile ); if ( extension == ".idl" || extension == ".IDL" ) Modified: trunk/reactos/tools/rbuild/backend/msbuild/msbuild.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msbui…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msbuild/msbuild.cpp (original) +++ trunk/reactos/tools/rbuild/backend/msbuild/msbuild.cpp Wed Sep 12 11:04:32 2007 @@ -83,7 +83,7 @@ { size_t i; - string module_type = GetExtension(module.output->name); + string module_type = GetExtension(*module.output); vector<string> source_files, resource_files, includes, libraries; vector<string> header_files, common_defines, compiler_flags; vector<string> vars, values; Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp (original) +++ trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp Wed Sep 12 11:04:32 2007 @@ -56,7 +56,7 @@ imports.push_back ( module.non_if_data.libraries[i]->name ); } - string module_type = GetExtension(module.output->name); + string module_type = GetExtension(*module.output); bool lib = (module_type == ".lib") || (module_type == ".a"); bool dll = (module_type == ".dll") || (module_type == ".cpl"); bool exe = (module_type == ".exe") || (module_type == ".scr"); Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp (original) +++ trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp Wed Sep 12 11:04:32 2007 @@ -98,7 +98,7 @@ FILE* OUT = fopen ( vcproj_file.c_str(), "wb" ); vector<string> imports; - string module_type = GetExtension(module.output->name); + string module_type = GetExtension(*module.output); bool lib = (module.type == ObjectLibrary) || (module.type == RpcClient) ||(module.type == RpcServer) || (module_type == ".lib") || (module_type == ".a"); bool dll = (module_type == ".dll") || (module_type == ".cpl"); bool exe = (module_type == ".exe") || (module_type == ".scr"); Modified: trunk/reactos/tools/rbuild/compilationunit.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/compilationun…
============================================================================== --- trunk/reactos/tools/rbuild/compilationunit.cpp (original) +++ trunk/reactos/tools/rbuild/compilationunit.cpp Wed Sep 12 11:04:32 2007 @@ -67,7 +67,7 @@ if ( files.size () != 1 ) return false; File* file = files[0]; - string extension = GetExtension ( file->file.name ); + string extension = GetExtension ( file->file ); return ( extension == ".spec" || extension == ".SPEC" ); } @@ -78,7 +78,7 @@ for ( i = 0; i < files.size (); i++ ) { File& file = *files[i]; - string fileExtension = GetExtension ( file.file.name ); + string fileExtension = GetExtension ( file.file ); if ( !stricmp ( fileExtension.c_str (), extension.c_str () ) ) return true; } Modified: trunk/reactos/tools/rbuild/module.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
============================================================================== --- trunk/reactos/tools/rbuild/module.cpp (original) +++ trunk/reactos/tools/rbuild/module.cpp Wed Sep 12 11:04:32 2007 @@ -137,7 +137,7 @@ return FixSeparator(path + cSep + att_value); } -string +static string GetExtension ( const string& filename ) { size_t index = filename.find_last_of ( '/' ); @@ -150,23 +150,9 @@ } string -GetDirectory ( const string& filename ) -{ - size_t index = filename.find_last_of ( cSep ); - if ( index == string::npos ) - return ""; - else - return filename.substr ( 0, index ); -} - -string -GetFilename ( const string& filename ) -{ - size_t index = filename.find_last_of ( cSep ); - if ( index == string::npos ) - return filename; - else - return filename.substr ( index + 1, filename.length () - index ); +GetExtension ( const FileLocation& file ) +{ + return GetExtension ( file.name ); } string Modified: trunk/reactos/tools/rbuild/rbuild.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.h?rev=…
============================================================================== --- trunk/reactos/tools/rbuild/rbuild.h (original) +++ trunk/reactos/tools/rbuild/rbuild.h Wed Sep 12 11:04:32 2007 @@ -775,7 +775,6 @@ AutomaticDependency ( const Project& project ); ~AutomaticDependency (); - std::string GetFilename ( const std::string& filename ); bool LocateIncludedFile ( const FileLocation& directory, const std::string& includedFilename, std::string& resolvedFilename ); @@ -1030,13 +1029,7 @@ const std::string& att_value ); extern std::string -GetExtension ( const std::string& filename ); - -extern std::string -GetDirectory ( const std::string& filename ); - -extern std::string -GetFilename ( const std::string& filename ); +GetExtension ( const FileLocation& file ); extern std::string NormalizeFilename ( const std::string& filename ); Modified: trunk/reactos/tools/rbuild/testsupportcode.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/testsupportco…
============================================================================== --- trunk/reactos/tools/rbuild/testsupportcode.cpp (original) +++ trunk/reactos/tools/rbuild/testsupportcode.cpp Wed Sep 12 11:04:32 2007 @@ -23,6 +23,16 @@ using std::string; using std::vector; +static std::string +GetFilename ( const std::string& filename ) +{ + size_t index = filename.find_last_of ( cSep ); + if ( index == string::npos ) + return filename; + else + return filename.substr ( index + 1, filename.length () - index ); +} + TestSupportCode::TestSupportCode ( const Project& project ) : project ( project ) { Modified: trunk/reactos/tools/rbuild/wineresource.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/wineresource.…
============================================================================== --- trunk/reactos/tools/rbuild/wineresource.cpp (original) +++ trunk/reactos/tools/rbuild/wineresource.cpp Wed Sep 12 11:04:32 2007 @@ -37,7 +37,7 @@ bool WineResource::IsSpecFile ( const File& file ) { - string extension = GetExtension ( file.file.name ); + string extension = GetExtension ( file.file ); if ( extension == ".spec" || extension == ".SPEC" ) return true; return false; @@ -58,7 +58,7 @@ bool WineResource::IsResourceFile ( const File& file ) { - string extension = GetExtension ( file.file.name ); + string extension = GetExtension ( file.file ); if ( extension == ".rc" || extension == ".RC" ) return true; return false;
17 years, 3 months
1
0
0
0
[silverblade] 29011: Modified WINE's winmm.dll to support loading of user-installable drivers from the registry 'Drivers' and 'Drivers32' keys, as Windows does. Also silenced the beep-MIDI driver (which is supported by winmm! - but doesn't seem to do much, at least under vmware.) Added some Drivers32 entries to be loaded by default, to the hivesft.inf file.
by silverblade@svn.reactos.org
Author: silverblade Date: Wed Sep 12 04:29:07 2007 New Revision: 29011 URL:
http://svn.reactos.org/svn/reactos?rev=29011&view=rev
Log: Modified WINE's winmm.dll to support loading of user-installable drivers from the registry 'Drivers' and 'Drivers32' keys, as Windows does. Also silenced the beep-MIDI driver (which is supported by winmm! - but doesn't seem to do much, at least under vmware.) Added some Drivers32 entries to be loaded by default, to the hivesft.inf file. Added: trunk/reactos/dll/win32/winmm/registry.c Modified: trunk/reactos/boot/bootdata/hivesft.inf trunk/reactos/boot/bootdata/packages/reactos.dff trunk/reactos/dll/win32/beepmidi/beepmidi.c trunk/reactos/dll/win32/winmm/lolvldrv.c trunk/reactos/dll/win32/winmm/winemm.h trunk/reactos/dll/win32/winmm/winmm.rbuild Modified: trunk/reactos/boot/bootdata/hivesft.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesft.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivesft.inf (original) +++ trunk/reactos/boot/bootdata/hivesft.inf Wed Sep 12 04:29:07 2007 @@ -24,6 +24,12 @@ ;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\loaddll.exe","GlobalFlag",0x00000000,"0x00000002" ;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\soffice.exe","GlobalFlag",0x00000000,"0x00000002" ;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\tlstest.exe","GlobalFlag",0x00000000,"0x00000002" + +; MME - TODO: Should not require full paths! +HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","midimapper",0x00000000,"c:\reactos\system32\midimap.dll" +HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","wavemapper",0x00000000,"c:\reactos\system32\msacm32.dll" +;HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","wave",0x00000000,"sndblst.dll" +HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","midi",0x00000000,"c:\reactos\system32\beepmidi.dll" ; Mesa OpenGL Driver HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers","DefaultDriver",0x00000000,"Mesa" Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff Wed Sep 12 04:29:07 2007 @@ -251,6 +251,7 @@ dll\win32\wshirda\wshirda.dll 1 dll\win32\wsock32\wsock32.dll 1 dll\win32\wtsapi32\wtsapi32.dll 1 +dll\win32\beepmidi\beepmidi.dll 1 ; Drivers Modified: trunk/reactos/dll/win32/beepmidi/beepmidi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/beepmidi/beepmid…
============================================================================== --- trunk/reactos/dll/win32/beepmidi/beepmidi.c (original) +++ trunk/reactos/dll/win32/beepmidi/beepmidi.c Wed Sep 12 04:29:07 2007 @@ -51,8 +51,8 @@ #include <mmddk.h> #include <mmsystem.h> -#define DPRINT printf -//#define DPRINT // +/*#define DPRINT printf*/ +#define DPRINT FakePrintf /* A few MIDI command categories */ #define MIDI_NOTE_OFF 0x80 Modified: trunk/reactos/dll/win32/winmm/lolvldrv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/lolvldrv.c…
============================================================================== --- trunk/reactos/dll/win32/winmm/lolvldrv.c (original) +++ trunk/reactos/dll/win32/winmm/lolvldrv.c Wed Sep 12 04:29:07 2007 @@ -620,7 +620,7 @@ /************************************************************************** * MMDRV_Install [internal] */ -static BOOL MMDRV_Install(LPCSTR drvRegName, LPCSTR drvFileName, BOOL bIsMapper) +BOOL MMDRV_Install(LPCSTR drvRegName, LPCSTR drvFileName, BOOL bIsMapper) { int i, count = 0; LPWINE_MM_DRIVER lpDrv = &MMDrvs[MMDrvsHi]; @@ -723,6 +723,8 @@ */ BOOL MMDRV_Init(void) { +/* Redundant code, keeping this for reference only (for now) */ +#if 0 HKEY hKey; char driver_buffer[256]; char mapper_buffer[256]; @@ -743,13 +745,21 @@ strcpy(driver_buffer, WINE_DEFAULT_WINMM_DRIVER); } - // AG: TESTING: - ret |= MMDRV_Install("mmdrv.dll", "mmdrv.dll", FALSE); + ret |= MMDRV_Install("beepmidi.dll", "beepmidi.dll", FALSE); ret |= MMDRV_Install("wavemapper", WINE_DEFAULT_WINMM_MAPPER, TRUE); ret |= MMDRV_Install("midimapper", WINE_DEFAULT_WINMM_MIDI, TRUE); return ret; - +#else + INT driver_count = 0; + + driver_count += LoadRegistryMMEDrivers(NT_MME_DRIVERS_KEY); + driver_count += LoadRegistryMMEDrivers(NT_MME_DRIVERS32_KEY); + + /* Explorer doesn't like us failing */ + return TRUE; +// return ( driver_count > 0 ); +#endif } /****************************************************************** Added: trunk/reactos/dll/win32/winmm/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/registry.c…
============================================================================== --- trunk/reactos/dll/win32/winmm/registry.c (added) +++ trunk/reactos/dll/win32/winmm/registry.c Wed Sep 12 04:29:07 2007 @@ -1,0 +1,134 @@ +/* + MME User-Mode Driver Support + (c) Andrew Greenwood, 2007. + + This is intended for use with WINE's winmm.dll to allow it to find + and load appropriate drivers from the correct (Windows) registry keys. + + By default, WINE's winmm.dll will look in: + HKEY_CURRENT_USER\Software\Wine\Drivers + + Here it determines the driver to load based on a value called "Audio". + + Windows NT stores a list of drivers in: + HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32 + + TODO: Handle system.ini +*/ + +#include <windows.h> +#include "winemm.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(winmm); + +BOOL LoadRegistryMMEDrivers(char* key) +{ + INT driver_count = 0; + INT driver_index = 0; + HKEY drivers_key; + BOOL ret; + + DWORD value_name_length = 256; + char value_name[value_name_length]; + + DWORD value_data_length = 256; + char value_data[value_data_length]; + + DWORD value_type; + + if ( RegOpenKeyA(HKEY_LOCAL_MACHINE, key, &drivers_key) != ERROR_SUCCESS ) + { + TRACE("ERROR: Could not open: HKEY_LOCAL_MACHINE\\%s\n", key); + return 0; + } + + while ( RegEnumValue(drivers_key, + driver_index, + value_name, + &value_name_length, + NULL, + &value_type, + value_data, + &value_data_length) == ERROR_SUCCESS ) + { + BOOL valid_driver = FALSE; + BOOL is_mapper = FALSE; + + if ( value_type == REG_SZ ) + { + /* We look for mappers first so they don't match + something else later on! */ + + if ( ! stricmp("wavemapper", value_name) ) + { + TRACE("Found a Wave-mapper: %s\n", value_data); + valid_driver = TRUE; + is_mapper = TRUE; + driver_count ++; + } + else if ( ! stricmp("midimapper", value_name) ) + { + TRACE("Found a MIDI-mapper: %s\n", value_data); + valid_driver = TRUE; + is_mapper = TRUE; + driver_count ++; + } + else if ( ! strnicmp("wave", value_name, 4) ) + { + TRACE("Found a Wave driver: %s\n", value_data); + valid_driver = TRUE; + driver_count ++; + } + else if ( ! strnicmp("midi", value_name, 4) ) + { + TRACE("Found a MIDI driver: %s\n", value_data); + valid_driver = TRUE; + driver_count ++; + } + else if ( ! strnicmp("mixer", value_name, 5) ) + { + TRACE("Found a mixer driver: %s\n", value_data); + valid_driver = TRUE; + driver_count ++; + } + else if ( ! strnicmp("aux", value_name, 4) ) + { + TRACE("Found an aux driver: %s\n", value_data); + valid_driver = TRUE; + driver_count ++; + } + else + { + TRACE("Not supported: %s\n", value_data); + } + + /* If we have a valid driver now, we get it "installed" in + winmm itself so it can be used */ + + if ( valid_driver ) + { + if ( ! MMDRV_Install(value_name, value_data, is_mapper) ) + { + TRACE("FAILED when initializing %s\n", value_data); + } + } + } + else + { + TRACE("Invalid data format\n"); + } + + /* Reinitialize */ + value_name_length = 256; + value_data_length = 256; + memset(value_name, 0, value_name_length); + memset(value_data, 0, value_data_length); + + driver_index ++; + } + + TRACE("Found a total of %d drivers\n", driver_count); + + return driver_count; +} Modified: trunk/reactos/dll/win32/winmm/winemm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/winemm.h?r…
============================================================================== --- trunk/reactos/dll/win32/winmm/winemm.h (original) +++ trunk/reactos/dll/win32/winmm/winemm.h Wed Sep 12 04:29:07 2007 @@ -315,3 +315,14 @@ */ #define WINE_GDF_EXIST 0x80000000 #define WINE_GDF_16BIT 0x10000000 + +/* Modification to take into account Windows NT's registry format */ + +#define NT_MME_DRIVERS32_KEY \ + "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32" + +#define NT_MME_DRIVERS_KEY \ + "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers" + +INT LoadRegistryMMEDrivers(char* key); +BOOL MMDRV_Install(LPCSTR drvRegName, LPCSTR drvFileName, BOOL bIsMapper); Modified: trunk/reactos/dll/win32/winmm/winmm.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/winmm.rbui…
============================================================================== --- trunk/reactos/dll/win32/winmm/winmm.rbuild (original) +++ trunk/reactos/dll/win32/winmm/winmm.rbuild Wed Sep 12 04:29:07 2007 @@ -27,7 +27,8 @@ <file>playsound.c</file> <file>time.c</file> <file>winmm.c</file> + <file>registry.c</file> <file>winmm_res.rc</file> <file>winmm.spec</file> </module> -</group> +</group>
17 years, 3 months
1
0
0
0
[gedmurphy] 29010: make the apps icon a bit neater
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Sep 12 01:56:25 2007 New Revision: 29010 URL:
http://svn.reactos.org/svn/reactos?rev=29010&view=rev
Log: make the apps icon a bit neater Modified: trunk/reactos/base/shell/explorer/res/apps.ico Modified: trunk/reactos/base/shell/explorer/res/apps.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/res/ap…
============================================================================== Binary files - no diff available.
17 years, 3 months
1
0
0
0
[fireball] 29009: - Disable NHF dialog for VMWare SCSI controller's driver (if user clicks "Yes", drivers are installed but currently unsupported by ReactOS).
by fireball@svn.reactos.org
Author: fireball Date: Tue Sep 11 20:28:03 2007 New Revision: 29009 URL:
http://svn.reactos.org/svn/reactos?rev=29009&view=rev
Log: - Disable NHF dialog for VMWare SCSI controller's driver (if user clicks "Yes", drivers are installed but currently unsupported by ReactOS). Modified: branches/ros-branch-0_3_3-new/reactos/media/inf/machine.inf Modified: branches/ros-branch-0_3_3-new/reactos/media/inf/machine.inf URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/me…
============================================================================== --- branches/ros-branch-0_3_3-new/reactos/media/inf/machine.inf (original) +++ branches/ros-branch-0_3_3-new/reactos/media/inf/machine.inf Tue Sep 11 20:28:03 2007 @@ -42,6 +42,7 @@ %*PNP0C0C.DeviceDesc% = NO_DRV,*PNP0C0C %*PNP0C0E.DeviceDesc% = NO_DRV,*PNP0C0E %*PNP0C0F.DeviceDesc% = NO_DRV,*PNP0C0F +"VMware SCSI card" = NO_DRV,PCI\VEN_104B&DEV_1040 %ACPI\FixedButton.DeviceDesc% = NO_DRV,ACPI\FixedButton %PCI\CC_0600.DeviceDesc% = NO_DRV,PCI\CC_0600
17 years, 3 months
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
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