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
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
December 2023
----- 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
20 participants
274 discussions
Start a n
N
ew thread
[reactos] 01/01: [NTUSER] menu.c: Fix readability after commit 1df52257
by Thamatip Chitpong
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=986809c719f5f6d59ced3…
commit 986809c719f5f6d59ced39dea3e5d6527a84ec9c Author: Thamatip Chitpong <thamatip.chitpong(a)reactos.org> AuthorDate: Fri Dec 22 00:22:07 2023 +0700 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Dec 22 00:22:07 2023 +0700 [NTUSER] menu.c: Fix readability after commit 1df52257 Add comments for default return value. --- win32ss/user/ntuser/menu.c | 70 ++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c index 85e9c93ef72..1f09af6afd9 100644 --- a/win32ss/user/ntuser/menu.c +++ b/win32ss/user/ntuser/menu.c @@ -5656,12 +5656,12 @@ NtUserGetSystemMenu(HWND hWnd, BOOL bRevert) if (!(Window = UserGetWindowObject(hWnd))) { - goto Exit; + goto Exit; // Return NULL } if (!(Menu = IntGetSystemMenu(Window, bRevert))) { - goto Exit; + goto Exit; // Return NULL } Ret = UserHMGetHandle(Menu); @@ -5691,7 +5691,7 @@ NtUserSetSystemMenu(HWND hWnd, HMENU hMenu) if (!(Window = UserGetWindowObject(hWnd))) { - goto Exit; + goto Exit; // Return FALSE } if (hMenu) @@ -5701,7 +5701,7 @@ NtUserSetSystemMenu(HWND hWnd, HMENU hMenu) */ if (!(Menu = IntGetMenuObject(hMenu))) { - goto Exit; + goto Exit; // Return FALSE } Result = IntSetSystemMenu(Window, Menu); @@ -5814,12 +5814,12 @@ NtUserDestroyMenu( if(!(Menu = UserGetMenuObject(hMenu))) { - goto Exit; + goto Exit; // Return FALSE } if (Menu->head.rpdesk != gptiCurrent->rpdesk) { EngSetLastError(ERROR_ACCESS_DENIED); - goto Exit; + goto Exit; // Return FALSE } Ret = IntDestroyMenuObject(Menu, TRUE); @@ -5910,7 +5910,7 @@ NtUserGetMenuBarInfo( if (!(pWnd = UserGetWindowObject(hwnd))) { EngSetLastError(ERROR_INVALID_WINDOW_HANDLE); - goto Cleanup; + goto Cleanup; // Return FALSE } UserRefObjectCo(pWnd, &Ref); @@ -5925,12 +5925,12 @@ NtUserGetMenuBarInfo( { case OBJID_CLIENT: if (!pWnd->pcls->fnid) - goto Cleanup; + goto Cleanup; // Return FALSE if (pWnd->pcls->fnid != FNID_MENU) { WARN("called on invalid window: %u\n", pWnd->pcls->fnid); EngSetLastError(ERROR_INVALID_MENU_HANDLE); - goto Cleanup; + goto Cleanup; // Return FALSE } // Windows does this! Wine checks for Atom and uses GetWindowLongPtrW. hMenu = (HMENU)co_IntSendMessage(hwnd, MN_GETHMENU, 0, 0); @@ -5944,21 +5944,23 @@ NtUserGetMenuBarInfo( } break; case OBJID_MENU: - if (pWnd->style & WS_CHILD) goto Cleanup; + if (pWnd->style & WS_CHILD) + goto Cleanup; // Return FALSE hMenu = UlongToHandle(pWnd->IDMenu); TRACE("GMBI: OBJID_MENU hMenu %p\n",hMenu); break; case OBJID_SYSMENU: - if (!(pWnd->style & WS_SYSMENU)) goto Cleanup; + if (!(pWnd->style & WS_SYSMENU)) + goto Cleanup; // Return FALSE Menu = IntGetSystemMenu(pWnd, FALSE); hMenu = UserHMGetHandle(Menu); break; default: - goto Cleanup; + goto Cleanup; // Return FALSE } if (!hMenu) - goto Cleanup; + goto Cleanup; // Return FALSE _SEH2_TRY { @@ -5974,18 +5976,18 @@ NtUserGetMenuBarInfo( if (kmbi.cbSize != sizeof(MENUBARINFO)) { EngSetLastError(ERROR_INVALID_PARAMETER); - goto Cleanup; + goto Cleanup; // Return FALSE } if (!Menu) { Menu = UserGetMenuObject(hMenu); if (!Menu) - goto Cleanup; + goto Cleanup; // Return FALSE } if ((idItem < 0) || ((ULONG)idItem > Menu->cItems)) - goto Cleanup; + goto Cleanup; // Return FALSE if (idItem == 0) { @@ -6061,7 +6063,7 @@ NtUserGetMenuIndex( if ( !(Menu = UserGetMenuObject(hMenu)) || !(SubMenu = UserGetMenuObject(hSubMenu)) ) - goto Exit; + goto Exit; // Return 0xFFFFFFFF MenuItem = Menu->rgItems; for (i = 0; i < Menu->cItems; i++, MenuItem++) @@ -6102,7 +6104,7 @@ NtUserGetMenuItemRect( if (!(Menu = UserGetMenuObject(hMenu))) { - goto Exit; + goto Exit; // Return FALSE } if ((MenuItem = MENU_FindItem (&Menu, &uItem, MF_BYPOSITION))) @@ -6113,16 +6115,18 @@ NtUserGetMenuItemRect( Rect.bottom = MenuItem->cyItem; } else - goto Exit; + goto Exit; // Return FALSE if(!hWnd) { hWnd = Menu->hWnd; } - if (lprcItem == NULL) goto Exit; + if (lprcItem == NULL) + goto Exit; // Return FALSE - if (!(ReferenceWnd = UserGetWindowObject(hWnd))) goto Exit; + if (!(ReferenceWnd = UserGetWindowObject(hWnd))) + goto Exit; // Return FALSE if (Menu->fFlags & MNF_POPUP) { @@ -6153,7 +6157,7 @@ NtUserGetMenuItemRect( if (!NT_SUCCESS(Status)) { SetLastNtError(Status); - goto Exit; + goto Exit; // Return FALSE } Ret = TRUE; @@ -6183,13 +6187,13 @@ NtUserHiliteMenuItem( if(!(Window = UserGetWindowObject(hWnd))) { EngSetLastError(ERROR_INVALID_WINDOW_HANDLE); - goto Exit; + goto Exit; // Return FALSE } if(!(Menu = UserGetMenuObject(hMenu))) { EngSetLastError(ERROR_INVALID_MENU_HANDLE); - goto Exit; + goto Exit; // Return FALSE } Ret = IntHiliteMenuItem(Window, Menu, uItemHilite, uHilite); @@ -6224,13 +6228,13 @@ NtUserDrawMenuBarTemp( if(!(Window = UserGetWindowObject(hWnd))) { EngSetLastError(ERROR_INVALID_WINDOW_HANDLE); - goto Exit; + goto Exit; // Return 0 } if(!(Menu = UserGetMenuObject(hMenu))) { EngSetLastError(ERROR_INVALID_MENU_HANDLE); - goto Exit; + goto Exit; // Return 0 } _SEH2_TRY @@ -6247,7 +6251,7 @@ NtUserDrawMenuBarTemp( if (Status != STATUS_SUCCESS) { SetLastNtError(Status); - goto Exit; + goto Exit; // Return 0 } Ret = IntDrawMenuBarTemp(Window, hDC, &Rect, Menu, hFont); @@ -6279,12 +6283,12 @@ NtUserMenuItemFromPoint( if (!(Menu = UserGetMenuObject(hMenu))) { - goto Exit; + goto Exit; // Return -1 } if (!(Window = UserGetWindowObject(Menu->hWnd))) { - goto Exit; + goto Exit; // Return -1 } X -= Window->rcWindow.left; @@ -6396,12 +6400,12 @@ NtUserSetMenu( if (!(Window = UserGetWindowObject(hWnd))) { - goto Exit; + goto Exit; // Return FALSE } if (!IntSetMenu(Window, Menu, &Changed)) { - goto Exit; + goto Exit; // Return FALSE } // Not minimized and please repaint!!! @@ -6548,7 +6552,7 @@ NtUserThunkedMenuItemInfo( if (!(Menu = UserGetMenuObject(hMenu))) { - goto Cleanup; + goto Cleanup; // Return FALSE } /* Check if we got a Caption */ @@ -6562,7 +6566,7 @@ NtUserThunkedMenuItemInfo( { ERR("Failed to capture MenuItem Caption (status 0x%08x)\n",Status); SetLastNtError(Status); - goto Cleanup; + goto Cleanup; // Return FALSE } }
1 year
1
0
0
0
[reactos] 01/01: [TRANSLATION] Update and fix Bulgarian (bg-BG) translation (#5581)
by Николай Димитров
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4514e91dd6c10ae126d23…
commit 4514e91dd6c10ae126d231b1ab5155c73a96c3cd Author: Николай Димитров <nikolay.dimitrov(a)extremesoft.eu> AuthorDate: Thu Dec 21 19:09:34 2023 +0200 Commit: GitHub <noreply(a)github.com> CommitDate: Thu Dec 21 18:09:34 2023 +0100 [TRANSLATION] Update and fix Bulgarian (bg-BG) translation (#5581) NOTE: IDS_ADMINISTRATOR_NAME translation excluded for the time being. It should be "Администратор", but bg-BG translation missing in samsrv.dll, therefore don't translate it because otherwise this would introduce a mismatch (samsrv falls back into english when translation is missing). Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> --- base/applications/rapps/lang/bg-BG.rc | 2 +- base/setup/reactos/lang/bg-BG.rc | 4 +-- base/shell/explorer/lang/bg-BG.rc | 10 +++--- base/system/format/lang/bg-BG.rc | 2 +- dll/cpl/appwiz/lang/bg-BG.rc | 8 ++--- dll/cpl/console/lang/bg-BG.rc | 6 ++-- dll/cpl/desk/lang/bg-BG.rc | 18 +++++----- dll/cpl/hdwwiz/lang/bg-BG.rc | 66 +++++++++++++++++------------------ dll/cpl/joy/lang/bg-BG.rc | 4 +-- dll/cpl/liccpa/lang/bg-BG.rc | 2 +- dll/cpl/sysdm/lang/bg-BG.rc | 34 +++++++++--------- dll/win32/browseui/lang/bg-BG.rc | 64 ++++++++++++++++----------------- dll/win32/devmgr/lang/bg-BG.rc | 10 +++--- dll/win32/netid/lang/bg-BG.rc | 2 +- dll/win32/shell32/lang/bg-BG.rc | 4 +-- dll/win32/syssetup/lang/bg-BG.rc | 14 ++++---- media/inf/shortcuts.inf | 6 ++-- 17 files changed, 128 insertions(+), 128 deletions(-) diff --git a/base/applications/rapps/lang/bg-BG.rc b/base/applications/rapps/lang/bg-BG.rc index eda7a62c360..f20960d1b67 100644 --- a/base/applications/rapps/lang/bg-BG.rc +++ b/base/applications/rapps/lang/bg-BG.rc @@ -159,7 +159,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nОписание: " IDS_AINFO_SIZE "\nРазмер: " IDS_AINFO_URLSITE "\nДомашна страница: " - IDS_AINFO_LICENSE "\nРазрешително: " + IDS_AINFO_LICENSE "\nЛицензна информация: " IDS_AINFO_URLDOWNLOAD "\nИзтегляне: " IDS_AINFO_LANGUAGES "\nLanguages: " END diff --git a/base/setup/reactos/lang/bg-BG.rc b/base/setup/reactos/lang/bg-BG.rc index 4b2c5c99206..0e50934d1ba 100644 --- a/base/setup/reactos/lang/bg-BG.rc +++ b/base/setup/reactos/lang/bg-BG.rc @@ -70,7 +70,7 @@ BEGIN LTEXT "Размер:", IDC_STATIC, 13, 24, 27, 9 EDITTEXT IDC_PARTSIZE, 58, 22, 47, 13, WS_VISIBLE | WS_TABSTOP LTEXT "ГБ", IDC_UNIT, 117, 24, 14, 9 - LTEXT "Файлова уредба:", IDC_STATIC, 13, 46, 42, 9 + LTEXT "Файлова система:", IDC_STATIC, 13, 46, 42, 9 CONTROL "", IDC_FSTYPE, "ComboBox", WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST, 58, 42, 73, 50 PUSHBUTTON "&Добре", IDOK, 35, 68, 47, 15, WS_VISIBLE | WS_TABSTOP PUSHBUTTON "&Отказ", IDCANCEL, 87, 68, 47, 15, WS_VISIBLE | WS_TABSTOP @@ -147,7 +147,7 @@ BEGIN IDS_DEVICESUBTITLE "Настройка на екрана и клавиатурата." IDS_DRIVETITLE "Приготвяне на дял за слагане и системна папка" IDS_DRIVESUBTITLE "Приготвяне на дял за слагане, системна папка и зареждач." - IDS_PROCESSTITLE "Подготвяне на дял, презапис на файлове и настройване на уредбата" + IDS_PROCESSTITLE "Подготвяне на дял, презапис на файлове и настройване на системата" IDS_PROCESSSUBTITLE "Създаване и оразмеряване на дял, презапис на файлове, слагане и настройка на зареждач" IDS_RESTARTTITLE "Първата степен на настройването приключи" IDS_RESTARTSUBTITLE "Първата степен приключи, презапуснете, за да продължите към втора степен" diff --git a/base/shell/explorer/lang/bg-BG.rc b/base/shell/explorer/lang/bg-BG.rc index f426f017b53..d05994ddb8c 100644 --- a/base/shell/explorer/lang/bg-BG.rc +++ b/base/shell/explorer/lang/bg-BG.rc @@ -90,10 +90,10 @@ BEGIN CONTROL "", IDC_TASKBARPROP_STARTMENU_BITMAP, "Static", SS_BITMAP | SS_SUNKEN, 7, 7, 183, 108 AUTORADIOBUTTON "&Старт меню", IDC_TASKBARPROP_STARTMENU, 7, 135, 105, 10 LTEXT "Тази лента със задачите ви дава лесен достъп до папките ви, приложенията и търсенето.", IDC_TASKBARPROP_STARTMENUMODERNTEXT, 20, 145, 150, 24 - PUSHBUTTON "&Персонализиране...", IDC_TASKBARPROP_STARTMENUCUST, 192, 132, 53, 14 + PUSHBUTTON "&Персонализиране...", IDC_TASKBARPROP_STARTMENUCUST, 172, 132, 73, 14 AUTORADIOBUTTON "Класическо Старт меню", IDC_TASKBARPROP_STARTMENUCLASSIC, 7, 175, 105, 10 LTEXT "Този изглед на лентата със задачите ви осигурява класически облик и начин на работа.", IDC_TASKBARPROP_STARTMENUCLASSICTEXT, 20, 185, 150, 24 - PUSHBUTTON "&Персонализиране...", IDC_TASKBARPROP_STARTMENUCLASSICCUST, 192, 172, 53, 14 + PUSHBUTTON "&Персонализиране...", IDC_TASKBARPROP_STARTMENUCLASSICCUST, 172, 172, 73, 14 END IDD_TASKBARPROP_NOTIFY DIALOGEX 0, 0, 252, 218 @@ -106,11 +106,11 @@ BEGIN LTEXT "Можете да поддържате лентата подредена, като скривате приложенията, върху които скоро не сте стартирали.", IDC_STATIC, 13, 48, 223, 16 AUTOCHECKBOX "Скриване на неактивните иконки", IDC_TASKBARPROP_HIDEICONS, 13, 70, 125, 10 PUSHBUTTON "Персонализиране...", IDC_TASKBARPROP_ICONCUST, 168, 70, 70, 14 - GROUPBOX "System icons", IDC_STATIC, 6, 99, 240, 56 - LTEXT "Select which system icons to always show.", IDC_STATIC, 13, 113, 223, 8 + GROUPBOX "Системни иконки", IDC_STATIC, 6, 99, 240, 56 + LTEXT "Изберете системните иконки които винаги видими.", IDC_STATIC, 13, 113, 223, 8 AUTOCHECKBOX "&Часовник", IDC_TASKBARPROP_CLOCK, 13, 127, 80, 10 AUTOCHECKBOX "Покажи секундите", IDC_TASKBARPROP_SECONDS, 120, 127, 80, 10, WS_DISABLED - AUTOCHECKBOX "&Desktop", IDC_TASKBARPROP_DESKTOP, 13, 140, 80, 10 + AUTOCHECKBOX "&Работен плот", IDC_TASKBARPROP_DESKTOP, 13, 140, 80, 10 END IDD_NOTIFICATIONS_CUSTOMIZE DIALOGEX 0, 0, 232, 240 diff --git a/base/system/format/lang/bg-BG.rc b/base/system/format/lang/bg-BG.rc index ce55b3efba7..eeabc866595 100644 --- a/base/system/format/lang/bg-BG.rc +++ b/base/system/format/lang/bg-BG.rc @@ -33,7 +33,7 @@ BEGIN STRING_YES_NO_FAQ "YN" STRING_VERIFYING "Проверка" STRING_FAST_FMT "Бързо оразмеряване" - STRING_CREATE_FSYS "Създаване на структурата на файловата уредба.\n" + STRING_CREATE_FSYS "Създаване на структурата на файловата система.\n" STRING_FMT_COMPLETE "Оразмеряването приключи.\n" STRING_VOL_COMPRESS "Томът не поддържа сбиване.\n" STRING_ENTER_LABEL "Етикет (11 знака или Enter за нищо)? " diff --git a/dll/cpl/appwiz/lang/bg-BG.rc b/dll/cpl/appwiz/lang/bg-BG.rc index 2ca81ca7306..5cb93daa660 100644 --- a/dll/cpl/appwiz/lang/bg-BG.rc +++ b/dll/cpl/appwiz/lang/bg-BG.rc @@ -43,10 +43,10 @@ END IDD_CONFIG_STARTMENU DIALOGEX 0, 0, 212, 200 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Remove Shortcuts/Folders" +CAPTION "Премахни Преки пътища/Папки" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&To remove an item from the Start menu, select the item and click Remove.", -1, 10, 10, 192, 16 + LTEXT "&За премахване на елемент от Старт меню, изберете елемент и натиснете Премахни.", -1, 10, 10, 192, 16 CONTROL "List1", IDC_STARTMENU_TREE, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 10, 32, 192, 138 PUSHBUTTON "&Remove", IDC_REMOVE_ENTRIES, 98, 176, 50, 14, WS_GROUP | WS_TABSTOP @@ -75,8 +75,8 @@ END STRINGTABLE BEGIN - IDS_DOWNLOADING "Downloading..." - IDS_INSTALLING "Installing..." + IDS_DOWNLOADING "Изтегляне..." + IDS_INSTALLING "Инсталиране..." IDS_INVALID_SHA "Unexpected checksum of downloaded file. Aborting installation of corrupted file." IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut" IDS_DWL_FAILED "Failed to download the Gecko package. Make sure you have an internet connection in order to download it. The setup will proceed without installing Gecko." diff --git a/dll/cpl/console/lang/bg-BG.rc b/dll/cpl/console/lang/bg-BG.rc index cb04f2716d2..7ce7a6b5ef9 100644 --- a/dll/cpl/console/lang/bg-BG.rc +++ b/dll/cpl/console/lang/bg-BG.rc @@ -127,9 +127,9 @@ BEGIN CONTROL "", IDC_STATIC_COLOR14, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 199, 90, 12, 12 CONTROL "", IDC_STATIC_COLOR15, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 213, 90, 12, 12 CONTROL "", IDC_STATIC_COLOR16, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 227, 90, 12, 12 - GROUPBOX "Preview (Screen)", IDC_STATIC, 7, 111, 240, 40 + GROUPBOX "Преглед (Екран)", IDC_STATIC, 7, 111, 240, 40 CONTROL "", IDC_STATIC_SCREEN_COLOR, "Static", SS_OWNERDRAW | SS_SUNKEN, 15, 124, 224, 20, WS_EX_CLIENTEDGE - GROUPBOX "Preview (Popup)", IDC_STATIC, 7, 162, 240, 40 + GROUPBOX "Преглед (Изкачащ прозорец)", IDC_STATIC, 7, 162, 240, 40 CONTROL "", IDC_STATIC_POPUP_COLOR, "Static", SS_OWNERDRAW | SS_SUNKEN, 15, 176, 224, 20, WS_EX_CLIENTEDGE END @@ -150,5 +150,5 @@ BEGIN IDS_CPLDESCRIPTION "Настройка на конзолата." IDS_APPLY_SHORTCUT_ALL "Промяна на &препратката, запуснала този прозорец" IDS_RASTERFONTS "Решетъчни шрифтове" - IDS_GROUPBOX_FONT_NAME "Selected Font: " + IDS_GROUPBOX_FONT_NAME "Избор на шрифт: " END diff --git a/dll/cpl/desk/lang/bg-BG.rc b/dll/cpl/desk/lang/bg-BG.rc index a5059005234..138cb469db2 100644 --- a/dll/cpl/desk/lang/bg-BG.rc +++ b/dll/cpl/desk/lang/bg-BG.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT IDD_THEMES DIALOGEX 0, 0, 246, 210 -CAPTION "Themes" +CAPTION "Теми" STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN @@ -15,7 +15,7 @@ END IDD_BACKGROUND DIALOGEX 0, 0, 246, 210 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Работна площ" +CAPTION "Работен плот" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_BACKGROUND_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 @@ -31,11 +31,11 @@ END IDD_SCREENSAVER DIALOGEX 0, 0, 246, 202 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Екранен предпазител" +CAPTION "Скрийн сейвър" FONT 8, "MS Shell Dlg", 0, 0 BEGIN CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 - GROUPBOX "&Екранен предпазител", IDC_SCREENS_DUMMY, 8, 92, 230, 52 + GROUPBOX "&Скрийн сейвър", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "На&стройки", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP PUSHBUTTON "Пре&глед", IDC_SCREENS_TESTSC, 175, 102, 50, 15 @@ -57,13 +57,13 @@ CAPTION "Облик" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 - LTEXT "Visual Style", IDC_STATIC, 7, 130, 104, 9 + LTEXT "Стил", IDC_STATIC, 7, 130, 104, 9 COMBOBOX IDC_APPEARANCE_VISUAL_STYLE, 7, 140, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "Разцветка", IDC_STATIC, 7, 157, 104, 9 + LTEXT "Второстепенен стил", IDC_STATIC, 7, 157, 104, 9 COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 167, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "Size", IDC_STATIC, 7, 184, 104, 9 + LTEXT "Големина", IDC_STATIC, 7, 184, 104, 9 COMBOBOX IDC_APPEARANCE_SIZE, 7, 194, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Ефекти", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 @@ -308,6 +308,6 @@ STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Настройки на екрана" IDS_APPLY_FAILED "Неуспешно прилагане на новите настройки..." - IDS_APPLY_NEEDS_RESTART "За прилагане на настройките, трябва да презапуснете компютъра" - IDS_TIMEOUTTEXT "Revert to previous settings in %d seconds." + IDS_APPLY_NEEDS_RESTART "За прилагане на настройките, трябва да рестартирате компютъра" + IDS_TIMEOUTTEXT "Връщане на предишните настройки след %d секунди." END diff --git a/dll/cpl/hdwwiz/lang/bg-BG.rc b/dll/cpl/hdwwiz/lang/bg-BG.rc index 7a3c90875c5..b2328037e6d 100644 --- a/dll/cpl/hdwwiz/lang/bg-BG.rc +++ b/dll/cpl/hdwwiz/lang/bg-BG.rc @@ -2,21 +2,21 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT IDD_STARTPAGE DIALOGEX 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Вълшебник за добавяне на оборудване" +CAPTION "Магьосник за добавяне на устройства" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Вълшебник за добавяне на оборудване ви приветства", IDC_FINISHTITLE, 114, 8, 203, 24 - LTEXT "Вълшебникът ще ви помогне да:", -1, 114, 40, 182, 8 - LTEXT "1) Сложите осигуряване за поддръжка на оборудването, което сте добавили към компютъра си.", -1, 121, 56, 184, 16 + LTEXT "Магьосник за добавяне на устройства", IDC_FINISHTITLE, 114, 8, 203, 24 + LTEXT "Магьосникът ще ви помогне да:", -1, 114, 40, 182, 8 + LTEXT "1) Сложите осигуряване за поддръжка на устройството, което сте добавили към компютъра си.", -1, 121, 56, 184, 16 LTEXT "2) Отстраните ядове с компютъра си.", -1, 121, 78, 185, 16 ICON IDI_WARNINGICON, IDC_WARNINGICON, 124, 109, 20, 20 - LTEXT "Ако оборудването ви е доставено с инсталационен КД, се препоръчва да отметнете „Отказ“, за да затворите вълшебника и да използвате диска на производителя, за да подкарате софтуера.", 503, 150, 106, 155, 50 + LTEXT "Ако устройството ви е доставено с инсталационен диск, се препоръчва да изберете „Отказ“, за да затворите магьосника и да използвате диска на производителя, за да инсталирате софтуера.", 503, 150, 106, 155, 50 LTEXT "Натиснете „Напред“, за да продължите.", -1, 114, 166, 193, 8 END IDD_SEARCHPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Вълшебник за добавяне на оборудване" +CAPTION "Магьосник за добавяне на устройства" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_STATUSTEXT, 21, 8, 275, 32 @@ -25,39 +25,39 @@ END IDD_ISCONNECTEDPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Вълшебник за добавяне на оборудване" +CAPTION "Магьосник за добавяне на устройства" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Оборудването свързано ли е вече към компютъра ви?", -1, 20, 11, 275, 8 + LTEXT "Устройството свързано ли е вече към компютъра ви?", -1, 20, 11, 275, 8 AUTORADIOBUTTON "&Да, вече е свързано", IDC_CONNECTED, 29, 23, 266, 8, WS_GROUP AUTORADIOBUTTON "&Не, още не е свързано", IDC_NOTCONNECTED, 29, 35, 266, 8 END IDD_PROBELISTPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Вълшебник за добавяне на оборудване" +CAPTION "Магьосник за добавяне на устройства" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "От долния списък изберете сложено устройство, след това натиснете „Напред“, за да проверите свойствата или отстраните възможна неизправност.", -1, 21, 8, 275, 22 - LTEXT "За да добавите непоказано в списъка оборудване, натиснете „Добавяне на ново устройство“.", -1, 21, 32, 275, 24 - LTEXT "&Сложено оборудване:", -1, 21, 62, 140, 8 + LTEXT "От долния списък изберете вида устройство, след това натиснете „Напред“, за да проверите свойствата или отстраните възможна неизправност.", -1, 21, 8, 275, 22 + LTEXT "За да добавите устройство което не е в списъка, натиснете „Добавяне на ново устройство“.", -1, 21, 32, 275, 24 + LTEXT "&Избор на устройство:", -1, 21, 62, 140, 8 CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END IDD_SELECTWAYPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Вълшебник за добавяне на оборудване" +CAPTION "Магьосник за добавяне на устройства" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Вълшебикът може да потърси друго оборудване и да го подкара автоматично, вместо вас. Или ако знаете точните данни на оборудването си, можете да го изберете от списък.", -1, 21, 8, 280, 24 + LTEXT "Вълшебникът може да потърси друго устройство и да го инсталира автоматично, вместо вас. Или ако знаете точните данни на устройството си, можете да го изберете от списък.", -1, 21, 8, 280, 24 LTEXT "Какво желаете да направи вълшебникът?", -1, 23, 40, 275, 8 - AUTORADIOBUTTON "&Търсене и автоматично подкарване на оборудването (препоръчително)", IDC_AUTOINSTALL, 30, 55, 288, 8, WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "Подкарване на оборудване, което &сам си избера по списък (за напреднали)", IDC_MANUALLYINST, 30, 70, 288, 8, NOT WS_TABSTOP + AUTORADIOBUTTON "&Търсене и автоматично инсталиране на устройството (препоръчително)", IDC_AUTOINSTALL, 30, 55, 288, 8, WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "Инсталиране на устройство, което &сам си избера по списък (за напреднали)", IDC_MANUALLYINST, 30, 70, 288, 8, NOT WS_TABSTOP END IDD_DETECTEDHWPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Вълшебник за добавяне на оборудване" +CAPTION "Магьосник за добавяне на устройства" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_STATUSTEXT, 21, 9, 275, 40 @@ -67,7 +67,7 @@ END IDD_HWTYPESPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Вълшебник за добавяне на оборудване" +CAPTION "Магьосник за добавяне на устройства" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Ако не виждате хардуерния раздел, който искате, натиснете „Показване на всички устройства“.", IDC_STATUSTEXT, 21, 9, 275, 18 @@ -77,11 +77,11 @@ END IDD_PROGRESSPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Вълшебник за добавяне на оборудване" +CAPTION "Магьосник за добавяне на устройства" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Търсенето на оборудването може да отнеме известно време.", -1, 21, 8, 275, 15 - LTEXT "Общ ход:", IDC_TPROGRESSTEXT, 21, 25, 275, 8 + LTEXT "Търсенето на устройството може да отнеме известно време.", -1, 21, 8, 275, 15 + LTEXT "Прогрес:", IDC_TPROGRESSTEXT, 21, 25, 275, 8 CONTROL "", IDC_TPROGRESSBAR, "msctls_progress32", 0, 21, 37, 275, 14 LTEXT "", IDC_PROGRESSTEXT, 58, 58, 200, 8, SS_NOPREFIX CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 @@ -89,7 +89,7 @@ END IDD_FINISHPAGE DIALOGEX 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Вълшебник за добавяне на оборудване" +CAPTION "Магьосник за добавяне на устройства" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Приключване на вълшебника за добавяне на оборудване", IDC_FINISHTITLE, 114, 8, 203, 24 @@ -100,7 +100,7 @@ END IDD_ISFOUNDPAGE DIALOGEX 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Вълшебник за добавяне на оборудване" +CAPTION "Магьосник за добавяне на устройства" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Приключване на вълшебника за добавяне на оборудване", IDC_FINISHTITLE, 114, 8, 203, 24 @@ -111,7 +111,7 @@ END IDD_HWSTATUSPAGE DIALOGEX 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Вълшебник за добавяне на оборудване" +CAPTION "Магьосник за добавяне на устройства" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Приключване на вълшебника за добавяне на оборудване", IDC_FINISHTITLE, 114, 8, 195, 28 @@ -123,7 +123,7 @@ END IDD_NOTCONNECTEDPAGE DIALOGEX 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Вълшебник за добавяне на оборудване" +CAPTION "Магьосник за добавяне на устройства" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Вълшебникът за добавяне на оборудване не може да продължи.", IDC_FINISHTITLE, 114, 8, 203, 28 @@ -135,14 +135,14 @@ END STRINGTABLE BEGIN - IDS_CPLNAME "Добавяне на оборудване" - IDS_CPLDESCRIPTION "Добавяне на оборудване към компютъра ви." - IDS_SEARCHTITLE "Почакайте, докато приключи търсенето..." - IDS_SEARCHTEXT "Вълшебникът търси свързано към компютъра оборудване, което още не е сложено" - IDS_ISCONNECTED "Оборудването свързано ли е?" - IDS_PROBELISTTITLE "Следното оборудване вече е подкарано на компютъра ви" + IDS_CPLNAME "Добавяне на устройства" + IDS_CPLDESCRIPTION "Добавяне на устройства към компютъра ви." + IDS_SEARCHTITLE "Изчакайте, докато приключи търсенето..." + IDS_SEARCHTEXT "Магьосникът търси свързано към компютъра устройство, което още не е инсталирано" + IDS_ISCONNECTED "Устройството свързано ли е?" + IDS_PROBELISTTITLE "Това устройство вече е инсталирано на компютъра ви" IDS_ADDNEWDEVICE "Добавяне на ново устройство" - IDS_SELECTWAYTITLE "Вълшебникът може да ви помогне при слагането на друго оборудане" - IDS_HDTYPESTITLE "Изберете от долния списък вида оборудване, което ще подкарвате" + IDS_SELECTWAYTITLE "Магьосникът може да ви помогне при добавянето на друго устройство" + IDS_HDTYPESTITLE "Изберете от долния списък вида на устройството, което ще инсталирате" END diff --git a/dll/cpl/joy/lang/bg-BG.rc b/dll/cpl/joy/lang/bg-BG.rc index f675307354b..f4c43c1d6f5 100644 --- a/dll/cpl/joy/lang/bg-BG.rc +++ b/dll/cpl/joy/lang/bg-BG.rc @@ -3,11 +3,11 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT IDD_PROPPAGEMAIN DIALOGEX 0, 0, 252, 205 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION "Игрови управления" +CAPTION "Настройки на джойстик" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_CPLSYSTEM, -1, 7, 7, 20, 20 - LTEXT "Това са настройките за игровите управления на компютъра ви.", -1, 33, 7, 214, 20, NOT WS_GROUP + LTEXT "Това са настройките за джойстиците на компютъра ви.", -1, 33, 7, 214, 20, NOT WS_GROUP GROUPBOX "Сложени игрови управления", -1, 7, 34, 238, 117 CONTROL "List1", IDC_CONTROLLER_LIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000808D, 14, 44, 224, 80 PUSHBUTTON "&Добавяне...", IDC_ADD_BUTTON, 35, 129, 65, 14 diff --git a/dll/cpl/liccpa/lang/bg-BG.rc b/dll/cpl/liccpa/lang/bg-BG.rc index d957d5fb42c..87b70338ba3 100644 --- a/dll/cpl/liccpa/lang/bg-BG.rc +++ b/dll/cpl/liccpa/lang/bg-BG.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU -CAPTION "Избор на вида на даване на разрешителни" +CAPTION "Избор на вида на лиценза" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Вид на клиентко разрешаване", 100, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 4, 4, 239, 94 diff --git a/dll/cpl/sysdm/lang/bg-BG.rc b/dll/cpl/sysdm/lang/bg-BG.rc index 47a34bc0093..5a8ddb609b4 100644 --- a/dll/cpl/sysdm/lang/bg-BG.rc +++ b/dll/cpl/sysdm/lang/bg-BG.rc @@ -6,13 +6,13 @@ CAPTION "Общи" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_ROSIMG, "Static", SS_OWNERDRAW, 4, 5, 248, 111 - LTEXT "Уредба:", IDC_STATIC, 4, 116, 100, 9 + LTEXT "Операционна система:", IDC_STATIC, 4, 116, 100, 9 LTEXT REACTOS_STR_PRODUCT_NAME, IDC_STATIC, 10, 128, 116, 9 LTEXT "Версия:", IDC_ROSVERSION, 10, 137, 131, 9 LTEXT KERNEL_VERSION_REVISION_RC, IDC_STATIC, 10, 146, 110, 9 LTEXT "System Uptime:", IDC_STATIC, 4, 161, 100, 9 LTEXT "", IDC_UPTIME, 10, 173, 116, 9 - LTEXT "Машина:", IDC_STATIC, 124, 116, 100, 9 + LTEXT "Компютър:", IDC_STATIC, 124, 116, 100, 9 LTEXT "", IDC_MACHINELINE1, 130, 128, 118, 9 LTEXT "", IDC_MACHINELINE2, 130, 137, 118, 9 LTEXT "", IDC_MACHINELINE3, 130, 146, 118, 9 @@ -20,7 +20,7 @@ BEGIN LTEXT "", IDC_MACHINELINE5, 130, 164, 118, 9 LTEXT "", IDC_MACHINELINE6, 130, 173, 118, 9 CONTROL "Посетете <A HREF=""
https://reactos.org/
"">ReactOS Homepage</A>", IDC_ROSHOMEPAGE_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 200, 140, 10 - PUSHBUTTON "&Разрешителното", IDC_LICENCE, 170, 198, 78, 15 + PUSHBUTTON "&Лицензна информация", IDC_LICENCE, 150, 198, 98, 15 END IDD_PROPPAGEHARDWARE DIALOGEX 0, 0, 256, 218 @@ -28,10 +28,10 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Оборудване" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Управител на устройствата", IDC_STATIC, 6, 7, 244, 61 + GROUPBOX "Диспечер на устройствата", IDC_STATIC, 6, 7, 244, 61 ICON IDI_DEVMGR, IDC_STATIC, 12, 18, 23, 21, SS_ICON - LTEXT "Управителят на устройствата извежда списък на всички устройства в компютъра ви. Чрез него можете да укажете свойствата на всяко от тях.", IDC_STATIC, 42, 18, 204, 24 - PUSHBUTTON "Управител на &устройствата...", IDC_HARDWARE_DEVICE_MANAGER, 134, 48, 110, 15 + LTEXT "Диспечерът на устройствата извежда списък на всички устройства в компютъра ви. Чрез него можете да укажете свойствата на всяко от тях.", IDC_STATIC, 42, 18, 204, 24 + PUSHBUTTON "Диспечер на &устройствата...", IDC_HARDWARE_DEVICE_MANAGER, 134, 48, 110, 15 GROUPBOX "Съветник по оборудването", IDC_STATIC, 6, 79, 244, 61 ICON IDI_ADDHW, IDC_STATIC, 12, 90, 23, 21, SS_ICON LTEXT "Съветникът по оборудването ще ви помогне да подкарате, махнете, извадите, изхмъкнете и настроите оборудването си.", IDC_STATIC, 42, 90, 204, 24 @@ -57,14 +57,14 @@ BEGIN GROUPBOX "Пускане и възстановяване", IDC_STATIC, 6, 131, 244, 52 LTEXT "Изборите за пускане и възстановяване казват на компютъра ви как да се пусне и какво да прави, в случай на грешка, която да го накара да спре.", IDC_STATIC, 16, 144, 210, 27 PUSHBUTTON "Настройки", IDC_STAREC, 194, 162, 50, 15 - PUSHBUTTON "System Settings", IDC_SYSSETTINGS, 6, 192, 80, 15 + PUSHBUTTON "Системни настройки", IDC_SYSSETTINGS, 6, 192, 80, 15 PUSHBUTTON "Променливи на средата", IDC_ENVVAR, 88, 192, 80, 15 PUSHBUTTON "Докладване на грешки", IDC_ERRORREPORT, 170, 192, 80, 15 END IDD_SYSSETTINGS DIALOGEX 0, 0, 221, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Настройки на уредбата" +CAPTION "Настройки на системата" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN GROUPBOX "Сведения за версията", IDC_STATIC, 6, 3, 210, 73 @@ -213,7 +213,7 @@ BEGIN LTEXT "За да обработите ръчно файла с пусковите настройки, натиснете „Обработка”.", IDC_STATIC, 14, 87, 187, 16 PUSHBUTTON "&Обработка", IDC_STRRECEDIT, 188, 87, 50, 14 GROUPBOX "Отказ (повреда) на системата", IDC_STATIC, 7, 111, 238, 140 - AUTOCHECKBOX "В&писване на събития в дневника на уредбата", IDC_STRRECWRITEEVENT, 14, 124, 220, 10 + AUTOCHECKBOX "В&писване на събития в дневника на системата", IDC_STRRECWRITEEVENT, 14, 124, 220, 10 AUTOCHECKBOX "Из&пращане на административно предупреждение", IDC_STRRECSENDALERT, 14, 138, 220, 10 AUTOCHECKBOX "Самопре&запускане", IDC_STRRECRESTART, 14, 152, 220, 10 GROUPBOX "Записване на данни за чистене на недъзи", IDC_STATIC, 12, 167, 227, 76 @@ -315,7 +315,7 @@ BEGIN END IDD_LICENCE DIALOGEX 6, 5, 267, 159 -CAPTION "Разрешително" +CAPTION "Лицензно споразумение" FONT 8, "MS Shell Dlg" STYLE DS_SHELLFONT | WS_BORDER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU BEGIN @@ -325,12 +325,12 @@ END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Уредба" + IDS_CPLSYSTEMNAME "Система" IDS_CPLSYSTEMDESCRIPTION "Можете да видите сведения за компютъра ви и за различни настройки" - IDS_MEGABYTE "МБ памет" - IDS_GIGABYTE "ГБ памет" - IDS_TERABYTE "ТБ памет" - IDS_PETABYTE "ПБ памет" + IDS_MEGABYTE "МБ" + IDS_GIGABYTE "ГБ" + IDS_TERABYTE "ТБ" + IDS_PETABYTE "ПБ" IDS_MEGAHERTZ "MHz" IDS_GIGAHERTZ "GHz" IDS_UPTIME_FORMAT "%lu Days, %02lu:%02lu:%02lu" @@ -348,12 +348,12 @@ BEGIN IDS_USERPROFILE_LOCAL "Local" IDS_USERPROFILE_ROAMING "Roaming" IDS_USERPROFILE_MANDATORY "Mandatory" - IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's profile?" + IDS_USERPROFILE_CONFIRM_DELETE "Сигурен ли сте че искате да изтриете този профил: %s?" IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete" IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown" IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted" IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating system use the roaming profile or just the locally cached copy of the roaming profile." - IDS_MESSAGEBOXTITLE "Приложение за таблото за управление на уредбата" + IDS_MESSAGEBOXTITLE "Приложение за таблото за управление на системата" IDS_WARNINITIALSIZE "Въведете числена стойност за началния размер на страниращия файл." IDS_WARNMAXIMUMSIZE "Въведете числена стойност за върховия размер на страниращия файл." IDS_WARNINITIALRANGE "The initial paging file size must be between 2 MB and %lu MB on the selected drive." diff --git a/dll/win32/browseui/lang/bg-BG.rc b/dll/win32/browseui/lang/bg-BG.rc index f051e257427..2138165570c 100644 --- a/dll/win32/browseui/lang/bg-BG.rc +++ b/dll/win32/browseui/lang/bg-BG.rc @@ -57,8 +57,8 @@ BEGIN END POPUP "&Любимки", FCIDM_MENU_FAVORITES BEGIN - MENUITEM "Добавяне към &любимките...", IDM_FAVORITES_ADDTOFAVORITES - MENUITEM "&Подреждане на любимките", IDM_FAVORITES_ORGANIZEFAVORITES + MENUITEM "Добавяне към &любими...", IDM_FAVORITES_ADDTOFAVORITES + MENUITEM "&Подреждане на любими", IDM_FAVORITES_ORGANIZEFAVORITES MENUITEM "", -1, MFT_SEPARATOR MENUITEM "(Празно)", IDM_FAVORITES_EMPTY END @@ -80,8 +80,8 @@ IDM_TASKBAR_TOOLBARS MENUEX BEGIN POPUP "&Toolbars", -1, MFT_STRING, MFS_ENABLED, 0 BEGIN - MENUITEM "&Desktop", IDM_TASKBAR_TOOLBARS_DESKTOP, MFT_STRING - MENUITEM "&Quick Launch", IDM_TASKBAR_TOOLBARS_QUICKLAUNCH, MFT_STRING + MENUITEM "&Работен плот", IDM_TASKBAR_TOOLBARS_DESKTOP, MFT_STRING + MENUITEM "&Бързо стартиране", IDM_TASKBAR_TOOLBARS_QUICKLAUNCH, MFT_STRING MENUITEM "", -1, MFT_SEPARATOR, MFS_ENABLED MENUITEM "&New Toolbar...", IDM_TASKBAR_TOOLBARS_NEW, MFT_STRING END @@ -89,7 +89,7 @@ END IDM_BAND_MENU MENUEX BEGIN - MENUITEM "Sho&w Title", IDM_BAND_TITLE + MENUITEM "Пока&жи Заглавие", IDM_BAND_TITLE MENUITEM "&Close Toolbar", IDM_BAND_CLOSE END @@ -99,11 +99,11 @@ BEGIN BEGIN POPUP "&View", IDM_VIEW_MENU BEGIN - MENUITEM "&Large Icons", IDM_LARGE_ICONS - MENUITEM "&Small Icons", IDM_SMALL_ICONS + MENUITEM "&Големи икони", IDM_LARGE_ICONS + MENUITEM "&Малки икони", IDM_SMALL_ICONS END - MENUITEM "&Open Folder", IDM_OPEN_FOLDER - MENUITEM "&Show Text", IDM_SHOW_TEXT + MENUITEM "&Отвори папка", IDM_OPEN_FOLDER + MENUITEM "&Покажи текст", IDM_SHOW_TEXT END END @@ -136,21 +136,21 @@ IDD_SEARCH_DLG DIALOGEX 0, 0, 260, 85 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CAPTION | WS_DLGFRAME FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Search by any or all of the criteria below.", IDC_SEARCH_LABEL, 4, 2, 120, 20 + LTEXT "Търсене по всеки или всички критерии заедно.", IDC_SEARCH_LABEL, 4, 2, 120, 20 LTEXT "All or part &of the file name:", -1, 10, 25, 500, 10 EDITTEXT IDC_SEARCH_FILENAME, 10, 35, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP - LTEXT "A &word or phrase in the file:", -1, 10, 50, 500, 10 + LTEXT "&Дума или фраза във файл:", -1, 10, 50, 500, 10 EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP - LTEXT "&Look in:", -1, 10, 75, 500, 10 + LTEXT "&Търси в:", -1, 10, 75, 500, 10 CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 - DEFPUSHBUTTON "Sea&rch", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE - PUSHBUTTON "&Stop", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "Тър&сене", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE + PUSHBUTTON "&Спри", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP - AUTOCHECKBOX "Search Hidden Files and Folders", + AUTOCHECKBOX "Търси в скрити файлове и папки", IDC_SEARCH_HIDDEN, 4, 130, 130, 8, WS_VISIBLE | WS_GROUP | WS_TABSTOP CONTROL "", IDC_PROGRESS_BAR, PROGRESS_CLASSA, WS_BORDER | PBS_MARQUEE, 10, 155, 200, 8 @@ -180,7 +180,7 @@ END STRINGTABLE BEGIN - IDS_CANCELLING "Canceling..." + IDS_CANCELLING "Прекрати..." IDS_REMAINING "Remaining" END @@ -298,7 +298,7 @@ END STRINGTABLE BEGIN - IDS_ADDRESSMENUTEXT "&Address" + IDS_ADDRESSMENUTEXT "&Адрес" IDS_HISTORYTEXT "&Дневник\tCtrl+H" END @@ -309,37 +309,37 @@ END STRINGTABLE BEGIN - IDS_BACK "Back to %s" - IDS_FORWARD "Forward to %s" - IDS_FOLDER_OPTIONS "Folder Options" + IDS_BACK "Назад в %s" + IDS_FORWARD "Напред към %s" + IDS_FOLDER_OPTIONS "Опции на папката" END STRINGTABLE BEGIN - IDS_STANDARD_TOOLBAR, "|Back|Forward|Up|Search|Folders|Move To|Copy To|Delete|Undo|Views|Stop|Refresh|Home|Map Drive|Disconnect|Favorites|History|Full Screen|Properties|Cut|Copy|Paste|Folder Options||" + IDS_STANDARD_TOOLBAR, "|Назад|Напред|Нагоре|Търси|Папки|Премести в|Копирай в|Изтрий|Отмени|Изгледи|Стоп|Обнови|Начало|Свързване на устройство|Разкачи|Избрани|История|Пълен екран|Свойства|Изрежи|Копирай|Постави|Настройки на папките||" END STRINGTABLE BEGIN - IDS_BROWSEFORNEWTOOLAR "Choose a folder" - IDS_TOOLBAR_ERR_TITLE "Toolbar" - IDS_TOOLBAR_ERR_TEXT "Cannot create toolbar." + IDS_BROWSEFORNEWTOOLAR "Избери папка" + IDS_TOOLBAR_ERR_TITLE "Лента с инструменти" + IDS_TOOLBAR_ERR_TEXT "Не може да се създаде лента с инструменти." END STRINGTABLE BEGIN - IDS_SEARCH_RESULTS "Search Results" - IDS_SEARCHINVALID "'%1' is not a valid folder." - IDS_SEARCH_FOLDER "Searching %s" - IDS_SEARCH_FILES_FOUND "%u files found" - IDS_SEARCH_OPEN_FOLDER "Open Containing &Folder" - IDS_COL_NAME "Name" - IDS_COL_LOCATION "In Folder" + IDS_SEARCH_RESULTS "Резултати от търсенето" + IDS_SEARCHINVALID "'%1' не е валидна папка." + IDS_SEARCH_FOLDER "Търсене в %s" + IDS_SEARCH_FILES_FOUND "%u намерени файлове" + IDS_SEARCH_OPEN_FOLDER "Отвори файла в &Папката" + IDS_COL_NAME "Име" + IDS_COL_LOCATION "В папка" IDS_COL_RELEVANCE "Relevance" END STRINGTABLE BEGIN IDS_PARSE_ADDR_ERR_TITLE "ReactOS Explorer" - IDS_PARSE_ADDR_ERR_TEXT "ReactOS Explorer cannot find '%1'. Check the spelling and try again." + IDS_PARSE_ADDR_ERR_TEXT "ReactOS Explorer не намира '%1'. Проверете правописа и опитайте отново." END diff --git a/dll/win32/devmgr/lang/bg-BG.rc b/dll/win32/devmgr/lang/bg-BG.rc index 269a7844700..c7ec9608599 100644 --- a/dll/win32/devmgr/lang/bg-BG.rc +++ b/dll/win32/devmgr/lang/bg-BG.rc @@ -21,8 +21,8 @@ BEGIN IDS_REINSTALLDRV "По&вторно слагане на драйвера..." IDS_PROPERTIES "&Свойства" IDS_UPDATEDRV "Об&новаване на водача..." - IDS_REBOOT "&Презапуск на компютъра..." - IDS_NOTAVAILABLE "Неналично" + IDS_REBOOT "&Рестартиране на компютъра..." + IDS_NOTAVAILABLE "Не е намерено" IDS_NOTDIGITALLYSIGNED "Без цифров подпис" IDS_NODRIVERS "Не са нужни или не са заредени водачи за това устройство." IDS_RESOURCE_COLUMN "Resource type" @@ -81,15 +81,15 @@ BEGIN IDS_DEV_BIOS_TABLE "Системният фърмуер на компютъра ви не съдържа достатъчно сведения за правилната настройка и употреба на това устройство.\nЗа да го използвате, свтржете се с производителя на компютъра си, за да се получите обновление на фърмуера или БИОСа." IDS_DEV_IRQ_TRANSLATION_FAILED "Това устройство подава заявка за прекъсване на PCI, но е настроено за прекъсване на ISA (или наопаки).\nИзползвате програмата за системна настройка на компютъра, за да пренастроите прекъсването за това устройство." IDS_DEV_FAILED_DRIVER_ENTRY "РеактОС не може да подготви водача за това оборудване." - IDS_DEV_DRIVER_FAILED_PRIOR_UNLOAD "РеактОС не може да зареди водача за това оборудване, понеже предишно изпълнение на водача на устройството е все още в паметта." - IDS_DEV_DRIVER_FAILED_LOAD "РеактОС не може да зареди водача за това оборудване. Водачът може да е повреден или да липсва." + IDS_DEV_DRIVER_FAILED_PRIOR_UNLOAD "РеактОС не може да това устройство, понеже предишно изпълнение на водача на устройството е все още в паметта." + IDS_DEV_DRIVER_FAILED_LOAD "РеактОС не може да зареди това устройство. То може да е повредено или да липсва." IDS_DEV_DRIVER_SERVICE_KEY_INVALID "РеактОС не получава достъп до устройството, понеже сведенията за облужващият му ключ в регистъра липсват или са записани грешно." IDS_DEV_LEGACY_SERVICE_NO_DEVICES "РеактОС е заредил успешно водача за устройството но не може да намери самото устройство." IDS_DEV_DUPLICATE_DEVICE "РеактОС не може да зареди водача за това оборудване, понеже вече има такъв водач, изпълняван от уредбата." IDS_DEV_FAILED_POST_START "РеактОС е изключил това устройство, понеже е докладвало за нередности." IDS_DEV_HALTED "Приложение или услуга е изключила това устройство." IDS_DEV_PHANTOM "Понастоящем, устройството не е закачено за компютъра." - IDS_DEV_SYSTEM_SHUTDOWN "РеактОС не може да получи достъп до това устройство, понеже работната уредба се изключва." + IDS_DEV_SYSTEM_SHUTDOWN "РеактОС не може да получи достъп до това устройство, понеже системата се изключва." IDS_DEV_HELD_FOR_EJECT "РеактОС не може да използва това устройство, защото е било приготвено за безопасно откачане, но не е било откачено." IDS_DEV_DRIVER_BLOCKED "Софтуерът за това устройство не е бил пуснат, понеже е известно, че има ядове с РеактОС. Свържете се с производителя на оборудването за нов водач." IDS_DEV_REGISTRY_TOO_LARGE "РеактОС не успя да пусне новите устройства, понеже системният рой е твърде голям (надхвърля ограничението по размер на регистъра)." diff --git a/dll/win32/netid/lang/bg-BG.rc b/dll/win32/netid/lang/bg-BG.rc index a0185f3e088..01f760d72a2 100644 --- a/dll/win32/netid/lang/bg-BG.rc +++ b/dll/win32/netid/lang/bg-BG.rc @@ -19,7 +19,7 @@ BEGIN PUSHBUTTON "Про&мяна...", IDC_NETWORK_PROPERTY, 170, 149, 85, 15 LTEXT "", IDC_MESSAGETEXT, 7, 179, 242, 46 ICON IDI_WARNINGICO, IDC_RESTARTICON, 7, 194, 20, 20, SS_ICON | SS_REALSIZEIMAGE - LTEXT "Changes will take effect after you restart this computer.", IDC_RESTARTTEXT, 25, 195, 209, 8 + LTEXT "За да има ефект трябва да рестартирате този компютър.", IDC_RESTARTTEXT, 25, 195, 209, 8 END IDD_PROPPAGECOMPNAMECHENGE DIALOGEX 0, 0, 232, 222 diff --git a/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc index e2951c20ce0..660f2556e88 100644 --- a/dll/win32/shell32/lang/bg-BG.rc +++ b/dll/win32/shell32/lang/bg-BG.rc @@ -306,7 +306,7 @@ BEGIN LTEXT "", -1, 8, 32, 223, 1, SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE LTEXT "Вид:", -1, 8, 38, 95, 10 EDITTEXT 14001, 110, 38, 120, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL - LTEXT "Файлова уредба:", -1, 8, 51, 95, 10 + LTEXT "Файлова система:", -1, 8, 51, 95, 10 EDITTEXT 14002, 110, 51, 120, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP LTEXT "", -1, 8, 64, 223, 1, SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE CONTROL "", 14013, "Static", SS_SUNKEN | SS_OWNERDRAW, 8, 69, 10, 10 @@ -597,7 +597,7 @@ BEGIN PUSHBUTTON "&Затваряне", IDCANCEL, 118, 198, 60, 14 LTEXT "&Обем:", -1, 7, 6, 169, 9 COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "&Файлова уредба", -1, 7, 35, 170, 9 + LTEXT "&Файлова система", -1, 7, 35, 170, 9 COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 LTEXT "&Размер на разпределените участъци", -1, 7, 64, 170, 9 diff --git a/dll/win32/syssetup/lang/bg-BG.rc b/dll/win32/syssetup/lang/bg-BG.rc index 6905bb1f86a..55415df4bb7 100644 --- a/dll/win32/syssetup/lang/bg-BG.rc +++ b/dll/win32/syssetup/lang/bg-BG.rc @@ -73,7 +73,7 @@ CAPTION "Настройка на РеактОС" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Местната стойност на уредбата трябва да отговаря на езика на приложенията, които ще използвате. Местната стойност определя как се изобразават паричните стойности и датите.", IDC_STATIC, 53, 2, 253, 26 + LTEXT "Езика на системата трябва да отговаря на езика на приложенията, които ще използвате. Езикът определя как се изобразават паричните стойности и датите.", IDC_STATIC, 53, 2, 253, 26 LTEXT "%s", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT "За промяна на уредбените или местните настройки, натиснете „Нагласяване“.", IDC_STATIC, 53, 60, 184, 16 PUSHBUTTON "&Нагласяване...", IDC_CUSTOMLOCALE, 245, 57, 55, 14 @@ -132,7 +132,7 @@ END IDD_GPL DIALOGEX 0, 0, 333, 230 STYLE DS_SHELLFONT | DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Отворено разрешително споразумение GNU" +CAPTION "Лицензно споразумение GNU" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_GPL_TEXT, 7, 7, 319, 190, ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL @@ -151,7 +151,7 @@ END IDD_PS2MOUSEPROPERTIES DIALOGEX 0, 0, 252, 218 STYLE WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION "Advanced Settings" +CAPTION "Разширени настройки" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "", IDC_PS2STATIC, 5, 20, 242, 110 @@ -182,8 +182,8 @@ BEGIN IDS_LAYOUTTEXT "Your default text input language and method is: %s keyboard layout" IDS_DATETIMETITLE "Дата и време" IDS_DATETIMESUBTITLE "Задайте правилните дата и време." - IDS_PROCESSTITLE "Finishing the Installation" - IDS_PROCESSSUBTITLE "Please wait while Setup completes the final steps." + IDS_PROCESSTITLE "Завършване на инсталацията" + IDS_PROCESSSUBTITLE "Моля изчакайте докато инсталацията приключи." IDS_THEMESELECTIONTITLE "Appearance" IDS_THEMESELECTIONSUBTITLE "Select the theme you prefer." END @@ -204,7 +204,7 @@ BEGIN * samsrv.dll:IDS_USER_ADMINISTRATOR_NAME synchronized. * Also check the IDD_COMPUTERPAGE dialog. */ - IDS_ADMINISTRATOR_NAME "Administrator" + IDS_ADMINISTRATOR_NAME "Administrator" // FIXME: Should be "Администратор", but bg-BG translation missing in samsrv.dll IDS_MACHINE_OWNER_NAME "Собственик" END @@ -254,5 +254,5 @@ BEGIN IDS_PRODUCTWORKSTATIONNAME "ReactOS Workstation" IDS_PRODUCTSERVERINFO "The system will be recognized as a server. Private folders ""My Pictures"", ""My Videos"" and ""My Music"" are independent from ""My Documents""." IDS_PRODUCTWORKSTATIONINFO "The system will be recognized as a workstation. Private folders ""My Pictures"", ""My Videos"" and ""My Music"" are in ""My Documents""." - IDS_DEFAULT "(Default)" + IDS_DEFAULT "(По подразбиране)" END diff --git a/media/inf/shortcuts.inf b/media/inf/shortcuts.inf index 6035d878ab8..4f6b4d8b45b 100644 --- a/media/inf/shortcuts.inf +++ b/media/inf/shortcuts.inf @@ -156,12 +156,12 @@ RAPPS_TITLE_SHORT=Управител на приложенията RAPPS_DESC=Сваляне и слагане на различни приложения SERVMAN_TITLE=Управител на услугите SERVMAN_DESC=Пускане на управителя на услугите -DEVMGMT_TITLE=Управител на устройствата +DEVMGMT_TITLE=Диспечер на устройствата DEVMGMT_DESC=Пускане на управителя на устройствата EVENTVWR_TITLE=Преглед на събития EVENTVWR_DESC=Пускане на прегледника на събития -MSCONFIG_TITLE=Настройка на уредбата -MSCONFIG_DESC=Пускане на приложението за настройка на уредбата +MSCONFIG_TITLE=Настройка на системата +MSCONFIG_DESC=Пускане на приложението за настройка на системата CALC_TITLE=Изчислител CALC_DESC=Пускане на изчислителя NOTEPAD_TITLE=Бележник
1 year
1
0
0
0
[reactos] 01/01: [NTUSER] accelerator.c: Fix readability after commit 95657698
by Thamatip Chitpong
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=979551e33e028a8e8ac00…
commit 979551e33e028a8e8ac0014859bf6696a5079721 Author: Thamatip Chitpong <thamatip.chitpong(a)reactos.org> AuthorDate: Fri Dec 22 00:01:02 2023 +0700 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Dec 22 00:01:02 2023 +0700 [NTUSER] accelerator.c: Fix readability after commit 95657698 Add comments for default return value. --- win32ss/user/ntuser/accelerator.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/win32ss/user/ntuser/accelerator.c b/win32ss/user/ntuser/accelerator.c index 7da1a82133b..d1643591028 100644 --- a/win32ss/user/ntuser/accelerator.c +++ b/win32ss/user/ntuser/accelerator.c @@ -182,7 +182,7 @@ NtUserCopyAcceleratorTable( Accel = UserGetAccelObject(hAccel); if (!Accel) { - goto Exit; + goto Exit; // Return 0 } /* If Entries is NULL return table size */ @@ -240,7 +240,7 @@ NtUserCreateAcceleratorTable( if (!Entries || EntriesCount <= 0) { SetLastNtError(STATUS_INVALID_PARAMETER); - goto Exit; + goto Exit; // Return NULL } pti = PsGetCurrentThreadWin32Thread(); @@ -255,7 +255,7 @@ NtUserCreateAcceleratorTable( if (Accel == NULL) { SetLastNtError(STATUS_NO_MEMORY); - goto Exit; + goto Exit; // Return NULL } Accel->Count = EntriesCount; @@ -265,7 +265,7 @@ NtUserCreateAcceleratorTable( UserDereferenceObject(Accel); UserDeleteObject(hAccel, TYPE_ACCELTABLE); SetLastNtError(STATUS_NO_MEMORY); - goto Exit; + goto Exit; // Return NULL } _SEH2_TRY @@ -303,7 +303,7 @@ NtUserCreateAcceleratorTable( UserDereferenceObject(Accel); UserDeleteObject(hAccel, TYPE_ACCELTABLE); SetLastNtError(Status); - goto Exit; + goto Exit; // Return NULL } /* FIXME: Save HandleTable in a list somewhere so we can clean it up again */ @@ -382,7 +382,7 @@ NtUserTranslateAccelerator( if (hWnd == NULL) { - goto Cleanup; + goto Cleanup; // Return 0 } _SEH2_TRY @@ -393,7 +393,7 @@ NtUserTranslateAccelerator( _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { SetLastNtError(_SEH2_GetExceptionCode()); - _SEH2_YIELD(goto Cleanup); + _SEH2_YIELD(goto Cleanup); // Return 0 } _SEH2_END; @@ -402,13 +402,13 @@ NtUserTranslateAccelerator( (Message.message != WM_SYSCHAR) && (Message.message != WM_CHAR)) { - goto Cleanup; + goto Cleanup; // Return 0 } Accel = UserGetAccelObject(hAccel); if (!Accel) { - goto Cleanup; + goto Cleanup; // Return 0 } UserRefObjectCo(Accel, &AccelRef); @@ -416,7 +416,7 @@ NtUserTranslateAccelerator( Window = UserGetWindowObject(hWnd); if (!Window) { - goto Cleanup; + goto Cleanup; // Return 0 } UserRefObjectCo(Window, &WindowRef);
1 year
1
0
0
0
[reactos] 01/01: [NTUSER] window.c: Fix readability after commit 3f5fd1d0
by Thamatip Chitpong
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=26f8b97886a1e47f19f75…
commit 26f8b97886a1e47f19f75faf242910be8969620a Author: Thamatip Chitpong <thamatip.chitpong(a)reactos.org> AuthorDate: Thu Dec 21 23:49:03 2023 +0700 Commit: GitHub <noreply(a)github.com> CommitDate: Thu Dec 21 23:49:03 2023 +0700 [NTUSER] window.c: Fix readability after commit 3f5fd1d0 Add comments for default return value. --- win32ss/user/ntuser/window.c | 48 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/win32ss/user/ntuser/window.c b/win32ss/user/ntuser/window.c index 9472a67af23..9cfa7d47598 100644 --- a/win32ss/user/ntuser/window.c +++ b/win32ss/user/ntuser/window.c @@ -3196,7 +3196,7 @@ NtUserFindWindowEx(HWND hwndParent, _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { SetLastNtError(_SEH2_GetExceptionCode()); - _SEH2_YIELD(goto Exit); + _SEH2_YIELD(goto Exit); // Return NULL } _SEH2_END; @@ -3206,12 +3206,12 @@ NtUserFindWindowEx(HWND hwndParent, !IS_ATOM(ClassName.Buffer)) { EngSetLastError(ERROR_INVALID_PARAMETER); - goto Exit; + goto Exit; // Return NULL } else if (ClassAtom == (RTL_ATOM)0) { /* LastError code was set by IntGetAtomFromStringOrAtom */ - goto Exit; + goto Exit; // Return NULL } } } @@ -3230,13 +3230,13 @@ NtUserFindWindowEx(HWND hwndParent, if(!(Parent = UserGetWindowObject(hwndParent))) { - goto Exit; + goto Exit; // Return NULL } ChildAfter = NULL; if(hwndChildAfter && !(ChildAfter = UserGetWindowObject(hwndChildAfter))) { - goto Exit; + goto Exit; // Return NULL } _SEH2_TRY @@ -3589,7 +3589,7 @@ NtUserGetListBoxInfo( if (!(Wnd = UserGetWindowObject(hWnd))) { - goto Exit; + goto Exit; // Return 0 } if ((Wnd->pcls->atomClassName != gpsi->atomSysClass[ICLS_LISTBOX]) && Wnd->fnid != FNID_LISTBOX) @@ -3725,12 +3725,12 @@ NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView) if (!(WndShell = UserGetWindowObject(hwndShell))) { - goto Exit; + goto Exit; // Return FALSE } if (!(WndListView = UserGetWindowObject(hwndListView))) { - goto Exit; + goto Exit; // Return FALSE } Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation, @@ -3742,7 +3742,7 @@ NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView) if (!NT_SUCCESS(Status)) { SetLastNtError(Status); - goto Exit; + goto Exit; // Return FALSE } /* @@ -3751,7 +3751,7 @@ NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView) if (WinStaObject->ShellWindow) { ObDereferenceObject(WinStaObject); - goto Exit; + goto Exit; // Return FALSE } /* @@ -3770,14 +3770,14 @@ NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView) if (WndListView->ExStyle & WS_EX_TOPMOST) { ObDereferenceObject(WinStaObject); - goto Exit; + goto Exit; // Return FALSE } } if (WndShell->ExStyle & WS_EX_TOPMOST) { ObDereferenceObject(WinStaObject); - goto Exit; + goto Exit; // Return FALSE } UserRefObjectCo(WndShell, &Ref); @@ -4127,12 +4127,12 @@ NtUserSetWindowWord(HWND hWnd, INT Index, WORD NewValue) if (hWnd == IntGetDesktopWindow()) { EngSetLastError(STATUS_ACCESS_DENIED); - goto Exit; + goto Exit; // Return 0 } if (!(Window = UserGetWindowObject(hWnd))) { - goto Exit; + goto Exit; // Return 0 } switch (Index) @@ -4147,14 +4147,14 @@ NtUserSetWindowWord(HWND hWnd, INT Index, WORD NewValue) if (Index < 0) { EngSetLastError(ERROR_INVALID_INDEX); - goto Exit; + goto Exit; // Return 0 } } if ((ULONG)Index > (Window->cbwndExtra - sizeof(WORD))) { EngSetLastError(ERROR_INVALID_INDEX); - goto Exit; + goto Exit; // Return 0 } OldValue = *((WORD *)((PCHAR)(Window + 1) + Index)); @@ -4201,7 +4201,7 @@ NtUserQueryWindow(HWND hWnd, DWORD Index) if (!(pWnd = UserGetWindowObject(hWnd))) { - goto Exit; + goto Exit; // Return 0 } switch(Index) @@ -4303,14 +4303,14 @@ NtUserRegisterWindowMessage(PUNICODE_STRING MessageNameUnsafe) if(MessageNameUnsafe == NULL) { EngSetLastError(ERROR_INVALID_PARAMETER); - goto Exit; + goto Exit; // Return 0 } Status = IntSafeCopyUnicodeStringTerminateNULL(&SafeMessageName, MessageNameUnsafe); if(!NT_SUCCESS(Status)) { SetLastNtError(Status); - goto Exit; + goto Exit; // Return 0 } Ret = (UINT)IntAddAtom(SafeMessageName.Buffer); @@ -4338,13 +4338,13 @@ NtUserSetWindowFNID(HWND hWnd, if (!(Wnd = UserGetWindowObject(hWnd))) { - goto Exit; + goto Exit; // Return FALSE } if (Wnd->head.pti->ppi != PsGetCurrentProcessWin32Process()) { EngSetLastError(ERROR_ACCESS_DENIED); - goto Exit; + goto Exit; // Return FALSE } // From user land we only set these. @@ -4355,7 +4355,7 @@ NtUserSetWindowFNID(HWND hWnd, Wnd->fnid != 0) { EngSetLastError(ERROR_INVALID_PARAMETER); - goto Exit; + goto Exit; // Return FALSE } } @@ -4596,12 +4596,12 @@ NtUserInternalGetWindowText(HWND hWnd, LPWSTR lpString, INT nMaxCount) if(lpString && (nMaxCount <= 1)) { EngSetLastError(ERROR_INVALID_PARAMETER); - goto Exit; + goto Exit; // Return 0 } if(!(Wnd = UserGetWindowObject(hWnd))) { - goto Exit; + goto Exit; // Return 0 } Result = Wnd->strName.Length / sizeof(WCHAR);
1 year
1
0
0
0
[reactos] 01/01: [COMCTL32][USER32] EDIT control: Check bCaptureState on WM_CHAR (#6206)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=34068456a53047ab3bd97…
commit 34068456a53047ab3bd97b8851a5d35a445a31d0 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu Dec 21 20:24:44 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Thu Dec 21 20:24:44 2023 +0900 [COMCTL32][USER32] EDIT control: Check bCaptureState on WM_CHAR (#6206) Based on KRosUser's edit_v2.patch. Edit control should stop processing characters when left mouse button is down. If es->bCaptureState is set, then ignore WM_CHAR message. CORE-10259 --- dll/win32/comctl32/edit.c | 5 +++++ win32ss/user/user32/controls/edit.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/dll/win32/comctl32/edit.c b/dll/win32/comctl32/edit.c index d17c7f20d30..67edb6b3e3f 100644 --- a/dll/win32/comctl32/edit.c +++ b/dll/win32/comctl32/edit.c @@ -3051,6 +3051,11 @@ static LRESULT EDIT_WM_Char(EDITSTATE *es, WCHAR c) { BOOL control; +#ifdef __REACTOS__ + if (es->bCaptureState) + return 0; +#endif + control = GetKeyState(VK_CONTROL) & 0x8000; switch (c) { diff --git a/win32ss/user/user32/controls/edit.c b/win32ss/user/user32/controls/edit.c index bfe910c8cde..21d2c24c64c 100644 --- a/win32ss/user/user32/controls/edit.c +++ b/win32ss/user/user32/controls/edit.c @@ -3286,6 +3286,11 @@ static LRESULT EDIT_WM_Char(EDITSTATE *es, WCHAR c) { BOOL control; +#ifdef __REACTOS__ + if (es->bCaptureState) + return 0; +#endif + control = GetKeyState(VK_CONTROL) & 0x8000; switch (c) {
1 year
1
0
0
0
[reactos] 01/01: [MSCTFIME][SDK] Improve CicArray (#6217)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=df9c53554286346903fa2…
commit df9c53554286346903fa20ba65c00bfc89d4479d Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu Dec 21 20:17:35 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Thu Dec 21 20:17:35 2023 +0900 [MSCTFIME][SDK] Improve CicArray (#6217) - Add template type parameter. - Use size_t for indexing instead of INT. - Protect CicArray members. - Adapt msctfime to new CicArray. CORE-19360 --- dll/ime/msctfime/msctfime.cpp | 14 +++--- sdk/include/reactos/cicero/cicarray.h | 82 ++++++++++++++++++++++------------- 2 files changed, 59 insertions(+), 37 deletions(-) diff --git a/dll/ime/msctfime/msctfime.cpp b/dll/ime/msctfime/msctfime.cpp index bfe55ed615f..36dcf4b68f3 100644 --- a/dll/ime/msctfime/msctfime.cpp +++ b/dll/ime/msctfime/msctfime.cpp @@ -348,7 +348,7 @@ typedef INT (CALLBACK *FN_EVENTSINK)(LPVOID, REFGUID); class CCompartmentEventSink : public ITfCompartmentEventSink { - CicArray m_array; + CicArray<CESMAP> m_array; LONG m_cRefs; FN_EVENTSINK m_fnEventSink; LPVOID m_pUserData; @@ -373,7 +373,7 @@ public: * @implemented */ CCompartmentEventSink::CCompartmentEventSink(FN_EVENTSINK fnEventSink, LPVOID pUserData) - : m_array(8) + : m_array() , m_cRefs(1) , m_fnEventSink(fnEventSink) , m_pUserData(pUserData) @@ -438,7 +438,7 @@ STDMETHODIMP CCompartmentEventSink::OnChange(REFGUID rguid) HRESULT CCompartmentEventSink::_Advise(IUnknown *pUnknown, REFGUID rguid, BOOL bThread) { - CESMAP *pCesMap = (CESMAP *)m_array.Append(1); + CESMAP *pCesMap = m_array.Append(1); if (!pCesMap) return E_OUTOFMEMORY; @@ -458,7 +458,7 @@ CCompartmentEventSink::_Advise(IUnknown *pUnknown, REFGUID rguid, BOOL bThread) pCesMap->m_pComp->Release(); pCesMap->m_pComp = NULL; } - m_array.Remove(m_array.m_cItems - 1, 1); + m_array.Remove(m_array.size() - 1, 1); } else { @@ -478,11 +478,11 @@ CCompartmentEventSink::_Advise(IUnknown *pUnknown, REFGUID rguid, BOOL bThread) */ HRESULT CCompartmentEventSink::_Unadvise() { - CESMAP *pCesMap = (CESMAP *)m_array.m_pb; - if (!m_array.m_cItems) + CESMAP *pCesMap = m_array.data(); + size_t cItems = m_array.size(); + if (!cItems) return S_OK; - INT cItems = m_array.m_cItems; do { ITfSource *pSource = NULL; diff --git a/sdk/include/reactos/cicero/cicarray.h b/sdk/include/reactos/cicero/cicarray.h index 9ce7cfa6b76..29c2e6e17ab 100644 --- a/sdk/include/reactos/cicero/cicarray.h +++ b/sdk/include/reactos/cicero/cicarray.h @@ -9,57 +9,79 @@ #include "cicbase.h" -class CicArray +class CicArrayBase { -public: +protected: LPBYTE m_pb; - INT m_cItems; - INT m_cbItem; - INT m_cCapacity; + size_t m_cItems, m_cbItem, m_cCapacity; + +public: + CicArrayBase(size_t cbItem); + virtual ~CicArrayBase(); + + BOOL Insert(size_t iItem, size_t cGrow); + LPVOID Append(size_t cGrow); + void Remove(size_t iItem, size_t cRemove); +}; + +template <typename T_ITEM> +class CicArray : protected CicArrayBase +{ +public: + CicArray() : CicArrayBase(sizeof(T_ITEM)) { } + + T_ITEM* data() const { return (T_ITEM*)m_pb; } + size_t size() const { return m_cItems; } + bool empty() const { return !size(); } - CicArray(INT cbItem); - virtual ~CicArray(); + T_ITEM& operator[](size_t iItem) + { + return *(T_ITEM*)&m_pb[iItem * m_cbItem]; + } + const T_ITEM& operator[](size_t iItem) const + { + return *(const T_ITEM*)&m_pb[iItem * m_cbItem]; + } - BOOL Insert(INT iItem, INT cGrow); - LPVOID Append(INT cGrow); - void Remove(INT iItem, INT cRemove); + T_ITEM* Append(size_t cGrow) + { + return (T_ITEM*)CicArrayBase::Append(cGrow); + } + + using CicArrayBase::Insert; + using CicArrayBase::Remove; }; /******************************************************************************/ -inline CicArray::CicArray(INT cbItem) +inline CicArrayBase::CicArrayBase(size_t cbItem) { m_cbItem = cbItem; m_pb = NULL; m_cItems = m_cCapacity = 0; } -inline CicArray::~CicArray() +inline CicArrayBase::~CicArrayBase() { cicMemFree(m_pb); } -inline LPVOID CicArray::Append(INT cGrow) +inline LPVOID CicArrayBase::Append(size_t cGrow) { if (!Insert(m_cItems, cGrow)) return NULL; return &m_pb[(m_cItems - cGrow) * m_cbItem]; } -inline BOOL CicArray::Insert(INT iItem, INT cGrow) +inline BOOL CicArrayBase::Insert(size_t iItem, size_t cGrow) { - INT cNewCapacity = m_cItems + cGrow; + size_t cNewCapacity = m_cItems + cGrow; if (m_cCapacity < cNewCapacity) { if (cNewCapacity <= m_cItems + m_cItems / 2) cNewCapacity = m_cItems + m_cItems / 2; - BYTE *pbNew; - if (m_pb) - pbNew = (BYTE *)cicMemReAlloc(m_pb, cNewCapacity * m_cbItem); - else - pbNew = (BYTE *)cicMemAlloc(cNewCapacity * m_cbItem); - + LPBYTE pbNew = (LPBYTE)cicMemReAlloc(m_pb, cNewCapacity * m_cbItem); if (!pbNew) return FALSE; @@ -78,7 +100,7 @@ inline BOOL CicArray::Insert(INT iItem, INT cGrow) return TRUE; } -inline void CicArray::Remove(INT iItem, INT cRemove) +inline void CicArrayBase::Remove(size_t iItem, size_t cRemove) { if (iItem + cRemove < m_cItems) { @@ -89,14 +111,14 @@ inline void CicArray::Remove(INT iItem, INT cRemove) m_cItems -= cRemove; - INT cHalfCapacity = m_cCapacity / 2; - if (cHalfCapacity > m_cItems) + size_t cHalfCapacity = m_cCapacity / 2; + if (cHalfCapacity <= m_cItems) + return; + + LPBYTE pb = (LPBYTE)cicMemReAlloc(m_pb, cHalfCapacity * m_cbItem); + if (pb) { - BYTE *pb = (BYTE *)cicMemReAlloc(m_pb, cHalfCapacity * m_cbItem); - if (pb) - { - m_pb = pb; - m_cCapacity = cHalfCapacity; - } + m_pb = pb; + m_cCapacity = cHalfCapacity; } }
1 year
1
0
0
0
[reactos] 01/01: [CTFMON][MSCTFIME][SDK] Renaming for Cicero (#6216)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7d6fc57ec96e2ff6bbd49…
commit 7d6fc57ec96e2ff6bbd49ea5c943704224224a7b Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu Dec 21 19:05:33 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Thu Dec 21 19:05:33 2023 +0900 [CTFMON][MSCTFIME][SDK] Renaming for Cicero (#6216) Keep consistency with Cicero naming rule. - s/CModulePath/CicSystemModulePath/. - s/GetOSInfo/cicGetOSInfo/. - s/IsWow64/cicIsWow64/. - s/GetSystemModuleHandle/cicGetSystemModuleHandle/. - s/LoadSystemLibrary/cicLoadSystemLibrary/. - Move cicGetOSInfo and cicIsWow64 to <cicero/cicbase.h>. - Delete some Cicero headers. - Adapt ctfmon and msctfime to these changes. CORE-19360 --- base/applications/ctfmon/CRegWatcher.cpp | 2 +- base/applications/ctfmon/ctfmon.cpp | 38 +---- base/applications/ctfmon/precomp.h | 4 - dll/ime/msctfime/msctfime.cpp | 4 +- dll/ime/msctfime/msctfime.h | 4 +- sdk/include/reactos/cicero/CModulePath.h | 90 ------------ sdk/include/reactos/cicero/cicbase.h | 158 ++++++++++++++++++++- sdk/include/reactos/cicero/{imclock.h => cicimc.h} | 0 sdk/include/reactos/cicero/osinfo.h | 47 ------ 9 files changed, 166 insertions(+), 181 deletions(-) diff --git a/base/applications/ctfmon/CRegWatcher.cpp b/base/applications/ctfmon/CRegWatcher.cpp index 7782b5c096d..f27ab57895c 100644 --- a/base/applications/ctfmon/CRegWatcher.cpp +++ b/base/applications/ctfmon/CRegWatcher.cpp @@ -138,7 +138,7 @@ CRegWatcher::UpdateSpTip() } // Get %WINDIR%/IME/sptip.dll!TF_CreateLangProfileUtil function - HINSTANCE hSPTIP = LoadSystemLibrary(L"IME\\sptip.dll", TRUE); + HINSTANCE hSPTIP = cicLoadSystemLibrary(L"IME\\sptip.dll", TRUE); FN_TF_CreateLangProfileUtil fnTF_CreateLangProfileUtil = (FN_TF_CreateLangProfileUtil)::GetProcAddress(hSPTIP, "TF_CreateLangProfileUtil"); if (fnTF_CreateLangProfileUtil) diff --git a/base/applications/ctfmon/ctfmon.cpp b/base/applications/ctfmon/ctfmon.cpp index ebeae0fd933..676c0657289 100644 --- a/base/applications/ctfmon/ctfmon.cpp +++ b/base/applications/ctfmon/ctfmon.cpp @@ -9,10 +9,6 @@ #include "CRegWatcher.h" #include "CLoaderWnd.h" -// ntdll!NtQueryInformationProcess -typedef NTSTATUS (WINAPI *FN_NtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG); -FN_NtQueryInformationProcess g_fnNtQueryInformationProcess = NULL; - // kernel32!SetProcessShutdownParameters typedef BOOL (WINAPI *FN_SetProcessShutdownParameters)(DWORD, DWORD); FN_SetProcessShutdownParameters g_fnSetProcessShutdownParameters = NULL; @@ -29,31 +25,9 @@ HANDLE g_hCicMutex = NULL; // The Cicero mutex BOOL g_bOnWow64 = FALSE; // Is the app running on WoW64? BOOL g_fNoRunKey = FALSE; // Don't write registry key "Run"? BOOL g_fJustRunKey = FALSE; // Just write registry key "Run"? -DWORD g_dwOsInfo = 0; // The OS version info. See GetOSInfo +DWORD g_dwOsInfo = 0; // The OS version info. See cicGetOSInfo CLoaderWnd* g_pLoaderWnd = NULL; // TIP Bar loader window -// Is the current process on WoW64? -static BOOL -IsWow64(VOID) -{ - HMODULE hNTDLL = GetSystemModuleHandle(L"ntdll.dll", FALSE); - if (!hNTDLL) - return FALSE; - - g_fnNtQueryInformationProcess = - (FN_NtQueryInformationProcess)::GetProcAddress(hNTDLL, "NtQueryInformationProcess"); - if (!g_fnNtQueryInformationProcess) - return FALSE; - - ULONG_PTR Value = 0; - NTSTATUS Status = g_fnNtQueryInformationProcess(::GetCurrentProcess(), ProcessWow64Information, - &Value, sizeof(Value), NULL); - if (!NT_SUCCESS(Status)) - return FALSE; - - return !!Value; -} - static VOID ParseCommandLine( _In_ LPCWSTR pszCmdLine) @@ -107,7 +81,7 @@ WriteRegRun(VOID) return; // Write the module path - CModulePath ModPath; + CicSystemModulePath ModPath; if (ModPath.Init(L"ctfmon.exe", FALSE)) { DWORD cbData = (ModPath.m_cchPath + 1) * sizeof(WCHAR); @@ -172,7 +146,7 @@ CheckX64System( } // Get GetSystemWow64DirectoryW function - g_hKernel32 = GetSystemModuleHandle(L"kernel32.dll", FALSE); + g_hKernel32 = cicGetSystemModuleHandle(L"kernel32.dll", FALSE); g_fnGetSystemWow64DirectoryW = (FN_GetSystemWow64DirectoryW)::GetProcAddress(g_hKernel32, "GetSystemWow64DirectoryW"); if (!g_fnGetSystemWow64DirectoryW) @@ -204,8 +178,8 @@ InitApp( g_hInst = hInstance; // Save the instance handle g_uACP = ::GetACP(); // Save the active codepage - g_bOnWow64 = IsWow64(); // Is the current process on WoW64? - g_dwOsInfo = GetOSInfo(); // Get OS info + g_bOnWow64 = cicIsWow64(); // Is the current process on WoW64? + g_dwOsInfo = cicGetOSInfo(); // Get OS info // Create a mutex for Cicero g_hCicMutex = TF_CreateCicLoadMutex(&g_fWinLogon); @@ -218,7 +192,7 @@ InitApp( // Call SetProcessShutdownParameters if possible if (g_dwOsInfo & OSINFO_NT) { - g_hKernel32 = GetSystemModuleHandle(L"kernel32.dll", FALSE); + g_hKernel32 = cicGetSystemModuleHandle(L"kernel32.dll", FALSE); g_fnSetProcessShutdownParameters = (FN_SetProcessShutdownParameters) ::GetProcAddress(g_hKernel32, "SetProcessShutdownParameters"); diff --git a/base/applications/ctfmon/precomp.h b/base/applications/ctfmon/precomp.h index 636739eb9e1..541e1d6833a 100644 --- a/base/applications/ctfmon/precomp.h +++ b/base/applications/ctfmon/precomp.h @@ -9,7 +9,6 @@ #define WIN32_NO_STATUS #include <windows.h> -#include <ndk/pstypes.h> #include <shellapi.h> #include <shlwapi.h> #include <stdlib.h> @@ -17,10 +16,7 @@ #include <msctf.h> #include <ctfutb.h> #include <ctffunc.h> - #include <cicero/cicbase.h> -#include <cicero/osinfo.h> -#include <cicero/CModulePath.h> #include "resource.h" diff --git a/dll/ime/msctfime/msctfime.cpp b/dll/ime/msctfime/msctfime.cpp index 86a7ddc325a..bfe55ed615f 100644 --- a/dll/ime/msctfime/msctfime.cpp +++ b/dll/ime/msctfime/msctfime.cpp @@ -88,7 +88,7 @@ DllShutDownInProgress(VOID) if (s_fnDllShutDownInProgress) return s_fnDllShutDownInProgress(); - hNTDLL = GetSystemModuleHandle(L"ntdll.dll", FALSE); + hNTDLL = cicGetSystemModuleHandle(L"ntdll.dll", FALSE); s_fnDllShutDownInProgress = (FN_DllShutDownInProgress)GetProcAddress(hNTDLL, "RtlDllShutdownInProgress"); if (!s_fnDllShutDownInProgress) @@ -2841,7 +2841,7 @@ BOOL ProcessAttach(HINSTANCE hinstDLL) if (!TLS::Initialize()) return FALSE; - g_dwOSInfo = GetOSInfo(); + g_dwOSInfo = cicGetOSInfo(); // FIXME diff --git a/dll/ime/msctfime/msctfime.h b/dll/ime/msctfime/msctfime.h index daa9f74c66f..5fce8fb5c42 100644 --- a/dll/ime/msctfime/msctfime.h +++ b/dll/ime/msctfime/msctfime.h @@ -24,9 +24,7 @@ #include <cicero/cicbase.h> #include <cicero/cicarray.h> -#include <cicero/osinfo.h> -#include <cicero/CModulePath.h> -#include <cicero/imclock.h> +#include <cicero/cicimc.h> class CicInputContext; diff --git a/sdk/include/reactos/cicero/CModulePath.h b/sdk/include/reactos/cicero/CModulePath.h deleted file mode 100644 index 2418b157cdd..00000000000 --- a/sdk/include/reactos/cicero/CModulePath.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * PROJECT: ReactOS Cicero - * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) - * PURPOSE: Manipulate module path - * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> - */ - -#pragma once - -struct CModulePath -{ - WCHAR m_szPath[MAX_PATH]; - SIZE_T m_cchPath; - - CModulePath() - { - m_szPath[0] = UNICODE_NULL; - m_cchPath = 0; - } - - BOOL Init(_In_ LPCWSTR pszFileName, _In_ BOOL bSysWinDir); -}; - -// Get an instance handle that is already loaded -static inline HINSTANCE -GetSystemModuleHandle( - _In_ LPCWSTR pszFileName, - _In_ BOOL bSysWinDir) -{ - CModulePath ModPath; - if (!ModPath.Init(pszFileName, bSysWinDir)) - return NULL; - return GetModuleHandleW(ModPath.m_szPath); -} - -// Load a system library -static inline HINSTANCE -LoadSystemLibrary( - _In_ LPCWSTR pszFileName, - _In_ BOOL bSysWinDir) -{ - CModulePath ModPath; - if (!ModPath.Init(pszFileName, bSysWinDir)) - return NULL; - return ::LoadLibraryW(ModPath.m_szPath); -} - -/******************************************************************************/ - -inline BOOL -CModulePath::Init( - _In_ LPCWSTR pszFileName, - _In_ BOOL bSysWinDir) -{ - SIZE_T cchPath; - if (bSysWinDir) - { - // Usually C:\Windows or C:\ReactOS - cchPath = ::GetSystemWindowsDirectory(m_szPath, _countof(m_szPath)); - } - else - { - // Usually C:\Windows\system32 or C:\ReactOS\system32 - cchPath = ::GetSystemDirectoryW(m_szPath, _countof(m_szPath)); - } - - m_szPath[_countof(m_szPath) - 1] = UNICODE_NULL; // Avoid buffer overrun - - if ((cchPath == 0) || (cchPath > _countof(m_szPath) - 2)) - goto Failure; - - // Add backslash if necessary - if ((cchPath > 0) && (m_szPath[cchPath - 1] != L'\\')) - { - m_szPath[cchPath + 0] = L'\\'; - m_szPath[cchPath + 1] = UNICODE_NULL; - } - - // Append pszFileName - if (FAILED(StringCchCatW(m_szPath, _countof(m_szPath), pszFileName))) - goto Failure; - - m_cchPath = wcslen(m_szPath); - return TRUE; - -Failure: - m_szPath[0] = UNICODE_NULL; - m_cchPath = 0; - return FALSE; -} diff --git a/sdk/include/reactos/cicero/cicbase.h b/sdk/include/reactos/cicero/cicbase.h index 3e4184ac7fc..ff18ce94f72 100644 --- a/sdk/include/reactos/cicero/cicbase.h +++ b/sdk/include/reactos/cicero/cicbase.h @@ -7,6 +7,10 @@ #pragma once +#ifndef __cplusplus + #error Cicero needs C++. +#endif + static inline LPVOID cicMemAlloc(SIZE_T size) { return LocalAlloc(0, size); @@ -30,7 +34,6 @@ static inline void cicMemFree(LPVOID ptr) LocalFree(ptr); } -#ifdef __cplusplus inline void* __cdecl operator new(size_t size) noexcept { return cicMemAllocClear(size); @@ -45,7 +48,6 @@ inline void __cdecl operator delete(void* ptr, size_t size) noexcept { cicMemFree(ptr); } -#endif // __cplusplus // FIXME: Use msutb.dll and header static inline void ClosePopupTipbar(void) @@ -56,3 +58,155 @@ static inline void ClosePopupTipbar(void) static inline void GetPopupTipbar(HWND hwnd, BOOL fWinLogon) { } + +/* The flags of cicGetOSInfo() */ +#define OSINFO_NT 0x01 +#define OSINFO_CJK 0x10 +#define OSINFO_IMM 0x20 +#define OSINFO_DBCS 0x40 + +static inline DWORD +cicGetOSInfo(VOID) +{ + DWORD dwOsInfo = 0; + + /* Check OS version info */ + OSVERSIONINFOW VerInfo = { sizeof(VerInfo) }; + GetVersionExW(&VerInfo); + if (VerInfo.dwPlatformId == DLLVER_PLATFORM_NT) + dwOsInfo |= OSINFO_NT; + + /* Check codepage */ + switch (GetACP()) + { + case 932: /* Japanese (Japan) */ + case 936: /* Chinese (PRC, Singapore) */ + case 949: /* Korean (Korea) */ + case 950: /* Chinese (Taiwan, Hong Kong) */ + dwOsInfo |= OSINFO_CJK; + break; + } + + if (GetSystemMetrics(SM_IMMENABLED)) + dwOsInfo |= OSINFO_IMM; + + if (GetSystemMetrics(SM_DBCSENABLED)) + dwOsInfo |= OSINFO_DBCS; + + /* I'm not interested in other flags */ + + return dwOsInfo; +} + +struct CicSystemModulePath +{ + WCHAR m_szPath[MAX_PATH]; + SIZE_T m_cchPath; + + CicSystemModulePath() + { + m_szPath[0] = UNICODE_NULL; + m_cchPath = 0; + } + + BOOL Init(_In_ LPCWSTR pszFileName, _In_ BOOL bSysWinDir); +}; + +// Get an instance handle that is already loaded +static inline HINSTANCE +cicGetSystemModuleHandle( + _In_ LPCWSTR pszFileName, + _In_ BOOL bSysWinDir) +{ + CicSystemModulePath ModPath; + if (!ModPath.Init(pszFileName, bSysWinDir)) + return NULL; + return GetModuleHandleW(ModPath.m_szPath); +} + +// Load a system library +static inline HINSTANCE +cicLoadSystemLibrary( + _In_ LPCWSTR pszFileName, + _In_ BOOL bSysWinDir) +{ + CicSystemModulePath ModPath; + if (!ModPath.Init(pszFileName, bSysWinDir)) + return NULL; + return ::LoadLibraryW(ModPath.m_szPath); +} + +#include <ndk/pstypes.h> /* for PROCESSINFOCLASS */ + +/* ntdll!NtQueryInformationProcess */ +typedef NTSTATUS (WINAPI *FN_NtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG); + +/* Is the current process on WoW64? */ +static inline BOOL cicIsWow64(VOID) +{ + static FN_NtQueryInformationProcess s_fnNtQueryInformationProcess = NULL; + ULONG_PTR Value; + NTSTATUS Status; + + if (!s_fnNtQueryInformationProcess) + { + HMODULE hNTDLL = cicGetSystemModuleHandle(L"ntdll.dll", FALSE); + if (!hNTDLL) + return FALSE; + + s_fnNtQueryInformationProcess = + (FN_NtQueryInformationProcess)GetProcAddress(hNTDLL, "NtQueryInformationProcess"); + if (!s_fnNtQueryInformationProcess) + return FALSE; + } + + Value = 0; + Status = s_fnNtQueryInformationProcess(GetCurrentProcess(), ProcessWow64Information, + &Value, sizeof(Value), NULL); + if (!NT_SUCCESS(Status)) + return FALSE; + + return !!Value; +} + +inline BOOL +CicSystemModulePath::Init( + _In_ LPCWSTR pszFileName, + _In_ BOOL bSysWinDir) +{ + SIZE_T cchPath; + if (bSysWinDir) + { + // Usually C:\Windows or C:\ReactOS + cchPath = ::GetSystemWindowsDirectory(m_szPath, _countof(m_szPath)); + } + else + { + // Usually C:\Windows\system32 or C:\ReactOS\system32 + cchPath = ::GetSystemDirectoryW(m_szPath, _countof(m_szPath)); + } + + m_szPath[_countof(m_szPath) - 1] = UNICODE_NULL; // Avoid buffer overrun + + if ((cchPath == 0) || (cchPath > _countof(m_szPath) - 2)) + goto Failure; + + // Add backslash if necessary + if ((cchPath > 0) && (m_szPath[cchPath - 1] != L'\\')) + { + m_szPath[cchPath + 0] = L'\\'; + m_szPath[cchPath + 1] = UNICODE_NULL; + } + + // Append pszFileName + if (FAILED(StringCchCatW(m_szPath, _countof(m_szPath), pszFileName))) + goto Failure; + + m_cchPath = wcslen(m_szPath); + return TRUE; + +Failure: + m_szPath[0] = UNICODE_NULL; + m_cchPath = 0; + return FALSE; +} diff --git a/sdk/include/reactos/cicero/imclock.h b/sdk/include/reactos/cicero/cicimc.h similarity index 100% rename from sdk/include/reactos/cicero/imclock.h rename to sdk/include/reactos/cicero/cicimc.h diff --git a/sdk/include/reactos/cicero/osinfo.h b/sdk/include/reactos/cicero/osinfo.h deleted file mode 100644 index b260000dfbc..00000000000 --- a/sdk/include/reactos/cicero/osinfo.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * PROJECT: ReactOS Cicero - * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) - * PURPOSE: Getting OS information - * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> - */ - -#pragma once - -/* The flags of GetOSInfo() */ -#define OSINFO_NT 0x01 -#define OSINFO_CJK 0x10 -#define OSINFO_IMM 0x20 -#define OSINFO_DBCS 0x40 - -static inline DWORD -GetOSInfo(VOID) -{ - DWORD dwOsInfo = 0; - - /* Check OS version info */ - OSVERSIONINFOW VerInfo = { sizeof(VerInfo) }; - GetVersionExW(&VerInfo); - if (VerInfo.dwPlatformId == DLLVER_PLATFORM_NT) - dwOsInfo |= OSINFO_NT; - - /* Check codepage */ - switch (GetACP()) - { - case 932: /* Japanese (Japan) */ - case 936: /* Chinese (PRC, Singapore) */ - case 949: /* Korean (Korea) */ - case 950: /* Chinese (Taiwan, Hong Kong) */ - dwOsInfo |= OSINFO_CJK; - break; - } - - if (GetSystemMetrics(SM_IMMENABLED)) - dwOsInfo |= OSINFO_IMM; - - if (GetSystemMetrics(SM_DBCSENABLED)) - dwOsInfo |= OSINFO_DBCS; - - /* I'm not interested in other flags */ - - return dwOsInfo; -}
1 year
1
0
0
0
[reactos] 01/01: [MSCTFIME][SDK] Implement CicInputContext::OnCleanupContext (#6213)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=814cb188c6470b3188e82…
commit 814cb188c6470b3188e8294cc1216ea80f847762 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu Dec 21 16:23:23 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Thu Dec 21 16:23:23 2023 +0900 [MSCTFIME][SDK] Implement CicInputContext::OnCleanupContext (#6213) - Strengthen CicInputContext class. - Modify <cicero/imclock.h>. - add __cxa_pure_virtual function. CORE-19360 --- dll/ime/msctfime/msctfime.cpp | 174 ++++++++++++++++++++++++++++++++++- sdk/include/reactos/cicero/imclock.h | 17 ++++ 2 files changed, 186 insertions(+), 5 deletions(-) diff --git a/dll/ime/msctfime/msctfime.cpp b/dll/ime/msctfime/msctfime.cpp index 047dbfe3ccd..86a7ddc325a 100644 --- a/dll/ime/msctfime/msctfime.cpp +++ b/dll/ime/msctfime/msctfime.cpp @@ -17,6 +17,11 @@ CRITICAL_SECTION g_csLock; DEFINE_GUID(GUID_COMPARTMENT_CTFIME_DIMFLAGS, 0xA94C5FD2, 0xC471, 0x4031, 0x95, 0x46, 0x70, 0x9C, 0x17, 0x30, 0x0C, 0xB9); +EXTERN_C void __cxa_pure_virtual(void) +{ + ERR("__cxa_pure_virtual\n"); +} + UINT WM_MSIME_SERVICE = 0; UINT WM_MSIME_UIREADY = 0; UINT WM_MSIME_RECONVERTREQUEST = 0; @@ -508,8 +513,12 @@ HRESULT CCompartmentEventSink::_Unadvise() class CInputContextOwnerCallBack; /* FIXME */ -class CicInputContext : public ITfContextOwnerCompositionSink +class CicInputContext + : public ITfCleanupContextSink + , public ITfContextOwnerCompositionSink + , public ITfCompositionSink { +public: DWORD m_dw[2]; LONG m_cRefs; HIMC m_hIMC; @@ -532,10 +541,7 @@ class CicInputContext : public ITfContextOwnerCompositionSink DWORD m_dw3[19]; public: - CicInputContext() - { - m_cRefs = 1; - } + CicInputContext(TfClientId cliendId, LIBTHREAD *pLibThread, HIMC hIMC); virtual ~CicInputContext() { } @@ -545,20 +551,38 @@ public: STDMETHODIMP_(ULONG) AddRef() override; STDMETHODIMP_(ULONG) Release() override; + // ITfCleanupContextSink interface + STDMETHODIMP OnCleanupContext(TfEditCookie ecWrite, ITfContext *pic) override; + // ITfContextOwnerCompositionSink interface STDMETHODIMP OnStartComposition(ITfCompositionView *pComposition, BOOL *pfOk) override; STDMETHODIMP OnUpdateComposition(ITfCompositionView *pComposition, ITfRange *pRangeNew) override; STDMETHODIMP OnEndComposition(ITfCompositionView *pComposition) override; + // ITfCompositionSink interface + STDMETHODIMP OnCompositionTerminated(TfEditCookie ecWrite, ITfComposition *pComposition) override; + HRESULT GetGuidAtom( _Inout_ IMCLock& imcLock, _In_ BYTE iAtom, _Out_opt_ LPDWORD pdwGuidAtom); + HRESULT CreateInputContext(ITfThreadMgr *pThreadMgr, IMCLock& imcLock); HRESULT DestroyInputContext(); }; +/** + * @unimplemented + */ +CicInputContext::CicInputContext(TfClientId cliendId, LIBTHREAD *pLibThread, HIMC hIMC) +{ + m_hIMC = hIMC; + m_guid = GUID_NULL; + m_dwQueryPos = 0; + m_cRefs = 1; +} + /** * @unimplemented */ @@ -661,6 +685,16 @@ CicInputContext::GetGuidAtom( return hr; } +/** + * @unimplemented + */ +HRESULT +CicInputContext::CreateInputContext(ITfThreadMgr *pThreadMgr, IMCLock& imcLock) +{ + //FIXME + return E_NOTIMPL; +} + /** * @unimplemented */ @@ -671,6 +705,15 @@ CicInputContext::DestroyInputContext() return E_NOTIMPL; } +/** + * @implemented + */ +STDMETHODIMP +CicInputContext::OnCompositionTerminated(TfEditCookie ecWrite, ITfComposition *pComposition) +{ + return S_OK; +} + /** * @implemented */ @@ -1025,6 +1068,7 @@ public: HRESULT DestroyInputContext(TLS *pTLS, HIMC hIMC); void PostTransMsg(HWND hWnd, INT cTransMsgs, LPTRANSMSG pTransMsgs); + void GetDocumentManager(IMCCLock<CTFIMECONTEXT>& imeContext); HRESULT ConfigureGeneral(TLS* pTLS, ITfThreadMgr *pThreadMgr, HKL hKL, HWND hWnd); HRESULT ConfigureRegisterWord(TLS* pTLS, ITfThreadMgr *pThreadMgr, HKL hKL, HWND hWnd, LPVOID lpData); @@ -1513,6 +1557,56 @@ CicProfile::InitProfileInstance(TLS *pTLS) return hr; } +/** + * @implemented + */ +STDMETHODIMP CicInputContext::OnCleanupContext(TfEditCookie ecWrite, ITfContext *pic) +{ + TLS *pTLS = TLS::PeekTLS(); + if (!pTLS || !pTLS->m_pProfile) + return E_OUTOFMEMORY; + + LANGID LangID; + pTLS->m_pProfile->GetLangId(&LangID); + + IMEINFO IMEInfo; + WCHAR szPath[MAX_PATH]; + if (Inquire(&IMEInfo, szPath, 0, (HKL)UlongToHandle(LangID)) != S_OK) + return E_FAIL; + + ITfProperty *pProp = NULL; + if (!(IMEInfo.fdwProperty & IME_PROP_COMPLETE_ON_UNSELECT)) + return S_OK; + + HRESULT hr = pic->GetProperty(GUID_PROP_COMPOSING, &pProp); + if (FAILED(hr)) + return S_OK; + + IEnumTfRanges *pRanges = NULL; + hr = pProp->EnumRanges(ecWrite, &pRanges, NULL); + if (SUCCEEDED(hr)) + { + ITfRange *pRange = NULL; + while (pRanges->Next(1, &pRange, 0) == S_OK) + { + VARIANT vari; + V_VT(&vari) = VT_EMPTY; + pProp->GetValue(ecWrite, pRange, &vari); + if (V_VT(&vari) == VT_I4) + { + if (V_I4(&vari)) + pProp->Clear(ecWrite, pRange); + } + pRange->Release(); + pRange = NULL; + } + pRanges->Release(); + } + pProp->Release(); + + return S_OK; +} + /*********************************************************************** * CicBridge */ @@ -1580,11 +1674,81 @@ CicBridge::~CicBridge() UnInitIMMX(pTLS); } +void CicBridge::GetDocumentManager(IMCCLock<CTFIMECONTEXT>& imeContext) +{ + CicInputContext *pCicIC = imeContext.get().m_pCicIC; + if (pCicIC) + { + m_pDocMgr = pCicIC->m_pDocumentMgr; + m_pDocMgr->AddRef(); + } + else + { + m_pDocMgr->Release(); + m_pDocMgr = NULL; + } +} + /** * @unimplemented */ HRESULT CicBridge::CreateInputContext(TLS *pTLS, HIMC hIMC) { + IMCLock imcLock(hIMC); + HRESULT hr = imcLock.m_hr; + if (!imcLock) + hr = E_FAIL; + if (FAILED(hr)) + return hr; + + if (!imcLock.get().hCtfImeContext) + { + HIMCC hCtfImeContext = ImmCreateIMCC(sizeof(CTFIMECONTEXT)); + if (!hCtfImeContext) + return E_OUTOFMEMORY; + imcLock.get().hCtfImeContext = hCtfImeContext; + } + + IMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext); + CicInputContext *pCicIC = imeContext.get().m_pCicIC; + if (!pCicIC) + { + pCicIC = new CicInputContext(m_cliendId, &m_LibThread, hIMC); + if (!pCicIC) + { + imeContext.unlock(); + imcLock.unlock(); + DestroyInputContext(pTLS, hIMC); + return E_OUTOFMEMORY; + } + + if (!pTLS->m_pThreadMgr) + { + pCicIC->Release(); + imeContext.unlock(); + imcLock.unlock(); + DestroyInputContext(pTLS, hIMC); + return E_NOINTERFACE; + } + + imeContext.get().m_pCicIC = pCicIC; + } + + hr = pCicIC->CreateInputContext(pTLS->m_pThreadMgr, imcLock); + if (FAILED(hr)) + { + pCicIC->Release(); + imeContext.get().m_pCicIC = NULL; + } + else + { + if (imcLock.get().hWnd && imcLock.get().hWnd == ::GetFocus()) + { + GetDocumentManager(imeContext); + //FIXME + } + } + return E_NOTIMPL; } diff --git a/sdk/include/reactos/cicero/imclock.h b/sdk/include/reactos/cicero/imclock.h index 3392c9a1107..81a642ec067 100644 --- a/sdk/include/reactos/cicero/imclock.h +++ b/sdk/include/reactos/cicero/imclock.h @@ -40,10 +40,19 @@ public: _LockIMCC(this->m_hIMCC, &this->m_pIMCC); } ~IMCCLock() + { + unlock(); + } + + void unlock() { if (this->m_pIMCC) + { _UnlockIMCC(this->m_hIMCC); + this->m_pIMCC = NULL; + } } + operator T_DATA*() const { return this->m_pIMCC; @@ -101,9 +110,17 @@ public: m_hr = _LockIMC(hIMC, &m_pIC); } ~IMCLock() + { + unlock(); + } + + void unlock() { if (m_pIC) + { _UnlockIMC(m_hIMC); + m_pIC = NULL; + } } void InitContext()
1 year
1
0
0
0
[reactos] 01/01: [NTUSER] Remove RETURN() macro (#6194)
by Thamatip Chitpong
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=533d877aaf692a16c8f3f…
commit 533d877aaf692a16c8f3f06bfa228aa2aaf730a2 Author: Thamatip Chitpong <thamatip.chitpong(a)reactos.org> AuthorDate: Thu Dec 21 11:10:46 2023 +0700 Commit: GitHub <noreply(a)github.com> CommitDate: Thu Dec 21 11:10:46 2023 +0700 [NTUSER] Remove RETURN() macro (#6194) Remove macro definition and the remaining uses. RETURN() macro is just a wrapper for goto, most of the time it makes the code more complicated than using goto directly. --- win32ss/user/ntuser/caret.c | 51 +++++++-------- win32ss/user/ntuser/cursoricon.c | 24 +++---- win32ss/user/ntuser/desktop.c | 50 +++++++-------- win32ss/user/ntuser/focus.c | 55 +++++++--------- win32ss/user/ntuser/hook.c | 59 +++++++++-------- win32ss/user/ntuser/message.c | 92 ++++++++++++++------------- win32ss/user/ntuser/misc.c | 36 +++++------ win32ss/user/ntuser/ntuser.h | 5 -- win32ss/user/ntuser/object.c | 15 +++-- win32ss/user/ntuser/painting.c | 84 +++++++++++-------------- win32ss/user/ntuser/scrollbar.c | 122 ++++++++++++++++++------------------ win32ss/user/ntuser/scrollex.c | 33 +++++----- win32ss/user/ntuser/windc.c | 12 ++-- win32ss/user/ntuser/winpos.c | 132 +++++++++++++++++---------------------- 14 files changed, 357 insertions(+), 413 deletions(-) diff --git a/win32ss/user/ntuser/caret.c b/win32ss/user/ntuser/caret.c index a4e4afc1acb..60594c50134 100644 --- a/win32ss/user/ntuser/caret.c +++ b/win32ss/user/ntuser/caret.c @@ -316,20 +316,20 @@ NtUserCreateCaret( PWND Window; PTHREADINFO pti; PUSER_MESSAGE_QUEUE ThreadQueue; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; TRACE("Enter NtUserCreateCaret\n"); UserEnterExclusive(); if(!(Window = UserGetWindowObject(hWnd))) { - RETURN(FALSE); + goto Exit; // Return FALSE } if(Window->head.pti->pEThread != PsGetCurrentThread()) { EngSetLastError(ERROR_ACCESS_DENIED); - RETURN(FALSE); + goto Exit; // Return FALSE } pti = PsGetCurrentThreadWin32Thread(); @@ -368,12 +368,12 @@ NtUserCreateCaret( IntNotifyWinEvent(EVENT_OBJECT_CREATE, Window, OBJID_CARET, CHILDID_SELF, 0); - RETURN(TRUE); + Ret = TRUE; -CLEANUP: - TRACE("Leave NtUserCreateCaret, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserCreateCaret, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } UINT @@ -399,7 +399,7 @@ NtUserGetCaretPos( PTHREADINFO pti; PUSER_MESSAGE_QUEUE ThreadQueue; NTSTATUS Status; - DECLARE_RETURN(BOOL); + BOOL Ret = TRUE; TRACE("Enter NtUserGetCaretPos\n"); UserEnterShared(); @@ -411,15 +411,12 @@ NtUserGetCaretPos( if(!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN(FALSE); + Ret = FALSE; } - RETURN(TRUE); - -CLEANUP: - TRACE("Leave NtUserGetCaretPos, ret=%i\n",_ret_); + TRACE("Leave NtUserGetCaretPos, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } BOOL @@ -428,15 +425,14 @@ NtUserShowCaret(HWND hWnd OPTIONAL) { PWND Window = NULL; USER_REFERENCE_ENTRY Ref; - DECLARE_RETURN(BOOL); - BOOL ret; + BOOL ret = FALSE; TRACE("Enter NtUserShowCaret\n"); UserEnterExclusive(); if(hWnd && !(Window = UserGetWindowObject(hWnd))) { - RETURN(FALSE); + goto Exit; // Return FALSE } if (Window) UserRefObjectCo(Window, &Ref); @@ -445,12 +441,10 @@ NtUserShowCaret(HWND hWnd OPTIONAL) if (Window) UserDerefObjectCo(Window); - RETURN(ret); - -CLEANUP: - TRACE("Leave NtUserShowCaret, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserShowCaret, ret=%i\n", ret); UserLeave(); - END_CLEANUP; + return ret; } BOOL @@ -459,15 +453,14 @@ NtUserHideCaret(HWND hWnd OPTIONAL) { PWND Window = NULL; USER_REFERENCE_ENTRY Ref; - DECLARE_RETURN(BOOL); - BOOL ret; + BOOL ret = FALSE; TRACE("Enter NtUserHideCaret\n"); UserEnterExclusive(); if(hWnd && !(Window = UserGetWindowObject(hWnd))) { - RETURN(FALSE); + goto Exit; // Return FALSE } if (Window) UserRefObjectCo(Window, &Ref); @@ -476,10 +469,8 @@ NtUserHideCaret(HWND hWnd OPTIONAL) if (Window) UserDerefObjectCo(Window); - RETURN(ret); - -CLEANUP: - TRACE("Leave NtUserHideCaret, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserHideCaret, ret=%i\n", ret); UserLeave(); - END_CLEANUP; + return ret; } diff --git a/win32ss/user/ntuser/cursoricon.c b/win32ss/user/ntuser/cursoricon.c index bb72ffcdfba..1c51605a3e9 100644 --- a/win32ss/user/ntuser/cursoricon.c +++ b/win32ss/user/ntuser/cursoricon.c @@ -650,7 +650,6 @@ NtUserGetCursorInfo( NTSTATUS Status = STATUS_SUCCESS; PCURICON_OBJECT CurIcon; BOOL Ret = FALSE; - DECLARE_RETURN(BOOL); TRACE("Enter NtUserGetCursorInfo\n"); UserEnterShared(); @@ -687,12 +686,9 @@ NtUserGetCursorInfo( SetLastNtError(Status); } - RETURN(Ret); - -CLEANUP: - TRACE("Leave NtUserGetCursorInfo, ret=%i\n",_ret_); + TRACE("Leave NtUserGetCursorInfo, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } BOOL @@ -999,18 +995,18 @@ NtUserGetClipCursor( PSYSTEM_CURSORINFO CurInfo; RECTL Rect; NTSTATUS Status; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; TRACE("Enter NtUserGetClipCursor\n"); UserEnterShared(); if (!CheckWinstaAttributeAccess(WINSTA_READATTRIBUTES)) { - RETURN(FALSE); + goto Exit; // Return FALSE } if (!lpRect) - RETURN(FALSE); + goto Exit; // Return FALSE CurInfo = IntGetSysCursorInfo(); if (CurInfo->bClipped) @@ -1029,15 +1025,15 @@ NtUserGetClipCursor( if (!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN(FALSE); + goto Exit; // Return FALSE } - RETURN(TRUE); + Ret = TRUE; -CLEANUP: - TRACE("Leave NtUserGetClipCursor, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserGetClipCursor, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } diff --git a/win32ss/user/ntuser/desktop.c b/win32ss/user/ntuser/desktop.c index 7f200cbfc92..c3ac7e034a0 100644 --- a/win32ss/user/ntuser/desktop.c +++ b/win32ss/user/ntuser/desktop.c @@ -2535,8 +2535,7 @@ NtUserCreateDesktop( { NTSTATUS Status; HDESK hDesk; - - DECLARE_RETURN(HDESK); + HDESK Ret = NULL; TRACE("Enter NtUserCreateDesktop\n"); UserEnterExclusive(); @@ -2552,15 +2551,15 @@ NtUserCreateDesktop( { ERR("IntCreateDesktop failed, Status 0x%08lx\n", Status); // SetLastNtError(Status); - RETURN(NULL); + goto Exit; // Return NULL } - RETURN(hDesk); + Ret = hDesk; -CLEANUP: - TRACE("Leave NtUserCreateDesktop, ret=0x%p\n", _ret_); +Exit: + TRACE("Leave NtUserCreateDesktop, ret=0x%p\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* @@ -2724,7 +2723,7 @@ NtUserCloseDesktop(HDESK hDesktop) { PDESKTOP pdesk; NTSTATUS Status; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; TRACE("NtUserCloseDesktop(0x%p) called\n", hDesktop); UserEnterExclusive(); @@ -2733,14 +2732,14 @@ NtUserCloseDesktop(HDESK hDesktop) { ERR("Attempted to close thread desktop\n"); EngSetLastError(ERROR_BUSY); - RETURN(FALSE); + goto Exit; // Return FALSE } Status = IntValidateDesktopHandle(hDesktop, UserMode, 0, &pdesk); if (!NT_SUCCESS(Status)) { ERR("Validation of desktop handle 0x%p failed\n", hDesktop); - RETURN(FALSE); + goto Exit; // Return FALSE } ObDereferenceObject(pdesk); @@ -2750,15 +2749,15 @@ NtUserCloseDesktop(HDESK hDesktop) { ERR("Failed to close desktop handle 0x%p\n", hDesktop); SetLastNtError(Status); - RETURN(FALSE); + goto Exit; // Return FALSE } - RETURN(TRUE); + Ret = TRUE; -CLEANUP: - TRACE("Leave NtUserCloseDesktop, ret=%i\n", _ret_); +Exit: + TRACE("Leave NtUserCloseDesktop, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* @@ -2939,7 +2938,7 @@ NtUserSwitchDesktop(HDESK hdesk) PDESKTOP pdesk; NTSTATUS Status; BOOL bRedrawDesktop; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; UserEnterExclusive(); TRACE("Enter NtUserSwitchDesktop(0x%p)\n", hdesk); @@ -2948,21 +2947,22 @@ NtUserSwitchDesktop(HDESK hdesk) if (!NT_SUCCESS(Status)) { ERR("Validation of desktop handle 0x%p failed\n", hdesk); - RETURN(FALSE); + goto Exit; // Return FALSE } if (PsGetCurrentProcessSessionId() != pdesk->rpwinstaParent->dwSessionId) { ObDereferenceObject(pdesk); ERR("NtUserSwitchDesktop called for a desktop of a different session\n"); - RETURN(FALSE); + goto Exit; // Return FALSE } if (pdesk == gpdeskInputDesktop) { ObDereferenceObject(pdesk); WARN("NtUserSwitchDesktop called for active desktop\n"); - RETURN(TRUE); + Ret = TRUE; + goto Exit; } /* @@ -2974,14 +2974,14 @@ NtUserSwitchDesktop(HDESK hdesk) { ObDereferenceObject(pdesk); ERR("Switching desktop 0x%p denied because the window station is locked!\n", hdesk); - RETURN(FALSE); + goto Exit; // Return FALSE } if (pdesk->rpwinstaParent != InputWindowStation) { ObDereferenceObject(pdesk); ERR("Switching desktop 0x%p denied because desktop doesn't belong to the interactive winsta!\n", hdesk); - RETURN(FALSE); + goto Exit; // Return FALSE } /* FIXME: Fail if the process is associated with a secured @@ -3014,12 +3014,12 @@ NtUserSwitchDesktop(HDESK hdesk) TRACE("SwitchDesktop gpdeskInputDesktop 0x%p\n", gpdeskInputDesktop); ObDereferenceObject(pdesk); - RETURN(TRUE); + Ret = TRUE; -CLEANUP: - TRACE("Leave NtUserSwitchDesktop, ret=%i\n", _ret_); +Exit: + TRACE("Leave NtUserSwitchDesktop, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* diff --git a/win32ss/user/ntuser/focus.c b/win32ss/user/ntuser/focus.c index 3b11d47d5f4..2d6ed372a48 100644 --- a/win32ss/user/ntuser/focus.c +++ b/win32ss/user/ntuser/focus.c @@ -1441,17 +1441,16 @@ IntGetCapture(VOID) { PTHREADINFO pti; PUSER_MESSAGE_QUEUE ThreadQueue; - DECLARE_RETURN(HWND); + HWND Ret; TRACE("Enter IntGetCapture\n"); pti = PsGetCurrentThreadWin32Thread(); ThreadQueue = pti->MessageQueue; - RETURN( ThreadQueue ? (ThreadQueue->spwndCapture ? UserHMGetHandle(ThreadQueue->spwndCapture) : 0) : 0); + Ret = ((ThreadQueue && ThreadQueue->spwndCapture) ? UserHMGetHandle(ThreadQueue->spwndCapture) : NULL); -CLEANUP: - TRACE("Leave IntGetCapture, ret=%p\n", _ret_); - END_CLEANUP; + TRACE("Leave IntGetCapture, ret=%p\n", Ret); + return Ret; } HWND FASTCALL @@ -1647,17 +1646,16 @@ IntAllowSetForegroundWindow(DWORD dwProcessId) HWND APIENTRY NtUserGetForegroundWindow(VOID) { - DECLARE_RETURN(HWND); + HWND Ret; TRACE("Enter NtUserGetForegroundWindow\n"); UserEnterExclusive(); - RETURN( UserGetForegroundWindow()); + Ret = UserGetForegroundWindow(); -CLEANUP: - TRACE("Leave NtUserGetForegroundWindow, ret=%p\n",_ret_); + TRACE("Leave NtUserGetForegroundWindow, ret=%p\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } HWND APIENTRY @@ -1666,7 +1664,7 @@ NtUserSetActiveWindow(HWND hWnd) USER_REFERENCE_ENTRY Ref; HWND hWndPrev; PWND Window, pwndPrev; - DECLARE_RETURN(HWND); + HWND Ret = NULL; TRACE("Enter NtUserSetActiveWindow(%p)\n", hWnd); UserEnterExclusive(); @@ -1677,7 +1675,7 @@ NtUserSetActiveWindow(HWND hWnd) if (!(Window = UserGetWindowObject(hWnd))) { ERR("NtUserSetActiveWindow: Invalid handle 0x%p!\n",hWnd); - RETURN( NULL); + goto Exit; // Return NULL } } @@ -1689,14 +1687,13 @@ NtUserSetActiveWindow(HWND hWnd) if (Window) UserRefObjectCo(Window, &Ref); UserSetActiveWindow(Window); if (Window) UserDerefObjectCo(Window); - RETURN(hWndPrev ? (IntIsWindow(hWndPrev) ? hWndPrev : NULL) : NULL); + Ret = ((hWndPrev && IntIsWindow(hWndPrev)) ? hWndPrev : NULL); } - RETURN( NULL); -CLEANUP: - TRACE("Leave NtUserSetActiveWindow, ret=%p\n",_ret_); +Exit: + TRACE("Leave NtUserSetActiveWindow, ret=%p\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* @@ -1705,17 +1702,16 @@ CLEANUP: HWND APIENTRY NtUserSetCapture(HWND hWnd) { - DECLARE_RETURN(HWND); + HWND Ret; TRACE("Enter NtUserSetCapture(%p)\n", hWnd); UserEnterExclusive(); - RETURN( co_UserSetCapture(hWnd)); + Ret = co_UserSetCapture(hWnd); -CLEANUP: - TRACE("Leave NtUserSetCapture, ret=%p\n", _ret_); + TRACE("Leave NtUserSetCapture, ret=%p\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* @@ -1726,8 +1722,7 @@ NtUserSetFocus(HWND hWnd) { PWND Window; USER_REFERENCE_ENTRY Ref; - DECLARE_RETURN(HWND); - HWND ret; + HWND ret = NULL; TRACE("Enter NtUserSetFocus(%p)\n", hWnd); UserEnterExclusive(); @@ -1737,24 +1732,22 @@ NtUserSetFocus(HWND hWnd) if (!(Window = UserGetWindowObject(hWnd))) { ERR("NtUserSetFocus: Invalid handle 0x%p!\n",hWnd); - RETURN(NULL); + goto Exit; // Return NULL } UserRefObjectCo(Window, &Ref); ret = co_UserSetFocus(Window); UserDerefObjectCo(Window); - - RETURN(ret); } else { - RETURN( co_UserSetFocus(0)); + ret = co_UserSetFocus(NULL); } -CLEANUP: - TRACE("Leave NtUserSetFocus, ret=%p\n",_ret_); +Exit: + TRACE("Leave NtUserSetFocus, ret=%p\n", ret); UserLeave(); - END_CLEANUP; + return ret; } /* EOF */ diff --git a/win32ss/user/ntuser/hook.c b/win32ss/user/ntuser/hook.c index b9879c01320..b9da033e07b 100644 --- a/win32ss/user/ntuser/hook.c +++ b/win32ss/user/ntuser/hook.c @@ -1376,7 +1376,6 @@ NtUserCallNextHookEx( int Code, PHOOK HookObj, NextObj; PCLIENTINFO ClientInfo; LRESULT lResult = 0; - DECLARE_RETURN(LRESULT); TRACE("Enter NtUserCallNextHookEx\n"); UserEnterExclusive(); @@ -1385,7 +1384,8 @@ NtUserCallNextHookEx( int Code, HookObj = pti->sphkCurrent; - if (!HookObj) RETURN( 0); + if (!HookObj) + goto Exit; // Return 0 NextObj = HookObj->phkNext; @@ -1407,12 +1407,11 @@ NtUserCallNextHookEx( int Code, NextObj->phkNext = IntGetNextHook(NextObj); lResult = co_UserCallNextHookEx( NextObj, Code, wParam, lParam, NextObj->Ansi); } - RETURN( lResult); -CLEANUP: - TRACE("Leave NtUserCallNextHookEx, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserCallNextHookEx, ret=%i\n", lResult); UserLeave(); - END_CLEANUP; + return lResult; } HHOOK @@ -1450,7 +1449,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, NTSTATUS Status; HHOOK Handle; PTHREADINFO pti, ptiHook = NULL; - DECLARE_RETURN(HHOOK); + HHOOK Ret = NULL; TRACE("Enter NtUserSetWindowsHookEx\n"); UserEnterExclusive(); @@ -1460,13 +1459,13 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, if (HookId < WH_MINHOOK || WH_MAXHOOK < HookId ) { EngSetLastError(ERROR_INVALID_HOOK_FILTER); - RETURN( NULL); + goto Cleanup; // Return NULL } if (!HookProc) { EngSetLastError(ERROR_INVALID_FILTER_PROC); - RETURN( NULL); + goto Cleanup; // Return NULL } if (ThreadId) /* thread-local hook */ @@ -1480,21 +1479,21 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, TRACE("Local hook installing Global HookId: %d\n",HookId); /* these can only be global */ EngSetLastError(ERROR_GLOBAL_ONLY_HOOK); - RETURN( NULL); + goto Cleanup; // Return NULL } if ( !(ptiHook = IntTID2PTI( UlongToHandle(ThreadId) ))) { ERR("Invalid thread id 0x%x\n", ThreadId); EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN( NULL); + goto Cleanup; // Return NULL } if ( ptiHook->rpdesk != pti->rpdesk) // gptiCurrent->rpdesk) { ERR("Local hook wrong desktop HookId: %d\n",HookId); EngSetLastError(ERROR_ACCESS_DENIED); - RETURN( NULL); + goto Cleanup; // Return NULL } if (ptiHook->ppi != pti->ppi) @@ -1511,7 +1510,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, { ERR("Local hook needs hMod HookId: %d\n",HookId); EngSetLastError(ERROR_HOOK_NEEDS_HMOD); - RETURN( NULL); + goto Cleanup; // Return NULL } if ( (ptiHook->TIF_flags & (TIF_CSRSSTHREAD|TIF_SYSTEMTHREAD)) && @@ -1525,7 +1524,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, HookId == WH_CALLWNDPROCRET) ) { EngSetLastError(ERROR_HOOK_TYPE_NOT_ALLOWED); - RETURN( NULL); + goto Cleanup; // Return NULL } } } @@ -1545,7 +1544,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, { ERR("Global hook needs hMod HookId: %d\n",HookId); EngSetLastError(ERROR_HOOK_NEEDS_HMOD); - RETURN( NULL); + goto Cleanup; // Return NULL } } @@ -1558,7 +1557,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, if (!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN( NULL); + goto Cleanup; // Return NULL } ObDereferenceObject(WinStaObj); @@ -1566,7 +1565,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, if (!Hook) { - RETURN( NULL); + goto Cleanup; // Return NULL } Hook->ihmod = (INT_PTR)Mod; // Module Index from atom table, Do this for now. @@ -1640,7 +1639,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, { IntRemoveHook(Hook); SetLastNtError(Status); - RETURN( NULL); + goto Cleanup; // Return NULL } Hook->ModuleName.Buffer = ExAllocatePoolWithTag( PagedPool, @@ -1650,7 +1649,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, { IntRemoveHook(Hook); EngSetLastError(ERROR_NOT_ENOUGH_MEMORY); - RETURN( NULL); + goto Cleanup; // Return NULL } Hook->ModuleName.MaximumLength = ModuleName.MaximumLength; @@ -1663,7 +1662,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, Hook->ModuleName.Buffer = NULL; IntRemoveHook(Hook); SetLastNtError(Status); - RETURN( NULL); + goto Cleanup; // Return NULL } Hook->ModuleName.Length = ModuleName.Length; @@ -1677,14 +1676,14 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, Hook->offPfn = 0; TRACE("Installing: HookId %d Global %s\n", HookId, !ThreadId ? "TRUE" : "FALSE"); - RETURN( Handle); + Ret = Handle; -CLEANUP: +Cleanup: if (Hook) UserDereferenceObject(Hook); - TRACE("Leave NtUserSetWindowsHookEx, ret=%p\n", _ret_); + TRACE("Leave NtUserSetWindowsHookEx, ret=%p\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } BOOL @@ -1692,7 +1691,7 @@ APIENTRY NtUserUnhookWindowsHookEx(HHOOK Hook) { PHOOK HookObj; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; TRACE("Enter NtUserUnhookWindowsHookEx\n"); UserEnterExclusive(); @@ -1701,7 +1700,7 @@ NtUserUnhookWindowsHookEx(HHOOK Hook) { ERR("Invalid handle passed to NtUserUnhookWindowsHookEx\n"); /* SetLastNtError(Status); */ - RETURN( FALSE); + goto Exit; // Return FALSE } ASSERT(Hook == UserHMGetHandle(HookObj)); @@ -1710,12 +1709,12 @@ NtUserUnhookWindowsHookEx(HHOOK Hook) UserDereferenceObject(HookObj); - RETURN( TRUE); + Ret = TRUE; -CLEANUP: - TRACE("Leave NtUserUnhookWindowsHookEx, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserUnhookWindowsHookEx, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } BOOL diff --git a/win32ss/user/ntuser/message.c b/win32ss/user/ntuser/message.c index 78a7956d88b..92d00192712 100644 --- a/win32ss/user/ntuser/message.c +++ b/win32ss/user/ntuser/message.c @@ -1466,20 +1466,20 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, ULONG_PTR *uResult ) { NTSTATUS Status = STATUS_SUCCESS; - PWND Window = NULL; + PWND Window; PMSGMEMORY MsgMemoryEntry; INT lParamBufferSize; LPARAM lParamPacked; PTHREADINFO Win32Thread, ptiSendTo = NULL; ULONG_PTR Result = 0; - DECLARE_RETURN(LRESULT); + LRESULT Ret = FALSE; USER_REFERENCE_ENTRY Ref; BOOL DoCallBack = TRUE; if (!(Window = UserGetWindowObject(hWnd))) { TRACE("SendMessageTimeoutSingle: Invalid handle 0x%p!\n",hWnd); - RETURN( FALSE); + return FALSE; } UserRefObjectCo(Window, &Ref); @@ -1493,7 +1493,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, if (!IntDdeSendMessageHook(Window, Msg, wParam, lParam)) { ERR("Sending Exit DDE 0x%x\n",Msg); - RETURN( FALSE); + goto Cleanup; // Return FALSE } } @@ -1502,7 +1502,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, if (Win32Thread->TIF_flags & TIF_INCLEANUP) { /* Never send messages to exiting threads */ - RETURN( FALSE); + goto Cleanup; // Return FALSE } if (Msg & 0x80000000) @@ -1510,7 +1510,8 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, TRACE("SMTS: Internal Message!\n"); Result = (ULONG_PTR)handle_internal_message( Window, Msg, wParam, lParam ); if (uResult) *uResult = Result; - RETURN( TRUE); + Ret = TRUE; + goto Cleanup; } // Only happens when calling the client! @@ -1523,7 +1524,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, if (IoGetRemainingStackSize() < PAGE_SIZE) { ERR("Server Callback Exceeded Stack!\n"); - RETURN( FALSE); + goto Cleanup; // Return FALSE } /* Return after server side call, IntCallWndProcRet will not be called. */ switch(Window->fnid) @@ -1541,7 +1542,8 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, if (!DoCallBack) { if (uResult) *uResult = Result; - RETURN( TRUE); + Ret = TRUE; + goto Cleanup; } } /* See if this message type is present in the table */ @@ -1560,7 +1562,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, if (! NT_SUCCESS(PackParam(&lParamPacked, Msg, wParam, lParam, FALSE))) { ERR("Failed to pack message parameters\n"); - RETURN( FALSE); + goto Cleanup; // Return FALSE } Result = (ULONG_PTR)co_IntCallWindowProc( Window->lpfnWndProc, @@ -1578,20 +1580,22 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, if (! NT_SUCCESS(UnpackParam(lParamPacked, Msg, wParam, lParam, FALSE))) { ERR("Failed to unpack message parameters\n"); - RETURN( TRUE); + Ret = TRUE; + goto Cleanup; } // Only happens when calling the client! IntCallWndProcRet( Window, hWnd, Msg, wParam, lParam, (LRESULT *)uResult); - RETURN( TRUE); + Ret = TRUE; + goto Cleanup; } if (Window->state & WNDS_DESTROYED) { /* FIXME: Last error? */ ERR("Attempted to send message to window %p that is being destroyed!\n", hWnd); - RETURN( FALSE); + goto Cleanup; // Return FALSE } if ((uFlags & SMTO_ABORTIFHUNG) && MsqIsHung(ptiSendTo, 4 * MSQ_HUNG)) @@ -1599,7 +1603,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, // FIXME: Set window hung and add to a list. /* FIXME: Set a LastError? */ ERR("Window %p (%p) (pti %p) is hung!\n", hWnd, Window, ptiSendTo); - RETURN( FALSE); + goto Cleanup; // Return FALSE } do @@ -1634,19 +1638,19 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, * returns ERROR_TIMEOUT, then the function timed out. */ EngSetLastError(ERROR_TIMEOUT); - RETURN( FALSE); + goto Cleanup; // Return FALSE } else if (!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN( FALSE); + goto Cleanup; // Return FALSE } - RETURN( TRUE); + Ret = TRUE; -CLEANUP: - if (Window) UserDerefObjectCo(Window); - END_CLEANUP; +Cleanup: + UserDerefObjectCo(Window); + return Ret; } LRESULT FASTCALL @@ -1737,12 +1741,12 @@ co_IntSendMessageWithCallBack(HWND hWnd, ULONG_PTR *uResult) { ULONG_PTR Result; - PWND Window = NULL; + PWND Window; PMSGMEMORY MsgMemoryEntry; INT lParamBufferSize; LPARAM lParamPacked; PTHREADINFO Win32Thread, ptiSendTo = NULL; - DECLARE_RETURN(LRESULT); + LRESULT Ret = FALSE; USER_REFERENCE_ENTRY Ref; PUSER_SENT_MESSAGE Message; BOOL DoCallBack = TRUE; @@ -1750,7 +1754,7 @@ co_IntSendMessageWithCallBack(HWND hWnd, if (!(Window = UserGetWindowObject(hWnd))) { TRACE("SendMessageWithCallBack: Invalid handle 0x%p\n",hWnd); - RETURN(FALSE); + return FALSE; } UserRefObjectCo(Window, &Ref); @@ -1759,25 +1763,27 @@ co_IntSendMessageWithCallBack(HWND hWnd, { /* FIXME: last error? */ ERR("Attempted to send message to window %p that is being destroyed\n", hWnd); - RETURN(FALSE); + goto Cleanup; // Return FALSE } Win32Thread = PsGetCurrentThreadWin32Thread(); if (Win32Thread == NULL || Win32Thread->TIF_flags & TIF_INCLEANUP) - RETURN(FALSE); + goto Cleanup; // Return FALSE ptiSendTo = IntSendTo(Window, Win32Thread, Msg); if (Msg & 0x80000000 && !ptiSendTo) { - if (Win32Thread->TIF_flags & TIF_INCLEANUP) RETURN(FALSE); + if (Win32Thread->TIF_flags & TIF_INCLEANUP) + goto Cleanup; // Return FALSE TRACE("SMWCB: Internal Message\n"); Result = (ULONG_PTR)handle_internal_message(Window, Msg, wParam, lParam); if (uResult) *uResult = Result; - RETURN(TRUE); + Ret = TRUE; + goto Cleanup; } /* See if this message type is present in the table */ @@ -1795,7 +1801,7 @@ co_IntSendMessageWithCallBack(HWND hWnd, if (!NT_SUCCESS(PackParam(&lParamPacked, Msg, wParam, lParam, !!ptiSendTo))) { ERR("Failed to pack message parameters\n"); - RETURN(FALSE); + goto Cleanup; // Return FALSE } /* If it can be sent now, then send it. */ @@ -1805,7 +1811,7 @@ co_IntSendMessageWithCallBack(HWND hWnd, { UnpackParam(lParamPacked, Msg, wParam, lParam, FALSE); /* Never send messages to exiting threads */ - RETURN(FALSE); + goto Cleanup; // Return FALSE } IntCallWndProc(Window, hWnd, Msg, wParam, lParam); @@ -1858,13 +1864,14 @@ co_IntSendMessageWithCallBack(HWND hWnd, { ERR("Failed to unpack message parameters\n"); } - RETURN(TRUE); + Ret = TRUE; + goto Cleanup; } if(!(Message = AllocateUserMessage(FALSE))) { ERR("Failed to allocate message\n"); - RETURN(FALSE); + goto Cleanup; // Return FALSE } Message->Msg.hwnd = hWnd; @@ -1890,11 +1897,11 @@ co_IntSendMessageWithCallBack(HWND hWnd, InsertTailList(&ptiSendTo->SentMessagesListHead, &Message->ListEntry); MsqWakeQueue(ptiSendTo, QS_SENDMESSAGE, TRUE); - RETURN(TRUE); + Ret = TRUE; -CLEANUP: - if (Window) UserDerefObjectCo(Window); - END_CLEANUP; +Cleanup: + UserDerefObjectCo(Window); + return Ret; } #if 0 @@ -2156,7 +2163,7 @@ NtUserDragDetect( MSG msg; RECT rect; ULONG wDragWidth, wDragHeight; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; TRACE("Enter NtUserDragDetect(%p)\n", hWnd); UserEnterExclusive(); @@ -2181,7 +2188,7 @@ NtUserDragDetect( if ( msg.message == WM_LBUTTONUP ) { co_UserSetCapture(NULL); - RETURN( FALSE); + goto Exit; // Return FALSE } if ( msg.message == WM_MOUSEMOVE ) { @@ -2191,7 +2198,8 @@ NtUserDragDetect( if( !RECTL_bPointInRect( &rect, tmp.x, tmp.y ) ) { co_UserSetCapture(NULL); - RETURN( TRUE); + Ret = TRUE; + goto Exit; } } if ( msg.message == WM_KEYDOWN ) @@ -2199,7 +2207,8 @@ NtUserDragDetect( if ( msg.wParam == VK_ESCAPE ) { co_UserSetCapture(NULL); - RETURN( TRUE); + Ret = TRUE; + goto Exit; } } if ( msg.message == WM_QUEUESYNC ) @@ -2209,12 +2218,11 @@ NtUserDragDetect( } co_IntWaitMessage(NULL, 0, 0); } - RETURN( FALSE); -CLEANUP: - TRACE("Leave NtUserDragDetect, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserDragDetect, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } BOOL APIENTRY diff --git a/win32ss/user/ntuser/misc.c b/win32ss/user/ntuser/misc.c index b5b0f27ac0a..b1da3935d67 100644 --- a/win32ss/user/ntuser/misc.c +++ b/win32ss/user/ntuser/misc.c @@ -410,8 +410,7 @@ NtUserGetGUIThreadInfo( PDESKTOP Desktop; PUSER_MESSAGE_QUEUE MsgQueue; PTHREADINFO W32Thread, pti; - - DECLARE_RETURN(BOOLEAN); + BOOL Ret = FALSE; TRACE("Enter NtUserGetGUIThreadInfo\n"); UserEnterShared(); @@ -420,13 +419,13 @@ NtUserGetGUIThreadInfo( if(!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN( FALSE); + goto Exit; // Return FALSE } if(SafeGui.cbSize != sizeof(GUITHREADINFO)) { EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN( FALSE); + goto Exit; // Return FALSE } if (idThread) @@ -439,7 +438,7 @@ NtUserGetGUIThreadInfo( if ( !W32Thread ) { EngSetLastError(ERROR_ACCESS_DENIED); - RETURN( FALSE); + goto Exit; // Return FALSE } Desktop = W32Thread->rpdesk; @@ -448,7 +447,7 @@ NtUserGetGUIThreadInfo( if ( !Desktop || Desktop != pti->rpdesk ) { EngSetLastError(ERROR_ACCESS_DENIED); - RETURN( FALSE); + goto Exit; // Return FALSE } if ( W32Thread->MessageQueue ) @@ -465,7 +464,7 @@ NtUserGetGUIThreadInfo( if(!MsgQueue) { EngSetLastError(ERROR_ACCESS_DENIED); - RETURN( FALSE); + goto Exit; // Return FALSE } } @@ -518,15 +517,15 @@ NtUserGetGUIThreadInfo( if(!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN( FALSE); + goto Exit; // Return FALSE } - RETURN( TRUE); + Ret = TRUE; -CLEANUP: - TRACE("Leave NtUserGetGUIThreadInfo, ret=%u\n",_ret_); +Exit: + TRACE("Leave NtUserGetGUIThreadInfo, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } @@ -540,7 +539,6 @@ NtUserGetGuiResources( PPROCESSINFO W32Process; NTSTATUS Status; DWORD Ret = 0; - DECLARE_RETURN(DWORD); TRACE("Enter NtUserGetGuiResources\n"); UserEnterShared(); @@ -555,7 +553,7 @@ NtUserGetGuiResources( if(!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN( 0); + goto Exit; // Return 0 } W32Process = (PPROCESSINFO)Process->Win32Process; @@ -563,7 +561,7 @@ NtUserGetGuiResources( { ObDereferenceObject(Process); EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN( 0); + goto Exit; // Return 0 } switch(uiFlags) @@ -587,12 +585,10 @@ NtUserGetGuiResources( ObDereferenceObject(Process); - RETURN( Ret); - -CLEANUP: - TRACE("Leave NtUserGetGuiResources, ret=%lu\n",_ret_); +Exit: + TRACE("Leave NtUserGetGuiResources, ret=%lu\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } VOID FASTCALL diff --git a/win32ss/user/ntuser/ntuser.h b/win32ss/user/ntuser/ntuser.h index 7c878c4f793..28b9ac6e59c 100644 --- a/win32ss/user/ntuser/ntuser.h +++ b/win32ss/user/ntuser/ntuser.h @@ -1,10 +1,5 @@ #pragma once -#define DECLARE_RETURN(type) type _ret_ -#define RETURN(value) { _ret_ = value; goto _cleanup_; } -#define CLEANUP /*unreachable*/ ASSERT(FALSE); _cleanup_ -#define END_CLEANUP return _ret_; - #define UserEnterCo UserEnterExclusive #define UserLeaveCo UserLeave diff --git a/win32ss/user/ntuser/object.c b/win32ss/user/ntuser/object.c index d0b4b4cf364..36be69bedd4 100644 --- a/win32ss/user/ntuser/object.c +++ b/win32ss/user/ntuser/object.c @@ -795,14 +795,14 @@ NtUserValidateHandleSecure( UINT uType; PPROCESSINFO ppi; PUSER_HANDLE_ENTRY entry; + BOOL Ret = FALSE; - DECLARE_RETURN(BOOL); UserEnterExclusive(); if (!(entry = handle_to_entry(gHandleTable, handle ))) { EngSetLastError(ERROR_INVALID_HANDLE); - RETURN( FALSE); + goto Exit; // Return FALSE } uType = entry->type; switch (uType) @@ -824,16 +824,15 @@ NtUserValidateHandleSecure( break; } - if (!ppi) RETURN( FALSE); + if (!ppi) + goto Exit; // Return FALSE // Same process job returns TRUE. - if (gptiCurrent->ppi->pW32Job == ppi->pW32Job) RETURN( TRUE); + if (gptiCurrent->ppi->pW32Job == ppi->pW32Job) Ret = TRUE; - RETURN( FALSE); - -CLEANUP: +Exit: UserLeave(); - END_CLEANUP; + return Ret; } // Win: HMAssignmentLock diff --git a/win32ss/user/ntuser/painting.c b/win32ss/user/ntuser/painting.c index 57e006b7312..a79a631fbd1 100644 --- a/win32ss/user/ntuser/painting.c +++ b/win32ss/user/ntuser/painting.c @@ -1607,19 +1607,19 @@ IntFillWindow(PWND pWndParent, HDC APIENTRY NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs) { - PWND Window = NULL; + PWND Window; PAINTSTRUCT Ps; NTSTATUS Status; HDC hDC; USER_REFERENCE_ENTRY Ref; - DECLARE_RETURN(HDC); + HDC Ret = NULL; TRACE("Enter NtUserBeginPaint\n"); UserEnterExclusive(); if (!(Window = UserGetWindowObject(hWnd))) { - RETURN( NULL); + goto Cleanup; // Return NULL } UserRefObjectCo(Window, &Ref); @@ -1630,18 +1630,17 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs) if (! NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN(NULL); + goto Cleanup; // Return NULL } - RETURN(hDC); + Ret = hDC; -CLEANUP: +Cleanup: if (Window) UserDerefObjectCo(Window); - TRACE("Leave NtUserBeginPaint, ret=%p\n",_ret_); + TRACE("Leave NtUserBeginPaint, ret=%p\n", Ret); UserLeave(); - END_CLEANUP; - + return Ret; } /* @@ -1655,17 +1654,17 @@ BOOL APIENTRY NtUserEndPaint(HWND hWnd, CONST PAINTSTRUCT* pUnsafePs) { NTSTATUS Status = STATUS_SUCCESS; - PWND Window = NULL; + PWND Window; PAINTSTRUCT Ps; USER_REFERENCE_ENTRY Ref; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; TRACE("Enter NtUserEndPaint\n"); UserEnterExclusive(); if (!(Window = UserGetWindowObject(hWnd))) { - RETURN(FALSE); + goto Cleanup; // Return FALSE } UserRefObjectCo(Window, &Ref); // Here for the exception. @@ -1682,17 +1681,17 @@ NtUserEndPaint(HWND hWnd, CONST PAINTSTRUCT* pUnsafePs) _SEH2_END if (!NT_SUCCESS(Status)) { - RETURN(FALSE); + goto Cleanup; // Return FALSE } - RETURN(IntEndPaint(Window, &Ps)); + Ret = IntEndPaint(Window, &Ps); -CLEANUP: +Cleanup: if (Window) UserDerefObjectCo(Window); - TRACE("Leave NtUserEndPaint, ret=%i\n",_ret_); + TRACE("Leave NtUserEndPaint, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* @@ -1928,26 +1927,21 @@ co_UserGetUpdateRect(PWND Window, PRECT pRect, BOOL bErase) INT APIENTRY NtUserGetUpdateRgn(HWND hWnd, HRGN hRgn, BOOL bErase) { - DECLARE_RETURN(INT); PWND Window; - INT ret; + INT ret = ERROR; TRACE("Enter NtUserGetUpdateRgn\n"); UserEnterExclusive(); - if (!(Window = UserGetWindowObject(hWnd))) + Window = UserGetWindowObject(hWnd); + if (Window) { - RETURN(ERROR); + ret = co_UserGetUpdateRgn(Window, hRgn, bErase); } - ret = co_UserGetUpdateRgn(Window, hRgn, bErase); - - RETURN(ret); - -CLEANUP: - TRACE("Leave NtUserGetUpdateRgn, ret=%i\n",_ret_); + TRACE("Leave NtUserGetUpdateRgn, ret=%i\n", ret); UserLeave(); - END_CLEANUP; + return ret; } /* @@ -1963,15 +1957,14 @@ NtUserGetUpdateRect(HWND hWnd, LPRECT UnsafeRect, BOOL bErase) PWND Window; RECTL Rect; NTSTATUS Status; - BOOL Ret; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; TRACE("Enter NtUserGetUpdateRect\n"); UserEnterExclusive(); if (!(Window = UserGetWindowObject(hWnd))) { - RETURN(FALSE); + goto Exit; // Return FALSE } Ret = co_UserGetUpdateRect(Window, &Rect, bErase); @@ -1982,16 +1975,14 @@ NtUserGetUpdateRect(HWND hWnd, LPRECT UnsafeRect, BOOL bErase) if (!NT_SUCCESS(Status)) { EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN(FALSE); + Ret = FALSE; } } - RETURN(Ret); - -CLEANUP: - TRACE("Leave NtUserGetUpdateRect, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserGetUpdateRect, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* @@ -2010,18 +2001,17 @@ NtUserRedrawWindow( { RECTL SafeUpdateRect; PWND Wnd; - BOOL Ret; + BOOL Ret = FALSE; USER_REFERENCE_ENTRY Ref; NTSTATUS Status = STATUS_SUCCESS; PREGION RgnUpdate = NULL; - DECLARE_RETURN(BOOL); TRACE("Enter NtUserRedrawWindow\n"); UserEnterExclusive(); if (!(Wnd = UserGetWindowObject(hWnd ? hWnd : IntGetDesktopWindow()))) { - RETURN( FALSE); + goto Exit; // Return FALSE } if (lprcUpdate) @@ -2039,7 +2029,7 @@ NtUserRedrawWindow( if (!NT_SUCCESS(Status)) { EngSetLastError(RtlNtStatusToDosError(Status)); - RETURN( FALSE); + goto Exit; // Return FALSE } } @@ -2049,7 +2039,7 @@ NtUserRedrawWindow( { /* RedrawWindow fails only in case that flags are invalid */ EngSetLastError(ERROR_INVALID_FLAGS); - RETURN( FALSE); + goto Exit; // Return FALSE } /* We can't hold lock on GDI objects while doing roundtrips to user mode, @@ -2061,7 +2051,7 @@ NtUserRedrawWindow( if (!RgnUpdate) { EngSetLastError(ERROR_NOT_ENOUGH_MEMORY); - RETURN(FALSE); + goto Exit; // Return FALSE } REGION_UnlockRgn(RgnUpdate); } @@ -2079,12 +2069,10 @@ NtUserRedrawWindow( UserDerefObjectCo(Wnd); - RETURN( Ret); - -CLEANUP: - TRACE("Leave NtUserRedrawWindow, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserRedrawWindow, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } BOOL diff --git a/win32ss/user/ntuser/scrollbar.c b/win32ss/user/ntuser/scrollbar.c index 63bb168ca34..0f1173bbd30 100644 --- a/win32ss/user/ntuser/scrollbar.c +++ b/win32ss/user/ntuser/scrollbar.c @@ -1144,8 +1144,7 @@ NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi) NTSTATUS Status; SCROLLBARINFO sbi; PWND Window; - BOOL Ret; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; USER_REFERENCE_ENTRY Ref; TRACE("Enter NtUserGetScrollBarInfo\n"); @@ -1155,11 +1154,11 @@ NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi) if(!NT_SUCCESS(Status) || (sbi.cbSize != sizeof(SCROLLBARINFO))) { SetLastNtError(Status); - RETURN(FALSE); + goto Exit; // Return FALSE } if(!(Window = UserGetWindowObject(hWnd))) - RETURN(FALSE); + goto Exit; // Return FALSE UserRefObjectCo(Window, &Ref); Ret = co_IntGetScrollBarInfo(Window, idObject, &sbi); @@ -1172,12 +1171,10 @@ NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi) Ret = FALSE; } - RETURN(Ret); - -CLEANUP: - TRACE("Leave NtUserGetScrollBarInfo, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserGetScrollBarInfo, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } BOOL @@ -1190,9 +1187,8 @@ NtUserSBGetParms( { PWND Window; SCROLLINFO psi; - BOOL Ret; + BOOL Ret = FALSE; SBDATA SBDataSafe; - DECLARE_RETURN(BOOL); USER_REFERENCE_ENTRY Ref; TRACE("Enter NtUserGetScrollInfo\n"); @@ -1208,14 +1204,14 @@ NtUserSBGetParms( { ERR("NtUserGetScrollInfo Failed size\n"); SetLastNtError(_SEH2_GetExceptionCode()); - _SEH2_YIELD(RETURN(FALSE)); + _SEH2_YIELD(goto Exit); // Return FALSE } _SEH2_END if(!(Window = UserGetWindowObject(hWnd))) { ERR("NtUserGetScrollInfo Bad window\n"); - RETURN(FALSE); + goto Exit; // Return FALSE } UserRefObjectCo(Window, &Ref); @@ -1230,16 +1226,15 @@ NtUserSBGetParms( { ERR("NtUserGetScrollInfo Failed copy to user\n"); SetLastNtError(_SEH2_GetExceptionCode()); - _SEH2_YIELD(RETURN(FALSE)); + Ret = FALSE; + _SEH2_YIELD(goto Exit); } _SEH2_END - RETURN(Ret); - -CLEANUP: - TRACE("Leave NtUserGetScrollInfo, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserGetScrollInfo, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } BOOL @@ -1253,19 +1248,19 @@ NtUserEnableScrollBar( PWND Window = NULL; PSCROLLBARINFO InfoV = NULL, InfoH = NULL; BOOL Chg = FALSE; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; USER_REFERENCE_ENTRY Ref; TRACE("Enter NtUserEnableScrollBar\n"); UserEnterExclusive(); if (!(Window = UserGetWindowObject(hWnd)) || UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) - RETURN(FALSE); + goto Cleanup; // Return FALSE UserRefObjectCo(Window, &Ref); if (!co_IntCreateScrollBars(Window)) - RETURN(FALSE); + goto Cleanup; // Return FALSE OrigArrows = Window->pSBInfo->WSBflags; Window->pSBInfo->WSBflags = wArrows; @@ -1275,14 +1270,15 @@ NtUserEnableScrollBar( if ((wArrows == ESB_DISABLE_BOTH || wArrows == ESB_ENABLE_BOTH)) IntEnableWindow(hWnd, (wArrows == ESB_ENABLE_BOTH)); - RETURN(TRUE); + Ret = TRUE; + goto Cleanup; } if(wSBflags != SB_BOTH && !SBID_IS_VALID(wSBflags)) { EngSetLastError(ERROR_INVALID_PARAMETER); ERR("Trying to set scrollinfo for unknown scrollbar type %u\n", wSBflags); - RETURN(FALSE); + goto Cleanup; // Return FALSE } switch(wSBflags) @@ -1297,7 +1293,7 @@ NtUserEnableScrollBar( InfoV = IntGetScrollbarInfoFromWindow(Window, SB_VERT); break; default: - RETURN(FALSE); + goto Cleanup; // Return FALSE } if(InfoV) @@ -1310,17 +1306,24 @@ NtUserEnableScrollBar( // Done in user32: // SCROLL_RefreshScrollBar(hwnd, nBar, TRUE, TRUE); - RETURN(Chg); - if (OrigArrows == wArrows) RETURN(FALSE); - RETURN(TRUE); + Ret = Chg; + goto Cleanup; // FIXME + + if (OrigArrows == wArrows) + { + Ret = FALSE; + goto Cleanup; + } + + Ret = TRUE; -CLEANUP: +Cleanup: if (Window) UserDerefObjectCo(Window); - TRACE("Leave NtUserEnableScrollBar, ret=%i\n",_ret_); + TRACE("Leave NtUserEnableScrollBar, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } DWORD @@ -1334,14 +1337,14 @@ NtUserSetScrollInfo( PWND Window = NULL; NTSTATUS Status; SCROLLINFO ScrollInfo; - DECLARE_RETURN(DWORD); + DWORD Ret = 0; USER_REFERENCE_ENTRY Ref; TRACE("Enter NtUserSetScrollInfo\n"); UserEnterExclusive(); if(!(Window = UserGetWindowObject(hWnd)) || UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) - RETURN(0); + goto Cleanup; // Return 0 UserRefObjectCo(Window, &Ref); @@ -1349,45 +1352,42 @@ NtUserSetScrollInfo( if(!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN(0); + goto Cleanup; // Return 0 } - RETURN(co_IntSetScrollInfo(Window, fnBar, &ScrollInfo, bRedraw)); + Ret = co_IntSetScrollInfo(Window, fnBar, &ScrollInfo, bRedraw); -CLEANUP: +Cleanup: if (Window) UserDerefObjectCo(Window); - TRACE("Leave NtUserSetScrollInfo, ret=%lu\n", _ret_); + TRACE("Leave NtUserSetScrollInfo, ret=%lu\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } DWORD APIENTRY NtUserShowScrollBar(HWND hWnd, int nBar, DWORD bShow) { PWND Window; - DECLARE_RETURN(DWORD); - DWORD ret; + DWORD ret = 0; USER_REFERENCE_ENTRY Ref; TRACE("Enter NtUserShowScrollBar\n"); UserEnterExclusive(); - if (!(Window = UserGetWindowObject(hWnd))) - RETURN(0); - - UserRefObjectCo(Window, &Ref); - ret = co_UserShowScrollBar(Window, nBar, (nBar == SB_VERT) ? 0 : bShow, - (nBar == SB_HORZ) ? 0 : bShow); - UserDerefObjectCo(Window); - - RETURN(ret); + Window = UserGetWindowObject(hWnd); + if (Window) + { + UserRefObjectCo(Window, &Ref); + ret = co_UserShowScrollBar(Window, nBar, (nBar == SB_VERT) ? 0 : bShow, + (nBar == SB_HORZ) ? 0 : bShow); + UserDerefObjectCo(Window); + } -CLEANUP: - TRACE("Leave NtUserShowScrollBar, ret%lu\n", _ret_); + TRACE("Leave NtUserShowScrollBar, ret=%lu\n", ret); UserLeave(); - END_CLEANUP; + return ret; } // Ugly NtUser API @@ -1405,14 +1405,14 @@ NtUserSetScrollBarInfo( LPSCROLLINFO psi; NTSTATUS Status; LONG Obj; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; USER_REFERENCE_ENTRY Ref; TRACE("Enter NtUserSetScrollBarInfo\n"); UserEnterExclusive(); if(!(Window = UserGetWindowObject(hWnd))) - RETURN(FALSE); + goto Cleanup; // Return FALSE UserRefObjectCo(Window, &Ref); @@ -1421,17 +1421,17 @@ NtUserSetScrollBarInfo( { EngSetLastError(ERROR_INVALID_PARAMETER); ERR("Trying to set scrollinfo for unknown scrollbar type %d\n", Obj); - RETURN(FALSE); + goto Cleanup; // Return FALSE } if(!co_IntCreateScrollBars(Window)) - RETURN(FALSE); + goto Cleanup; // Return FALSE Status = MmCopyFromCaller(&Safeinfo, info, sizeof(SETSCROLLBARINFO)); if(!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN(FALSE); + goto Cleanup; // Return FALSE } sbi = IntGetScrollbarInfoFromWindow(Window, Obj); @@ -1441,15 +1441,15 @@ NtUserSetScrollBarInfo( sbi->reserved = Safeinfo.reserved; RtlCopyMemory(&sbi->rgstate, &Safeinfo.rgstate, sizeof(Safeinfo.rgstate)); - RETURN(TRUE); + Ret = TRUE; -CLEANUP: +Cleanup: if (Window) UserDerefObjectCo(Window); - TRACE("Leave NtUserSetScrollBarInfo, ret=%i\n",_ret_); + TRACE("Leave NtUserSetScrollBarInfo, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* EOF */ diff --git a/win32ss/user/ntuser/scrollex.c b/win32ss/user/ntuser/scrollex.c index 82f248ec367..32370fabfc8 100644 --- a/win32ss/user/ntuser/scrollex.c +++ b/win32ss/user/ntuser/scrollex.c @@ -481,7 +481,7 @@ NtUserScrollDC( HRGN hrgnUpdate, LPRECT prcUnsafeUpdate) { - DECLARE_RETURN(DWORD); + BOOL Ret = FALSE; DWORD Result; NTSTATUS Status = STATUS_SUCCESS; RECTL rcScroll, rcClip, rcUpdate; @@ -515,7 +515,7 @@ NtUserScrollDC( if (!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN(FALSE); + goto Exit; // Return FALSE } Result = UserScrollDC( hDC, @@ -529,7 +529,7 @@ NtUserScrollDC( if(Result == ERROR) { /* FIXME: Only if hRgnUpdate is invalid we should SetLastError(ERROR_INVALID_HANDLE) */ - RETURN(FALSE); + goto Exit; // Return FALSE } if (prcUnsafeUpdate) @@ -548,16 +548,16 @@ NtUserScrollDC( { /* FIXME: SetLastError? */ /* FIXME: correct? We have already scrolled! */ - RETURN(FALSE); + goto Exit; // Return FALSE } } - RETURN(TRUE); + Ret = TRUE; -CLEANUP: - TRACE("Leave NtUserScrollDC, ret=%lu\n",_ret_); +Exit: + TRACE("Leave NtUserScrollDC, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* @@ -578,8 +578,7 @@ NtUserScrollWindowEx( LPRECT prcUnsafeUpdate, UINT flags) { - DECLARE_RETURN(DWORD); - INT Result; + DWORD Result = ERROR; NTSTATUS Status = STATUS_SUCCESS; PWND Window = NULL; RECTL rcScroll, rcClip, rcUpdate; @@ -592,7 +591,7 @@ NtUserScrollWindowEx( if (!Window || !IntIsWindowDrawable(Window)) { Window = NULL; /* prevent deref at cleanup */ - RETURN(ERROR); + goto Cleanup; // Return ERROR } UserRefObjectCo(Window, &Ref); @@ -619,7 +618,7 @@ NtUserScrollWindowEx( if (!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN(ERROR); + goto Cleanup; // Return ERROR } Result = IntScrollWindowEx(Window, @@ -647,19 +646,17 @@ NtUserScrollWindowEx( if (!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN(ERROR); + Result = ERROR; } } - RETURN(Result); - -CLEANUP: +Cleanup: if (Window) UserDerefObjectCo(Window); - TRACE("Leave NtUserScrollWindowEx, ret=%lu\n",_ret_); + TRACE("Leave NtUserScrollWindowEx, ret=%lu\n", Result); UserLeave(); - END_CLEANUP; + return Result; } /* EOF */ diff --git a/win32ss/user/ntuser/windc.c b/win32ss/user/ntuser/windc.c index 0f2d2781e30..40163ad443d 100644 --- a/win32ss/user/ntuser/windc.c +++ b/win32ss/user/ntuser/windc.c @@ -974,7 +974,7 @@ HDC APIENTRY NtUserGetDCEx(HWND hWnd OPTIONAL, HANDLE ClipRegion, ULONG Flags) { PWND Wnd=NULL; - DECLARE_RETURN(HDC); + HDC Ret = NULL; TRACE("Enter NtUserGetDCEx: hWnd %p, ClipRegion %p, Flags %x.\n", hWnd, ClipRegion, Flags); @@ -982,14 +982,14 @@ NtUserGetDCEx(HWND hWnd OPTIONAL, HANDLE ClipRegion, ULONG Flags) if (hWnd && !(Wnd = UserGetWindowObject(hWnd))) { - RETURN(NULL); + goto Exit; // Return NULL } - RETURN( UserGetDCEx(Wnd, ClipRegion, Flags)); + Ret = UserGetDCEx(Wnd, ClipRegion, Flags); -CLEANUP: - TRACE("Leave NtUserGetDCEx, ret=%p\n", _ret_); +Exit: + TRACE("Leave NtUserGetDCEx, ret=%p\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* diff --git a/win32ss/user/ntuser/winpos.c b/win32ss/user/ntuser/winpos.c index 2ec319505d1..ccba1abcf9b 100644 --- a/win32ss/user/ntuser/winpos.c +++ b/win32ss/user/ntuser/winpos.c @@ -3392,21 +3392,21 @@ NtUserGetWindowPlacement(HWND hWnd, PWND Wnd; WINDOWPLACEMENT Safepl; NTSTATUS Status; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; TRACE("Enter NtUserGetWindowPlacement\n"); UserEnterShared(); if (!(Wnd = UserGetWindowObject(hWnd))) { - RETURN( FALSE); + goto Exit; // Return FALSE } Status = MmCopyFromCaller(&Safepl, lpwndpl, sizeof(WINDOWPLACEMENT)); if (!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN( FALSE); + goto Exit; // Return FALSE } Safepl.length = sizeof(WINDOWPLACEMENT); @@ -3417,15 +3417,15 @@ NtUserGetWindowPlacement(HWND hWnd, if (!NT_SUCCESS(Status)) { SetLastNtError(Status); - RETURN( FALSE); + goto Exit; // Return FALSE } - RETURN( TRUE); + Ret = TRUE; -CLEANUP: - TRACE("Leave NtUserGetWindowPlacement, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserGetWindowPlacement, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } DWORD @@ -3512,9 +3512,8 @@ NtUserSetWindowPos( int cy, UINT uFlags) { - DECLARE_RETURN(BOOL); PWND Window, pWndIA; - BOOL ret; + BOOL ret = FALSE; USER_REFERENCE_ENTRY Ref; TRACE("Enter NtUserSetWindowPos\n"); @@ -3524,7 +3523,7 @@ NtUserSetWindowPos( UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) { ERR("NtUserSetWindowPos bad window handle!\n"); - RETURN(FALSE); + goto Exit; // Return FALSE } if ( hWndInsertAfter != HWND_TOP && @@ -3536,7 +3535,7 @@ NtUserSetWindowPos( UserIsDesktopWindow(pWndIA) || UserIsMessageWindow(pWndIA)) { ERR("NtUserSetWindowPos bad insert window handle!\n"); - RETURN(FALSE); + goto Exit; // Return FALSE } } @@ -3560,12 +3559,10 @@ NtUserSetWindowPos( ret = co_WinPosSetWindowPos(Window, hWndInsertAfter, X, Y, cx, cy, uFlags); UserDerefObjectCo(Window); - RETURN(ret); - -CLEANUP: - TRACE("Leave NtUserSetWindowPos, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserSetWindowPos, ret=%i\n", ret); UserLeave(); - END_CLEANUP; + return ret; } /* @@ -3580,8 +3577,7 @@ NtUserSetWindowRgn( HRGN hrgnCopy = NULL; PWND Window; INT flags = (SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE); - BOOLEAN Ret = FALSE; - DECLARE_RETURN(INT); + INT Ret = 0; TRACE("Enter NtUserSetWindowRgn\n"); UserEnterExclusive(); @@ -3589,7 +3585,7 @@ NtUserSetWindowRgn( if (!(Window = UserGetWindowObject(hWnd)) || UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) { - RETURN( 0); + goto Exit; // Return 0 } if (hRgn) // The region will be deleted in user32. @@ -3602,7 +3598,7 @@ NtUserSetWindowRgn( NtGdiCombineRgn( hrgnCopy, hRgn, 0, RGN_COPY); } else - RETURN( 0); + goto Exit; // Return 0 } //// HACK 1 : Work around the lack of supporting DeferWindowPos. @@ -3615,14 +3611,12 @@ NtUserSetWindowRgn( Window->hrgnNewFrame = HRGN_WINDOW; } //// HACK 2 - Ret = co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, bRedraw ? flags : (flags|SWP_NOREDRAW) ); - - RETURN( (INT)Ret); + Ret = (INT)co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, bRedraw ? flags : (flags | SWP_NOREDRAW)); -CLEANUP: - TRACE("Leave NtUserSetWindowRgn, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserSetWindowRgn, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* @@ -3640,7 +3634,7 @@ NtUserSetInternalWindowPos( PWND Wnd; RECT rect; POINT pt = {0}; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; USER_REFERENCE_ENTRY Ref; TRACE("Enter NtUserSetWindowPlacement\n"); @@ -3649,7 +3643,7 @@ NtUserSetInternalWindowPos( if (!(Wnd = UserGetWindowObject(hwnd)) || // FIXME: UserIsDesktopWindow(Wnd) || UserIsMessageWindow(Wnd)) { - RETURN( FALSE); + goto Exit; // Return FALSE } _SEH2_TRY @@ -3668,7 +3662,7 @@ NtUserSetInternalWindowPos( _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { SetLastNtError(_SEH2_GetExceptionCode()); - _SEH2_YIELD(RETURN( FALSE)); + _SEH2_YIELD(goto Exit); // Return FALSE } _SEH2_END @@ -3691,12 +3685,12 @@ NtUserSetInternalWindowPos( UserRefObjectCo(Wnd, &Ref); IntSetWindowPlacement(Wnd, &wndpl, flags); UserDerefObjectCo(Wnd); - RETURN(TRUE); + Ret = TRUE; -CLEANUP: - TRACE("Leave NtUserSetWindowPlacement, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserSetWindowPlacement, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* @@ -3709,7 +3703,7 @@ NtUserSetWindowPlacement(HWND hWnd, PWND Wnd; WINDOWPLACEMENT Safepl; UINT Flags; - DECLARE_RETURN(BOOL); + BOOL Ret = FALSE; USER_REFERENCE_ENTRY Ref; TRACE("Enter NtUserSetWindowPlacement\n"); @@ -3718,7 +3712,7 @@ NtUserSetWindowPlacement(HWND hWnd, if (!(Wnd = UserGetWindowObject(hWnd)) || UserIsDesktopWindow(Wnd) || UserIsMessageWindow(Wnd)) { - RETURN( FALSE); + goto Exit; // Return FALSE } _SEH2_TRY @@ -3729,13 +3723,13 @@ NtUserSetWindowPlacement(HWND hWnd, _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { SetLastNtError(_SEH2_GetExceptionCode()); - _SEH2_YIELD(RETURN( FALSE)); + _SEH2_YIELD(goto Exit); // Return FALSE } _SEH2_END if(Safepl.length != sizeof(WINDOWPLACEMENT)) { - RETURN( FALSE); + goto Exit; // Return FALSE } Flags = PLACE_MAX | PLACE_RECT; @@ -3743,12 +3737,12 @@ NtUserSetWindowPlacement(HWND hWnd, UserRefObjectCo(Wnd, &Ref); IntSetWindowPlacement(Wnd, &Safepl, Flags); UserDerefObjectCo(Wnd); - RETURN(TRUE); + Ret = TRUE; -CLEANUP: - TRACE("Leave NtUserSetWindowPlacement, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserSetWindowPlacement, ret=%i\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* @@ -3758,8 +3752,8 @@ BOOL APIENTRY NtUserShowWindowAsync(HWND hWnd, LONG nCmdShow) { PWND Window; - BOOL ret; - DECLARE_RETURN(BOOL); + LRESULT Result; + BOOL ret = FALSE; USER_REFERENCE_ENTRY Ref; TRACE("Enter NtUserShowWindowAsync\n"); @@ -3768,26 +3762,24 @@ NtUserShowWindowAsync(HWND hWnd, LONG nCmdShow) if (!(Window = UserGetWindowObject(hWnd)) || UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) { - RETURN(FALSE); + goto Exit; // Return FALSE } if ( nCmdShow > SW_MAX ) { EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN(FALSE); + goto Exit; // Return FALSE } UserRefObjectCo(Window, &Ref); - ret = co_IntSendMessageNoWait( hWnd, WM_ASYNC_SHOWWINDOW, nCmdShow, 0 ); + Result = co_IntSendMessageNoWait( hWnd, WM_ASYNC_SHOWWINDOW, nCmdShow, 0 ); UserDerefObjectCo(Window); - if (-1 == (int) ret || !ret) ret = FALSE; - - RETURN(ret); + if (Result != -1 && Result != 0) ret = TRUE; -CLEANUP: - TRACE("Leave NtUserShowWindowAsync, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserShowWindowAsync, ret=%i\n", ret); UserLeave(); - END_CLEANUP; + return ret; } /* @@ -3797,8 +3789,7 @@ BOOL APIENTRY NtUserShowWindow(HWND hWnd, LONG nCmdShow) { PWND Window; - BOOL ret; - DECLARE_RETURN(BOOL); + BOOL ret = FALSE; USER_REFERENCE_ENTRY Ref; TRACE("Enter NtUserShowWindow hWnd %p SW_ %d\n",hWnd, nCmdShow); @@ -3807,25 +3798,23 @@ NtUserShowWindow(HWND hWnd, LONG nCmdShow) if (!(Window = UserGetWindowObject(hWnd)) || UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) { - RETURN(FALSE); + goto Exit; // Return FALSE } if ( nCmdShow > SW_MAX || Window->state2 & WNDS2_INDESTROY) { EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN(FALSE); + goto Exit; // Return FALSE } UserRefObjectCo(Window, &Ref); ret = co_WinPosShowWindow(Window, nCmdShow); UserDerefObjectCo(Window); - RETURN(ret); - -CLEANUP: - TRACE("Leave NtUserShowWindow, ret=%i\n",_ret_); +Exit: + TRACE("Leave NtUserShowWindow, ret=%i\n", ret); UserLeave(); - END_CLEANUP; + return ret; } @@ -3836,10 +3825,9 @@ HWND APIENTRY NtUserWindowFromPoint(LONG X, LONG Y) { POINT pt; - HWND Ret; - PWND DesktopWindow = NULL, Window = NULL; + HWND Ret = NULL; + PWND DesktopWindow, Window; USHORT hittest; - DECLARE_RETURN(HWND); USER_REFERENCE_ENTRY Ref; TRACE("Enter NtUserWindowFromPoint\n"); @@ -3858,23 +3846,17 @@ NtUserWindowFromPoint(LONG X, LONG Y) //pti = PsGetCurrentThreadWin32Thread(); Window = co_WinPosWindowFromPoint(DesktopWindow, &pt, &hittest, FALSE); - if (Window) { Ret = UserHMGetHandle(Window); - - RETURN( Ret); } - } - - RETURN( NULL); -CLEANUP: - if (DesktopWindow) UserDerefObjectCo(DesktopWindow); + UserDerefObjectCo(DesktopWindow); + } - TRACE("Leave NtUserWindowFromPoint, ret=%p\n", _ret_); + TRACE("Leave NtUserWindowFromPoint, ret=%p\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* EOF */
1 year
1
0
0
0
[reactos] 01/01: [SDK] msctf.idl: Add ITfCleanupContextSink
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f5b0c66a054be40da91b9…
commit f5b0c66a054be40da91b9332f2798045f29bc75b Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu Dec 21 12:44:07 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Thu Dec 21 12:44:07 2023 +0900 [SDK] msctf.idl: Add ITfCleanupContextSink CORE-19360 --- sdk/include/psdk/msctf.idl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sdk/include/psdk/msctf.idl b/sdk/include/psdk/msctf.idl index 4a4425f95fb..2cbb888f3d3 100644 --- a/sdk/include/psdk/msctf.idl +++ b/sdk/include/psdk/msctf.idl @@ -106,6 +106,7 @@ interface ITfCompositionView; interface ITfKeyEventSink; interface ITfPersistentPropertyLoaderACP; interface ITfRangeACP; +interface ITfCleanupContextSink; cpp_quote("#if 0") typedef [uuid(4f5d560f-5ab5-4dde-8c4d-404592857ab0)] UINT_PTR HKL; @@ -1508,6 +1509,18 @@ interface ITfCompositionSink : IUnknown [in] ITfComposition *pComposition); } +[ + object, + uuid(01689689-7acb-4e9b-ab7c-7ea46b12b522), + pointer_default(unique) +] +interface ITfCleanupContextSink : IUnknown +{ + HRESULT OnCleanupContext( + [in] TfEditCookie ecWrite, + [in] ITfContext *pic); +} + [ object, uuid(d40C8aae-aC92-4fc7-9a11-0ee0e23aa39b),
1 year
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
28
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
Results per page:
10
25
50
100
200