diff --git a/base/applications/dxdiag/display.c b/base/applications/dxdiag/display.c index eae055589f4..14228720d23 100644 --- a/base/applications/dxdiag/display.c +++ b/base/applications/dxdiag/display.c @@ -18,7 +18,6 @@ GetFileModifyTime(LPCWSTR pFullPath, WCHAR * szTime, int szTimeSize) FILETIME AccessTime; SYSTEMTIME SysTime, LocalTime; UINT Length; - TIME_ZONE_INFORMATION TimeInfo; hFile = CreateFileW(pFullPath, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); if (!hFile) @@ -31,13 +30,10 @@ GetFileModifyTime(LPCWSTR pFullPath, WCHAR * szTime, int szTimeSize) } CloseHandle(hFile); - if(!GetTimeZoneInformation(&TimeInfo)) - return FALSE; - if (!FileTimeToSystemTime(&AccessTime, &SysTime)) return FALSE; - if (!SystemTimeToTzSpecificLocalTime(&TimeInfo, &SysTime, &LocalTime)) + if (!SystemTimeToTzSpecificLocalTime(NULL, &SysTime, &LocalTime)) return FALSE; Length = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &LocalTime, NULL, szTime, szTimeSize); diff --git a/base/applications/mspaint/lang/hu-HU.rc b/base/applications/mspaint/lang/hu-HU.rc index 68235d94782..d5a42c8ff19 100644 --- a/base/applications/mspaint/lang/hu-HU.rc +++ b/base/applications/mspaint/lang/hu-HU.rc @@ -213,7 +213,7 @@ BEGIN END IDD_FONTS DIALOG 0, 0, 225, 25 -CAPTION "Fonts" +CAPTION "Betűtípusok" STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_TOOLWINDOW FONT 8, "MS Shell Dlg" @@ -256,13 +256,13 @@ BEGIN IDS_ANGLE "A szögnek -89 és 89 között kell lennie." IDS_LOADERRORTEXT "A(z) %s fájlt nem sikerült betölteni." IDS_ENLARGEPROMPTTEXT "A vágólapon lévő kép nagyobb mint a bitkép.\nSzeretné a bitkép méretét megnövelni?" - IDS_BOLD "Bold" - IDS_ITALIC "Italic" - IDS_UNDERLINE "Underline" - IDS_VERTICAL "Vertical" + IDS_BOLD "Félkövér" + IDS_ITALIC "Dőlt" + IDS_UNDERLINE "Aláhúzott" + IDS_VERTICAL "Függőleges" IDS_PRINTRES "%d x %d pixel/cm" - IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported." - IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s" - IDS_CANTSENDMAIL "Failed to send a mail." - IDS_LOSECOLOR "The color information will be lost in this operation. Are you sure to proceed?" + IDS_CANTPASTE "Nem sikerült a beillesztés a vágólapról. Hibás, vagy nem támogatott adatformátum." + IDS_SAVEERROR "Nem sikerült a bitkép mentése az alábbi fájlba:\n\n%s" + IDS_CANTSENDMAIL "Nem sikerült az email küldése." + IDS_LOSECOLOR "A színinformációk el fognak veszni a művelet során. Biztosan folytatja?" END diff --git a/base/applications/notepad/dialog.c b/base/applications/notepad/dialog.c index 2867ea11ff5..32d9c8bd777 100644 --- a/base/applications/notepad/dialog.c +++ b/base/applications/notepad/dialog.c @@ -164,7 +164,7 @@ int DIALOG_StringMsgBox(HWND hParent, int formatId, LPCTSTR szString, DWORD dwFl /* Load and format szMessage */ LoadString(Globals.hInstance, formatId, szResource, _countof(szResource)); - _sntprintf(szMessage, _countof(szMessage), szResource, szString); + StringCchPrintf(szMessage, _countof(szMessage), szResource, szString); /* Load szCaption */ if ((dwFlags & MB_ICONMASK) == MB_ICONEXCLAMATION) @@ -865,6 +865,10 @@ VOID DIALOG_GoTo(VOID) else ich = (INT)SendMessage(Globals.hEdit, EM_LINEINDEX, GotoData.iLine, 0); + /* EM_LINEINDEX can return -1 on failure */ + if (ich < 0) + ich = 0; + /* Move the caret */ SendMessage(Globals.hEdit, EM_SETSEL, ich, ich); SendMessage(Globals.hEdit, EM_SCROLLCARET, 0, 0); @@ -872,15 +876,18 @@ VOID DIALOG_GoTo(VOID) VOID DIALOG_StatusBarUpdateCaretPos(VOID) { - int line, col; + int line, ich, col; TCHAR buff[MAX_PATH]; DWORD dwStart, dwSize; SendMessage(Globals.hEdit, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwSize); line = SendMessage(Globals.hEdit, EM_LINEFROMCHAR, (WPARAM)dwStart, 0); - col = dwStart - SendMessage(Globals.hEdit, EM_LINEINDEX, (WPARAM)line, 0); + ich = (int)SendMessage(Globals.hEdit, EM_LINEINDEX, (WPARAM)line, 0); + + /* EM_LINEINDEX can return -1 on failure */ + col = ((ich < 0) ? 0 : (dwStart - ich)); - _stprintf(buff, Globals.szStatusBarLineCol, line + 1, col + 1); + StringCchPrintf(buff, _countof(buff), Globals.szStatusBarLineCol, line + 1, col + 1); SendMessage(Globals.hStatusBar, SB_SETTEXT, SBPART_CURPOS, (LPARAM)buff); } diff --git a/base/applications/notepad/lang/hi-IN.rc b/base/applications/notepad/lang/hi-IN.rc index 5c568dc677e..59b16bb6cc6 100644 --- a/base/applications/notepad/lang/hi-IN.rc +++ b/base/applications/notepad/lang/hi-IN.rc @@ -1,8 +1,8 @@ /* - * PROJECT: Notepad Hindi Translation - * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) - * PURPOSE: Hindi Translation Of Notepad - * COPYRIGHT: Copyright 2018 Arnav Bhatt (arnavbhatt2004@gmail.com) + * PROJECT: ReactOS Notepad + * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) + * PURPOSE: Hindi (India) resource file + * TRANSLATOR: Copyright 2018 Arnav Bhatt */ LANGUAGE LANG_HINDI, SUBLANG_HINDI_INDIA @@ -159,7 +159,7 @@ BEGIN STRING_UNTITLED "शीर्षकहीन" STRING_ALL_FILES "सभी फाइलें (*.*)" STRING_TEXT_FILES_TXT "पाठ फाइलें (*.txt)" - STRING_TOOLARGE "नोटपैड के लिए फ़ाइल '% s' बहुत बड़ी है।\n\ + STRING_TOOLARGE "नोटपैड के लिए फ़ाइल '%s' बहुत बड़ी है।\n\ कृपया एक अलग इडिटर का प्रयोग करें।" STRING_NOTEXT "आपने कोई टेक्स्ट दर्ज नहीं किया है।\ \nकृपया कुछ टाइप करें और पुनः प्रयास करें" diff --git a/base/applications/notepad/lang/hu-HU.rc b/base/applications/notepad/lang/hu-HU.rc index 18e368941c7..1f419e614c7 100644 --- a/base/applications/notepad/lang/hu-HU.rc +++ b/base/applications/notepad/lang/hu-HU.rc @@ -131,12 +131,12 @@ BEGIN END DIALOG_PRINTING DIALOG 0, 0, 160, 100 -CAPTION "Now printing" +CAPTION "Nyomtatás folyamatban" STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" BEGIN - CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15 - CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 + CTEXT "A nyomtatási feladat indul...", IDC_PRINTING_STATUS, 5, 10, 150, 15 + CTEXT "(Fájlnév)", IDC_PRINTING_FILENAME, 5, 35, 150, 15 CTEXT "Oldalszám: %u", IDC_PRINTING_PAGE, 5, 55, 150, 15 PUSHBUTTON "Mégse", IDCANCEL, 50, 75, 60, 20 END @@ -176,12 +176,12 @@ Szeretné menteni a változásokat?" STRING_LINE_COLUMN "Sor: %d, oszlop: %d" STRING_PRINTERROR "Nem sikerült kinyomtatni a következő fájlt: '%s'.\n\nEllenőrizze hogy a nyomtató be van-e kapcsolva és megfelelően van-e konfigurálva." STRING_DEFAULTFONT "Lucida Console" - STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range." - STRING_NOWPRINTING "Now printing page..." - STRING_PRINTCANCELING "The print job is being canceled..." - STRING_PRINTCOMPLETE "Printing is successfully done." - STRING_PRINTCANCELED "Printing has been canceled." - STRING_PRINTFAILED "Printing is failed." + STRING_LINE_NUMBER_OUT_OF_RANGE "A megadott sorszám kívül esik az elérhető tartományon." + STRING_NOWPRINTING "Oldal nyomtatása folyamatban..." + STRING_PRINTCANCELING "A nyomtatási feladat megszakítása folyamatban..." + STRING_PRINTCOMPLETE "A nyomtatás sikeresen befejeződött." + STRING_PRINTCANCELED "A nyomtatást megszakították." + STRING_PRINTFAILED "A nyomtatás nem sikerült." STRING_TEXT_DOCUMENT "Szöveges dokumentum" STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" diff --git a/base/applications/notepad/main.c b/base/applications/notepad/main.c index c232bfbf3e7..599ad5c60df 100644 --- a/base/applications/notepad/main.c +++ b/base/applications/notepad/main.c @@ -202,7 +202,7 @@ BOOL NOTEPAD_FindNext(FINDREPLACE *pFindReplace, BOOL bReplace, BOOL bShowAlert) if (bShowAlert) { LoadString(Globals.hInstance, STRING_CANNOTFIND, szResource, _countof(szResource)); - _sntprintf(szText, _countof(szText), szResource, pFindReplace->lpstrFindWhat); + StringCchPrintf(szText, _countof(szText), szResource, pFindReplace->lpstrFindWhat); LoadString(Globals.hInstance, STRING_NOTEPAD, szResource, _countof(szResource)); MessageBox(Globals.hFindReplaceDlg, szText, szResource, MB_OK); } @@ -270,6 +270,7 @@ static VOID NOTEPAD_InitData(HINSTANCE hInstance) */ static VOID NOTEPAD_InitMenuPopup(HMENU menu, LPARAM index) { + DWORD dwStart, dwEnd; int enable; UNREFERENCED_PARAMETER(index); @@ -280,8 +281,8 @@ static VOID NOTEPAD_InitMenuPopup(HMENU menu, LPARAM index) SendMessage(Globals.hEdit, EM_CANUNDO, 0, 0) ? MF_ENABLED : MF_GRAYED); EnableMenuItem(menu, CMD_PASTE, IsClipboardFormatAvailable(CF_TEXT) ? MF_ENABLED : MF_GRAYED); - enable = (int) SendMessage(Globals.hEdit, EM_GETSEL, 0, 0); - enable = (HIWORD(enable) == LOWORD(enable)) ? MF_GRAYED : MF_ENABLED; + SendMessage(Globals.hEdit, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd); + enable = ((dwStart == dwEnd) ? MF_GRAYED : MF_ENABLED); EnableMenuItem(menu, CMD_CUT, enable); EnableMenuItem(menu, CMD_COPY, enable); EnableMenuItem(menu, CMD_DELETE, enable); diff --git a/base/applications/regedit/lang/it-IT.rc b/base/applications/regedit/lang/it-IT.rc index 5226bad09d8..5394d596765 100644 --- a/base/applications/regedit/lang/it-IT.rc +++ b/base/applications/regedit/lang/it-IT.rc @@ -1,3 +1,11 @@ +/* + * PROJECT: ReactOS Registry Editor + * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) + * PURPOSE: Italian resource file + * TRANSLATORS: Copyright 2007-2013 Paolo Devoti + * Copyright 2013 Ivan Di Francesco (oswetto) + */ + LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL ID_ACCEL ACCELERATORS @@ -458,10 +466,10 @@ END STRINGTABLE BEGIN - IDS_IMPORT_PROMPT "Aggiungendo informazioni si possono involontariamente modificare o eliminare i valori e causare il giusto funzionamente dei componenti.\n Se non si considera attendibile la fonte di queste informazioni in '% s', non aggiungere al Registro di sistema.\n\n Si desidera continuare? " - IDS_IMPORT_OK "Le chiavi e i valori contenuti in '% s' sono stati correttamente aggiunti al Registro di sistema." - IDS_IMPORT_ERROR "Impossibile importare '% s': Errore durante l'apertura del file. Ci può essere un disco, file cdanneggiati o il file non esiste." - IDS_EXPORT_ERROR "Impossibile esportare '% s': Errore durante la creazione o la scrittura del file. Ci può essere un disco o un file di sistema danneggiato." + IDS_IMPORT_PROMPT "Aggiungendo informazioni si possono involontariamente modificare o eliminare i valori e causare il giusto funzionamente dei componenti.\n Se non si considera attendibile la fonte di queste informazioni in '%s', non aggiungere al Registro di sistema.\n\n Si desidera continuare? " + IDS_IMPORT_OK "Le chiavi e i valori contenuti in '%s' sono stati correttamente aggiunti al Registro di sistema." + IDS_IMPORT_ERROR "Impossibile importare '%s': Errore durante l'apertura del file. Ci può essere un disco, file cdanneggiati o il file non esiste." + IDS_EXPORT_ERROR "Impossibile esportare '%s': Errore durante la creazione o la scrittura del file. Ci può essere un disco o un file di sistema danneggiato." END STRINGTABLE diff --git a/base/applications/regedit/lang/ro-RO.rc b/base/applications/regedit/lang/ro-RO.rc index 2257a838099..f879c311d19 100644 --- a/base/applications/regedit/lang/ro-RO.rc +++ b/base/applications/regedit/lang/ro-RO.rc @@ -431,7 +431,7 @@ BEGIN IDS_FLT_REGEDIT4_FLT "*.reg" IDS_FLT_ALLFILES "Orice fișier (*.*)" IDS_FLT_ALLFILES_FLT "*.*" - IDS_FLT_TXTFILES "Text Files (*.txt)" + IDS_FLT_TXTFILES "Fișiere text (*.txt)" IDS_FLT_TXTFILES_FLT "*.txt" END @@ -530,16 +530,16 @@ END STRINGTABLE BEGIN - IDS_FIELD_KEY_NAME "Key Name:" - IDS_FIELD_CLASS_NAME "Class Name:" - IDS_NO_CLASS_NAME "" - IDS_NULL_TIMESTAMP "" - IDS_FIELD_NAME " Name:" - IDS_FIELD_TYPE " Type:" - IDS_FIELD_DATA " Data:" - IDS_FIELD_LASTWRITE "Last Write Time:" - IDS_UNKNOWN "" - IDS_VALUE_INDEX "Value %d" + IDS_FIELD_KEY_NAME "Numele cheii:" + IDS_FIELD_CLASS_NAME "Numele clasei:" + IDS_NO_CLASS_NAME "" + IDS_NULL_TIMESTAMP "" + IDS_FIELD_NAME " Nume:" + IDS_FIELD_TYPE " Tip:" + IDS_FIELD_DATA " Dată:" + IDS_FIELD_LASTWRITE "Ultima dată a scrierii:" + IDS_UNKNOWN "" + IDS_VALUE_INDEX "Valoare %d" END /*****************************************************************/ diff --git a/base/applications/screensavers/logon/logon.c b/base/applications/screensavers/logon/logon.c index 20e66f2fb70..bf84b782723 100644 --- a/base/applications/screensavers/logon/logon.c +++ b/base/applications/screensavers/logon/logon.c @@ -18,127 +18,95 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include +#include #include #include #include #include #include -#include -#include #include "resource.h" -#define RANDOM( min, max ) ((rand() % (int)(((max)+1) - (min))) + (min)) +#define RANDOM(min, max) ((rand() % (int)(((max)+1) - (min))) + (min)) -#define APPNAME _T("Logon") #define APP_TIMER 1 -#define APP_TIMER_INTERVAL 2000 +#define APP_TIMER_INTERVAL 10000 +static HBITMAP GetScreenSaverBitmap(VOID) { - OSVERSIONINFOEX osvi; - - ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); - osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx ((OSVERSIONINFO *) &osvi); - - switch(osvi.wProductType) - { - case VER_NT_WORKSTATION: - return LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_WORKSTATION), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); - break; - default: - return LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_SERVER), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); - break; - } + OSVERSIONINFOEX osvi = {0}; + osvi.dwOSVersionInfoSize = sizeof(osvi); + GetVersionEx((POSVERSIONINFO)&osvi); + + return LoadImageW(GetModuleHandle(NULL), + osvi.wProductType == VER_NT_WORKSTATION ? + MAKEINTRESOURCEW(IDB_WORKSTATION) : MAKEINTRESOURCEW(IDB_SERVER), + IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); } LRESULT CALLBACK -ScreenSaverProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +ScreenSaverProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - static RECT rect; static HBITMAP bitmap; - switch (message) + switch (uMsg) { case WM_CREATE: { - bitmap = GetScreenSaverBitmap (); + bitmap = GetScreenSaverBitmap(); if (bitmap == NULL) { - MessageBox(hWnd, - _T("Fatal Error: Could not load bitmap"), - _T("Error"), - MB_OK | MB_ICONEXCLAMATION); + /* Extremely unlikely, message not localized. */ + MessageBoxW(hWnd, + L"Fatal Error: Could not load bitmap", + L"Error", + MB_OK | MB_ICONEXCLAMATION); } - SetTimer(hWnd, - APP_TIMER, - APP_TIMER_INTERVAL, - NULL); - - break; + SetTimer(hWnd, APP_TIMER, APP_TIMER_INTERVAL, NULL); + break; } case WM_PAINT: { - BITMAP bm; /* Bitmap structure as seen in bmWidth & bmHeight */ - PAINTSTRUCT ps; - HDC hdc; - HDC hdcMem; - HBITMAP hbmOld; - - // Obtain window coordinates. - GetClientRect (hWnd, &rect); - - hdc = BeginPaint(hWnd, &ps); - hdcMem = CreateCompatibleDC(hdc); - hbmOld = SelectObject(hdcMem, bitmap); - - GetObject(bitmap, sizeof(bm), &bm); - - if (rect.right < bm.bmWidth || - rect.bottom < bm.bmHeight) - { - StretchBlt( - hdc, - RANDOM (0, rect.right - (bm.bmWidth /5)), - RANDOM (0, rect.bottom - (bm.bmHeight /5)), - bm.bmWidth /5, - bm.bmHeight /5, - hdcMem, - 0, - 0, - bm.bmWidth, - bm.bmHeight, - SRCCOPY); - } - else - { - BitBlt( - hdc, - RANDOM (0, rect.right - bm.bmWidth), - RANDOM (0, rect.bottom - bm.bmHeight), - bm.bmWidth, - bm.bmHeight, - hdcMem, - 0, - 0, - SRCCOPY); - } - - SelectObject(hdcMem, hbmOld); - DeleteDC(hdcMem); - - EndPaint(hWnd, &ps); - break; + BITMAP bm; + PAINTSTRUCT ps; + HDC hdc; + HDC hdcMem; + HBITMAP hbmOld; + RECT rect; + + hdc = BeginPaint(hWnd, &ps); + hdcMem = CreateCompatibleDC(hdc); + hbmOld = SelectObject(hdcMem, bitmap); + GetObjectW(bitmap, sizeof(bm), &bm); + + GetClientRect(hWnd, &rect); + if (rect.right < bm.bmWidth || rect.bottom < bm.bmHeight) + { + StretchBlt(hdc, RANDOM(0, rect.right - (bm.bmWidth / 5)), + RANDOM(0, rect.bottom - (bm.bmHeight / 5)), + bm.bmWidth / 5, bm.bmHeight / 5, hdcMem, 0, 0, + bm.bmWidth, bm.bmHeight, SRCCOPY); + } + else + { + BitBlt(hdc, RANDOM(0, rect.right - bm.bmWidth), + RANDOM(0, rect.bottom - bm.bmHeight), + bm.bmWidth, bm.bmHeight, hdcMem, 0, 0, SRCCOPY); + } + + SelectObject(hdcMem, hbmOld); + DeleteDC(hdcMem); + EndPaint(hWnd, &ps); + break; } case WM_TIMER: { - InvalidateRect(hWnd, NULL, 1); - break; + InvalidateRect(hWnd, NULL, TRUE); + break; } case WM_DESTROY: { @@ -147,10 +115,11 @@ ScreenSaverProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) PostQuitMessage(0); break; } - default: - // Pass Windows Messages to the default screensaver window procedure - return DefScreenSaverProc(hWnd, message, wParam, lParam); + { + /* Pass window messages to the default screensaver window procedure */ + return DefScreenSaverProc(hWnd, uMsg, wParam, lParam); + } } return 0; @@ -163,19 +132,20 @@ ScreenSaverConfigureDialog(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) return FALSE; } -// This function is only called one time before opening the configuration dialog. -// Use it to show a message that no configuration is necessary and return FALSE to indicate that no configuration dialog shall be opened. +/* This function is only called once before opening the configuration dialog. + * Use it to show a message that no configuration is necessary and return FALSE to indicate that no configuration dialog shall be opened. + */ BOOL WINAPI RegisterDialogClasses(HANDLE hInst) { - TCHAR szMessage[256]; - TCHAR szTitle[25]; + WCHAR szMessage[256]; + WCHAR szTitle[25]; - LoadString(hInst, IDS_TEXT, szMessage, sizeof(szMessage) / sizeof(TCHAR)); - LoadString(hInst, IDS_DESCRIPTION, szTitle, sizeof(szTitle) / sizeof(TCHAR)); + LoadStringW(hInst, IDS_TEXT, szMessage, _countof(szMessage)); + LoadStringW(hInst, IDS_DESCRIPTION, szTitle, _countof(szTitle)); - MessageBox(NULL, szMessage, szTitle, MB_OK | MB_ICONEXCLAMATION); + MessageBoxW(NULL, szMessage, szTitle, MB_OK | MB_ICONEXCLAMATION); return FALSE; } diff --git a/base/applications/screensavers/logon/logon.rc b/base/applications/screensavers/logon/logon.rc index a01683ea2c2..4fc03d20abb 100644 --- a/base/applications/screensavers/logon/logon.rc +++ b/base/applications/screensavers/logon/logon.rc @@ -15,8 +15,11 @@ IDI_ICON ICON DISCARDABLE "res/icon_logon.ico" #include +/* To change the bitmap used for Workstation or Server + * versions, add the new bitmap and update the path below. + */ IDB_WORKSTATION BITMAP "res/0.bmp" -IDB_SERVER BITMAP "res/1.bmp" +IDB_SERVER BITMAP "res/0.bmp" #include diff --git a/base/applications/screensavers/logon/res/0.bmp b/base/applications/screensavers/logon/res/0.bmp index 3f99e1d56ea..d692ced1ca5 100644 Binary files a/base/applications/screensavers/logon/res/0.bmp and b/base/applications/screensavers/logon/res/0.bmp differ diff --git a/base/applications/screensavers/logon/res/1.bmp b/base/applications/screensavers/logon/res/1.bmp deleted file mode 100644 index 3f99e1d56ea..00000000000 Binary files a/base/applications/screensavers/logon/res/1.bmp and /dev/null differ diff --git a/base/applications/taskmgr/lang/hu-HU.rc b/base/applications/taskmgr/lang/hu-HU.rc index 84a04f5b22b..f4968d5432a 100644 --- a/base/applications/taskmgr/lang/hu-HU.rc +++ b/base/applications/taskmgr/lang/hu-HU.rc @@ -138,8 +138,8 @@ BEGIN END MENUITEM "&Processzorok használata...", ID_PROCESS_PAGE_SETAFFINITY MENUITEM SEPARATOR - MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES - MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION + MENUITEM "&Tulajdonságok", ID_PROCESS_PAGE_PROPERTIES + MENUITEM "Fájl &helyének megnyitása", ID_PROCESS_PAGE_OPENFILELOCATION END END @@ -381,8 +381,8 @@ BEGIN ID_PROCESS_PAGE_SETPRIORITY_NORMAL "Normál prioritásra állítja a folyamatot" ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL "Normál alatti prioritásra állítja a folyamatot" ID_PROCESS_PAGE_SETPRIORITY_LOW "Alacsony prioritásra állítja a folyamatot" - ID_PROCESS_PAGE_PROPERTIES "Shows process file properties" - ID_PROCESS_PAGE_OPENFILELOCATION "Opens process file location" + ID_PROCESS_PAGE_PROPERTIES "Megjeleníti a folyamat fájl tulajdonságait" + ID_PROCESS_PAGE_OPENFILELOCATION "Megnyitja a folyamat fájl helyét" END STRINGTABLE diff --git a/base/shell/explorer/lang/hu-HU.rc b/base/shell/explorer/lang/hu-HU.rc index 48f20e35f24..e50abfdc81d 100644 --- a/base/shell/explorer/lang/hu-HU.rc +++ b/base/shell/explorer/lang/hu-HU.rc @@ -78,7 +78,7 @@ BEGIN AUTOCHECKBOX "A tálca mindig legyen &látható a többi ablak előtt", IDC_TASKBARPROP_ONTOP, 13, 71, 200, 10 AUTOCHECKBOX "Hasonló tálca gombok &csoportosítása", IDC_TASKBARPROP_GROUP, 13, 84, 200, 10 AUTOCHECKBOX "&Gyorsindító megjelenítése", IDC_TASKBARPROP_SHOWQL, 13, 97, 200, 10 - AUTOCHECKBOX "U&se small icons", IDC_TASKBARPROP_SMALLICONS, 13, 110, 200, 10 + AUTOCHECKBOX "&Kis ikonok használata", IDC_TASKBARPROP_SMALLICONS, 13, 110, 200, 10 END IDD_TASKBARPROP_STARTMENU DIALOGEX 0, 0, 252, 218 @@ -101,15 +101,15 @@ CAPTION "Értesítési terület" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "", IDC_TASKBARPROP_NOTIFICATIONBITMAP, "Static", SS_BITMAP | SS_SUNKEN | SS_CENTERIMAGE, 12, 6, 229, 24 - GROUPBOX "Icons", IDC_STATIC, 6, 36, 240, 56 + GROUPBOX "Ikonok", IDC_STATIC, 6, 36, 240, 56 LTEXT "Rendezettebbé teheti az értesítési területet, ha elrejti azokat az ikonokat, amelyekre már régen nem kattintott rá.", IDC_STATIC, 13, 48, 223, 16 AUTOCHECKBOX "A nem aktív &ikonok elrejtése", IDC_TASKBARPROP_HIDEICONS, 13, 70, 125, 10 PUSHBUTTON "&Testreszabás...", IDC_TASKBARPROP_ICONCUST, 188, 67, 53, 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 "Rendszerikonok", IDC_STATIC, 6, 99, 240, 56 + LTEXT "Jelölje ki a mindig megjelenítendő rendszerikonokat.", IDC_STATIC, 13, 113, 223, 8 AUTOCHECKBOX "Az óra &megjelenítése", IDC_TASKBARPROP_CLOCK, 13, 127, 80, 10 AUTOCHECKBOX "Má&sodpercek megjelenítése", IDC_TASKBARPROP_SECONDS, 120, 127, 100, 10, WS_DISABLED - AUTOCHECKBOX "&Desktop", IDC_TASKBARPROP_DESKTOP, 13, 140, 80, 10 + AUTOCHECKBOX "&Asztal", IDC_TASKBARPROP_DESKTOP, 13, 140, 80, 10 END IDD_NOTIFICATIONS_CUSTOMIZE DIALOGEX 0, 0, 232, 240 @@ -213,6 +213,6 @@ STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Tálca és Start menü" IDS_RESTORE_ALL "&Megnyitott ablakok megjelenítése" - IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade" - IDS_TRAYWND_UNDO_TILE "&Undo Tile" + IDS_TRAYWND_UNDO_CASCADE "Lépcsőzetes elre&ndezés visszavonása" + IDS_TRAYWND_UNDO_TILE "Mozaik elre&ndezés visszavonása" END diff --git a/boot/bootdata/hivesft.inf b/boot/bootdata/hivesft.inf index 6d2e60961ee..36cb025fb4e 100644 --- a/boot/bootdata/hivesft.inf +++ b/boot/bootdata/hivesft.inf @@ -799,7 +799,7 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Display",0x00000000,%GMT_MINUS_07_B_DESC% HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Dlt",0x00000000,%GMT_MINUS_07_B_DAYLIGHT% -HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Std",0x00000000, +HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Std",0x00000000,%GMT_MINUS_07_B_STANDARD% HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Index",0x00010001,13 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","TZI",0x00000001,\ 0xa4,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\ diff --git a/dll/apisets/api-ms-win-crt-time-l1-1-0.spec b/dll/apisets/api-ms-win-crt-time-l1-1-0.spec index db0fe40f724..6b571be4c03 100644 --- a/dll/apisets/api-ms-win-crt-time-l1-1-0.spec +++ b/dll/apisets/api-ms-win-crt-time-l1-1-0.spec @@ -34,10 +34,10 @@ @ stub _gmtime32_s @ stdcall _gmtime64() msvcrt._gmtime64 @ stub _gmtime64_s -@ stub _localtime32 -@ stub _localtime32_s -@ stdcall _localtime64() msvcrt._localtime64 -@ stub _localtime64_s +@ cdecl -version=0x600+ _localtime32() msvcrt._localtime32 +@ cdecl -version=0x600+ _localtime32_s() msvcrt._localtime32_s +@ cdecl _localtime64() msvcrt._localtime64 +@ cdecl -version=0x600+ _localtime64_s() msvcrt._localtime64_s @ stub _mkgmtime32 @ stdcall _mkgmtime64() msvcrt._mkgmtime64 @ stub _mktime32 diff --git a/dll/cpl/appwiz/lang/hu-HU.rc b/dll/cpl/appwiz/lang/hu-HU.rc index f5107ebcfb7..66efe0cb4bc 100644 --- a/dll/cpl/appwiz/lang/hu-HU.rc +++ b/dll/cpl/appwiz/lang/hu-HU.rc @@ -90,5 +90,5 @@ BEGIN IDS_NO_DIRECTORY "Nincs megadva mappa!" IDS_INVALID_PATH "A megadott mappa érvénytelen!" IDS_INVALID_NAME "A megadott parancsikon név érvénytelen fájlnév karaktereket tartalmaz, vagy túl hosszú." - IDS_BROWSE_FOR_TARGET "Please select the target of the shortcut below:" + IDS_BROWSE_FOR_TARGET "Kérem válassza ki a parancsikon hivatkozását:" END diff --git a/dll/cpl/timedate/timezone.c b/dll/cpl/timedate/timezone.c index 5b7911cc0b1..1424a69ba61 100644 --- a/dll/cpl/timedate/timezone.c +++ b/dll/cpl/timedate/timezone.c @@ -168,36 +168,51 @@ ShowTimeZoneList(HWND hwnd) { TIME_ZONE_INFORMATION TimeZoneInfo; PTIMEZONE_ENTRY Entry; - BOOL bDoAdvancedTest; - DWORD dwIndex; - DWORD i; + DWORD dwCount; + DWORD dwIndex = 0; + BOOL bFound = FALSE; - GetTimeZoneInformation(&TimeZoneInfo); - bDoAdvancedTest = (!*TimeZoneInfo.StandardName); + if (GetTimeZoneInformation(&TimeZoneInfo) == TIME_ZONE_ID_INVALID) + { + /* Failed to retrieve current time-zone info, reset it */ + ZeroMemory(&TimeZoneInfo, sizeof(TimeZoneInfo)); + } - dwIndex = 0; - i = 0; - Entry = TimeZoneListHead; - while (Entry != NULL) + for (Entry = TimeZoneListHead; Entry != NULL; Entry = Entry->Next) { - SendMessageW(hwnd, - CB_ADDSTRING, - 0, - (LPARAM)Entry->Description); - - if ( (!bDoAdvancedTest && *Entry->StandardName && - wcscmp(Entry->StandardName, TimeZoneInfo.StandardName) == 0) || - ( (Entry->TimezoneInfo.Bias == TimeZoneInfo.Bias) && - (Entry->TimezoneInfo.StandardBias == TimeZoneInfo.StandardBias) && - (Entry->TimezoneInfo.DaylightBias == TimeZoneInfo.DaylightBias) && - (memcmp(&Entry->TimezoneInfo.StandardDate, &TimeZoneInfo.StandardDate, sizeof(SYSTEMTIME)) == 0) && - (memcmp(&Entry->TimezoneInfo.DaylightDate, &TimeZoneInfo.DaylightDate, sizeof(SYSTEMTIME)) == 0) ) ) + dwCount = SendMessageW(hwnd, + CB_ADDSTRING, + 0, + (LPARAM)Entry->Description); + if (dwCount == CB_ERR || dwCount == CB_ERRSPACE) + continue; + + /* If the time-zone was found in the list, skip the tests */ + if (bFound) + continue; + + if (*TimeZoneInfo.StandardName && *Entry->StandardName) { - dwIndex = i; + /* Compare by name */ + if (wcscmp(Entry->StandardName, TimeZoneInfo.StandardName) == 0) + { + dwIndex = dwCount; + bFound = TRUE; + } + } + else + { + /* Compare by date and bias */ + if ((Entry->TimezoneInfo.Bias == TimeZoneInfo.Bias) && + (Entry->TimezoneInfo.StandardBias == TimeZoneInfo.StandardBias) && + (Entry->TimezoneInfo.DaylightBias == TimeZoneInfo.DaylightBias) && + (memcmp(&Entry->TimezoneInfo.StandardDate, &TimeZoneInfo.StandardDate, sizeof(SYSTEMTIME)) == 0) && + (memcmp(&Entry->TimezoneInfo.DaylightDate, &TimeZoneInfo.DaylightDate, sizeof(SYSTEMTIME)) == 0)) + { + dwIndex = dwCount; + bFound = TRUE; + } } - - i++; - Entry = Entry->Next; } SendMessageW(hwnd, diff --git a/dll/ntdll/def/ntdll.spec b/dll/ntdll/def/ntdll.spec index ee2598f8040..b7659f042d5 100644 --- a/dll/ntdll/def/ntdll.spec +++ b/dll/ntdll/def/ntdll.spec @@ -940,7 +940,7 @@ @ stdcall RtlInitializeContext(ptr ptr ptr ptr ptr) @ stdcall RtlInitializeCriticalSection(ptr) @ stdcall RtlInitializeCriticalSectionAndSpinCount(ptr long) -@ stub -version=0x600+ RtlInitializeCriticalSectionEx +@ stdcall -version=0x600+ RtlInitializeCriticalSectionEx(ptr long long) @ stub -version=0x600+ -arch=i386 RtlInitializeExceptionChain @ stdcall RtlInitializeGenericTable(ptr ptr ptr ptr ptr) @ stdcall RtlInitializeGenericTableAvl(ptr ptr ptr ptr ptr) diff --git a/dll/win32/browseui/lang/hu-HU.rc b/dll/win32/browseui/lang/hu-HU.rc index a3a390830a8..4d446c9cae2 100644 --- a/dll/win32/browseui/lang/hu-HU.rc +++ b/dll/win32/browseui/lang/hu-HU.rc @@ -316,7 +316,7 @@ END STRINGTABLE BEGIN - IDS_ADDRESSMENUTEXT "&Address" + IDS_ADDRESSMENUTEXT "&Cím" IDS_HISTORYTEXT "&Előzmények\tCtrl+H" END diff --git a/dll/win32/browseui/shellbrowser.cpp b/dll/win32/browseui/shellbrowser.cpp index f6cb992dbb6..9c8edff1822 100644 --- a/dll/win32/browseui/shellbrowser.cpp +++ b/dll/win32/browseui/shellbrowser.cpp @@ -2387,12 +2387,33 @@ HRESULT STDMETHODCALLTYPE CShellBrowser::QueryService(REFGUID guidService, REFII return E_NOINTERFACE; } +static BOOL _ILIsNetworkPlace(LPCITEMIDLIST pidl) +{ + WCHAR szPath[MAX_PATH]; + return SHGetPathFromIDListWrapW(pidl, szPath) && PathIsUNCW(szPath); +} + HRESULT STDMETHODCALLTYPE CShellBrowser::GetPropertyBag(long flags, REFIID riid, void **ppvObject) { if (ppvObject == NULL) return E_POINTER; + *ppvObject = NULL; - return E_NOTIMPL; + + LPITEMIDLIST pidl; + HRESULT hr = GetPidl(&pidl); + if (FAILED_UNEXPECTEDLY(hr)) + return E_FAIL; + + // FIXME: pidl for Internet etc. + + if (_ILIsNetworkPlace(pidl)) + flags |= SHGVSPB_ROAM; + + hr = SHGetViewStatePropertyBag(pidl, L"Shell", flags, riid, ppvObject); + + ILFree(pidl); + return hr; } HRESULT STDMETHODCALLTYPE CShellBrowser::GetTypeInfoCount(UINT *pctinfo) diff --git a/dll/win32/comdlg32/cdlg.h b/dll/win32/comdlg32/cdlg.h index 7570acebb9e..4c8be081e84 100644 --- a/dll/win32/comdlg32/cdlg.h +++ b/dll/win32/comdlg32/cdlg.h @@ -199,8 +199,14 @@ HRESULT FileSaveDialog_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv) /* Shared helper functions */ void COMDLG32_GetCanonicalPath(PCIDLIST_ABSOLUTE pidlAbsCurrent, LPWSTR lpstrFile, LPWSTR lpstrPathAndFile) DECLSPEC_HIDDEN; +#ifdef __REACTOS__ +struct FileOpenDlgInfos; +int FILEDLG95_ValidatePathAction(struct FileOpenDlgInfos *fodInfos, LPWSTR lpstrPathAndFile, IShellFolder **ppsf, + HWND hwnd, DWORD flags, BOOL isSaveDlg, int defAction) DECLSPEC_HIDDEN; +#else int FILEDLG95_ValidatePathAction(LPWSTR lpstrPathAndFile, IShellFolder **ppsf, HWND hwnd, DWORD flags, BOOL isSaveDlg, int defAction) DECLSPEC_HIDDEN; +#endif int COMDLG32_SplitFileNames(LPWSTR lpstrEdit, UINT nStrLen, LPWSTR *lpstrFileList, UINT *sizeUsed) DECLSPEC_HIDDEN; void FILEDLG95_OnOpenMessage(HWND hwnd, int idCaption, int idText) DECLSPEC_HIDDEN; diff --git a/dll/win32/comdlg32/filedlg.c b/dll/win32/comdlg32/filedlg.c index 54bbc544aab..8aa8eae3987 100644 --- a/dll/win32/comdlg32/filedlg.c +++ b/dll/win32/comdlg32/filedlg.c @@ -2826,8 +2826,98 @@ void FILEDLG95_OnOpenMessage(HWND hwnd, int idCaption, int idText) MessageBoxW(hwnd,strMsgText, strMsgTitle, MB_OK | MB_ICONHAND); } +#ifdef __REACTOS__ +/* The return value needs LocalFree */ +static LPWSTR FILEDLG95_GetFallbackExtension(FileOpenDlgInfos *fodInfos, LPWSTR lpstrPathAndFile) +{ + LPWSTR lpstrFilter, the_ext = NULL, pchDot = NULL; + + /* Without lpstrDefExt, append no extension */ + if (!fodInfos->defext) + return NULL; + + /* Get filter extensions */ + lpstrFilter = (LPWSTR)CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB, + fodInfos->ofnInfos->nFilterIndex - 1); + if (lpstrFilter != (LPWSTR)CB_ERR && lpstrFilter && *lpstrFilter) + { + LPWSTR pchSemicolon = wcschr(lpstrFilter, L';'); + + if (pchSemicolon) + *pchSemicolon = UNICODE_NULL; + + pchDot = wcschr(lpstrFilter, L'.'); + + if (pchDot && pchDot[1] && !wcschr(pchDot, L'*') && !wcschr(pchDot, L'?')) + the_ext = StrDupW(pchDot + 1); + + if (pchSemicolon) + *pchSemicolon = L';'; + } + + if (!the_ext && (!pchDot || pchDot[1])) + { + /* use default extension if no extension in filter */ + the_ext = StrDupW(fodInfos->defext); + } + + return the_ext; +} + +static BOOL +FILEDLG95_AddDotExtIfNeeded(FileOpenDlgInfos *fodInfos, LPWSTR lpstrPathAndFile) +{ + BOOL ret = FALSE; + LPWSTR ext = PathFindExtensionW(lpstrPathAndFile); + int PathLength = lstrlenW(lpstrPathAndFile); + LPWSTR the_ext = FILEDLG95_GetFallbackExtension(fodInfos, lpstrPathAndFile); + + if (the_ext && *the_ext && + (*ext == UNICODE_NULL || lstrcmpiW(ext + 1, the_ext) != 0)) + { + if (strlenW(lpstrPathAndFile) + 1 + strlenW(the_ext) + 1 <= + fodInfos->ofnInfos->nMaxFile) + { + /* Make the extension lowercase */ + CharLowerW(the_ext); + /* Append it (with dot) to the file */ + lstrcatW(lpstrPathAndFile, L"."); + lstrcatW(lpstrPathAndFile, the_ext); + /* update ext */ + ext = PathFindExtensionW(lpstrPathAndFile); + ret = TRUE; + } + } + + LocalFree(the_ext); + + /* In Open dialog: if file does not exist try without extension */ + if (!(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG) && !PathFileExistsW(lpstrPathAndFile)) + { + lpstrPathAndFile[PathLength] = UNICODE_NULL; + ret = FALSE; + } + + /* Set/clear the output OFN_EXTENSIONDIFFERENT flag */ + if (*ext) + ext++; + if (!lstrcmpiW(fodInfos->defext, ext)) + fodInfos->ofnInfos->Flags &= ~OFN_EXTENSIONDIFFERENT; + else + fodInfos->ofnInfos->Flags |= OFN_EXTENSIONDIFFERENT; + + return ret; +} +#endif + +#ifdef __REACTOS__ +int FILEDLG95_ValidatePathAction(struct FileOpenDlgInfos *fodInfos, LPWSTR lpstrPathAndFile, + IShellFolder **ppsf, HWND hwnd, DWORD flags, BOOL isSaveDlg, + int defAction) +#else int FILEDLG95_ValidatePathAction(LPWSTR lpstrPathAndFile, IShellFolder **ppsf, HWND hwnd, DWORD flags, BOOL isSaveDlg, int defAction) +#endif { int nOpenAction = defAction; LPWSTR lpszTemp, lpszTemp1; @@ -2924,8 +3014,17 @@ int FILEDLG95_ValidatePathAction(LPWSTR lpstrPathAndFile, IShellFolder **ppsf, { if( (flags & OFN_FILEMUSTEXIST) && !isSaveDlg ) { +#ifdef __REACTOS__ + FILEDLG95_AddDotExtIfNeeded(fodInfos, lpstrPathAndFile); + if (!PathFileExistsW(lpstrPathAndFile)) + { + FILEDLG95_OnOpenMessage(hwnd, 0, IDS_FILENOTEXISTING); + break; + } +#else FILEDLG95_OnOpenMessage(hwnd, 0, IDS_FILENOTEXISTING); break; +#endif } } /* change to the current folder */ @@ -3011,7 +3110,11 @@ BOOL FILEDLG95_OnOpen(HWND hwnd) else nOpenAction = ONOPEN_BROWSE; +#ifdef __REACTOS__ + nOpenAction = FILEDLG95_ValidatePathAction(fodInfos, lpstrPathAndFile, &lpsf, hwnd, +#else nOpenAction = FILEDLG95_ValidatePathAction(lpstrPathAndFile, &lpsf, hwnd, +#endif fodInfos->ofnInfos->Flags, fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG, nOpenAction); @@ -3088,7 +3191,9 @@ BOOL FILEDLG95_OnOpen(HWND hwnd) case ONOPEN_OPEN: /* fill in the return struct and close the dialog */ TRACE("ONOPEN_OPEN %s\n", debugstr_w(lpstrPathAndFile)); { +#ifndef __REACTOS__ WCHAR *ext = NULL; +#endif /* update READONLY check box flag */ if ((SendMessageW(GetDlgItem(hwnd,IDC_OPENREADONLY),BM_GETCHECK,0,0) & 0x03) == BST_CHECKED) @@ -3097,104 +3202,13 @@ BOOL FILEDLG95_OnOpen(HWND hwnd) fodInfos->ofnInfos->Flags &= ~OFN_READONLY; /* Attach the file extension with file name*/ - ext = PathFindExtensionW(lpstrPathAndFile); #ifdef __REACTOS__ - if (*ext == UNICODE_NULL && fodInfos->defext) - { - LPWSTR filterExt = NULL, lpstrFilter = NULL, pch, pchNext; - LPCWSTR the_ext = NULL; - static const WCHAR szwDot[] = {'.',0}; - int PathLength = lstrlenW(lpstrPathAndFile); - - /* get filter extensions */ - lpstrFilter = (LPWSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB, - fodInfos->ofnInfos->nFilterIndex - 1); - if (lpstrFilter != (LPWSTR)CB_ERR) /* control is not empty */ - { - LPWSTR filterSearchIndex, pchFirst = NULL; - filterExt = heap_alloc((lstrlenW(lpstrFilter) + 1) * sizeof(WCHAR)); - if (filterExt) - { - strcpyW(filterExt, lpstrFilter); - - if (ext && *ext) - { - /* find ext in filter */ - for (pch = filterExt; pch && *pch; pch = pchNext) - { - filterSearchIndex = strchrW(pch, ';'); - if (filterSearchIndex) - { - filterSearchIndex[0] = 0; - pchNext = filterSearchIndex + 1; - } - else - { - pchNext = NULL; - } - - while (*pch == '*' || *pch == '.' || *pch == '?') - { - ++pch; - } - - if (!pchFirst) - pchFirst = pch; - - if (lstrcmpiW(pch, &ext[1]) == 0) - { - the_ext = pch; - break; - } - } - - /* use first one if not found */ - if (!the_ext && pchFirst && *pchFirst) - { - the_ext = pchFirst; - } - } - } - } - - if (!the_ext) - { - /* use default extension if no extension in filter */ - the_ext = fodInfos->defext; - } - - if (the_ext && *the_ext && lstrcmpiW(&ext[1], the_ext) != 0) - { - if (strlenW(lpstrPathAndFile) + 1 + strlenW(the_ext) + 1 <= - fodInfos->ofnInfos->nMaxFile) - { - /* append the dot */ - lstrcatW(lpstrPathAndFile, szwDot); - /* append the extension */ - lstrcatW(lpstrPathAndFile, the_ext); - /* update ext */ - ext = PathFindExtensionW(lpstrPathAndFile); - } - } - - heap_free(filterExt); - - /* In Open dialog: if file does not exist try without extension */ - if (!(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG) && !PathFileExistsW(lpstrPathAndFile)) - lpstrPathAndFile[PathLength] = 0; - - /* Set/clear the output OFN_EXTENSIONDIFFERENT flag */ - if (*ext) - ext++; - if (!lstrcmpiW(fodInfos->defext, ext)) - fodInfos->ofnInfos->Flags &= ~OFN_EXTENSIONDIFFERENT; - else - fodInfos->ofnInfos->Flags |= OFN_EXTENSIONDIFFERENT; - } - + /* Add extension if necessary */ + FILEDLG95_AddDotExtIfNeeded(fodInfos, lpstrPathAndFile); /* update dialog data */ SetWindowTextW(fodInfos->DlgInfos.hwndFileName, PathFindFileNameW(lpstrPathAndFile)); #else /* __REACTOS__ */ + ext = PathFindExtensionW(lpstrPathAndFile); if (! *ext && fodInfos->defext) { /* if no extension is specified with file name, then */ diff --git a/dll/win32/comdlg32/filedlgbrowser.h b/dll/win32/comdlg32/filedlgbrowser.h index 67c07a8793c..ee7fbdc79d8 100644 --- a/dll/win32/comdlg32/filedlgbrowser.h +++ b/dll/win32/comdlg32/filedlgbrowser.h @@ -47,8 +47,11 @@ * Data structure */ - +#ifdef __REACTOS__ +typedef struct FileOpenDlgInfos +#else typedef struct +#endif { LPOPENFILENAMEW ofnInfos; BOOL unicode; diff --git a/dll/win32/kernel32/kernel32.spec b/dll/win32/kernel32/kernel32.spec index e72f99fb295..c4583be816f 100644 --- a/dll/win32/kernel32/kernel32.spec +++ b/dll/win32/kernel32/kernel32.spec @@ -708,10 +708,10 @@ @ stdcall -stub -version=0x600+ IdnToNameprepUnicode(long wstr long ptr long) @ stdcall -stub -version=0x600+ IdnToUnicode(long wstr long ptr long) @ stdcall InitAtomTable(long) -@ stdcall -stub -version=0x600+ InitOnceBeginInitialize(ptr long ptr ptr) -@ stdcall -stub -version=0x600+ InitOnceComplete(ptr long ptr) +@ stdcall -version=0x600+ InitOnceBeginInitialize(ptr long ptr ptr) +@ stdcall -version=0x600+ InitOnceComplete(ptr long ptr) @ stdcall -version=0x600+ InitOnceExecuteOnce(ptr ptr ptr ptr) -@ stdcall -stub -version=0x600+ InitOnceInitialize(ptr) +@ stdcall -version=0x600+ InitOnceInitialize(ptr) NTDLL.RtlRunOnceInitialize @ stdcall -version=0x600+ InitializeConditionVariable(ptr) ntdll.RtlInitializeConditionVariable @ stdcall InitializeCriticalSection(ptr) @ stdcall InitializeCriticalSectionAndSpinCount(ptr long) diff --git a/dll/win32/kernel32/kernel32_vista/CMakeLists.txt b/dll/win32/kernel32/kernel32_vista/CMakeLists.txt index acc53b9d80a..3b2b8e735b7 100644 --- a/dll/win32/kernel32/kernel32_vista/CMakeLists.txt +++ b/dll/win32/kernel32/kernel32_vista/CMakeLists.txt @@ -9,7 +9,7 @@ spec2def(kernel32_vista.dll kernel32_vista.spec ADD_IMPORTLIB) list(APPEND SOURCE GetFileInformationByHandleEx.c GetTickCount64.c - InitOnceExecuteOnce.c + InitOnce.c sync.c vista.c) diff --git a/dll/win32/kernel32/kernel32_vista/InitOnce.c b/dll/win32/kernel32/kernel32_vista/InitOnce.c new file mode 100644 index 00000000000..339c157286c --- /dev/null +++ b/dll/win32/kernel32/kernel32_vista/InitOnce.c @@ -0,0 +1,62 @@ +/* + * PROJECT: ReactOS Win32 Base API + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) + * PURPOSE: One-Time initialization API + * COPYRIGHT: Copyright 2023 Ratin Gao + */ + +#include "k32_vista.h" + +BOOL +WINAPI +InitOnceExecuteOnce( + _Inout_ PINIT_ONCE InitOnce, + _In_ __callback PINIT_ONCE_FN InitFn, + _Inout_opt_ PVOID Parameter, + _Outptr_opt_result_maybenull_ LPVOID *Context) +{ + return NT_SUCCESS(RtlRunOnceExecuteOnce(InitOnce, + (PRTL_RUN_ONCE_INIT_FN)InitFn, + Parameter, + Context)); +} + +BOOL +WINAPI +InitOnceBeginInitialize( + _Inout_ LPINIT_ONCE lpInitOnce, + _In_ DWORD dwFlags, + _Out_ PBOOL fPending, + _Outptr_opt_result_maybenull_ LPVOID *lpContext) +{ + NTSTATUS Status; + + Status = RtlRunOnceBeginInitialize(lpInitOnce, dwFlags, lpContext); + if (!NT_SUCCESS(Status)) + { + BaseSetLastNTError(Status); + return FALSE; + } + + *fPending = (Status == STATUS_PENDING); + return TRUE; +} + +BOOL +WINAPI +InitOnceComplete( + _Inout_ LPINIT_ONCE lpInitOnce, + _In_ DWORD dwFlags, + _In_opt_ LPVOID lpContext) +{ + NTSTATUS Status; + + Status = RtlRunOnceComplete(lpInitOnce, dwFlags, lpContext); + if (!NT_SUCCESS(Status)) + { + BaseSetLastNTError(Status); + return FALSE; + } + + return TRUE; +} diff --git a/dll/win32/kernel32/kernel32_vista/InitOnceExecuteOnce.c b/dll/win32/kernel32/kernel32_vista/InitOnceExecuteOnce.c deleted file mode 100644 index 1ef59160aef..00000000000 --- a/dll/win32/kernel32/kernel32_vista/InitOnceExecuteOnce.c +++ /dev/null @@ -1,19 +0,0 @@ - -#include "k32_vista.h" - -#include -#include -#include - -DWORD WINAPI RtlRunOnceExecuteOnce( RTL_RUN_ONCE *once, PRTL_RUN_ONCE_INIT_FN func, - void *param, void **context ); - -/* Taken from Wine kernel32/sync.c */ - -/* - * @implemented - */ -BOOL NTAPI InitOnceExecuteOnce( INIT_ONCE *once, PINIT_ONCE_FN func, void *param, void **context ) -{ - return !RtlRunOnceExecuteOnce( once, (PRTL_RUN_ONCE_INIT_FN)func, param, context ); -} diff --git a/dll/win32/kernel32/kernel32_vista/kernel32_vista.spec b/dll/win32/kernel32/kernel32_vista/kernel32_vista.spec index 02c1cb05739..bf074328323 100644 --- a/dll/win32/kernel32/kernel32_vista/kernel32_vista.spec +++ b/dll/win32/kernel32/kernel32_vista/kernel32_vista.spec @@ -1,5 +1,9 @@ +@ stdcall InitOnceBeginInitialize(ptr long ptr ptr) +@ stdcall InitOnceComplete(ptr long ptr) @ stdcall InitOnceExecuteOnce(ptr ptr ptr ptr) +@ stdcall InitOnceInitialize(ptr) NTDLL.RtlRunOnceInitialize + @ stdcall GetFileInformationByHandleEx(long long ptr long) @ stdcall -ret64 GetTickCount64() diff --git a/dll/win32/msgina/lang/hu-HU.rc b/dll/win32/msgina/lang/hu-HU.rc index 877b3f7ec1c..fc9c5a7857f 100644 --- a/dll/win32/msgina/lang/hu-HU.rc +++ b/dll/win32/msgina/lang/hu-HU.rc @@ -235,10 +235,10 @@ BEGIN IDS_INVALIDLOGONHOURS "A fiókján olyan időkorlátozás van, amely miatt jelenleg nem tud belépni. Kérjük próbálja újra később." IDS_INVALIDWORKSTATION "A fiókja úgy van beállítva hogy nem használhatja ezt a számítógépet. Kérjük próbálkozzon egy másik számítógéppel." IDS_ACCOUNTRESTRICTION "Fiókkorlátozás miatt nem sikerült a bejelentkezés." - IDS_EMERGENCYLOGOFFTITLE "Log Off ReactOS" - IDS_EMERGENCYLOGOFF "Click OK to immediately log off. Any unsaved data will be lost. Use this only as a last resort." - IDS_EMERGENCYRESTARTTITLE "Emergency restart" - IDS_EMERGENCYRESTART "Click OK to immediately restart. Any unsaved data will be lost. Use this only as a last resort." + IDS_EMERGENCYLOGOFFTITLE "Kijelentkezés a ReactOS-ből" + IDS_EMERGENCYLOGOFF "Kattintson az OK-ra az azonnali kijelentkezéshez. Minden nem mentett adat el fog veszni. Csak végső megoldásként használja ezt." + IDS_EMERGENCYRESTARTTITLE "Vészhelyzeti újraindítás" + IDS_EMERGENCYRESTART "Kattintson az OK-ra az azonnali újraindításhoz. Minden nem mentett adat el fog veszni. Csak végső megoldásként használja ezt." END /* Shutdown Dialog Strings */ diff --git a/dll/win32/msgina/lang/ro-RO.rc b/dll/win32/msgina/lang/ro-RO.rc index fe22bdc18e1..3a6fd1af8d8 100644 --- a/dll/win32/msgina/lang/ro-RO.rc +++ b/dll/win32/msgina/lang/ro-RO.rc @@ -4,7 +4,7 @@ * PURPOSE: Romanian resource file * TRANSLATORS: Copyright 2009 Petru Dimitriu * Copyright 2011-2019 Ștefan Fulea - * Copyright 2022 Andrei Miloiu + * Copyright 2022-2023 Andrei Miloiu */ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL @@ -243,10 +243,10 @@ BEGIN IDS_INVALIDLOGONHOURS "Contul dumneavoastră are restricții de timp care vă împiedică să vă conectați în acest moment. Încercați mai târziu." IDS_INVALIDWORKSTATION "Contul dumneavoastră este configurat pentru a vă preveni în a folosi acest calculator. Încercați la alt calculator." IDS_ACCOUNTRESTRICTION "Eșec în conectarea dumneavoastră din cauza unei restricții a contului." - IDS_EMERGENCYLOGOFFTITLE "Log Off ReactOS" - IDS_EMERGENCYLOGOFF "Click OK to immediately log off. Any unsaved data will be lost. Use this only as a last resort." - IDS_EMERGENCYRESTARTTITLE "Emergency restart" - IDS_EMERGENCYRESTART "Click OK to immediately restart. Any unsaved data will be lost. Use this only as a last resort." + IDS_EMERGENCYLOGOFFTITLE "Deautentificare din ReactOS" + IDS_EMERGENCYLOGOFF "Apăsați Confirmă pentru a vă deautentifica imediat. Toate datele nepăstrate vor fi pierdute. Folosiți acest lucru doar ca ultimă soluție." + IDS_EMERGENCYRESTARTTITLE "Repornire de urgență" + IDS_EMERGENCYRESTART "Apăsați Confirmă pentru a vă reporni calculatorul imediat. Toate datele nepăstrate vor fi pierdute. Folosiți acest lucru doar ca ultimă soluție." END /* Shutdown Dialog Strings */ diff --git a/dll/win32/msvcrt/msvcrt.spec b/dll/win32/msvcrt/msvcrt.spec index 0d5ab41eeee..e80a290e2fd 100644 --- a/dll/win32/msvcrt/msvcrt.spec +++ b/dll/win32/msvcrt/msvcrt.spec @@ -710,8 +710,8 @@ @ cdecl -arch=x86_64 _local_unwind(ptr ptr) @ cdecl -arch=i386 _local_unwind2(ptr long) @ cdecl -arch=i386 -version=0x600+ _local_unwind4(ptr ptr long) -@ stub -version=0x600+ _localtime32 -@ stub -version=0x600+ _localtime32_s +@ cdecl -version=0x600+ _localtime32(ptr) +@ cdecl -version=0x600+ _localtime32_s(ptr ptr) @ cdecl _localtime64(ptr) @ cdecl -version=0x600+ _localtime64_s(ptr ptr) @ cdecl _lock(long) diff --git a/dll/win32/shdocvw/CMakeLists.txt b/dll/win32/shdocvw/CMakeLists.txt index 307fee5ad6e..5d25b402784 100644 --- a/dll/win32/shdocvw/CMakeLists.txt +++ b/dll/win32/shdocvw/CMakeLists.txt @@ -23,7 +23,7 @@ add_library(shdocvw MODULE set_module_type(shdocvw win32dll) target_link_libraries(shdocvw uuid wine) -add_delay_importlibs(shdocvw ole32 oleaut32 ieframe) +add_delay_importlibs(shdocvw shell32 ole32 oleaut32 ieframe) add_importlibs(shdocvw shlwapi advapi32 msvcrt kernel32 ntdll) add_dependencies(shdocvw stdole2) add_pch(shdocvw precomp.h SOURCE) diff --git a/dll/win32/shdocvw/mrulist.cpp b/dll/win32/shdocvw/mrulist.cpp index 564c3d9e9be..b140779cb9c 100644 --- a/dll/win32/shdocvw/mrulist.cpp +++ b/dll/win32/shdocvw/mrulist.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include "shdocvw.h" #include @@ -27,20 +28,49 @@ extern "C" void __cxa_pure_virtual(void) ::DebugBreak(); } +BOOL IEILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, BOOL bUnknown) +{ + UINT cb1 = ILGetSize(pidl1), cb2 = ILGetSize(pidl2); + if (cb1 == cb2 && memcmp(pidl1, pidl2, cb1) == 0) + return TRUE; + + FIXME("%p, %p\n", pidl1, pidl2); + return FALSE; +} + +// The flags for SLOTITEMDATA.dwFlags +#define SLOT_LOADED 0x1 +#define SLOT_UNKNOWN_FLAG 0x2 + +// The flags for CMruBase.m_dwFlags +#define COMPARE_BY_MEMCMP 0x0 +#define COMPARE_BY_STRCMPIW 0x1 +#define COMPARE_BY_STRCMPW 0x2 +#define COMPARE_BY_IEILISEQUAL 0x3 +#define COMPARE_BY_MASK 0xF + class CMruBase : public IMruDataList { protected: LONG m_cRefs = 1; // Reference count - DWORD m_dwFlags = 0; // The flags + DWORD m_dwFlags = 0; // The COMPARE_BY_... flags BOOL m_bFlag1 = FALSE; // ??? - BOOL m_bChecked = FALSE; // ??? + BOOL m_bChecked = FALSE; // The checked flag HKEY m_hKey = NULL; // A registry key DWORD m_cSlotRooms = 0; // Rooms for slots DWORD m_cSlots = 0; // The # of slots SLOTCOMPARE m_fnCompare = NULL; // The comparison function SLOTITEMDATA * m_pSlots = NULL; // Slot data + HRESULT _LoadItem(UINT iSlot); + HRESULT _AddItem(UINT iSlot, const BYTE *pbData, DWORD cbData); + HRESULT _GetItem(UINT iSlot, SLOTITEMDATA **ppItem); + void _DeleteItem(UINT iSlot); + + HRESULT _GetSlotItem(UINT iSlot, SLOTITEMDATA **ppItem); + void _CheckUsedSlots(); + public: CMruBase() { @@ -53,19 +83,12 @@ class CMruBase { return ::InterlockedIncrement(&m_cRefs); } - STDMETHODIMP_(ULONG) Release() override - { - if (::InterlockedDecrement(&m_cRefs) == 0) - { - delete this; - return 0; - } - return m_cRefs; - } + STDMETHODIMP_(ULONG) Release() override; // IMruDataList methods - STDMETHODIMP InitData(UINT cCapacity, UINT flags, HKEY hKey, LPCWSTR pszSubKey, - SLOTCOMPARE fnCompare) override; + STDMETHODIMP InitData(UINT cCapacity, UINT flags, HKEY hKey, + LPCWSTR pszSubKey OPTIONAL, + SLOTCOMPARE fnCompare OPTIONAL) override; STDMETHODIMP AddData(const BYTE *pbData, DWORD cbData, UINT *piSlot) override; STDMETHODIMP FindData(const BYTE *pbData, DWORD cbData, UINT *piSlot) override; STDMETHODIMP GetData(UINT iSlot, BYTE *pbData, DWORD cbData) override; @@ -73,7 +96,7 @@ class CMruBase STDMETHODIMP Delete(UINT iSlot) override; // Non-standard methods - virtual HRESULT _IsEqual(const SLOTITEMDATA *pSlot, LPCITEMIDLIST pidl, UINT cbPidl) const; + virtual BOOL _IsEqual(const SLOTITEMDATA *pItem, LPCVOID pvData, UINT cbData) const; virtual HRESULT _DeleteValue(LPCWSTR pszValue); virtual HRESULT _InitSlots() = 0; virtual void _SaveSlots() = 0; @@ -104,11 +127,7 @@ CMruBase::~CMruBase() { for (UINT iSlot = 0; iSlot < m_cSlots; ++iSlot) { - if (m_pSlots[iSlot].pidl) - { - ::LocalFree(m_pSlots[iSlot].pidl); - m_pSlots[iSlot].pidl = NULL; - } + m_pSlots[iSlot].pvData = ::LocalFree(m_pSlots[iSlot].pvData); } ::LocalFree(m_pSlots); @@ -130,58 +149,252 @@ STDMETHODIMP CMruBase::QueryInterface(REFIID riid, void **ppvObj) return E_NOINTERFACE; } +STDMETHODIMP_(ULONG) CMruBase::Release() +{ + if (::InterlockedDecrement(&m_cRefs) == 0) + { + _SaveSlots(); + delete this; + return 0; + } + return m_cRefs; +} + +HRESULT CMruBase::_LoadItem(UINT iSlot) +{ + DWORD cbData; + WCHAR szValue[12]; + + SLOTITEMDATA *pItem = &m_pSlots[iSlot]; + _SlotString(iSlot, szValue, _countof(szValue)); + + if (SHGetValueW(m_hKey, NULL, szValue, NULL, NULL, &cbData) == ERROR_SUCCESS && + cbData > 0) + { + pItem->pvData = ::LocalAlloc(LPTR, cbData); + if (pItem->pvData) + { + pItem->cbData = cbData; + if (SHGetValueW(m_hKey, NULL, szValue, NULL, pItem->pvData, &cbData) != ERROR_SUCCESS) + pItem->pvData = ::LocalFree(pItem->pvData); + } + } + + pItem->dwFlags |= SLOT_LOADED; + if (!pItem->pvData) + return E_FAIL; + + return S_OK; +} + +HRESULT CMruBase::_GetSlotItem(UINT iSlot, SLOTITEMDATA **ppItem) +{ + if (!(m_pSlots[iSlot].dwFlags & SLOT_LOADED)) + _LoadItem(iSlot); + + SLOTITEMDATA *pItem = &m_pSlots[iSlot]; + if (!pItem->pvData) + return E_OUTOFMEMORY; + + *ppItem = pItem; + return S_OK; +} + +HRESULT CMruBase::_GetItem(UINT iSlot, SLOTITEMDATA **ppItem) +{ + HRESULT hr = _GetSlot(iSlot, &iSlot); + if (FAILED(hr)) + return hr; + return _GetSlotItem(iSlot, ppItem); +} + +void CMruBase::_DeleteItem(UINT iSlot) +{ + WCHAR szBuff[12]; + + _SlotString(iSlot, szBuff, _countof(szBuff)); + _DeleteValue(szBuff); + + m_pSlots[iSlot].pvData = ::LocalFree(m_pSlots[iSlot].pvData); +} + +void CMruBase::_CheckUsedSlots() +{ + UINT iGotSlot; + for (UINT iSlot = 0; iSlot < m_cSlots; ++iSlot) + _GetSlot(iSlot, &iGotSlot); + + m_bChecked = TRUE; +} + +HRESULT CMruBase::_AddItem(UINT iSlot, const BYTE *pbData, DWORD cbData) +{ + SLOTITEMDATA *pItem = &m_pSlots[iSlot]; + + WCHAR szBuff[12]; + _SlotString(iSlot, szBuff, _countof(szBuff)); + + if (SHSetValueW(m_hKey, NULL, szBuff, REG_BINARY, pbData, cbData) != ERROR_SUCCESS) + return E_OUTOFMEMORY; + + if (cbData >= pItem->cbData || !pItem->pvData) + { + ::LocalFree(pItem->pvData); + pItem->pvData = ::LocalAlloc(LPTR, cbData); + } + + if (!pItem->pvData) + return E_FAIL; + + pItem->cbData = cbData; + pItem->dwFlags = (SLOT_LOADED | SLOT_UNKNOWN_FLAG); + CopyMemory(pItem->pvData, pbData, cbData); + return S_OK; +} + STDMETHODIMP CMruBase::InitData( UINT cCapacity, UINT flags, HKEY hKey, - LPCWSTR pszSubKey, - SLOTCOMPARE fnCompare) + LPCWSTR pszSubKey OPTIONAL, + SLOTCOMPARE fnCompare OPTIONAL) { - FIXME("Stub\n"); - return E_NOTIMPL; + m_dwFlags = flags; + m_fnCompare = fnCompare; + m_cSlotRooms = cCapacity; + + if (pszSubKey) + ::RegCreateKeyExWrapW(hKey, pszSubKey, 0, NULL, 0, MAXIMUM_ALLOWED, NULL, &m_hKey, NULL); + else + m_hKey = SHRegDuplicateHKey(hKey); + + if (!m_hKey) + return E_FAIL; + + m_pSlots = (SLOTITEMDATA*)::LocalAlloc(LPTR, m_cSlotRooms * sizeof(SLOTITEMDATA)); + if (!m_pSlots) + return E_OUTOFMEMORY; + + return _InitSlots(); } STDMETHODIMP CMruBase::AddData(const BYTE *pbData, DWORD cbData, UINT *piSlot) { - FIXME("Stub\n"); - return E_NOTIMPL; + UINT iSlot; + HRESULT hr = FindData(pbData, cbData, &iSlot); + if (FAILED(hr)) + { + iSlot = _UpdateSlots(m_cSlots); + hr = _AddItem(iSlot, pbData, cbData); + if (FAILED(hr)) + return hr; + } + else + { + iSlot = _UpdateSlots(iSlot); + hr = S_OK; + } + + if (piSlot) + *piSlot = iSlot; + + return hr; } STDMETHODIMP CMruBase::FindData(const BYTE *pbData, DWORD cbData, UINT *piSlot) { - FIXME("Stub\n"); - return E_NOTIMPL; + if (m_cSlots <= 0) + return E_FAIL; + + UINT iSlot = 0; + SLOTITEMDATA *pItem; + while (FAILED(_GetItem(iSlot, &pItem)) || !_IsEqual(pItem, pbData, cbData)) + { + if (++iSlot >= m_cSlots) + return E_FAIL; + } + + *piSlot = iSlot; + return S_OK; } STDMETHODIMP CMruBase::GetData(UINT iSlot, BYTE *pbData, DWORD cbData) { - FIXME("Stub\n"); - return E_NOTIMPL; + SLOTITEMDATA *pItem; + HRESULT hr = _GetItem(iSlot, &pItem); + if (FAILED(hr)) + return hr; + + if (cbData < pItem->cbData) + return 0x8007007A; // FIXME: Magic number + + CopyMemory(pbData, pItem->pvData, pItem->cbData); + return hr; } STDMETHODIMP CMruBase::QueryInfo(UINT iSlot, UINT *puSlot, DWORD *pcbData) { - FIXME("Stub\n"); - return E_NOTIMPL; + UINT iGotSlot; + HRESULT hr = _GetSlot(iSlot, &iGotSlot); + if (FAILED(hr)) + return hr; + + if (puSlot) + *puSlot = iGotSlot; + + if (pcbData) + { + SLOTITEMDATA *pItem; + hr = _GetSlotItem(iGotSlot, &pItem); + if (SUCCEEDED(hr)) + *pcbData = pItem->cbData; + } + + return hr; } STDMETHODIMP CMruBase::Delete(UINT iSlot) { - FIXME("Stub\n"); - return E_NOTIMPL; + UINT uSlot; + HRESULT hr = _RemoveSlot(iSlot, &uSlot); + if (FAILED(hr)) + return hr; + + _DeleteItem(uSlot); + return hr; } -HRESULT CMruBase::_IsEqual(const SLOTITEMDATA *pSlot, LPCITEMIDLIST pidl, UINT cbPidl) const +BOOL CMruBase::_IsEqual(const SLOTITEMDATA *pItem, LPCVOID pvData, UINT cbData) const { - FIXME("Stub\n"); - return E_NOTIMPL; + if (m_fnCompare) + return m_fnCompare(pvData, pItem->pvData, cbData) == 0; + + switch (m_dwFlags & COMPARE_BY_MASK) + { + case COMPARE_BY_MEMCMP: + if (pItem->cbData != cbData) + return FALSE; + return memcmp(pvData, pItem->pvData, cbData) == 0; + + case COMPARE_BY_STRCMPIW: + return StrCmpIW((LPCWSTR)pvData, (LPCWSTR)pItem->pvData) == 0; + + case COMPARE_BY_STRCMPW: + return StrCmpW((LPCWSTR)pvData, (LPCWSTR)pItem->pvData) == 0; + + case COMPARE_BY_IEILISEQUAL: + return IEILIsEqual((LPCITEMIDLIST)pvData, (LPCITEMIDLIST)pItem->pvData, FALSE); + + default: + ERR("0x%08X\n", m_dwFlags); + return FALSE; + } } HRESULT CMruBase::_DeleteValue(LPCWSTR pszValue) { - FIXME("Stub\n"); - return E_NOTIMPL; + return SHDeleteValueW(m_hKey, NULL, pszValue); } class CMruLongList diff --git a/dll/win32/shell32/CShellLink.cpp b/dll/win32/shell32/CShellLink.cpp index 7ad91f5c2d9..d8951860328 100644 --- a/dll/win32/shell32/CShellLink.cpp +++ b/dll/win32/shell32/CShellLink.cpp @@ -2802,6 +2802,27 @@ BOOL CShellLink::OnInitDialog(HWND hwndDlg, HWND hwndFocus, LPARAM lParam) if (m_sDescription) SetDlgItemTextW(hwndDlg, IDC_SHORTCUT_COMMENT_EDIT, m_sDescription); + /* Hot key */ + SendDlgItemMessageW(hwndDlg, IDC_SHORTCUT_KEY_HOTKEY, HKM_SETHOTKEY, m_Header.wHotKey, 0); + + /* Run */ + const WORD runstrings[] = { IDS_SHORTCUT_RUN_NORMAL, IDS_SHORTCUT_RUN_MIN, IDS_SHORTCUT_RUN_MAX }; + const DWORD runshowcmd[] = { SW_SHOWNORMAL, SW_SHOWMINNOACTIVE, SW_SHOWMAXIMIZED }; + HWND hRunCombo = GetDlgItem(hwndDlg, IDC_SHORTCUT_RUN_COMBO); + for (UINT i = 0; i < _countof(runstrings); ++i) + { + WCHAR buf[MAX_PATH]; + if (!LoadStringW(shell32_hInstance, runstrings[i], buf, _countof(buf))) + break; + + int index = SendMessageW(hRunCombo, CB_ADDSTRING, 0, (LPARAM)buf); + if (index < 0) + continue; + SendMessageW(hRunCombo, CB_SETITEMDATA, index, runshowcmd[i]); + if (!i || m_Header.nShowCommand == runshowcmd[i]) + SendMessageW(hRunCombo, CB_SETCURSEL, index, 0); + } + /* auto-completion */ SHAutoComplete(GetDlgItem(hwndDlg, IDC_SHORTCUT_TARGET_TEXT), SHACF_DEFAULT); SHAutoComplete(GetDlgItem(hwndDlg, IDC_SHORTCUT_START_IN_EDIT), SHACF_DEFAULT); @@ -2923,6 +2944,14 @@ LRESULT CShellLink::OnNotify(HWND hwndDlg, int idFrom, LPNMHDR pnmhdr) HeapFree(GetProcessHeap(), 0, unquoted); + m_Header.wHotKey = (WORD)SendDlgItemMessageW(hwndDlg, IDC_SHORTCUT_KEY_HOTKEY, HKM_GETHOTKEY, 0, 0); + + int index = (int)SendDlgItemMessageW(hwndDlg, IDC_SHORTCUT_RUN_COMBO, CB_GETCURSEL, 0, 0); + if (index != CB_ERR) + { + m_Header.nShowCommand = (UINT)SendDlgItemMessageW(hwndDlg, IDC_SHORTCUT_RUN_COMBO, CB_GETITEMDATA, index, 0); + } + TRACE("This %p m_sLinkPath %S\n", this, m_sLinkPath); Save(m_sLinkPath, TRUE); SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATHW, m_sLinkPath, NULL); diff --git a/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc index ec5b35e27ef..4a82d40d3a9 100644 --- a/dll/win32/shell32/lang/bg-BG.rc +++ b/dll/win32/shell32/lang/bg-BG.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "Бърз &клавиш:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "Из&пълняване:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "&Забележка:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Намиране на целта...", IDC_SHORTCUT_FIND, 10, 115, 75, 14, ES_LEFT @@ -482,13 +482,13 @@ BEGIN ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL END -IDD_LOG_OFF DIALOGEX 0, 0, 188, 60 +IDD_LOG_OFF DIALOGEX 0, 0, 212, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION CAPTION "Излизане от РеактОС" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Сигурни ли сте, че искате да излезете?", -1, 43, 11, 140, 22 + LTEXT "Сигурни ли сте, че искате да излезете?", -1, 49, 15, 156, 8 DEFPUSHBUTTON "&Излизане", IDOK, 49, 38, 43, 14 PUSHBUTTON "Отказ", IDCANCEL, 99, 38, 43, 14 END @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Browse" IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Пусков изборник\\Приложения" IDS_PERSONAL "Книжа" diff --git a/dll/win32/shell32/lang/ca-ES.rc b/dll/win32/shell32/lang/ca-ES.rc index 419d6347940..d6d46e3edc2 100644 --- a/dll/win32/shell32/lang/ca-ES.rc +++ b/dll/win32/shell32/lang/ca-ES.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "Shortcut &key:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Run:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "C&omment:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Find Target...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -488,7 +488,7 @@ CAPTION "Log Off Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Are you sure you want to log off?", -1, 49, 15, 131, 8 + LTEXT "Are you sure you want to log off?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Log Off", IDOK, 49, 38, 43, 14 PUSHBUTTON "Cancel", IDCANCEL, 99, 38, 43, 14 END @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Browse" IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Start Menu\\Programs" IDS_PERSONAL "My Documents" diff --git a/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc index 83923a6fe50..07975ecfae6 100644 --- a/dll/win32/shell32/lang/cs-CZ.rc +++ b/dll/win32/shell32/lang/cs-CZ.rc @@ -198,7 +198,7 @@ BEGIN LTEXT "Klávesová zk&ratka:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "Spusti&t:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "&Komentář:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Najít cíl...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -494,9 +494,9 @@ CAPTION "Odhlásit se ze systému Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Opravdu se chcete odhlásit?", -1, 35, 16, 146, 8 - DEFPUSHBUTTON "&Odhlásit", IDOK, 41, 39, 50, 14 - PUSHBUTTON "Storno", IDCANCEL, 95, 39, 50, 14 + LTEXT "Opravdu se chcete odhlásit?", -1, 49, 15, 132, 8 + DEFPUSHBUTTON "&Odhlásit", IDOK, 49, 38, 43, 14 + PUSHBUTTON "Storno", IDCANCEL, 99, 38, 43, 14 END IDD_DISCONNECT DIALOGEX 0, 0, 188, 60 @@ -860,6 +860,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Procházet" IDS_RUNDLG_BROWSE_FILTER "Spustitelné soubory (*.exe)\0*.exe\0Všechnysoubory (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Nabídka Start\\Programy" IDS_PERSONAL "Dokumenty" diff --git a/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc index e0e91e5986a..29fad16633b 100644 --- a/dll/win32/shell32/lang/da-DK.rc +++ b/dll/win32/shell32/lang/da-DK.rc @@ -198,7 +198,7 @@ BEGIN LTEXT "Shortcut &key:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Run:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "C&omment:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Find Target...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -494,7 +494,7 @@ CAPTION "Log Off Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Are you sure you want to log off?", -1, 49, 15, 131, 8 + LTEXT "Are you sure you want to log off?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Log Off", IDOK, 49, 38, 43, 14 PUSHBUTTON "Cancel", IDCANCEL, 99, 38, 43, 14 END @@ -860,6 +860,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Browse" IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Start Menu\\Programmer" IDS_PERSONAL "Mine Dokumenter" diff --git a/dll/win32/shell32/lang/de-DE.rc b/dll/win32/shell32/lang/de-DE.rc index 441807acb72..320659fa11e 100644 --- a/dll/win32/shell32/lang/de-DE.rc +++ b/dll/win32/shell32/lang/de-DE.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "&Kurztasten:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "Ausfüh&ren:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "K&ommentar:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Ziel finden...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -482,15 +482,15 @@ BEGIN ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL END -IDD_LOG_OFF DIALOGEX 0, 0, 188, 60 +IDD_LOG_OFF DIALOGEX 0, 0, 212, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION CAPTION "Abmelden" FONT 8, "MS Shell Dlg" BEGIN - ICON IDI_SHELL_LOGOFF, IDC_STATIC, 7, 7, 20, 20 - LTEXT "Sind Sie sicher, dass Sie sich abmelden wollen?", -1, 35, 16, 166, 8 - DEFPUSHBUTTON "&Abmelden", IDOK, 41, 39, 50, 14 - PUSHBUTTON "Abbrechen", IDCANCEL, 95, 39, 50, 14 + ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 + LTEXT "Sind Sie sicher, dass Sie sich abmelden wollen?", -1, 49, 15, 156, 8 + DEFPUSHBUTTON "&Abmelden", IDOK, 49, 38, 53, 14 + PUSHBUTTON "Abbrechen", IDCANCEL, 109, 38, 53, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -855,6 +855,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Durchsuchen" IDS_RUNDLG_BROWSE_FILTER "Ausführbare Dateien (*.exe)\0*.exe\0Alle Dateien (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Startmenü\\Programme" IDS_PERSONAL "Eigene Dateien" diff --git a/dll/win32/shell32/lang/el-GR.rc b/dll/win32/shell32/lang/el-GR.rc index 270a4456089..1a686b52241 100644 --- a/dll/win32/shell32/lang/el-GR.rc +++ b/dll/win32/shell32/lang/el-GR.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "Πλήκτρο &συντόμευσης:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "Εκ&τέλεση:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "&Σχόλια:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Εύρεση προορισμού...", IDC_SHORTCUT_FIND, 10, 115, 71, 14, ES_LEFT @@ -488,7 +488,7 @@ CAPTION "Log Off Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Are you sure you want to log off?", -1, 49, 15, 131, 8 + LTEXT "Are you sure you want to log off?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Log Off", IDOK, 49, 38, 43, 14 PUSHBUTTON "Cancel", IDCANCEL, 99, 38, 43, 14 END @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Browse" IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Start Menu\\Programs" IDS_PERSONAL "Τα έγγραφά μου" diff --git a/dll/win32/shell32/lang/en-GB.rc b/dll/win32/shell32/lang/en-GB.rc index 452c7e1d335..e78b5b01b1f 100644 --- a/dll/win32/shell32/lang/en-GB.rc +++ b/dll/win32/shell32/lang/en-GB.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "Shortcut &key:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Run:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "C&omment:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Find Target...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -488,7 +488,7 @@ CAPTION "Log Off Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Are you sure you want to log off?", -1, 49, 15, 131, 8 + LTEXT "Are you sure you want to log off?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Log Off", IDOK, 49, 38, 43, 14 PUSHBUTTON "Cancel", IDCANCEL, 99, 38, 43, 14 END @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Browse" IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Start Menu\\Programs" IDS_PERSONAL "My Documents" diff --git a/dll/win32/shell32/lang/en-US.rc b/dll/win32/shell32/lang/en-US.rc index a4321007e9e..400e3d3e57d 100644 --- a/dll/win32/shell32/lang/en-US.rc +++ b/dll/win32/shell32/lang/en-US.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "Shortcut &key:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Run:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "C&omment:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Find Target...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -488,7 +488,7 @@ CAPTION "Log Off Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Are you sure you want to log off?", -1, 49, 15, 131, 8 + LTEXT "Are you sure you want to log off?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Log Off", IDOK, 49, 38, 43, 14 PUSHBUTTON "Cancel", IDCANCEL, 99, 38, 43, 14 END @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Browse" IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Start Menu\\Programs" IDS_PERSONAL "My Documents" diff --git a/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc index 828f47e6257..e986f203371 100644 --- a/dll/win32/shell32/lang/es-ES.rc +++ b/dll/win32/shell32/lang/es-ES.rc @@ -201,7 +201,7 @@ BEGIN LTEXT "&Tecla de método abreviado:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Ejecutar:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "C&omentario:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Abrir ubicación...", IDC_SHORTCUT_FIND, 9, 172, 62, 14, ES_LEFT @@ -491,15 +491,15 @@ BEGIN ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL END -IDD_LOG_OFF DIALOGEX 0, 0, 188, 60 +IDD_LOG_OFF DIALOGEX 0, 0, 212, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION CAPTION "Cerrar sesión de Windivs" FONT 8, "MS Shell Dlg" BEGIN - ICON IDI_SHELL_LOGOFF, IDC_STATIC, 7, 7, 20, 20 - LTEXT "¿Esta seguro de que quiere cerrar la sesión?", -1, 35, 16, 146, 8 - DEFPUSHBUTTON "&Cerrar sesión", IDOK, 41, 39, 50, 14 - PUSHBUTTON "Cancelar", IDCANCEL, 95, 39, 50, 14 + ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 + LTEXT "¿Esta seguro de que quiere cerrar la sesión?", -1, 49, 15, 156, 8 + DEFPUSHBUTTON "&Cerrar sesión", IDOK, 49, 38, 53, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 109, 38, 53, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -863,6 +863,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Examinar" IDS_RUNDLG_BROWSE_FILTER "Archivos ejecutables (*.exe)\0*.exe\0Todos los archivos (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Menú Inicio\\Programas" IDS_PERSONAL "Mis documentos" diff --git a/dll/win32/shell32/lang/et-EE.rc b/dll/win32/shell32/lang/et-EE.rc index dc14a3b5a9f..755a8736301 100644 --- a/dll/win32/shell32/lang/et-EE.rc +++ b/dll/win32/shell32/lang/et-EE.rc @@ -199,7 +199,7 @@ BEGIN LTEXT "Kiirkla&hv:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Käivita:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "K&ommentaar:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Otsi sihtüksus...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -495,7 +495,7 @@ CAPTION "Logi Windivs'ist välja" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Kas soovid kindlasti välja logida?", -1, 49, 15, 131, 8 + LTEXT "Kas soovid kindlasti välja logida?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Logi välja", IDOK, 49, 38, 43, 14 PUSHBUTTON "Loobu", IDCANCEL, 99, 38, 43, 14 END @@ -861,6 +861,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Sirvi" IDS_RUNDLG_BROWSE_FILTER "Rakendatavad failid (*.exe)\0*.exe\0Kõik failid (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Start Menu\\Programs" IDS_PERSONAL "Minu dokumendid" diff --git a/dll/win32/shell32/lang/eu-ES.rc b/dll/win32/shell32/lang/eu-ES.rc index c7d776890da..51b0a337208 100644 --- a/dll/win32/shell32/lang/eu-ES.rc +++ b/dll/win32/shell32/lang/eu-ES.rc @@ -199,7 +199,7 @@ BEGIN LTEXT "Las&ter-tekla:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "Exe&kutatu:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "&Iruzkina:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Bilatu helburua...", IDC_SHORTCUT_FIND, 9, 172, 62, 14, ES_LEFT @@ -494,10 +494,10 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION CAPTION "Amaitu Windivs saioa" FONT 8, "MS Shell Dlg" BEGIN - ICON IDI_SHELL_LOGOFF, IDC_STATIC, 7, 7, 20, 20 - LTEXT "Ziur zaude saioa amaitu nahi duzula?", -1, 35, 16, 146, 8 - DEFPUSHBUTTON "Ama&itu saioa", IDOK, 41, 39, 50, 14 - PUSHBUTTON "Utzi", IDCANCEL, 95, 39, 50, 14 + ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 + LTEXT "Ziur zaude saioa amaitu nahi duzula?", -1, 49, 15, 132, 8 + DEFPUSHBUTTON "Ama&itu saioa", IDOK, 49, 38, 53, 14 + PUSHBUTTON "Utzi", IDCANCEL, 109, 38, 53, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -859,6 +859,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Arakatu" IDS_RUNDLG_BROWSE_FILTER "Exekutatuko fitxategi (*.exe)\0*.exe\0Fitxategi denak (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Hasi Menua\\Programak" IDS_PERSONAL "Nire dokumentuak" diff --git a/dll/win32/shell32/lang/fi-FI.rc b/dll/win32/shell32/lang/fi-FI.rc index 70bc8b81ecc..870e9f5d65c 100644 --- a/dll/win32/shell32/lang/fi-FI.rc +++ b/dll/win32/shell32/lang/fi-FI.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "Shortcut &key:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Run:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "C&omment:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Find Target...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -488,7 +488,7 @@ CAPTION "Log Off Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Are you sure you want to log off?", -1, 49, 15, 131, 8 + LTEXT "Are you sure you want to log off?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Log Off", IDOK, 49, 38, 43, 14 PUSHBUTTON "Cancel", IDCANCEL, 99, 38, 43, 14 END @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Browse" IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Käynnistä\\Ohjelmat" IDS_PERSONAL "Omat tiedostot" diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc index c0cd55c7347..98641093036 100644 --- a/dll/win32/shell32/lang/fr-FR.rc +++ b/dll/win32/shell32/lang/fr-FR.rc @@ -164,7 +164,7 @@ CAPTION "Exécuter" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_RUNDLG_ICON, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Entrez le nom d'un programme, d'un dossier, d'un document ou d'une ressource Internet, et Windivs l'ouvrira pour vous.", 12289, 36, 4, 185, 26 + LTEXT "Entrez le nom d'un programme, d'un dossier, d'un document ou d'une ressource Internet, et ReactOS l'ouvrira pour vous.", 12289, 36, 4, 185, 26 LTEXT "&Ouvrir :", 12305, 7, 39, 26, 10 CONTROL "", IDC_RUNDLG_EDITPATH, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 184, 100 DEFPUSHBUTTON "OK", IDOK, 62, 70, 50, 14, WS_TABSTOP @@ -192,7 +192,7 @@ BEGIN LTEXT "&Touche de raccourci :", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Exécuter :", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "C&ommentaire :", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "Trouver la cible...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -414,7 +414,7 @@ BEGIN GROUPBOX "Tâches", -1, 7, 10, 249, 45 CONTROL "", IDC_FOLDER_OPTIONS_TASKICON, "Static", SS_ICON | WS_CHILD | WS_VISIBLE, 14, 25, 21, 20 AUTORADIOBUTTON "Afficher les tâches habituelles dans les dossiers", IDC_FOLDER_OPTIONS_COMMONTASKS, 40, 25, 205, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Utiliser les dossiers Windivs class&iques", IDC_FOLDER_OPTIONS_CLASSICFOLDERS, 40, 37, 205, 10 + AUTORADIOBUTTON "Utiliser les dossiers ReactOS class&iques", IDC_FOLDER_OPTIONS_CLASSICFOLDERS, 40, 37, 205, 10 GROUPBOX "Parcourir les dossiers", -1, 7, 60, 249, 45, WS_TABSTOP CONTROL "", IDC_FOLDER_OPTIONS_FOLDERICON, "Static", SS_ICON | WS_CHILD | WS_VISIBLE, 14, 70, 21, 20 AUTORADIOBUTTON "Ouvrir tous les dossiers dans la &même fenêtre", IDC_FOLDER_OPTIONS_SAMEWINDOW, 40, 70, 205, 10, WS_TABSTOP | WS_GROUP @@ -482,15 +482,15 @@ BEGIN ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL END -IDD_LOG_OFF DIALOGEX 0, 0, 188, 60 +IDD_LOG_OFF DIALOGEX 0, 0, 212, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION CAPTION "Fermer Windivs" FONT 8, "MS Shell Dlg" BEGIN - ICON IDI_SHELL_LOGOFF, IDC_STATIC, 7, 7, 20, 20 - LTEXT "Êtes-vous sûr de vouloir fermer Windivs ?", -1, 35, 16, 146, 8 - DEFPUSHBUTTON "Fermer", IDOK, 41, 39, 50, 14 - PUSHBUTTON "Annuler", IDCANCEL, 95, 39, 50, 14 + ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 + LTEXT "Êtes-vous sûr de vouloir fermer Windivs?", -1, 49, 15, 156, 8 + DEFPUSHBUTTON "&Fermer", IDOK, 49, 38, 43, 14 + PUSHBUTTON "Annuler", IDCANCEL, 99, 38, 43, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -502,14 +502,14 @@ BEGIN PUSHBUTTON "&Switch User", IDC_SWITCH_USER_BUTTON, 55, 46, 22, 20, BS_OWNERDRAW | WS_DISABLED | WS_GROUP PUSHBUTTON "&Fermer", IDC_LOG_OFF_BUTTON, 132, 46, 22, 20, BS_OWNERDRAW PUSHBUTTON "Annuler", IDCANCEL, 162, 103, 40, 12, WS_GROUP | BS_FLAT - LTEXT "Fermer Windivs", IDC_LOG_OFF_TEXT_STATIC, 4, 7, 130, 19 + LTEXT "Fermer ReactOS", IDC_LOG_OFF_TEXT_STATIC, 4, 7, 130, 19 CTEXT "Switch User", IDC_SWITCH_USER_STATIC, 41, 70, 51, 11 CTEXT "Fermer", IDC_LOG_OFF_STATIC, 118, 70, 51, 11 END IDD_DISCONNECT DIALOGEX 0, 0, 188, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Déconnecter Windivs" +CAPTION "Déconnecter ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_DISCONN, IDC_STATIC, 8, 6, 21, 20 @@ -523,7 +523,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLIN CAPTION "Exécution automatique" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Sélectionnez un type de contenu, puis choisissez une action que Windivs réalisera automatiquement quand ce type sera utilisé dans ce périphérique :", 1000, 7, 7, 215, 20 + LTEXT "Sélectionnez un type de contenu, puis choisissez une action que ReactOS réalisera automatiquement quand ce type sera utilisé dans ce périphérique :", 1000, 7, 7, 215, 20 CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 GROUPBOX "Actions", -1, 7, 45, 212, 146 AUTORADIOBUTTON "Sélectionnez une action à réaliser :", 1005, 14, 54, 202, 10, WS_GROUP @@ -539,7 +539,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", 1000, 5, 7, 21, 20 LTEXT "Ce disque ou dispositif contient plus d'un type de fichiers.", 1001, 32, 7, 191, 20 - LTEXT "Que voulez-vous que Windivs fasse ?", 1002, 32, 31, 188, 8 + LTEXT "Que voulez-vous que ReactOS fasse ?", 1002, 32, 31, 188, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 PUSHBUTTON "Annuler", IDCANCEL, 160, 186, 60, 14 @@ -551,10 +551,10 @@ CAPTION "Contenu mixte" FONT 8, "MS Shell Dlg" BEGIN ICON "", 1000, 5, 7, 21, 20 - LTEXT "Windivs peut réaliser la même action chaque fois que vous insérez un disque ou connectez un dispositif avec ce type de fichiers :", 1001, 30, 7, 193, 20 + LTEXT "ReactOS peut réaliser la même action chaque fois que vous insérez un disque ou connectez un dispositif avec ce type de fichiers :", 1001, 30, 7, 193, 20 ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "Que voulez-vous que Windivs fasse ?", 1002, 32, 41, 190, 8 + LTEXT "Que voulez-vous que ReactOS fasse ?", 1002, 32, 41, 190, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 AUTOCHECKBOX "Toujours réaliser l'action sélectionnée.", 1004, 32, 171, 190, 10 DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 @@ -567,8 +567,8 @@ CAPTION "Exécution automatique" FONT 8, "MS Shell Dlg" BEGIN ICON "", 1000, 5, 7, 21, 20 - LTEXT "Windivs peut réaliser la même action chaque fois que vous connectez ce dispositif.", 1001, 32, 7, 190, 22 - LTEXT "Que voulez-vous que Windivs fasse ?", 1002, 32, 31, 190, 8 + LTEXT "ReactOS peut réaliser la même action chaque fois que vous connectez ce dispositif.", 1001, 32, 7, 190, 22 + LTEXT "Que voulez-vous que ReactOS fasse ?", 1002, 32, 31, 190, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 AUTOCHECKBOX "Toujours réaliser l'action sélectionnée", 1004, 32, 143, 190, 8 DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 @@ -577,7 +577,7 @@ END IDD_SHUTDOWN DIALOGEX 0, 0, 211, 103 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Fermer Windivs" +CAPTION "Fermer ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Parcourir" IDS_RUNDLG_BROWSE_FILTER "Fichiers exécutables (*.exe)\0*.exe\0Tous les fichiers (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Menu Démarrer\\Programmes" IDS_PERSONAL "Mes documents" diff --git a/dll/win32/shell32/lang/he-IL.rc b/dll/win32/shell32/lang/he-IL.rc index 46f1a9382c2..a379e8abec1 100644 --- a/dll/win32/shell32/lang/he-IL.rc +++ b/dll/win32/shell32/lang/he-IL.rc @@ -194,7 +194,7 @@ BEGIN LTEXT "מקש קיצור:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "הפעל:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "הערה:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "פתח מיקום קובץ", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -490,7 +490,7 @@ CAPTION "התנתקות מ-Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "האם אתה בטוח שברצונך להתנתק?", -1, 49, 15, 131, 8 + LTEXT "האם אתה בטוח שברצונך להתנתק?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "התנתק", IDOK, 49, 38, 43, 14 PUSHBUTTON "ביטול", IDCANCEL, 99, 38, 43, 14 END @@ -856,6 +856,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "עיון" IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "תפריט ההתחלה\\תכניות" IDS_PERSONAL "המסמכים שלי" diff --git a/dll/win32/shell32/lang/hi-IN.rc b/dll/win32/shell32/lang/hi-IN.rc index 07fab3559fb..d53bb14d053 100644 --- a/dll/win32/shell32/lang/hi-IN.rc +++ b/dll/win32/shell32/lang/hi-IN.rc @@ -1,3 +1,10 @@ +/* + * PROJECT: ReactOS Shell32 + * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) + * PURPOSE: Hindi (India) resource file + * TRANSLATOR: Copyright 2019 Arnav Bhatt + */ + LANGUAGE LANG_HINDI, SUBLANG_HINDI_INDIA MENU_001 MENUEX @@ -192,7 +199,7 @@ BEGIN LTEXT "शॉर्टकट &की:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&रन:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "&टिप्पणी:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&टारगेट ढूंढें...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -488,7 +495,7 @@ CAPTION "लॉग ऑफ़ रिऐक्ट ओएस" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "क्या आप वाकई लॉग आफ़ करना चाहते हैं?", -1, 49, 15, 131, 8 + LTEXT "क्या आप वाकई लॉग आफ़ करना चाहते हैं?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&लॉग आफ़", IDOK, 49, 38, 43, 14 PUSHBUTTON "रद्द करें", IDCANCEL, 99, 38, 43, 14 END @@ -849,6 +856,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "ब्राउज़" IDS_RUNDLG_BROWSE_FILTER "एक्सेक्यूटेबल फ़ाइलें (*.exe)\0*.exe\0सारे फ़ाइलें (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "प्रारंभ मेनू\\प्रोग्राम" IDS_PERSONAL "मेरे डॉक्यूमेंट" @@ -1020,7 +1032,7 @@ BEGIN IDS_SPECIFY_ACTION "आपको एक कार्रवाई निर्दिष्ट करनी चाहिए।" IDS_INVALID_PROGRAM "निर्दिष्ट प्रोग्राम नहीं मिल सका। सुनिश्चित करें कि फ़ाइल का नाम और पथ सही है।" IDS_REMOVE_ACTION "क्या आप वाकई इस कार्रवाई को हटाना चाहते हैं?" - IDS_ACTION_EXISTS "इस फ़ाइल प्रकार के लिए कार्रवाई '% s' पहले से ही पंजीकृत है। कृपया एक अलग नाम दर्ज करें और पुनः प्रयास करें।" + IDS_ACTION_EXISTS "इस फ़ाइल प्रकार के लिए कार्रवाई '%s' पहले से ही पंजीकृत है। कृपया एक अलग नाम दर्ज करें और पुनः प्रयास करें।" IDS_EXE_FILTER "प्रोग्राम\0*.exe\0सारे फ़ाइल\0*.*\0" IDS_EDITING_ACTION "प्रकार के लिए संपादन कार्रवाई:" IDS_NO_ICONS "फ़ाइल '%s' में कोई आइकन नहीं है।\n\nसूची से एक आइकन चुनें या एक अलग फ़ाइल निर्दिष्ट करें।" diff --git a/dll/win32/shell32/lang/hu-HU.rc b/dll/win32/shell32/lang/hu-HU.rc index a5e883ff4a2..cbb6ed76f0c 100644 --- a/dll/win32/shell32/lang/hu-HU.rc +++ b/dll/win32/shell32/lang/hu-HU.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "&Billentyűparancs:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Futtatás:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "&Megjegyzés:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "Cé&l keresése...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -488,9 +488,9 @@ CAPTION "Kijelentkezés a Windivs-ből" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Biztosan ki akar jelentkezni?", -1, 49, 15, 131, 8 + LTEXT "Biztosan ki akar jelentkezni?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Kijelentkezés", IDOK, 49, 38, 53, 14 - PUSHBUTTON "Mégse", IDCANCEL, 109, 38, 43, 14 + PUSHBUTTON "Mégse", IDCANCEL, 109, 38, 53, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -805,11 +805,11 @@ BEGIN IDS_COPYERRORSAME "'%s' nem másolható: a forrás- és célfájl ugyanaz." IDS_MOVEERRORSUBFOLDER "'%s' nem mozgatható: a célmappa a forrásmappa egyik almappája." IDS_COPYERRORSUBFOLDER "'%s' nem másolható: a célmappa a forrásmappa egyik almappája." - IDS_MOVEERROR "Cannot move '%s': %s" - IDS_COPYERROR "Cannot copy '%s': %s" + IDS_MOVEERROR "'%s' nem mozgatható: %s" + IDS_COPYERROR "'%s' nem másolható: %s" - IDS_CREATEFILE_DENIED "Could not create file %1" - IDS_CREATEFILE_CAPTION "Error creating file" + IDS_CREATEFILE_DENIED "Nem sikerült a(z) %1 fájl létrehozása" + IDS_CREATEFILE_CAPTION "Hiba a fájl létrehozásakor" IDS_CREATEFOLDER_DENIED "Nem sikerült a(z) '%1' mappa létrehozása." IDS_CREATEFOLDER_CAPTION "Nem sikerült létrehozni a mappát" IDS_DELETEITEM_CAPTION "Állomány törlés megerősítése" @@ -853,6 +853,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Tallózás" IDS_RUNDLG_BROWSE_FILTER "Futtatható fájlok (*.exe)\0*.exe\0Minden fájl (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Start menü\\Programok" IDS_PERSONAL "Dokumentumok" @@ -884,7 +889,7 @@ BEGIN IDS_NETWORKPLACE "Hálózati helyek" IDS_NEWFOLDER "Új mappa" - IDS_NEWITEMFORMAT "New %s" + IDS_NEWITEMFORMAT "Új %s" IDS_DRIVE_FIXED "Helyi lemez" IDS_DRIVE_CDROM "CD-meghajtó" @@ -902,7 +907,7 @@ BEGIN IDS_SHELL_ABOUT_AUTHORS "&Készítők" IDS_SHELL_ABOUT_CHANGELOG "&Changelog" IDS_SHELL_ABOUT_BACK "< &Vissza" - FCIDM_SHVIEW_NEW "Ne&w" /* A menu item with an ampersand */ + FCIDM_SHVIEW_NEW "Ú&j" /* A menu item with an ampersand */ FCIDM_SHVIEW_NEWFOLDER "&Mappa" FCIDM_SHVIEW_NEWLINK "&Parancsikon" IDS_FOLDER_OPTIONS "Mappabeállítások" diff --git a/dll/win32/shell32/lang/id-ID.rc b/dll/win32/shell32/lang/id-ID.rc index ea597525bf5..404f4c9b414 100644 --- a/dll/win32/shell32/lang/id-ID.rc +++ b/dll/win32/shell32/lang/id-ID.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "&Tombol pintasan:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Jalankan:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "K&omentar:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Cari Target...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -488,7 +488,7 @@ CAPTION "Keluar Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Anda yakin ingin keluar?", -1, 49, 15, 131, 8 + LTEXT "Anda yakin ingin keluar?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Keluar", IDOK, 49, 38, 43, 14 PUSHBUTTON "Batal", IDCANCEL, 99, 38, 43, 14 END @@ -851,6 +851,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Jelajah" IDS_RUNDLG_BROWSE_FILTER "Berkas Eksekusi (*.exe)\0*.exe\0Semua Berkas (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Menu Mulai\\Program" IDS_PERSONAL "Dokumen Saya" diff --git a/dll/win32/shell32/lang/it-IT.rc b/dll/win32/shell32/lang/it-IT.rc index 80ecf05b829..b4e8f6ffe1f 100644 --- a/dll/win32/shell32/lang/it-IT.rc +++ b/dll/win32/shell32/lang/it-IT.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "&Tasto per il collegamento:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "E&secuzione:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "C&ommento:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Trova...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -482,15 +482,15 @@ BEGIN ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL END -IDD_LOG_OFF DIALOGEX 0, 0, 188, 60 +IDD_LOG_OFF DIALOGEX 0, 0, 212, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION CAPTION "Chiudi sessione di Windivs" FONT 8, "MS Shell Dlg" BEGIN - ICON IDI_SHELL_LOGOFF, IDC_STATIC, 7, 7, 20, 20 - LTEXT "Siete sicuro di voler chiudere la sessione?", -1, 35, 16, 146, 8 - DEFPUSHBUTTON "&Chiudi sessione", IDOK, 35, 39, 55, 14 - PUSHBUTTON "Annulla", IDCANCEL, 95, 39, 50, 14 + ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 + LTEXT "Siete sicuro di voler chiudere la sessione?", -1, 49, 15, 156, 8 + DEFPUSHBUTTON "&Chiudi sessione", IDOK, 49, 38, 57, 14 + PUSHBUTTON "Annulla", IDCANCEL, 113, 38, 57, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Sfoglia" IDS_RUNDLG_BROWSE_FILTER "File Eseguibili (*.exe)\0*.exe\0Tutti i file (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Menu Avvio\\Programmi" IDS_PERSONAL "Documenti Personali" diff --git a/dll/win32/shell32/lang/ja-JP.rc b/dll/win32/shell32/lang/ja-JP.rc index 8445a4cbec9..475eb8c4c16 100644 --- a/dll/win32/shell32/lang/ja-JP.rc +++ b/dll/win32/shell32/lang/ja-JP.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "ショートカットキー(&K):", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "実行状態 (&R):", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "コメント(&O):", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "対象の検索(&F)...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -487,10 +487,10 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION CAPTION "Windivs のログオフ" FONT 9, "MS UI Gothic" BEGIN - ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 22, 21 - LTEXT "ログオフしてもよろしいですか?", -1, 43, 11, 140, 22 - DEFPUSHBUTTON "ログオフ(&L)", IDOK, 41, 39, 50, 14 - PUSHBUTTON "キャンセル", IDCANCEL, 95, 39, 50, 14 + ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 + LTEXT "ログオフしてもよろしいですか?", -1, 49, 15, 132, 8 + DEFPUSHBUTTON "ログオフ(&L)", IDOK, 49, 38, 43, 14 + PUSHBUTTON "キャンセル", IDCANCEL, 99, 38, 43, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -851,6 +851,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "参照" IDS_RUNDLG_BROWSE_FILTER "実行可能ファイル (*.exe)\0*.exe\0すべてのファイル (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "スタート メニュー\\プログラム" IDS_PERSONAL "マイ ドキュメント" diff --git a/dll/win32/shell32/lang/ko-KR.rc b/dll/win32/shell32/lang/ko-KR.rc index fab3951da5d..7dd37d050f3 100644 --- a/dll/win32/shell32/lang/ko-KR.rc +++ b/dll/win32/shell32/lang/ko-KR.rc @@ -199,7 +199,7 @@ BEGIN LTEXT "바로 가기 키(&K):", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "실행(&R):", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "설명(&C)...", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "대상 찾기(&F)...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -495,7 +495,7 @@ CAPTION "Log Off Windivs" FONT 9, "굴림" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Are you sure you want to log off?", -1, 49, 15, 131, 8 + LTEXT "Are you sure you want to log off?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Log Off", IDOK, 49, 38, 43, 14 PUSHBUTTON "Cancel", IDCANCEL, 99, 38, 43, 14 END @@ -861,6 +861,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Browse" IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Start Menu\\Programs" IDS_PERSONAL "내 문서" diff --git a/dll/win32/shell32/lang/nl-NL.rc b/dll/win32/shell32/lang/nl-NL.rc index 4b76563fd37..be1d4bb7f8e 100644 --- a/dll/win32/shell32/lang/nl-NL.rc +++ b/dll/win32/shell32/lang/nl-NL.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "Shortcut &key:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Run:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "C&omment:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Find Target...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -488,7 +488,7 @@ CAPTION "Log Off Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Are you sure you want to log off?", -1, 49, 15, 131, 8 + LTEXT "Are you sure you want to log off?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Log Off", IDOK, 49, 38, 43, 14 PUSHBUTTON "Cancel", IDCANCEL, 99, 38, 43, 14 END @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Browse" IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Start Menu\\Programs" IDS_PERSONAL "My Documents" diff --git a/dll/win32/shell32/lang/no-NO.rc b/dll/win32/shell32/lang/no-NO.rc index 57ad9f3ca09..11053231e32 100644 --- a/dll/win32/shell32/lang/no-NO.rc +++ b/dll/win32/shell32/lang/no-NO.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "Snarvei nø&kkel:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "Kjø&r:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "K&ommentar:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Finn mål...", IDC_SHORTCUT_FIND, 10, 115, 63, 14, ES_LEFT @@ -488,9 +488,9 @@ CAPTION "Logg av Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Er du sikker på at du vil logge av?", -1, 43, 11, 140, 22 - DEFPUSHBUTTON "&Logg av", IDOK, 57, 40, 60, 14 - PUSHBUTTON "Avbryt", IDCANCEL, 122, 40, 60, 14 + LTEXT "Er du sikker på at du vil logge av?", -1, 49, 15, 132, 8 + DEFPUSHBUTTON "&Logg av", IDOK, 49, 38, 43, 14 + PUSHBUTTON "Avbryt", IDCANCEL, 99, 38, 43, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Browse" IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Start-meny\\Programmer" IDS_PERSONAL "Mine dokumenter" diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc index caf75f1244f..be0021be90c 100644 --- a/dll/win32/shell32/lang/pl-PL.rc +++ b/dll/win32/shell32/lang/pl-PL.rc @@ -198,7 +198,7 @@ BEGIN LTEXT "Klawisz &skrótu:", IDC_SHORTCUT_KEY, 7, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "U&ruchom:", IDC_SHORTCUT_RUN, 7, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "K&omentarz:", IDC_SHORTCUT_COMMENT, 7, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Znajdź element docelowy...", IDC_SHORTCUT_FIND, 7, 172, 96, 14, ES_LEFT @@ -494,9 +494,9 @@ CAPTION "Wylogowywanie z systemu Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Czy na pewno chcesz się wylogować?", -1, 35, 16, 146, 8 - DEFPUSHBUTTON "&Wyloguj", IDOK, 41, 39, 50, 14 - PUSHBUTTON "Anuluj", IDCANCEL, 95, 39, 50, 14 + LTEXT "Czy na pewno chcesz się wylogować?", -1, 49, 15, 132, 8 + DEFPUSHBUTTON "&Wyloguj", IDOK, 49, 38, 43, 14 + PUSHBUTTON "Anuluj", IDCANCEL, 99, 38, 43, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 278, 122 @@ -860,6 +860,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Przeglądanie" IDS_RUNDLG_BROWSE_FILTER "Programy (*.exe)\0*.exe\0Wszystkie pliki (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Menu Start\\Programy" IDS_PERSONAL "Moje dokumenty" diff --git a/dll/win32/shell32/lang/pt-BR.rc b/dll/win32/shell32/lang/pt-BR.rc index f7794ffa87d..a8e6b73977a 100644 --- a/dll/win32/shell32/lang/pt-BR.rc +++ b/dll/win32/shell32/lang/pt-BR.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "&Tecla de atalho:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Executar:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "C&omentário:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Procurar Alvo...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -482,13 +482,13 @@ BEGIN ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL END -IDD_LOG_OFF DIALOGEX 0, 0, 188, 60 +IDD_LOG_OFF DIALOGEX 0, 0, 212, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION CAPTION "Log Off Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Você tem certeza que desejar realizar log off?", -1, 35, 15, 148, 8 + LTEXT "Você tem certeza que desejar realizar log off?", -1, 49, 15, 156, 8 DEFPUSHBUTTON "&Log Off", IDOK, 49, 38, 43, 14 PUSHBUTTON "Cancelar", IDCANCEL, 99, 38, 43, 14 END @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Procurar" IDS_RUNDLG_BROWSE_FILTER "Arquivos Executáveis (*.exe)\0*.exe\0Todos os arquivos (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Menu Iniciar\\Programas" IDS_PERSONAL "Meus Documentos" diff --git a/dll/win32/shell32/lang/pt-PT.rc b/dll/win32/shell32/lang/pt-PT.rc index 30b1bb6711b..a6638273fac 100644 --- a/dll/win32/shell32/lang/pt-PT.rc +++ b/dll/win32/shell32/lang/pt-PT.rc @@ -1,4 +1,4 @@ -LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL +LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_PORTUGAL MENU_001 MENUEX BEGIN @@ -192,7 +192,7 @@ BEGIN LTEXT "&Tecla de atalho:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "Executar:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "C&omentário:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Localizar destino...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -482,15 +482,15 @@ BEGIN ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL END -IDD_LOG_OFF DIALOGEX 0, 0, 188, 60 +IDD_LOG_OFF DIALOGEX 0, 0, 212, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION CAPTION "Terminar sessão Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Pretende terminar a sessão?", -1, 43, 15, 170, 8 - DEFPUSHBUTTON "&Terminar a sessão", IDOK, 30, 38, 64, 14 - PUSHBUTTON "&Cancelar", IDCANCEL, 99, 38, 43, 14 + LTEXT "Pretende terminar a sessão?", -1, 49, 15, 156, 8 + DEFPUSHBUTTON "&Terminar a sessão", IDOK, 49, 38, 67, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 123, 38, 67, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -853,6 +853,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Localizar" IDS_RUNDLG_BROWSE_FILTER "Ficheiros executáveis (*.exe)\0*.exe\0Todos (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Menu Iniciar\\Programas" IDS_PERSONAL "Os Meus Documentos" diff --git a/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc index 3fa89bdc47b..e081df2b8a2 100644 --- a/dll/win32/shell32/lang/ro-RO.rc +++ b/dll/win32/shell32/lang/ro-RO.rc @@ -195,7 +195,7 @@ BEGIN LTEXT "Taste &rapide:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "E&xecuție:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "&Comentariu:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Locul țintei", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -491,9 +491,9 @@ CAPTION "Deautentificare" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Sigur doriți să vă deautentificați?", -1, 35, 16, 146, 8 - DEFPUSHBUTTON "&Deautentifică", IDOK, 41, 39, 50, 14 - PUSHBUTTON "A&nulează", IDCANCEL, 95, 39, 50, 14 + LTEXT "Sigur doriți să vă deautentificați?", -1, 49, 15, 132, 8 + DEFPUSHBUTTON "&Deautentifică", IDOK, 49, 38, 53, 14 + PUSHBUTTON "Anulează", IDCANCEL, 109, 38, 53, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -857,6 +857,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Specificare fișiere" IDS_RUNDLG_BROWSE_FILTER "Fișiere executabile (*.exe)\0*.exe\0Orice fișier (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Meniul Pornire\\Programe" IDS_PERSONAL "Documentele mele" diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc index 0a222e42d11..c0fd978d41c 100644 --- a/dll/win32/shell32/lang/ru-RU.rc +++ b/dll/win32/shell32/lang/ru-RU.rc @@ -199,7 +199,7 @@ BEGIN LTEXT "Б&ыстрый вызов:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "Ок&но:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "&Комментарий:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Найти объект...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -489,15 +489,15 @@ BEGIN ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL END -IDD_LOG_OFF DIALOGEX 0, 0, 188, 60 +IDD_LOG_OFF DIALOGEX 0, 0, 212, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION CAPTION "Выход из Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Вы действительно хотите выйти из системы?", -1, 35, 16, 146, 8 - DEFPUSHBUTTON "В&ыход", IDOK, 41, 39, 50, 14 - PUSHBUTTON "Отмена", IDCANCEL, 95, 39, 50, 14 + LTEXT "Вы действительно хотите выйти из системы?", -1, 49, 15, 156, 8 + DEFPUSHBUTTON "В&ыход", IDOK, 49, 38, 43, 14 + PUSHBUTTON "Отмена", IDCANCEL, 99, 38, 43, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -861,6 +861,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Обзор" IDS_RUNDLG_BROWSE_FILTER "Исполняемые файлы (*.exe)\0*.exe\0Все файлы (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Обычный размер окна" + IDS_SHORTCUT_RUN_MIN "Свёрнутое в значок" + IDS_SHORTCUT_RUN_MAX "Развёрнутое на весь экран" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Главное меню\\Программы" IDS_PERSONAL "Мои документы" diff --git a/dll/win32/shell32/lang/sk-SK.rc b/dll/win32/shell32/lang/sk-SK.rc index fc0e2d97145..3ea4107e524 100644 --- a/dll/win32/shell32/lang/sk-SK.rc +++ b/dll/win32/shell32/lang/sk-SK.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "&Klávesová skratka:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "Sp&ustiť:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "Pozná&mka:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Hľadať cieľ...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -488,7 +488,7 @@ CAPTION "Odhlásiť Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Ste si istý, že sa chcete odhlásiť?", -1, 49, 15, 131, 8 + LTEXT "Ste si istý, že sa chcete odhlásiť?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "O&dhlásiť", IDOK, 49, 38, 43, 14 PUSHBUTTON "Zrušiť", IDCANCEL, 99, 38, 43, 14 END @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Prehľadávať" IDS_RUNDLG_BROWSE_FILTER "Spustiteľné súbory (*.exe)\0*.exe\0Všetky súbory (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Ponuka Štart\\Programy" IDS_PERSONAL "Moje dokumenty" diff --git a/dll/win32/shell32/lang/sl-SI.rc b/dll/win32/shell32/lang/sl-SI.rc index 572bd92ea48..0527693f6d3 100644 --- a/dll/win32/shell32/lang/sl-SI.rc +++ b/dll/win32/shell32/lang/sl-SI.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "Shortcut &key:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Run:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "C&omment:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Find Target...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -488,7 +488,7 @@ CAPTION "Log Off Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Are you sure you want to log off?", -1, 49, 15, 131, 8 + LTEXT "Are you sure you want to log off?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Log Off", IDOK, 49, 38, 43, 14 PUSHBUTTON "Cancel", IDCANCEL, 99, 38, 43, 14 END @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Browse" IDS_RUNDLG_BROWSE_FILTER "Executable Files (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Start Menu\\Programs" IDS_PERSONAL "My Documents" diff --git a/dll/win32/shell32/lang/sq-AL.rc b/dll/win32/shell32/lang/sq-AL.rc index a34e2b15cfa..9d4054f73d2 100644 --- a/dll/win32/shell32/lang/sq-AL.rc +++ b/dll/win32/shell32/lang/sq-AL.rc @@ -196,7 +196,7 @@ BEGIN LTEXT "Ikonë &çelës:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Ekzekuto:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "K&oment:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Gjej Objektivin...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -492,9 +492,9 @@ CAPTION "Dil nga Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Jeni te sigurte qe doni të dilni?", -1, 35, 16, 146, 8 - DEFPUSHBUTTON "&Dil", IDOK, 41, 39, 50, 14 - PUSHBUTTON "Anulo", IDCANCEL, 95, 39, 50, 14 + LTEXT "Jeni te sigurte qe doni të dilni?", -1, 49, 15, 132, 8 + DEFPUSHBUTTON "&Dil", IDOK, 49, 38, 43, 14 + PUSHBUTTON "Anulo", IDCANCEL, 99, 38, 43, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -858,6 +858,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Shfletp" IDS_RUNDLG_BROWSE_FILTER "Dokumentë Ekzekutues (*.exe)\0*.exe\0T'gjith Dokumentat (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Fillo Menu\\Programe" IDS_PERSONAL "Dokumentet e'mi" diff --git a/dll/win32/shell32/lang/sv-SE.rc b/dll/win32/shell32/lang/sv-SE.rc index c6e6322f349..5fea74696a6 100644 --- a/dll/win32/shell32/lang/sv-SE.rc +++ b/dll/win32/shell32/lang/sv-SE.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "Kort&kommando:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Kör:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "K&ommentar:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Sök mål...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -488,7 +488,7 @@ CAPTION "Logga ut från Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Är du säker på att du vill logga ut?", -1, 49, 15, 131, 8 + LTEXT "Är du säker på att du vill logga ut?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "&Logga ut", IDOK, 49, 38, 43, 14 PUSHBUTTON "Avbryt", IDCANCEL, 99, 38, 43, 14 END @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Bläddra" IDS_RUNDLG_BROWSE_FILTER "Körbara filer (*.exe)\0*.exe\0Alla filer (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Start-meny\\Program" IDS_PERSONAL "Mina dokument" diff --git a/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc index 05a301d4f0b..7b0412ca7c7 100644 --- a/dll/win32/shell32/lang/tr-TR.rc +++ b/dll/win32/shell32/lang/tr-TR.rc @@ -194,7 +194,7 @@ BEGIN LTEXT "&Kısayol Tuşu:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Çalıştır:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "&Açıklama:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "H&edef Bul...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -484,15 +484,15 @@ BEGIN ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL END -IDD_LOG_OFF DIALOGEX 0, 0, 188, 60 +IDD_LOG_OFF DIALOGEX 0, 0, 212, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION CAPTION "Windivs Oturumunu Kapat" FONT 8, "MS Shell Dlg" BEGIN - ICON IDI_SHELL_LOGOFF, IDC_STATIC, 7, 7, 21, 20 - LTEXT "Oturumu kapatmak istediğinizden emin misiniz?", -1, 33, 16, 151, 8 - DEFPUSHBUTTON "&Oturumu Kapat", IDOK, 30, 39, 60, 14 - PUSHBUTTON "İptal", IDCANCEL, 95, 39, 60, 14 + ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 + LTEXT "Oturumu kapatmak istediğinizden emin misiniz?", -1, 49, 15, 156, 8 + DEFPUSHBUTTON "&Oturumu Kapat", IDOK, 49, 38, 57, 14 + PUSHBUTTON "İptal", IDCANCEL, 113, 38, 57, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -856,6 +856,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Göz At" IDS_RUNDLG_BROWSE_FILTER "Çalıştırılabilir Dosyalar (*.exe)\0*.exe\0Tüm Dosyalar (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Başlat Menüsü\\Programlar" IDS_PERSONAL "Belgelerim" diff --git a/dll/win32/shell32/lang/uk-UA.rc b/dll/win32/shell32/lang/uk-UA.rc index f9892f6aaa3..ad71a636781 100644 --- a/dll/win32/shell32/lang/uk-UA.rc +++ b/dll/win32/shell32/lang/uk-UA.rc @@ -192,7 +192,7 @@ BEGIN LTEXT "&Швидкий виклик:", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "&Вікно:", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "&Примітка:", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "З&найти об'єкт...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -488,7 +488,7 @@ CAPTION "Вихід із Windivs" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "Ви дійсно бажаєте вийти із системи?", -1, 49, 15, 131, 8 + LTEXT "Ви дійсно бажаєте вийти із системи?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "В&ихід", IDOK, 49, 38, 43, 14 PUSHBUTTON "Скасувати", IDCANCEL, 99, 38, 43, 14 END @@ -854,6 +854,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "Огляд" IDS_RUNDLG_BROWSE_FILTER "Виконувані файли (*.exe)\0*.exe\0Всі Файли (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ IDS_PROGRAMS "Головне меню\\Програми" IDS_PERSONAL "Мої документи" diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc index 7caab5adcb8..32f4421c1b0 100644 --- a/dll/win32/shell32/lang/zh-CN.rc +++ b/dll/win32/shell32/lang/zh-CN.rc @@ -1,5 +1,5 @@ /* - * PROJECT: Windivs Shell32 + * PROJECT: ReactOS Shell32 * LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+) * PURPOSE: Chinese (Simplified) resource file * TRANSLATORS: Copyright 2008 Zhang Bing @@ -147,9 +147,9 @@ BEGIN LTEXT "", IDC_ABOUT_VERSION, 35, 65, 250, 10, SS_NOPREFIX LTEXT "版权所有 1998-", IDC_STATIC, 35, 75, 53, 10 LTEXT COPYRIGHT_YEAR, IDC_STATIC, 88, 75, 17, 10 - LTEXT " Windivs Team\0", IDC_STATIC, 105, 75, 53, 10 + LTEXT " ReactOS Team\0", IDC_STATIC, 105, 75, 53, 10 LTEXT "", IDC_ABOUT_OTHERSTUFF, 35, 90, 180, 20, SS_NOPREFIX - LTEXT "这个 Windivs 版本授权给:", IDC_ABOUT_REG_TO, 35, 115, 180, 10 + LTEXT "这个 ReactOS 版本授权给:", IDC_ABOUT_REG_TO, 35, 115, 180, 10 LTEXT "", IDC_ABOUT_REG_USERNAME, 45, 125, 180, 10, SS_NOPREFIX LTEXT "", IDC_ABOUT_REG_ORGNAME, 45, 135, 180, 10, SS_NOPREFIX LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ @@ -157,14 +157,13 @@ BEGIN LTEXT "", IDC_ABOUT_PHYSMEM, 167, 152, 88, 10 DEFPUSHBUTTON "确定", IDOK, 220, 178, 50, 14 PUSHBUTTON "", IDC_ABOUT_AUTHORS, 5, 178, 70, 14 - PUSHBUTTON "", IDC_ABOUT_CHANGELOG, 110, 178, 70, 14 END IDD_ABOUT_AUTHORS DIALOGEX 35, 90, 235, 85 STYLE DS_SHELLFONT | WS_CHILD FONT 9, "宋体" BEGIN - LTEXT "给您带来 Windivs 的是:", IDC_STATIC, 0, 0, 180, 10 + LTEXT "给您带来 ReactOS 的是:", IDC_STATIC, 0, 0, 180, 10 LISTBOX IDC_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 END @@ -174,7 +173,7 @@ CAPTION "运行" FONT 9, "宋体" BEGIN ICON "", IDC_RUNDLG_ICON, 7, 11, 18, 20, WS_VISIBLE - LTEXT "请输入程序、目录、文件或 Internet 资源名,Windivs 将为您打开它。", 12289, 36, 11, 185, 18 + LTEXT "请输入程序、目录、文件或 Internet 资源名,ReactOS 将为您打开它。", 12289, 36, 11, 185, 18 LTEXT "打开(&O):", 12305, 7, 39, 32, 10 CONTROL "", IDC_RUNDLG_EDITPATH, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 42, 37, 178, 100 DEFPUSHBUTTON "确定", IDOK, 62, 70, 50, 14, WS_TABSTOP @@ -202,7 +201,7 @@ BEGIN LTEXT "快捷键(&K):", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "运行(&R):", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "备注(&O):", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "查找目标(&F)...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -424,7 +423,7 @@ BEGIN GROUPBOX "任务", -1, 7, 10, 249, 45 CONTROL "", IDC_FOLDER_OPTIONS_TASKICON, "Static", SS_ICON | WS_CHILD | WS_VISIBLE, 14, 25, 21, 20 AUTORADIOBUTTON "在文件夹中显示常见任务(&F)", IDC_FOLDER_OPTIONS_COMMONTASKS, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "使用 Windivs 经典文件夹(&I)", IDC_FOLDER_OPTIONS_CLASSICFOLDERS, 40, 37, 120, 10 + AUTORADIOBUTTON "使用 ReactOS 经典文件夹(&I)", IDC_FOLDER_OPTIONS_CLASSICFOLDERS, 40, 37, 120, 10 GROUPBOX "浏览文件夹", -1, 7, 60, 249, 45, WS_TABSTOP CONTROL "", IDC_FOLDER_OPTIONS_FOLDERICON, "Static", SS_ICON | WS_CHILD | WS_VISIBLE, 14, 70, 21, 20 AUTORADIOBUTTON "在相同窗口中打开每一个文件夹(&M)", IDC_FOLDER_OPTIONS_SAMEWINDOW, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP @@ -494,13 +493,13 @@ END IDD_LOG_OFF DIALOGEX 0, 0, 188, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION "注销 Windivs" +CAPTION "注销 ReactOS" FONT 9, "宋体" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "您确定要注销 Windivs 吗?", -1, 35, 16, 146, 8 - DEFPUSHBUTTON "注销(&L)", IDOK, 41, 39, 50, 14 - PUSHBUTTON "取消", IDCANCEL, 95, 39, 50, 14 + LTEXT "您确定要注销 ReactOS 吗?", -1, 49, 15, 132, 8 + DEFPUSHBUTTON "注销(&L)", IDOK, 49, 38, 43, 14 + PUSHBUTTON "取消", IDCANCEL, 99, 38, 43, 14 END IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 @@ -512,14 +511,14 @@ BEGIN PUSHBUTTON "切换用户(&S)", IDC_SWITCH_USER_BUTTON, 57, 46, 19, 19, BS_OWNERDRAW | WS_DISABLED | WS_GROUP PUSHBUTTON "注销(&L)", IDC_LOG_OFF_BUTTON, 134, 46, 19, 19, BS_OWNERDRAW PUSHBUTTON "取消", IDCANCEL, 162, 103, 40, 12, WS_GROUP | BS_FLAT - LTEXT "注销 Windivs", IDC_LOG_OFF_TEXT_STATIC, 4, 9, 130, 20 + LTEXT "注销 ReactOS", IDC_LOG_OFF_TEXT_STATIC, 4, 9, 130, 20 CTEXT "切换用户", IDC_SWITCH_USER_STATIC, 41, 70, 51, 11 CTEXT "注销", IDC_LOG_OFF_STATIC, 118, 70, 51, 11 END IDD_DISCONNECT DIALOGEX 0, 0, 188, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION "断开 Windivs" +CAPTION "断开 ReactOS" FONT 9, "宋体" BEGIN ICON IDI_SHELL_DISCONN, IDC_STATIC, 8, 6, 21, 20 @@ -533,7 +532,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLIN CAPTION "自动播放" FONT 9, "宋体" BEGIN - LTEXT "选择内容类型,然后选择 Windivs 在此设备中使用该类型时自动执行的操作(&S):", 1000, 7, 7, 215, 20 + LTEXT "选择内容类型,然后选择 ReactOS 在此设备中使用该类型时自动执行的操作(&S):", 1000, 7, 7, 215, 20 CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 GROUPBOX "行动", -1, 7, 45, 212, 146 AUTORADIOBUTTON "选择要执行的操作(&P):", 1005, 14, 54, 202, 10, WS_GROUP @@ -549,7 +548,7 @@ FONT 9, "宋体" BEGIN ICON "", 1000, 5, 7, 21, 20 LTEXT "此磁盘或设备包含多个类型的内容。", 1001, 32, 7, 191, 20 - LTEXT "您想要 Windivs 做什么?", 1002, 32, 31, 188, 8 + LTEXT "您想要 ReactOS 做什么?", 1002, 32, 31, 188, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 DEFPUSHBUTTON "确定", IDOK, 96, 186, 60, 14 PUSHBUTTON "取消", IDCANCEL, 160, 186, 60, 14 @@ -561,10 +560,10 @@ CAPTION "混合内容" FONT 9, "宋体" BEGIN ICON "", 1000, 5, 7, 21, 20 - LTEXT "每次您插入盘或连接的设备与此类型的文件,Windivs 可以执行相同的操作:", 1001, 30, 7, 193, 20 + LTEXT "每次您插入盘或连接的设备与此类型的文件,ReactOS 可以执行相同的操作:", 1001, 30, 7, 193, 20 ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "您想要 Windivs 做什么?", 1002, 32, 41, 190, 8 + LTEXT "您想要 ReactOS 做什么?", 1002, 32, 41, 190, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 AUTOCHECKBOX "始终执行选择的操作。", 1004, 32, 171, 190, 10 DEFPUSHBUTTON "确定", IDOK, 96, 185, 60, 14 @@ -577,8 +576,8 @@ CAPTION "自动播放" FONT 9, "宋体" BEGIN ICON "", 1000, 5, 7, 21, 20 - LTEXT "每次您连接此设备,Windivs 可以执行相同的操作。", 1001, 32, 7, 190, 22 - LTEXT "您想要 Windivs 做什么?(&W)", 1002, 32, 31, 190, 8 + LTEXT "每次您连接此设备,ReactOS 可以执行相同的操作。", 1001, 32, 7, 190, 22 + LTEXT "您想要 ReactOS 做什么?(&W)", 1002, 32, 31, 190, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 AUTOCHECKBOX "总是执行选定的操作(&A)", 1004, 32, 143, 190, 8 DEFPUSHBUTTON "确定", IDOK, 94, 160, 60, 14 @@ -587,7 +586,7 @@ END IDD_SHUTDOWN DIALOGEX 0, 0, 211, 103 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION "关闭 Windivs" +CAPTION "关闭 ReactOS" FONT 9, "宋体" BEGIN ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP @@ -854,7 +853,7 @@ BEGIN /* Warning format system drive dialog strings */ IDS_NO_FORMAT_TITLE "无法格式化该卷" - IDS_NO_FORMAT "无法格式化该卷!因为它包含 Windivs 正常工作所需的系统文件。" + IDS_NO_FORMAT "无法格式化该卷!因为它包含 ReactOS 正常工作所需的系统文件。" /* Run File dialog */ IDS_RUNDLG_ERROR "无法显示运行文件对话框(内部错误)" @@ -862,6 +861,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "浏览" IDS_RUNDLG_BROWSE_FILTER "可执行文件 (*.exe)\0*.exe\0所有文件 (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* Shell folder path default values. See also: dll/win32/userenv/lang */ /* ATTENTION: If there is no special situation, please DO NOT change English folder names into Chinese, or it may cause problems in the system. */ @@ -911,7 +915,6 @@ BEGIN IDS_OPEN_WITH_OTHER "其他程序:" IDS_SHELL_ABOUT_AUTHORS "作者(&A)" - IDS_SHELL_ABOUT_CHANGELOG "&Changelog" IDS_SHELL_ABOUT_BACK "< 返回(&B)" FCIDM_SHVIEW_NEW "新建(&W)" /* A menu item with an ampersand */ FCIDM_SHVIEW_NEWFOLDER "文件夹(&F)" @@ -933,8 +936,8 @@ BEGIN /* Friendly File Type Names */ IDS_DIRECTORY "文件夹" - IDS_BAT_FILE "Windivs 批处理文件" - IDS_CMD_FILE "Windivs 命令脚本" + IDS_BAT_FILE "ReactOS 批处理文件" + IDS_CMD_FILE "ReactOS 命令脚本" IDS_COM_FILE "DOS 应用程序" IDS_CPL_FILE "控制面板项" IDS_CUR_FILE "光标" @@ -976,7 +979,7 @@ BEGIN IDS_DEFAULT_CLUSTER_SIZE "默认分配大小" IDS_COPY_OF "副本" - IDS_SHLEXEC_NOASSOC "没有为 Windivs 配置关联的程序以打开这种类型的文件。" + IDS_SHLEXEC_NOASSOC "没有为 ReactOS 配置关联的程序以打开这种类型的文件。" IDS_FILE_DETAILS "“%s”扩展名的详细信息" IDS_FILE_DETAILSADV "文件扩展名为“%s”的类型“%s”。若要更改会影响所有的“%s”文件的设置,请单击高级。" @@ -995,10 +998,6 @@ BEGIN IDS_OBJECTS "%d 个对象" IDS_OBJECTS_SELECTED "已选中 %d 个对象" - IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" - IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." - IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" - IDS_TITLE_MYCOMP "我的电脑" IDS_TITLE_MYNET "网上邻居" IDS_TITLE_BIN_1 "回收站(满)" @@ -1053,7 +1052,7 @@ BEGIN IDS_SYSTEMFOLDER "系统文件夹" /* For IDD_LOG_OFF_FANCY */ - IDS_LOG_OFF_DESC "关闭您的程序并结束目前的 Windivs 会话。" + IDS_LOG_OFF_DESC "关闭您的程序并结束目前的 ReactOS 会话。" IDS_SWITCH_USER_DESC "允许其他用户登录并保持您的程序和文件开启。\r\n\r\n(您亦可使用 Windows 键 + L 来切换用户。)" IDS_LOG_OFF_TITLE "注销" IDS_SWITCH_USER_TITLE "切换用户" diff --git a/dll/win32/shell32/lang/zh-HK.rc b/dll/win32/shell32/lang/zh-HK.rc index 7109c2b3b5d..5666f8bd870 100644 --- a/dll/win32/shell32/lang/zh-HK.rc +++ b/dll/win32/shell32/lang/zh-HK.rc @@ -200,7 +200,7 @@ BEGIN LTEXT "快速鍵(&K):", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "執行(&R):", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "註解(&O):", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "尋找目標(&F)...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -496,7 +496,7 @@ CAPTION "登出 ReactOS" FONT 9, "新細明體" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "您確定要登出 ReactOS 嗎?", -1, 49, 15, 131, 8 + LTEXT "您確定要登出 ReactOS 嗎?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "登出(&L)", IDOK, 49, 38, 43, 14 PUSHBUTTON "取消", IDCANCEL, 99, 38, 43, 14 END @@ -860,6 +860,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "瀏覽" IDS_RUNDLG_BROWSE_FILTER "可執行檔 (*.exe)\0*.exe\0All Files (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* ATTENTION: DO NOT change English folder names into Chinese unless necessary, * or it may cause problems in the system. */ /* Shell folder path default values. See also: dll/win32/userenv/lang */ diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc index 44570f65c1b..6f3f37c48eb 100644 --- a/dll/win32/shell32/lang/zh-TW.rc +++ b/dll/win32/shell32/lang/zh-TW.rc @@ -1,5 +1,5 @@ /* - * PROJECT: Windivs Shell32 + * PROJECT: ReactOS Shell32 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) * PURPOSE: Chinese (Traditional) resource file * TRANSLATORS: Copyright 2011 Elton Chung aka MfldElton @@ -146,7 +146,7 @@ BEGIN LTEXT "", IDC_ABOUT_VERSION, 35, 65, 250, 10, SS_NOPREFIX LTEXT "Copyright 1996-", IDC_STATIC, 35, 75, 53, 10 LTEXT COPYRIGHT_YEAR, IDC_STATIC, 88, 75, 17, 10 - LTEXT " Windivs Team\0", IDC_STATIC, 105, 75, 53, 10 + LTEXT " ReactOS Team\0", IDC_STATIC, 105, 75, 53, 10 LTEXT "", IDC_ABOUT_OTHERSTUFF, 35, 90, 180, 20, SS_NOPREFIX LTEXT "這個版本授權予:", IDC_ABOUT_REG_TO, 35, 115, 180, 10 LTEXT "", IDC_ABOUT_REG_USERNAME, 45, 125, 180, 10, SS_NOPREFIX @@ -156,14 +156,13 @@ BEGIN LTEXT "", IDC_ABOUT_PHYSMEM, 167, 152, 88, 10 DEFPUSHBUTTON "確定", IDOK, 220, 178, 50, 14 PUSHBUTTON "", IDC_ABOUT_AUTHORS, 5, 178, 70, 14 - PUSHBUTTON "", IDC_ABOUT_CHANGELOG, 110, 178, 70, 14 END IDD_ABOUT_AUTHORS DIALOGEX 35, 90, 235, 85 STYLE DS_SHELLFONT | WS_CHILD FONT 9, "新細明體" BEGIN - LTEXT "給您帶來 Windivs 的是:", IDC_STATIC, 0, 0, 180, 10 + LTEXT "給您帶來 ReactOS 的是:", IDC_STATIC, 0, 0, 180, 10 LISTBOX IDC_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 END @@ -173,7 +172,7 @@ CAPTION "執行" FONT 9, "新細明體" BEGIN ICON "", IDC_RUNDLG_ICON, 7, 11, 18, 20, WS_VISIBLE - LTEXT "請輸入程式、資料夾、文件或網際網路的資源名稱,Windivs 將幫助您開啟。", 12289, 36, 11, 185, 18 + LTEXT "請輸入程式、資料夾、文件或網際網路的資源名稱,ReactOS 將幫助您開啟。", 12289, 36, 11, 185, 18 LTEXT "開啟(&O):", 12305, 4, 38, 31, 10 CONTROL "", IDC_RUNDLG_EDITPATH, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 184, 100 DEFPUSHBUTTON "確定", IDOK, 36, 70, 59, 14, WS_TABSTOP @@ -201,7 +200,7 @@ BEGIN LTEXT "快速鍵(&K):", IDC_SHORTCUT_KEY, 8, 117, 68, 10 CONTROL "", IDC_SHORTCUT_KEY_HOTKEY, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "執行(&R):", IDC_SHORTCUT_RUN, 8, 136, 68, 10 - COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SHORTCUT_RUN_COMBO, 79, 134, 150, 54, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP LTEXT "註解(&O):", IDC_SHORTCUT_COMMENT, 8, 154, 68, 10 EDITTEXT IDC_SHORTCUT_COMMENT_EDIT, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "尋找目標(&F)...", IDC_SHORTCUT_FIND, 9, 172, 70, 14, ES_LEFT @@ -423,7 +422,7 @@ BEGIN GROUPBOX "任務", -1, 7, 10, 249, 45 CONTROL "", IDC_FOLDER_OPTIONS_TASKICON, "Static", SS_ICON | WS_CHILD | WS_VISIBLE, 14, 25, 21, 20 AUTORADIOBUTTON "顯示資料夾的常見工作(&F)", IDC_FOLDER_OPTIONS_COMMONTASKS, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "使用 Windivs 傳統資料夾(&I)", IDC_FOLDER_OPTIONS_CLASSICFOLDERS, 40, 37, 120, 10 + AUTORADIOBUTTON "使用 ReactOS 傳統資料夾(&I)", IDC_FOLDER_OPTIONS_CLASSICFOLDERS, 40, 37, 120, 10 GROUPBOX "瀏覽資料夾", -1, 7, 60, 249, 45, WS_TABSTOP CONTROL "", IDC_FOLDER_OPTIONS_FOLDERICON, "Static", SS_ICON | WS_CHILD | WS_VISIBLE, 14, 70, 21, 20 AUTORADIOBUTTON "在相同視窗中開啟每一個資料夾(&M)", IDC_FOLDER_OPTIONS_SAMEWINDOW, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP @@ -493,11 +492,11 @@ END IDD_LOG_OFF DIALOGEX 0, 0, 188, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION "登出 Windivs" +CAPTION "登出 ReactOS" FONT 9, "新細明體" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 8, 6, 21, 20 - LTEXT "您確定要登出 Windivs 嗎?", -1, 49, 15, 131, 8 + LTEXT "您確定要登出 ReactOS 嗎?", -1, 49, 15, 132, 8 DEFPUSHBUTTON "登出(&L)", IDOK, 49, 38, 43, 14 PUSHBUTTON "取消", IDCANCEL, 99, 38, 43, 14 END @@ -511,18 +510,18 @@ BEGIN PUSHBUTTON "切換使用者(&S)", IDC_SWITCH_USER_BUTTON, 57, 46, 19, 19, BS_OWNERDRAW | WS_DISABLED | WS_GROUP PUSHBUTTON "登出(&L)", IDC_LOG_OFF_BUTTON, 134, 46, 19, 19, BS_OWNERDRAW PUSHBUTTON "取消", IDCANCEL, 162, 103, 40, 12, WS_GROUP | BS_FLAT - LTEXT "登出 Windivs", IDC_LOG_OFF_TEXT_STATIC, 4, 9, 130, 20 + LTEXT "登出 ReactOS", IDC_LOG_OFF_TEXT_STATIC, 4, 9, 130, 20 CTEXT "切換使用者", IDC_SWITCH_USER_STATIC, 41, 70, 51, 11 CTEXT "登出", IDC_LOG_OFF_STATIC, 118, 70, 51, 11 END IDD_DISCONNECT DIALOGEX 0, 0, 188, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION "中斷 Windivs" +CAPTION "中斷 ReactOS" FONT 9, "新細明體" BEGIN ICON IDI_SHELL_DISCONN, IDC_STATIC, 8, 6, 21, 20 - LTEXT "您確定要中斷 Windivs 嗎?", -1, 49, 15, 131, 8 + LTEXT "您確定要中斷 ReactOS 嗎?", -1, 49, 15, 131, 8 DEFPUSHBUTTON "中斷(&D)", IDOK, 47, 38, 47, 14 PUSHBUTTON "取消", IDCANCEL, 99, 38, 47, 14 END @@ -532,7 +531,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLIN CAPTION "自動播放" FONT 9, "新細明體" BEGIN - LTEXT "選擇內容類型,然後選擇 Windivs 在這個裝置中使用該類型時自動執行的動作(&S):", 1000, 7, 7, 215, 20 + LTEXT "選擇內容類型,然後選擇 ReactOS 在這個裝置中使用該類型時自動執行的動作(&S):", 1000, 7, 7, 215, 20 CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 GROUPBOX "動作", -1, 7, 45, 212, 146 AUTORADIOBUTTON "選擇要執行的動作(&P):", 1005, 14, 54, 202, 10, WS_GROUP @@ -548,7 +547,7 @@ FONT 9, "新細明體" BEGIN ICON "", 1000, 5, 7, 21, 20 LTEXT "這個磁碟或裝置包含多種類型的內容。", 1001, 32, 7, 191, 20 - LTEXT "您希望 Windivs 做什麼?", 1002, 32, 31, 188, 8 + LTEXT "您希望 ReactOS 做什麼?", 1002, 32, 31, 188, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 DEFPUSHBUTTON "確定", IDOK, 96, 186, 60, 14 PUSHBUTTON "取消", IDCANCEL, 160, 186, 60, 14 @@ -560,10 +559,10 @@ CAPTION "混合內容" FONT 9, "新細明體" BEGIN ICON "", 1000, 5, 7, 21, 20 - LTEXT "每次插入磁碟或連接有這類檔案的裝置時,Windivs 都可以執行相同的動作:", 1001, 30, 7, 193, 20 + LTEXT "每次插入磁碟或連接有這類檔案的裝置時,ReactOS 都可以執行相同的動作:", 1001, 30, 7, 193, 20 ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "您希望 Windivs 做什麼?", 1002, 32, 41, 190, 8 + LTEXT "您希望 ReactOS 做什麼?", 1002, 32, 41, 190, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 AUTOCHECKBOX "總是執行指定的動作。", 1004, 32, 171, 190, 10 DEFPUSHBUTTON "確定", IDOK, 96, 185, 60, 14 @@ -576,8 +575,8 @@ CAPTION "自動播放" FONT 9, "新細明體" BEGIN ICON "", 1000, 5, 7, 21, 20 - LTEXT "Windivs 可以執行您選擇的相同動作。", 1001, 32, 7, 190, 22 - LTEXT "您希望 Windivs 做什麼?(&W)", 1002, 32, 31, 190, 8 + LTEXT "ReactOS 可以執行您選擇的相同動作。", 1001, 32, 7, 190, 22 + LTEXT "您希望 ReactOS 做什麼?(&W)", 1002, 32, 31, 190, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 AUTOCHECKBOX "總是執行相同的動作(&A)", 1004, 32, 143, 190, 8 DEFPUSHBUTTON "確定", IDOK, 94, 160, 60, 14 @@ -586,7 +585,7 @@ END IDD_SHUTDOWN DIALOGEX 0, 0, 211, 103 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION "關閉 Windivs" +CAPTION "關閉 ReactOS" FONT 9, "新細明體" BEGIN ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP @@ -853,7 +852,7 @@ BEGIN /* Warning format system drive dialog strings */ IDS_NO_FORMAT_TITLE "無法格式化這個磁碟區" - IDS_NO_FORMAT "這個磁碟區無法格式化!磁碟區內有重要的系統檔案,使 Windivs 正常運作。" + IDS_NO_FORMAT "這個磁碟區無法格式化!磁碟區內有重要的系統檔案,使 ReactOS 正常運作。" /* Run File dialog */ IDS_RUNDLG_ERROR "無法顯示執行文件對話方塊(內部錯誤)" @@ -861,6 +860,11 @@ BEGIN IDS_RUNDLG_BROWSE_CAPTION "瀏覽" IDS_RUNDLG_BROWSE_FILTER "可執行檔 (*.exe)\0*.exe\0所有檔案 (*.*)\0*.*\0" + /* Shortcut property sheet */ + IDS_SHORTCUT_RUN_NORMAL "Normal window" + IDS_SHORTCUT_RUN_MIN "Minimized" + IDS_SHORTCUT_RUN_MAX "Maximized" + /* ATTENTION: DO NOT change English folder names into Chinese unless necessary, * or it may cause problems in the system. */ /* Shell folder path default values. See also: dll/win32/userenv/lang */ @@ -910,7 +914,6 @@ BEGIN IDS_OPEN_WITH_OTHER "其它程式:" IDS_SHELL_ABOUT_AUTHORS "作者(&A)" - IDS_SHELL_ABOUT_CHANGELOG "&Changelog" IDS_SHELL_ABOUT_BACK "< 上一步(&B)" FCIDM_SHVIEW_NEW "新增(&W)" /* A menu item with an ampersand */ FCIDM_SHVIEW_NEWFOLDER "新增資料夾(&F)" @@ -932,8 +935,8 @@ BEGIN /* Friendly File Type Names */ IDS_DIRECTORY "資料夾" - IDS_BAT_FILE "Windivs 批次文件" - IDS_CMD_FILE "Windivs 命令指令碼" + IDS_BAT_FILE "ReactOS 批次文件" + IDS_CMD_FILE "ReactOS 命令指令碼" IDS_COM_FILE "DOS 應用程式" IDS_CPL_FILE "控制台項目" IDS_CUR_FILE "指標" @@ -975,7 +978,7 @@ BEGIN IDS_DEFAULT_CLUSTER_SIZE "預設配置大小" IDS_COPY_OF "複製" - IDS_SHLEXEC_NOASSOC "沒有為 Windivs 設定關聯的程式以開啟這種類型的檔案。" + IDS_SHLEXEC_NOASSOC "沒有為 ReactOS 設定關聯的程式以開啟這種類型的檔案。" IDS_FILE_DETAILS "副檔名「%s」的詳細資料" IDS_FILE_DETAILSADV "副檔名為「%s」的檔案屬於類型「%s」。如果要變更影響所有「%s」檔案的設定值,請按一下[進階]。" @@ -994,10 +997,6 @@ BEGIN IDS_OBJECTS "%d 個物件" IDS_OBJECTS_SELECTED "已選擇 %d 個物件" - IDS_RECYCLE_CLEANER_DISPLAYNAME "Recycle Bin" - IDS_RECYCLE_CLEANER_DESCRIPTION "The Recycle Bin contains files you have deleted from your computer. These files are not permanently removed until you empty the Recycle Bin." - IDS_RECYCLE_CLEANER_BUTTON_TEXT "&View Files" - IDS_TITLE_MYCOMP "我的電腦" IDS_TITLE_MYNET "網路上的芳鄰" IDS_TITLE_BIN_1 "Recycle Bin (full)" diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h index b04e6c513ce..792025d83b9 100644 --- a/dll/win32/shell32/shresdef.h +++ b/dll/win32/shell32/shresdef.h @@ -257,6 +257,11 @@ #define IDS_MOVEERROR 351 #define IDS_COPYERROR 352 +/* Shortcut property sheet */ +#define IDS_SHORTCUT_RUN_NORMAL 4167 +#define IDS_SHORTCUT_RUN_MIN 4168 +#define IDS_SHORTCUT_RUN_MAX 4169 + #define IDS_MENU_EMPTY 34561 /* Note: those strings are referenced from the registry */ diff --git a/modules/rostests/apitests/atl/CImage.cpp b/modules/rostests/apitests/atl/CImage.cpp index e3309fd07ef..1e00d6a8995 100644 --- a/modules/rostests/apitests/atl/CImage.cpp +++ b/modules/rostests/apitests/atl/CImage.cpp @@ -235,6 +235,26 @@ static void Test_LoadSaveImage(void) color = image1.GetPixel(5, 5); ok(color == RGB(255, 0,0), "Expected color to be 255, 0, 0; was: %i, %i, %i (for %i)\n", GetRValue(color), GetGValue(color), GetBValue(color), n); + { + CImageDC dc1(image1); + ::SetPixel(dc1, 5, 5, RGB(0, 255, 0)); + { + CImageDC dc2(image1); + ::SetPixel(dc2, 5, 5, RGB(0, 0, 255)); + } + } + + { + HDC hdcImage = image1.GetDC(); + color = ::GetPixel(hdcImage, 5, 5); + ok_long(color, RGB(0, 0, 255)); + + ::SetPixel(hdcImage, 5, 5, RGB(255, 0, 0)); + color = ::GetPixel(hdcImage, 5, 5); + ok_long(color, RGB(255, 0, 0)); + image1.ReleaseDC(); + } + bOK = DeleteFile(file); ok(bOK, "Expected bOK to be TRUE, was: %d (for %i)\n", bOK, n); } diff --git a/modules/rostests/apitests/atl/CImage_WIP.txt b/modules/rostests/apitests/atl/CImage_WIP.txt deleted file mode 100644 index c3d538d69f7..00000000000 --- a/modules/rostests/apitests/atl/CImage_WIP.txt +++ /dev/null @@ -1,86 +0,0 @@ -Test files: - -atl_apitest: CImage class from reactos -CImage.exe : CImage class from microsoft - -================================================================================================================ -Windows Server 2003 SP2: -================================================================================================================ ->atl_apitest.exe CImage -R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(234): Test failed: Expected bpp to be 8, was: 32 -R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 0) -R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 1) -R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 2) -R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(260): Test failed: Expected bpp to be 24, was: 32 (for 3) -R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 4) - -CImage: 79 tests executed (0 marked as todo, 6 failures), 0 skipped. -================================================================================================================ ->CImage.exe -CImage: 79 tests executed (0 marked as todo, 0 failures), 0 skipped. -================================================================================================================ -================================================================================================================ -Windows 10: -================================================================================================================ ->atl_apitest.exe CImage -R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(234): Test failed: Expected bpp to be 8, was: 32 -R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 0) -R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 1) -R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 2) -R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(260): Test failed: Expected bpp to be 24, was: 32 (for 3) -R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 4) - -CImage: 79 tests executed (0 marked as todo, 6 failures), 0 skipped. -================================================================================================================ ->CImage.exe -CImage: 79 tests executed (0 marked as todo, 0 failures), 0 skipped. -================================================================================================================ -================================================================================================================ -Windivs: -================================================================================================================ ->atl_apitest.exe CImage -CImage.cpp:234: Test failed: Expected bpp to be 8, was: 32 -CImage.cpp:265: Test failed: Expected bpp to be 8, was: 32 (for 0) -CImage.cpp:245: Test failed: Expected hr to be S_OK, was: 80004005 (for 1) -CImage.cpp:251: Test failed: Expected hr to be S_OK, was: 80004005 (for 1) -CImage.cpp:254: Test failed: Expected width to be 48, was: 0 (for 1) -CImage.cpp:256: Test failed: Expected height to be 48, was: 0 (for 1) -CImage.cpp:265: Test failed: Expected bpp to be 8, was: 0 (for 1) -CImage.cpp:148: Test failed: Expected status to be 0, was: 1 -CImage.cpp:149: Test failed: Expected a valid bitmap -CImage.cpp:245: Test failed: Expected hr to be S_OK, was: 80004005 (for 2) -CImage.cpp:251: Test failed: Expected hr to be S_OK, was: 80004005 (for 2) -CImage.cpp:254: Test failed: Expected width to be 48, was: 0 (for 2) -CImage.cpp:256: Test failed: Expected height to be 48, was: 0 (for 2) -CImage.cpp:265: Test failed: Expected bpp to be 8, was: 0 (for 2) -CImage.cpp:148: Test failed: Expected status to be 0, was: 1 -CImage.cpp:149: Test failed: Expected a valid bitmap -CImage.cpp:260: Test failed: Expected bpp to be 24, was: 32 (for 3) -CImage.cpp:154: Test failed: Expected PixelFormat to be 0x21808, was: 0x30803 -CImage.cpp:265: Test failed: Expected bpp to be 8, was: 32 (for 4) -CImage.cpp:154: Test failed: Expected PixelFormat to be 0x30803, was: 0x21808 - -CImage: 77 tests executed (0 marked as todo, 20 failures), 0 skipped. -================================================================================================================ ->CImage.exe -../CImage.cpp (245): Expected hr to be S_OK, was: 80004005 (for 1) -../CImage.cpp (251): Expected hr to be S_OK, was: 80004005 (for 1) -../CImage.cpp (254): Expected width to be 48, was: 0 (for 1) -../CImage.cpp (256): Expected height to be 48, was: 0 (for 1) -../CImage.cpp (265): Expected bpp to be 8, was: 0 (for 1) -../CImage.cpp (148): Expected status to be 0, was: 1 -../CImage.cpp (149): Expected a valid bitmap -../CImage.cpp (245): Expected hr to be S_OK, was: 80004005 (for 2) -../CImage.cpp (251): Expected hr to be S_OK, was: 80004005 (for 2) -../CImage.cpp (254): Expected width to be 48, was: 0 (for 2) -../CImage.cpp (256): Expected height to be 48, was: 0 (for 2) -../CImage.cpp (265): Expected bpp to be 8, was: 0 (for 2) -../CImage.cpp (148): Expected status to be 0, was: 1 -../CImage.cpp (149): Expected a valid bitmap -../CImage.cpp (260): Expected bpp to be 24, was: 8 (for 3) -../CImage.cpp (154): Expected PixelFormat to be 0x21808, was: 0x30803 -../CImage.cpp (265): Expected bpp to be 8, was: 24 (for 4) -../CImage.cpp (154): Expected PixelFormat to be 0x30803, was: 0x21808 -CImage: 77 tests executed (0 marked as todo, 18 failures), 0 skipped. -================================================================================================================ - diff --git a/modules/rostests/apitests/kernel32/CMakeLists.txt b/modules/rostests/apitests/kernel32/CMakeLists.txt index 9aebaa979a5..8c26b340edc 100644 --- a/modules/rostests/apitests/kernel32/CMakeLists.txt +++ b/modules/rostests/apitests/kernel32/CMakeLists.txt @@ -18,6 +18,7 @@ list(APPEND SOURCE GetDriveType.c GetModuleFileName.c GetVolumeInformation.c + InitOnce.c interlck.c IsDBCSLeadByteEx.c JapaneseCalendar.c diff --git a/modules/rostests/apitests/kernel32/InitOnce.c b/modules/rostests/apitests/kernel32/InitOnce.c new file mode 100644 index 00000000000..586e87bac9d --- /dev/null +++ b/modules/rostests/apitests/kernel32/InitOnce.c @@ -0,0 +1,280 @@ +/* + * PROJECT: ReactOS API tests + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) + * PURPOSE: Tests for One-Time initialization APIs + * COPYRIGHT: Copyright 2023 Ratin Gao + */ + +#include "precomp.h" + +typedef +VOID +WINAPI +FN_InitOnceInitialize(_Out_ PINIT_ONCE InitOnce); + +typedef +BOOL +WINAPI +FN_InitOnceExecuteOnce( + _Inout_ PINIT_ONCE InitOnce, + _In_ __callback PINIT_ONCE_FN InitFn, + _Inout_opt_ PVOID Parameter, + _Outptr_opt_result_maybenull_ LPVOID *Context); + +typedef +BOOL +WINAPI +FN_InitOnceBeginInitialize( + _Inout_ LPINIT_ONCE lpInitOnce, + _In_ DWORD dwFlags, + _Out_ PBOOL fPending, + _Outptr_opt_result_maybenull_ LPVOID *lpContext); + +typedef +BOOL +WINAPI +FN_InitOnceComplete( + _Inout_ LPINIT_ONCE lpInitOnce, + _In_ DWORD dwFlags, + _In_opt_ LPVOID lpContext); + +static ULONG g_ulRandom; + +static +VOID +InitWorker(_Inout_ PULONG InitCount, _Out_ PULONG_PTR Context) +{ + /* Increase the initialization count */ + (*InitCount)++; + + /* Output context data */ + *Context = (ULONG_PTR)g_ulRandom; +} + +static +_Success_(return != FALSE) +BOOL +WINAPI +InitOnceProc( + _Inout_ PINIT_ONCE InitOnce, + _Inout_opt_ PVOID Parameter, + _Outptr_opt_result_maybenull_ PVOID* Context) +{ + if (!Parameter || !Context) + { + return FALSE; + } + + InitWorker(Parameter, (PULONG_PTR)Context); + return TRUE; +} + +START_TEST(InitOnce) +{ + BOOL bRet, fPending; + ULONG i, ulInitCount, ulSeed, ulContextData; + ULONG_PTR ulTempContext; + DWORD dwError; + + HMODULE hKernel32; + FN_InitOnceInitialize* pfnInitOnceInitialize; + FN_InitOnceExecuteOnce* pfnInitOnceExecuteOnce; + FN_InitOnceBeginInitialize* pfnInitOnceBeginInitialize; + FN_InitOnceComplete* pfnInitOnceComplete; + + /* Load functions */ + hKernel32 = GetModuleHandleW(L"kernel32.dll"); + if (!hKernel32) + { + skip("Module kernel32 not found\n"); + return; + } + pfnInitOnceInitialize = (FN_InitOnceInitialize*)GetProcAddress(hKernel32, "InitOnceInitialize"); + pfnInitOnceExecuteOnce = (FN_InitOnceExecuteOnce*)GetProcAddress(hKernel32, "InitOnceExecuteOnce"); + pfnInitOnceBeginInitialize = (FN_InitOnceBeginInitialize*)GetProcAddress(hKernel32, "InitOnceBeginInitialize"); + pfnInitOnceComplete = (FN_InitOnceComplete*)GetProcAddress(hKernel32, "InitOnceComplete"); + + /* + * Use a random as output context data, + * which the low-order INIT_ONCE_CTX_RESERVED_BITS bits should be zero. + */ + ulSeed = (ULONG)(ULONG_PTR)&ulSeed ^ GetTickCount(); + g_ulRandom = RtlRandom(&ulSeed); + for (i = 0; i < INIT_ONCE_CTX_RESERVED_BITS; i++) + { + g_ulRandom &= (~(1 << i)); + } + + /* Initialize One-Time initialization structure */ + INIT_ONCE InitOnce = { (PVOID)(ULONG_PTR)0xDEADBEEF }; + if (pfnInitOnceInitialize) + { + pfnInitOnceInitialize(&InitOnce); + } + else + { + skip("InitOnceInitialize not found\n"); + InitOnce = (INIT_ONCE)INIT_ONCE_STATIC_INIT; + } + + if (!pfnInitOnceExecuteOnce) + { + skip("InitOnceExecuteOnce not found\n"); + goto _test_sync; + } + + /* + * Perform synchronous initialization by using InitOnceExecuteOnce, + * which executes user-defined callback to initialize. + * Call InitOnceExecuteOnce twice will success, + * initialization count should be 1 and retrieve correct context data. + */ + ulInitCount = 0; + ulContextData = MAXULONG; + bRet = pfnInitOnceExecuteOnce(&InitOnce, InitOnceProc, &ulInitCount, (LPVOID*)&ulContextData); + ok(bRet, "InitOnceExecuteOnce failed with %lu\n", GetLastError()); + if (bRet) + { + /* Call InitOnceExecuteOnce again and check output values if the first call succeeded */ + bRet = pfnInitOnceExecuteOnce(&InitOnce, + InitOnceProc, + &ulInitCount, + (LPVOID*)&ulContextData); + ok(bRet, "InitOnceExecuteOnce failed with %lu\n", GetLastError()); + ok(ulInitCount == 1, "ulInitCount is not 1\n"); + ok(ulContextData == g_ulRandom, "Output ulContextData is incorrect\n"); + } + +_test_sync: + if (!pfnInitOnceBeginInitialize || !pfnInitOnceComplete) + { + skip("InitOnceBeginInitialize or InitOnceComplete not found\n"); + return; + } + + /* Re-initialize One-Time initialization structure by using INIT_ONCE_STATIC_INIT */ + InitOnce = (INIT_ONCE)INIT_ONCE_STATIC_INIT; + + /* Perform synchronous initialization by using InitOnceBeginInitialize */ + fPending = FALSE; + bRet = pfnInitOnceBeginInitialize(&InitOnce, 0, &fPending, (LPVOID*)&ulContextData); + ok(bRet, "InitOnceBeginInitialize failed with %lu\n", GetLastError()); + if (!bRet) + { + goto _test_async; + } + ok(fPending, "fPending is not TRUE after the first success InitOnceBeginInitialize\n"); + if (!fPending) + { + goto _test_async; + } + + /* Complete the initialization */ + InitWorker(&ulInitCount, &ulTempContext); + bRet = pfnInitOnceComplete(&InitOnce, 0, (LPVOID)ulTempContext); + ok(bRet, "InitOnceComplete failed with %lu\n", GetLastError()); + if (!bRet) + { + goto _test_async; + } + + /* + * Initialization is completed, call InitOnceBeginInitialize with + * INIT_ONCE_CHECK_ONLY should retrieve status and context data successfully + */ + bRet = pfnInitOnceBeginInitialize(&InitOnce, + INIT_ONCE_CHECK_ONLY, + &fPending, + (LPVOID*)&ulContextData); + ok(bRet && !fPending && ulContextData == g_ulRandom, + "InitOnceBeginInitialize returns incorrect result for a completed initialization\n"); + +_test_async: + InitOnce = (INIT_ONCE)INIT_ONCE_STATIC_INIT; + + /* Perform asynchronous initialization */ + fPending = FALSE; + bRet = pfnInitOnceBeginInitialize(&InitOnce, + INIT_ONCE_ASYNC, + &fPending, + (LPVOID*)&ulContextData); + ok(bRet, "InitOnceBeginInitialize failed with %lu\n", GetLastError()); + if (!bRet) + { + return; + } + ok(fPending, "fPending is not TRUE after a success InitOnceBeginInitialize\n"); + if (!fPending) + { + return; + } + + /* + * Now the initialization is in progress but not completed yet, + * call InitOnceBeginInitialize again without INIT_ONCE_ASYNC is invalid, + * should fail with ERROR_INVALID_PARAMETER + */ + bRet = pfnInitOnceBeginInitialize(&InitOnce, 0, &fPending, (LPVOID*)&ulContextData); + ok(!bRet, "InitOnceBeginInitialize should not success\n"); + if (!bRet) + { + dwError = GetLastError(); + ok(dwError == ERROR_INVALID_PARAMETER, + "Last error is %lu, but %u is expected\n", + dwError, + ERROR_INVALID_PARAMETER); + } + + /* + * Call InitOnceBeginInitialize again with INIT_ONCE_ASYNC + * should success because initialization could be executed in parallel + */ + bRet = pfnInitOnceBeginInitialize(&InitOnce, + INIT_ONCE_ASYNC, + &fPending, + (LPVOID*)&ulContextData); + ok(bRet, "InitOnceBeginInitialize failed with %lu\n", GetLastError()); + if (!bRet) + { + return; + } + ok(fPending, "fPending is not TRUE after a success InitOnceBeginInitialize\n"); + if (!fPending) + { + return; + } + + /* Complete the initialization once */ + InitWorker(&ulInitCount, &ulTempContext); + bRet = pfnInitOnceComplete(&InitOnce, INIT_ONCE_ASYNC, (LPVOID)ulTempContext); + ok(bRet, "InitOnceComplete failed with %lu\n", GetLastError()); + if (!bRet) + { + return; + } + + /* Subsequent InitOnceComplete should fail with ERROR_GEN_FAILURE */ + bRet = pfnInitOnceComplete(&InitOnce, INIT_ONCE_ASYNC, (LPVOID)ulTempContext); + ok(!bRet, "InitOnceComplete should not success\n"); + if (!bRet) + { + dwError = GetLastError(); + ok(dwError == ERROR_GEN_FAILURE, + "Last error is %lu, but %u is expected\n", + dwError, + ERROR_GEN_FAILURE); + } + + /* + * Initialization is completed, call InitOnceBeginInitialize with + * INIT_ONCE_CHECK_ONLY should retrieve status and context data successfully + */ + bRet = pfnInitOnceBeginInitialize(&InitOnce, + INIT_ONCE_CHECK_ONLY, + &fPending, + (LPVOID*)&ulContextData); + ok(bRet && !fPending && ulContextData == g_ulRandom, + "InitOnceBeginInitialize returns incorrect result for a completed initialization\n"); + + return; +} diff --git a/modules/rostests/apitests/kernel32/testlist.c b/modules/rostests/apitests/kernel32/testlist.c index b96dfa956f0..4802d88079c 100644 --- a/modules/rostests/apitests/kernel32/testlist.c +++ b/modules/rostests/apitests/kernel32/testlist.c @@ -18,6 +18,7 @@ extern void func_GetCurrentDirectory(void); extern void func_GetDriveType(void); extern void func_GetModuleFileName(void); extern void func_GetVolumeInformation(void); +extern void func_InitOnce(void); extern void func_interlck(void); extern void func_IsDBCSLeadByteEx(void); extern void func_JapaneseCalendar(void); @@ -53,6 +54,7 @@ const struct test winetest_testlist[] = { "GetDriveType", func_GetDriveType }, { "GetModuleFileName", func_GetModuleFileName }, { "GetVolumeInformation", func_GetVolumeInformation }, + { "InitOnce", func_InitOnce }, { "interlck", func_interlck }, { "IsDBCSLeadByteEx", func_IsDBCSLeadByteEx }, { "JapaneseCalendar", func_JapaneseCalendar }, diff --git a/modules/rostests/apitests/ntdll/CMakeLists.txt b/modules/rostests/apitests/ntdll/CMakeLists.txt index 14c12de120e..85515a2efaf 100644 --- a/modules/rostests/apitests/ntdll/CMakeLists.txt +++ b/modules/rostests/apitests/ntdll/CMakeLists.txt @@ -59,6 +59,7 @@ list(APPEND SOURCE RtlBitmap.c RtlComputePrivatizedDllName_U.c RtlCopyMappedMemory.c + RtlCriticalSection.c RtlDebugInformation.c RtlDeleteAce.c RtlDetermineDosPathNameType.c diff --git a/modules/rostests/apitests/ntdll/RtlCriticalSection.c b/modules/rostests/apitests/ntdll/RtlCriticalSection.c new file mode 100644 index 00000000000..920cc3a97a3 --- /dev/null +++ b/modules/rostests/apitests/ntdll/RtlCriticalSection.c @@ -0,0 +1,411 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later) + * PURPOSE: Test for Rtl Critical Section API + * COPYRIGHT: Copyright 2023 Timo Kreuzer + */ + +#include "precomp.h" +#include + +SYSTEM_INFO g_SysInfo; +OSVERSIONINFOEXA g_VerInfo; +ULONG g_Version; +ULONG g_DefaultSpinCount; + +typedef +NTSTATUS +NTAPI +FN_RtlInitializeCriticalSectionEx( + _Out_ PRTL_CRITICAL_SECTION CriticalSection, + _In_ ULONG SpinCount, + _In_ ULONG Flags); + +FN_RtlInitializeCriticalSectionEx* pfnRtlInitializeCriticalSectionEx; +RTL_CRITICAL_SECTION CritSect; +HANDLE hEventThread1Ready, hEventThread1Cont; +HANDLE hEventThread2Ready, hEventThread2Cont; + +static +void +Test_Init(void) +{ + NTSTATUS Status; + BOOL HasDebugInfo = (g_Version <= _WIN32_WINNT_VISTA); + + _SEH2_TRY + { + RtlInitializeCriticalSection(NULL); + Status = STATUS_SUCCESS; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + ok_ntstatus(Status, STATUS_ACCESS_VIOLATION); + + Status = RtlInitializeCriticalSection(&CritSect); + ok_ntstatus(Status, STATUS_SUCCESS); + ok_long(CritSect.LockCount, -1); + ok_long(CritSect.RecursionCount, 0); + ok_ptr(CritSect.OwningThread, NULL); + ok_ptr(CritSect.LockSemaphore, NULL); + ok_size_t(CritSect.SpinCount, g_DefaultSpinCount); + if (HasDebugInfo) + { + ok(CritSect.DebugInfo != NULL, "DebugInfo is %p\n", CritSect.DebugInfo); + ok(CritSect.DebugInfo != LongToPtr(-1), "DebugInfo is %p\n", CritSect.DebugInfo); + } + else + { + ok(CritSect.DebugInfo == LongToPtr(-1), "DebugInfo is %p\n", CritSect.DebugInfo); + } + + Status = RtlInitializeCriticalSectionAndSpinCount(&CritSect, 0); + ok_ntstatus(Status, STATUS_SUCCESS); + ok_long(CritSect.LockCount, -1); + ok_long(CritSect.RecursionCount, 0); + ok_ptr(CritSect.OwningThread, NULL); + ok_ptr(CritSect.LockSemaphore, NULL); + ok_size_t(CritSect.SpinCount, g_DefaultSpinCount); + if (HasDebugInfo) + { + ok(CritSect.DebugInfo != NULL, "DebugInfo is %p\n", CritSect.DebugInfo); + ok(CritSect.DebugInfo != LongToPtr(-1), "DebugInfo is %p\n", CritSect.DebugInfo); + } + else + { + ok(CritSect.DebugInfo == LongToPtr(-1), "DebugInfo is %p\n", CritSect.DebugInfo); + } + + Status = RtlInitializeCriticalSectionAndSpinCount(&CritSect, 0xFF000000); + ok_ntstatus(Status, STATUS_SUCCESS); + ok_size_t(CritSect.SpinCount, g_DefaultSpinCount); + + Status = RtlInitializeCriticalSectionAndSpinCount(&CritSect, 0x1234); + ok_ntstatus(Status, STATUS_SUCCESS); + ok_size_t(CritSect.SpinCount, (g_SysInfo.dwNumberOfProcessors > 1) ? 0x1234 : 0); + + if (pfnRtlInitializeCriticalSectionEx != NULL) + { + _SEH2_TRY + { + pfnRtlInitializeCriticalSectionEx(NULL, 0, 0); + Status = STATUS_SUCCESS; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + ok_ntstatus(Status, STATUS_ACCESS_VIOLATION); + + Status = pfnRtlInitializeCriticalSectionEx(&CritSect, 0, 0); + ok_ntstatus(Status, STATUS_SUCCESS); + ok_long(CritSect.LockCount, -1); + ok_long(CritSect.RecursionCount, 0); + ok_ptr(CritSect.OwningThread, NULL); + ok_ptr(CritSect.LockSemaphore, NULL); + ok_size_t(CritSect.SpinCount, g_DefaultSpinCount); + if (HasDebugInfo) + { + ok(CritSect.DebugInfo != NULL, "DebugInfo is %p\n", CritSect.DebugInfo); + ok(CritSect.DebugInfo != LongToPtr(-1), "DebugInfo is %p\n", CritSect.DebugInfo); + if ((CritSect.DebugInfo != NULL) && (CritSect.DebugInfo != LongToPtr(-1))) + { + ok_int(CritSect.DebugInfo->Type, 0); + ok_int(CritSect.DebugInfo->CreatorBackTraceIndex, 0); + ok_int(CritSect.DebugInfo->CreatorBackTraceIndexHigh, 0); + ok_ptr(CritSect.DebugInfo->CriticalSection, &CritSect); + ok(CritSect.DebugInfo->ProcessLocksList.Flink != NULL, "Flink is NULL\n"); + ok(CritSect.DebugInfo->ProcessLocksList.Blink != NULL, "Blink is NULL\n"); + if ((CritSect.DebugInfo->ProcessLocksList.Flink != NULL) && + (CritSect.DebugInfo->ProcessLocksList.Blink != NULL)) + { + ok_ptr(CritSect.DebugInfo->ProcessLocksList.Flink->Blink, + &CritSect.DebugInfo->ProcessLocksList); + ok_ptr(CritSect.DebugInfo->ProcessLocksList.Blink->Flink, + &CritSect.DebugInfo->ProcessLocksList); + } + ok_long(CritSect.DebugInfo->EntryCount, 0); + ok_long(CritSect.DebugInfo->ContentionCount, 0); + ok_long(CritSect.DebugInfo->Flags, 0); + ok_int(CritSect.DebugInfo->SpareWORD, 0); + } + } + else + { + ok(CritSect.DebugInfo == LongToPtr(-1), "DebugInfo is %p\n", CritSect.DebugInfo); + } + + Status = pfnRtlInitializeCriticalSectionEx(&CritSect, 0x00FFFFFF, 0); + ok_size_t(CritSect.SpinCount, (g_SysInfo.dwNumberOfProcessors > 1) ? 0x00FFFFFF : 0); + + Status = pfnRtlInitializeCriticalSectionEx(&CritSect, 0x01000000, 0); + ok_ntstatus(Status, STATUS_INVALID_PARAMETER_2); + + Status = pfnRtlInitializeCriticalSectionEx(&CritSect, 0x80000000, 0); + ok_ntstatus(Status, STATUS_INVALID_PARAMETER_2); + + _SEH2_TRY + { + Status = pfnRtlInitializeCriticalSectionEx(NULL, 0x12345678, 0); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + ok_ntstatus(Status, STATUS_INVALID_PARAMETER_2); + + for (ULONG i = 0; i < 32; i++) + { + ULONG Flags = 1UL << i; + ULONG AllowedFlags = 0x07FFFFFF; + if (g_Version >= _WIN32_WINNT_WIN7) AllowedFlags |= 0x18000000; + NTSTATUS ExpectedStatus = (Flags & ~AllowedFlags) ? + STATUS_INVALID_PARAMETER_3 : STATUS_SUCCESS; + Status = pfnRtlInitializeCriticalSectionEx(&CritSect, 0, Flags); + ok(Status == ExpectedStatus, "Wrong Status (0x%lx) for Flags 0x%lx\n", + Status, Flags); + if (NT_SUCCESS(Status)) + { + ULONG SetFlags = Flags & 0x08000000; + if (g_Version >= _WIN32_WINNT_WIN7) SetFlags |= (Flags & 0x03000000); + ok_size_t(CritSect.SpinCount, (g_SysInfo.dwNumberOfProcessors > 1) ? g_DefaultSpinCount | SetFlags : SetFlags); + } + } + + Status = pfnRtlInitializeCriticalSectionEx(&CritSect, 0, 0xFFFFFFFF); + ok_ntstatus(Status, STATUS_INVALID_PARAMETER_3); + _SEH2_TRY + { + Status = pfnRtlInitializeCriticalSectionEx(NULL, 0, 0xFFFFFFFF); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + ok_ntstatus(Status, STATUS_INVALID_PARAMETER_3); + + Status = pfnRtlInitializeCriticalSectionEx(&CritSect, 0x12345678, 0xFFFFFFFF); + ok_ntstatus(Status, STATUS_INVALID_PARAMETER_3); + + Status = pfnRtlInitializeCriticalSectionEx(&CritSect, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO); + if (g_Version >= _WIN32_WINNT_WIN7) + { + ok_ntstatus(Status, STATUS_SUCCESS); + ok(CritSect.DebugInfo != NULL, "DebugInfo is %p\n", CritSect.DebugInfo); + ok(CritSect.DebugInfo != LongToPtr(-1), "DebugInfo is %p\n", CritSect.DebugInfo); + if ((CritSect.DebugInfo != NULL) && (CritSect.DebugInfo != LongToPtr(-1))) + { + ok_int(CritSect.DebugInfo->Type, 0); + ok_int(CritSect.DebugInfo->CreatorBackTraceIndex, 0); + ok_int(CritSect.DebugInfo->CreatorBackTraceIndexHigh, 0); + ok_ptr(CritSect.DebugInfo->CriticalSection, &CritSect); + ok(CritSect.DebugInfo->ProcessLocksList.Flink != NULL, "Flink is NULL\n"); + ok(CritSect.DebugInfo->ProcessLocksList.Blink != NULL, "Blink is NULL\n"); + if ((CritSect.DebugInfo->ProcessLocksList.Flink != NULL) && + (CritSect.DebugInfo->ProcessLocksList.Blink != NULL)) + { + ok_ptr(CritSect.DebugInfo->ProcessLocksList.Flink->Blink, + &CritSect.DebugInfo->ProcessLocksList); + ok_ptr(CritSect.DebugInfo->ProcessLocksList.Blink->Flink, + &CritSect.DebugInfo->ProcessLocksList); + } + ok_long(CritSect.DebugInfo->EntryCount, 0); + ok_long(CritSect.DebugInfo->ContentionCount, 0); + ok_long(CritSect.DebugInfo->Flags, 0); + ok_int(CritSect.DebugInfo->SpareWORD, 0); + } + } + else + { + ok_ntstatus(Status, STATUS_INVALID_PARAMETER_3); + } + } + else + { + skip("RtlInitializeCriticalSectionEx not available.\n"); + } +} + +static +DWORD +WINAPI +ThreadProc1( + _In_ LPVOID lpParameter) +{ + printf("ThreadProc1 starting\n"); + RtlEnterCriticalSection(&CritSect); + + SetEvent(hEventThread1Ready); + + printf("ThreadProc1 waiting\n"); + WaitForSingleObject(hEventThread1Cont, INFINITE); + printf("ThreadProc1 returned from wait\n"); + + RtlLeaveCriticalSection(&CritSect); + + return 0; +} + +static +DWORD +WINAPI +ThreadProc2( + _In_ LPVOID lpParameter) +{ + printf("ThreadProc2 starting\n"); + RtlEnterCriticalSection(&CritSect); + + SetEvent(hEventThread2Ready); + + printf("ThreadProc2 waiting\n"); + WaitForSingleObject(hEventThread2Cont, INFINITE); + printf("ThreadProc2 returned from wait\n"); + + RtlLeaveCriticalSection(&CritSect); + + return 0; +} + +static +void +Test_Acquire(void) +{ + DWORD dwThreadId1, dwThreadId2; + HANDLE hThread1, hThread2; + + RtlInitializeCriticalSection(&CritSect); + + // Acquire once + RtlEnterCriticalSection(&CritSect); + ok_long(CritSect.LockCount, -2); + ok_long(CritSect.RecursionCount, 1); + ok_ptr(CritSect.OwningThread, UlongToHandle(GetCurrentThreadId())); + ok_ptr(CritSect.LockSemaphore, NULL); + ok_size_t(CritSect.SpinCount, g_DefaultSpinCount); + + // Acquire recursively + RtlEnterCriticalSection(&CritSect); + ok_long(CritSect.LockCount, -2); + ok_long(CritSect.RecursionCount, 2); + ok_ptr(CritSect.OwningThread, UlongToHandle(GetCurrentThreadId())); + ok_ptr(CritSect.LockSemaphore, NULL); + ok_size_t(CritSect.SpinCount, g_DefaultSpinCount); + + hEventThread1Ready = CreateEvent(NULL, TRUE, FALSE, NULL); + hEventThread1Cont = CreateEvent(NULL, TRUE, FALSE, NULL); + hEventThread2Ready = CreateEvent(NULL, TRUE, FALSE, NULL); + hEventThread2Cont = CreateEvent(NULL, TRUE, FALSE, NULL); + + // Create thread 1 and wait to it time to try to acquire the critical section + hThread1 = CreateThread(NULL, 0, ThreadProc1, NULL, 0, &dwThreadId1); + + // Wait up to 10 s + for (ULONG i = 0; (CritSect.LockCount == -2) && (i < 1000); i++) + { + Sleep(10); + } + + ok_long(CritSect.LockCount, -6); + ok_long(CritSect.RecursionCount, 2); + ok_ptr(CritSect.OwningThread, UlongToHandle(GetCurrentThreadId())); + //ok_ptr(CritSect.LockSemaphore, LongToPtr(-1)); // TODO: this behaves differently on different OS versions + ok_size_t(CritSect.SpinCount, g_DefaultSpinCount); + + // Create thread 2 and wait to it time to try to acquire the critical section + hThread2 = CreateThread(NULL, 0, ThreadProc2, NULL, 0, &dwThreadId2); + + // Wait up to 10 s + for (ULONG i = 0; (CritSect.LockCount == -6) && (i < 1000); i++) + { + Sleep(10); + } + + ok_long(CritSect.LockCount, -10); + ok_long(CritSect.RecursionCount, 2); + ok_ptr(CritSect.OwningThread, UlongToHandle(GetCurrentThreadId())); + //ok_ptr(CritSect.LockSemaphore, LongToPtr(-1)); + ok_size_t(CritSect.SpinCount, g_DefaultSpinCount); + + RtlLeaveCriticalSection(&CritSect); + ok_long(CritSect.LockCount, -10); + ok_long(CritSect.RecursionCount, 1); + RtlLeaveCriticalSection(&CritSect); + + // Wait until thread 1 has acquired the critical section + WaitForSingleObject(hEventThread1Ready, INFINITE); + + ok_long(CritSect.LockCount, -6); + ok_long(CritSect.RecursionCount, 1); + ok_ptr(CritSect.OwningThread, UlongToHandle(dwThreadId1)); + //ok_ptr(CritSect.LockSemaphore, LongToPtr(-1)); + if (g_DefaultSpinCount != 0) + { + ok(CritSect.SpinCount <= g_DefaultSpinCount, "SpinCount increased\n"); + } + else + { + ok_size_t(CritSect.SpinCount, g_DefaultSpinCount); + } + + ok_size_t(CritSect.SpinCount, g_DefaultSpinCount ? g_DefaultSpinCount - 1 : 0); + + // Release thread 1, wait for thread 2 to acquire the critical section + SetEvent(hEventThread1Cont); + WaitForSingleObject(hEventThread2Ready, INFINITE); + + ok_long(CritSect.LockCount, -2); + ok_long(CritSect.RecursionCount, 1); + ok_ptr(CritSect.OwningThread, UlongToHandle(dwThreadId2)); + //ok_ptr(CritSect.LockSemaphore, LongToPtr(-1)); + if (g_DefaultSpinCount != 0) + { + ok(CritSect.SpinCount <= g_DefaultSpinCount, "SpinCount increased\n"); + } + else + { + ok_size_t(CritSect.SpinCount, g_DefaultSpinCount); + } + + // Release thread 2 + SetEvent(hEventThread2Cont); + + // To make Thomas happy :) + WaitForSingleObject(hThread1, INFINITE); + WaitForSingleObject(hThread2, INFINITE); +} + +START_TEST(RtlCriticalSection) +{ + HMODULE hmodNtDll = GetModuleHandleA("ntdll.dll"); + pfnRtlInitializeCriticalSectionEx = (FN_RtlInitializeCriticalSectionEx*) + GetProcAddress(hmodNtDll, "RtlInitializeCriticalSectionEx"); + + g_VerInfo.dwOSVersionInfoSize = sizeof(g_VerInfo); + GetVersionExA((LPOSVERSIONINFOA)&g_VerInfo); + g_Version = g_VerInfo.dwMajorVersion << 8 | g_VerInfo.dwMinorVersion; + printf("g_VerInfo: %lu.%lu.%lu ('%s')\n ", + g_VerInfo.dwMajorVersion, + g_VerInfo.dwMinorVersion, + g_VerInfo.dwBuildNumber, + g_VerInfo.szCSDVersion); + GetSystemInfo(&g_SysInfo); + printf("g_SysInfo.dwNumberOfProcessors = %lu\n", g_SysInfo.dwNumberOfProcessors); + + if ((g_Version >= _WIN32_WINNT_VISTA) && (g_SysInfo.dwNumberOfProcessors > 1)) + { + g_DefaultSpinCount = 0x20007d0; + } + else + { + g_DefaultSpinCount = 0; + } + + Test_Init(); + Test_Acquire(); +} diff --git a/modules/rostests/apitests/ntdll/testlist.c b/modules/rostests/apitests/ntdll/testlist.c index 7f80f42420b..2be58938238 100644 --- a/modules/rostests/apitests/ntdll/testlist.c +++ b/modules/rostests/apitests/ntdll/testlist.c @@ -55,6 +55,7 @@ extern void func_RtlAllocateHeap(void); extern void func_RtlBitmap(void); extern void func_RtlComputePrivatizedDllName_U(void); extern void func_RtlCopyMappedMemory(void); +extern void func_RtlCriticalSection(void); extern void func_RtlDebugInformation(void); extern void func_RtlDeleteAce(void); extern void func_RtlDetermineDosPathNameType(void); @@ -150,6 +151,7 @@ const struct test winetest_testlist[] = { "RtlBitmapApi", func_RtlBitmap }, { "RtlComputePrivatizedDllName_U", func_RtlComputePrivatizedDllName_U }, { "RtlCopyMappedMemory", func_RtlCopyMappedMemory }, + { "RtlCriticalSection", func_RtlCriticalSection }, { "RtlDebugInformation", func_RtlDebugInformation }, { "RtlDeleteAce", func_RtlDeleteAce }, { "RtlDetermineDosPathNameType", func_RtlDetermineDosPathNameType }, diff --git a/modules/rostests/winetests/winhttp/winhttp.c b/modules/rostests/winetests/winhttp/winhttp.c index 776ee53e379..5655432f73b 100644 --- a/modules/rostests/winetests/winhttp/winhttp.c +++ b/modules/rostests/winetests/winhttp/winhttp.c @@ -4276,7 +4276,12 @@ static void test_IWinHttpRequest(int port) hr = IWinHttpRequest_get_ResponseText( req, &response ); ok( hr == S_OK, "got %08x\n", hr ); +#ifdef __REACTOS__ + ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", + wine_dbgstr_wn(response, min(SysStringLen(response), 32)) ); +#else ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", wine_dbgstr_wn(response, 32) ); +#endif SysFreeString( response ); IWinHttpRequest_Release( req ); diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c index 0e6917ea18a..efa4c8523d4 100644 --- a/ntoskrnl/cc/view.c +++ b/ntoskrnl/cc/view.c @@ -449,6 +449,124 @@ CcRosFlushDirtyPages ( return STATUS_SUCCESS; } +VOID +CcRosTrimCache( + _In_ ULONG Target, + _Out_ PULONG NrFreed) +/* + * FUNCTION: Try to free some memory from the file cache. + * ARGUMENTS: + * Target - The number of pages to be freed. + * NrFreed - Points to a variable where the number of pages + * actually freed is returned. + */ +{ + PLIST_ENTRY current_entry; + PROS_VACB current; + ULONG PagesFreed; + KIRQL oldIrql; + LIST_ENTRY FreeList; + PFN_NUMBER Page; + ULONG i; + BOOLEAN FlushedPages = FALSE; + + DPRINT("CcRosTrimCache(Target %lu)\n", Target); + + InitializeListHead(&FreeList); + + *NrFreed = 0; + +retry: + oldIrql = KeAcquireQueuedSpinLock(LockQueueMasterLock); + + current_entry = VacbLruListHead.Flink; + while (current_entry != &VacbLruListHead) + { + ULONG Refs; + + current = CONTAINING_RECORD(current_entry, + ROS_VACB, + VacbLruListEntry); + current_entry = current_entry->Flink; + + KeAcquireSpinLockAtDpcLevel(¤t->SharedCacheMap->CacheMapLock); + + /* Reference the VACB */ + CcRosVacbIncRefCount(current); + + /* Check if it's mapped and not dirty */ + if (InterlockedCompareExchange((PLONG)¤t->MappedCount, 0, 0) > 0 && !current->Dirty) + { + /* Page out the VACB */ + for (i = 0; i < VACB_MAPPING_GRANULARITY / PAGE_SIZE; i++) + { + Page = (PFN_NUMBER)(MmGetPhysicalAddress((PUCHAR)current->BaseAddress + (i * PAGE_SIZE)).QuadPart >> PAGE_SHIFT); + + MmPageOutPhysicalAddress(Page); + } + } + + /* Dereference the VACB */ + Refs = CcRosVacbDecRefCount(current); + + /* Check if we can free this entry now */ + if (Refs < 2) + { + ASSERT(!current->Dirty); + ASSERT(!current->MappedCount); + ASSERT(Refs == 1); + + RemoveEntryList(¤t->CacheMapVacbListEntry); + RemoveEntryList(¤t->VacbLruListEntry); + InitializeListHead(¤t->VacbLruListEntry); + InsertHeadList(&FreeList, ¤t->CacheMapVacbListEntry); + + /* Calculate how many pages we freed for Mm */ + PagesFreed = min(VACB_MAPPING_GRANULARITY / PAGE_SIZE, Target); + Target -= PagesFreed; + (*NrFreed) += PagesFreed; + } + + KeReleaseSpinLockFromDpcLevel(¤t->SharedCacheMap->CacheMapLock); + } + + KeReleaseQueuedSpinLock(LockQueueMasterLock, oldIrql); + + /* Try flushing pages if we haven't met our target */ + if ((Target > 0) && !FlushedPages) + { + /* Flush dirty pages to disk */ + CcRosFlushDirtyPages(Target, &PagesFreed, FALSE, FALSE); + FlushedPages = TRUE; + + /* We can only swap as many pages as we flushed */ + if (PagesFreed < Target) Target = PagesFreed; + + /* Check if we flushed anything */ + if (PagesFreed != 0) + { + /* Try again after flushing dirty pages */ + DPRINT("Flushed %lu dirty cache pages to disk\n", PagesFreed); + goto retry; + } + } + + while (!IsListEmpty(&FreeList)) + { + ULONG Refs; + + current_entry = RemoveHeadList(&FreeList); + current = CONTAINING_RECORD(current_entry, + ROS_VACB, + CacheMapVacbListEntry); + InitializeListHead(¤t->CacheMapVacbListEntry); + Refs = CcRosVacbDecRefCount(current); + ASSERT(Refs == 0); + } + + DPRINT("Evicted %lu cache pages\n", (*NrFreed)); +} + NTSTATUS CcRosReleaseVacb ( PROS_SHARED_CACHE_MAP SharedCacheMap, diff --git a/ntoskrnl/config/cmlazy.c b/ntoskrnl/config/cmlazy.c index 21b9d201253..ed03247a8c7 100644 --- a/ntoskrnl/config/cmlazy.c +++ b/ntoskrnl/config/cmlazy.c @@ -1,15 +1,14 @@ /* - * PROJECT: Windivs Kernel - * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/config/cmlazy.c - * PURPOSE: Configuration Manager - Internal Registry APIs - * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) + * PROJECT: ReactOS Kernel + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: Configuration Manager - Internal Registry APIs + * PROGRAMMERS: Alex Ionescu */ /* INCLUDES *******************************************************************/ #include "ntoskrnl.h" -//#define NDEBUG +#define NDEBUG #include "debug.h" /* GLOBALS ********************************************************************/ diff --git a/ntoskrnl/ex/init.c b/ntoskrnl/ex/init.c index ca373dfef55..843eba2f200 100644 --- a/ntoskrnl/ex/init.c +++ b/ntoskrnl/ex/init.c @@ -1549,10 +1549,8 @@ Phase1InitializationDiscard(IN PVOID Context) ExpTimeZoneBias.QuadPart; } - /* Update the system time */ + /* Update the system time and notify the system */ KeSetSystemTime(&UniversalBootTime, &OldTime, FALSE, NULL); - - /* Do system callback */ PoNotifySystemTimeSet(); /* Remember this as the boot time */ @@ -1681,7 +1679,8 @@ Phase1InitializationDiscard(IN PVOID Context) else { /* Check if the timezone switched and update the time */ - if (LastTzBias != ExpLastTimeZoneBias) ZwSetSystemTime(NULL, NULL); + if (LastTzBias != ExpLastTimeZoneBias) + ZwSetSystemTime(NULL, NULL); } /* Initialize the File System Runtime Library */ diff --git a/ntoskrnl/ex/time.c b/ntoskrnl/ex/time.c index 131adf04a72..b01a999887d 100644 --- a/ntoskrnl/ex/time.c +++ b/ntoskrnl/ex/time.c @@ -372,8 +372,9 @@ ExpSetTimeZoneInformation(PRTL_TIME_ZONE_INFORMATION TimeZoneInformation) /* Calculate the new system time */ ExLocalTimeToSystemTime(&LocalTime, &SystemTime); - /* Set the new system time */ + /* Set the new system time and notify the system */ KeSetSystemTime(&SystemTime, &OldTime, FALSE, NULL); + PoNotifySystemTimeSet(); /* Return success */ DPRINT("ExpSetTimeZoneInformation() done\n"); @@ -400,8 +401,17 @@ NtSetSystemTime(IN PLARGE_INTEGER SystemTime, TIME_FIELDS TimeFields; KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); NTSTATUS Status = STATUS_SUCCESS; + PAGED_CODE(); + // TODO: Handle the case when SystemTime == NULL, which means: + // "update system time using the current time-zone information". + if (!SystemTime) + { + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; + } + /* Check if we were called from user-mode */ if (PreviousMode != KernelMode) { @@ -409,7 +419,7 @@ NtSetSystemTime(IN PLARGE_INTEGER SystemTime, { /* Verify the time pointers */ NewSystemTime = ProbeForReadLargeInteger(SystemTime); - if(PreviousTime) ProbeForWriteLargeInteger(PreviousTime); + if (PreviousTime) ProbeForWriteLargeInteger(PreviousTime); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { @@ -437,8 +447,9 @@ NtSetSystemTime(IN PLARGE_INTEGER SystemTime, RtlTimeToTimeFields(&LocalTime, &TimeFields); HalSetRealTimeClock(&TimeFields); - /* Now set system time */ + /* Now set the system time and notify the system */ KeSetSystemTime(&NewSystemTime, &OldSystemTime, FALSE, NULL); + PoNotifySystemTimeSet(); /* Check if caller wanted previous time */ if (PreviousTime) diff --git a/ntoskrnl/ke/amd64/thrdini.c b/ntoskrnl/ke/amd64/thrdini.c index b2119c6e8a3..3185de21cd6 100644 --- a/ntoskrnl/ke/amd64/thrdini.c +++ b/ntoskrnl/ke/amd64/thrdini.c @@ -134,7 +134,7 @@ KiInitializeContextThread(IN PKTHREAD Thread, /* Set up the Context Switch Frame */ CtxSwitchFrame->Return = (ULONG64)KiThreadStartup; - CtxSwitchFrame->ApcBypass = FALSE; + CtxSwitchFrame->ApcBypass = TRUE; StartFrame->P1Home = (ULONG64)StartRoutine; StartFrame->P2Home = (ULONG64)StartContext; diff --git a/ntoskrnl/mm/balance.c b/ntoskrnl/mm/balance.c index ab71d0f195b..3b11aeab2c8 100644 --- a/ntoskrnl/mm/balance.c +++ b/ntoskrnl/mm/balance.c @@ -1,11 +1,9 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/balance.c - * PURPOSE: kernel memory management functions - * - * PROGRAMMERS: David Welch (welch@cwcom.net) - * Cameron Gutman (cameron.gutman@reactos.org) + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * PURPOSE: kernel memory management functions + * PROGRAMMERS: David Welch + * Cameron Gutman */ /* INCLUDES *****************************************************************/ @@ -144,7 +142,7 @@ MmTrimUserMemory(ULONG Target, ULONG Priority, PULONG NrFreedPages) (*NrFreedPages) = 0; - DPRINT1("MM BALANCER: %s\n", Priority ? "Paging out!" : "Removing access bit!"); + DPRINT("MM BALANCER: %s\n", Priority ? "Paging out!" : "Removing access bit!"); FirstPage = MmGetLRUFirstUserPage(); CurrentPage = FirstPage; @@ -316,6 +314,15 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait, PPFN_NUMBER AllocatedPage) { PFN_NUMBER Page; + static INT i = 0; + static LARGE_INTEGER TinyTime = {{-1L, -1L}}; + + /* Delay some requests for the Memory Manager to recover pages */ + if (i++ >= 100) + { + KeDelayExecutionThread(KernelMode, FALSE, &TinyTime); + i = 0; + } /* * Actually allocate the page. @@ -335,6 +342,10 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait, return(STATUS_SUCCESS); } +VOID +CcRosTrimCache( + _In_ ULONG Target, + _Out_ PULONG NrFreed); VOID NTAPI MiBalancerThread(PVOID Unused) @@ -361,6 +372,8 @@ MiBalancerThread(PVOID Unused) if (Status == STATUS_WAIT_0 || Status == STATUS_WAIT_1) { ULONG InitialTarget = 0; + ULONG Target; + ULONG NrFreedPages; do { @@ -372,6 +385,14 @@ MiBalancerThread(PVOID Unused) InitialTarget = MiTrimMemoryConsumer(i, InitialTarget); } + /* Trim cache */ + Target = max(InitialTarget, abs(MiMinimumAvailablePages - MmAvailablePages)); + if (Target) + { + CcRosTrimCache(Target, &NrFreedPages); + InitialTarget -= min(NrFreedPages, InitialTarget); + } + /* No pages left to swap! */ if (InitialTarget != 0 && InitialTarget == OldTarget) diff --git a/sdk/include/ndk/rtlfuncs.h b/sdk/include/ndk/rtlfuncs.h index 47830b87990..41aedeb7e2d 100644 --- a/sdk/include/ndk/rtlfuncs.h +++ b/sdk/include/ndk/rtlfuncs.h @@ -4961,6 +4961,43 @@ RtlGetNativeSystemInformation( _Out_opt_ PULONG ReturnLength ); +#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA) || (DLL_EXPORT_VERSION >= _WIN32_WINNT_VISTA) + +NTSYSAPI +VOID +NTAPI +RtlRunOnceInitialize( + _Out_ PRTL_RUN_ONCE RunOnce); + +_Maybe_raises_SEH_exception_ +NTSYSAPI +NTSTATUS +NTAPI +RtlRunOnceExecuteOnce( + _Inout_ PRTL_RUN_ONCE RunOnce, + _In_ __inner_callback PRTL_RUN_ONCE_INIT_FN InitFn, + _Inout_opt_ PVOID Parameter, + _Outptr_opt_result_maybenull_ PVOID *Context); + +_Must_inspect_result_ +NTSYSAPI +NTSTATUS +NTAPI +RtlRunOnceBeginInitialize( + _Inout_ PRTL_RUN_ONCE RunOnce, + _In_ ULONG Flags, + _Outptr_opt_result_maybenull_ PVOID *Context); + +NTSYSAPI +NTSTATUS +NTAPI +RtlRunOnceComplete( + _Inout_ PRTL_RUN_ONCE RunOnce, + _In_ ULONG Flags, + _In_opt_ PVOID Context); + +#endif + #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA) || (defined(__REACTOS__) && defined(_NTDLLBUILD_)) /* Put NTSYSAPI back when this will be really exported. Only statically linked for now */ // NTSYSAPI diff --git a/sdk/include/psdk/winbase.h b/sdk/include/psdk/winbase.h index 4872e40d98b..6b616b07b39 100644 --- a/sdk/include/psdk/winbase.h +++ b/sdk/include/psdk/winbase.h @@ -3837,6 +3837,8 @@ typedef PRTL_RUN_ONCE LPINIT_ONCE; #define INIT_ONCE_ASYNC RTL_RUN_ONCE_ASYNC #define INIT_ONCE_INIT_FAILED RTL_RUN_ONCE_INIT_FAILED +#define INIT_ONCE_CTX_RESERVED_BITS RTL_RUN_ONCE_CTX_RESERVED_BITS + typedef BOOL (WINAPI *PINIT_ONCE_FN)( _Inout_ PINIT_ONCE InitOnce, @@ -3961,14 +3963,41 @@ CopyFile2( #endif /* _WIN32_WINNT >= 0x0601 */ +#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA) || (DLL_EXPORT_VERSION >= _WIN32_WINNT_VISTA) + +WINBASEAPI +VOID +WINAPI +InitOnceInitialize( + _Out_ PINIT_ONCE InitOnce); + +WINBASEAPI +BOOL +WINAPI +InitOnceBeginInitialize( + _Inout_ LPINIT_ONCE lpInitOnce, + _In_ DWORD dwFlags, + _Out_ PBOOL fPending, + _Outptr_opt_result_maybenull_ LPVOID *lpContext); + +WINBASEAPI +BOOL +WINAPI +InitOnceComplete( + _Inout_ LPINIT_ONCE lpInitOnce, + _In_ DWORD dwFlags, + _In_opt_ LPVOID lpContext); + +#endif /* (_WIN32_WINNT >= _WIN32_WINNT_VISTA) || (DLL_EXPORT_VERSION >= _WIN32_WINNT_VISTA) */ + WINBASEAPI BOOL WINAPI InitOnceExecuteOnce( - _Inout_ PINIT_ONCE InitOnce, - _In_ __callback PINIT_ONCE_FN InitFn, - _Inout_opt_ PVOID Parameter, - _Outptr_opt_result_maybenull_ LPVOID *Context); + _Inout_ PINIT_ONCE InitOnce, + _In_ __callback PINIT_ONCE_FN InitFn, + _Inout_opt_ PVOID Parameter, + _Outptr_opt_result_maybenull_ LPVOID *Context); #if defined(_SLIST_HEADER_) && !defined(_NTOS_) && !defined(_NTOSP_) diff --git a/sdk/include/reactos/shlobj_undoc.h b/sdk/include/reactos/shlobj_undoc.h index fc97ac23a5b..f54fc4c8fb6 100644 --- a/sdk/include/reactos/shlobj_undoc.h +++ b/sdk/include/reactos/shlobj_undoc.h @@ -29,11 +29,11 @@ extern "C" { typedef struct tagSLOTITEMDATA { DWORD dwFlags; - UINT cbPidl; - LPITEMIDLIST pidl; + UINT cbData; + LPVOID pvData; } SLOTITEMDATA, *PSLOTITEMDATA; -typedef INT (CALLBACK *SLOTCOMPARE)(LPCITEMIDLIST, LPCITEMIDLIST, UINT); +typedef INT (CALLBACK *SLOTCOMPARE)(LPCVOID pvData1, LPCVOID pvData2, UINT cbData); /***************************************************************************** * New shellstate structure diff --git a/sdk/include/reactos/shlwapi_undoc.h b/sdk/include/reactos/shlwapi_undoc.h index d7f3790d897..1cb5a064631 100644 --- a/sdk/include/reactos/shlwapi_undoc.h +++ b/sdk/include/reactos/shlwapi_undoc.h @@ -69,6 +69,19 @@ HRESULT WINAPI SHWriteDataBlockList(IStream* lpStream, LPDBLIST lpList); HRESULT WINAPI SHReadDataBlockList(IStream* lpStream, LPDBLIST* lppList); VOID WINAPI SHFreeDataBlockList(LPDBLIST lpList); +LONG +WINAPI +RegCreateKeyExWrapW( + _In_ HKEY hKey, + _In_ LPCWSTR lpSubKey, + _In_ DWORD Reserved, + _In_opt_ LPWSTR lpClass, + _In_ DWORD dwOptions, + _In_ REGSAM samDesired, + _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, + _Out_ PHKEY phkResult, + _Out_opt_ LPDWORD lpdwDisposition); + /* Redirected to kernel32.ExpandEnvironmentStringsA/W */ DWORD WINAPI SHExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD); DWORD WINAPI SHExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD); @@ -263,6 +276,7 @@ BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath, DWORD dwWhich); BOOL WINAPI PathFindOnPathExW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs, DWORD dwWhich); VOID WINAPI FixSlashesAndColonW(LPWSTR); BOOL WINAPI PathIsValidCharW(WCHAR c, DWORD dwClass); +BOOL WINAPI SHGetPathFromIDListWrapW(LPCITEMIDLIST pidl, LPWSTR pszPath); #ifdef __cplusplus } /* extern "C" */ diff --git a/sdk/include/xdk/winnt_old.h b/sdk/include/xdk/winnt_old.h index 8e0de26a3da..15d353fc9ef 100644 --- a/sdk/include/xdk/winnt_old.h +++ b/sdk/include/xdk/winnt_old.h @@ -1116,7 +1116,19 @@ typedef VOID (NTAPI *WORKERCALLBACKFUNC)(PVOID); #define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003 #define IO_REPARSE_TAG_SYMLINK 0xA000000CL -#define RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO 0x01000000 +#define RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO 0x01000000 +#define RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN 0x02000000 +#define RTL_CRITICAL_SECTION_FLAG_STATIC_INIT 0x04000000 +#define RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE 0x08000000 +#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO 0x10000000 +#define RTL_CRITICAL_SECTION_ALL_FLAG_BITS 0xFF000000 +#define RTL_CRITICAL_SECTION_FLAG_RESERVED \ + (RTL_CRITICAL_SECTION_ALL_FLAG_BITS & \ + (~(RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO | \ + RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN | \ + RTL_CRITICAL_SECTION_FLAG_STATIC_INIT | \ + RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE | \ + RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO))) #ifndef RC_INVOKED @@ -2778,6 +2790,8 @@ RtlQueryDepthSList( #define RTL_RUN_ONCE_ASYNC 0x00000002UL #define RTL_RUN_ONCE_INIT_FAILED 0x00000004UL +#define RTL_RUN_ONCE_CTX_RESERVED_BITS 2 + #define RTL_RUN_ONCE_INIT {0} typedef union _RTL_RUN_ONCE { @@ -2787,14 +2801,6 @@ typedef union _RTL_RUN_ONCE { typedef DWORD WINAPI RTL_RUN_ONCE_INIT_FN(PRTL_RUN_ONCE, PVOID, PVOID*); typedef RTL_RUN_ONCE_INIT_FN *PRTL_RUN_ONCE_INIT_FN; -NTSYSAPI -DWORD -WINAPI -RtlRunOnceComplete( - PRTL_RUN_ONCE, - DWORD, - PVOID); - #endif #define RTL_CONDITION_VARIABLE_INIT {0} diff --git a/sdk/lib/atl/atlimage.h b/sdk/lib/atl/atlimage.h index d67cff1726a..9e5ad00ccbe 100644 --- a/sdk/lib/atl/atlimage.h +++ b/sdk/lib/atl/atlimage.h @@ -6,12 +6,6 @@ #ifndef __ATLIMAGE_H__ #define __ATLIMAGE_H__ -// !!!! -// TODO: The backend (gdi+) that this class relies on is not yet complete! -// Before that is finished, this class will not be a perfect replacement. -// See rostest/apitests/atl/CImage_WIP.txt for test results. -// !!!! - #pragma once #include // for ATL Core @@ -43,7 +37,7 @@ class CImage DIBOR_TOPDOWN // top-down DIB }; - CImage() throw() + CImage() noexcept { m_hBitmap = NULL; m_hOldBitmap = NULL; @@ -58,13 +52,13 @@ class CImage s_gdiplus.IncreaseCImageCount(); } - virtual ~CImage() throw() + virtual ~CImage() noexcept { Destroy(); s_gdiplus.DecreaseCImageCount(); } - operator HBITMAP() throw() + operator HBITMAP() noexcept { return m_hBitmap; } @@ -74,12 +68,12 @@ class CImage s_gdiplus.ReleaseGDIPlus(); } - void Attach(HBITMAP hBitmap, DIBOrientation eOrientation = DIBOR_DEFAULT) throw() + void Attach(HBITMAP hBitmap, DIBOrientation eOrientation = DIBOR_DEFAULT) noexcept { AttachInternal(hBitmap, eOrientation, -1); } - HBITMAP Detach() throw() + HBITMAP Detach() noexcept { m_eOrientation = DIBOR_DEFAULT; m_bHasAlphaChannel = false; @@ -91,30 +85,43 @@ class CImage return hBitmap; } - HDC GetDC() const throw() + HDC GetDC() const noexcept { - if (m_hDC) - return m_hDC; + ATLASSERT(m_nDCRefCount >= 0); + if (::InterlockedIncrement(&m_nDCRefCount) == 1) + { + ATLASSERT(m_hDC == NULL); + ATLASSERT(m_hOldBitmap == NULL); + + m_hDC = ::CreateCompatibleDC(NULL); + ATLASSERT(m_hDC != NULL); + + m_hOldBitmap = (HBITMAP)::SelectObject(m_hDC, m_hBitmap); + ATLASSERT(m_hOldBitmap != NULL); + } - m_hDC = ::CreateCompatibleDC(NULL); - m_hOldBitmap = (HBITMAP)::SelectObject(m_hDC, m_hBitmap); return m_hDC; } - void ReleaseDC() const throw() + void ReleaseDC() const noexcept { - ATLASSERT(m_hDC); + ATLASSERT(m_nDCRefCount > 0); - if (m_hDC == NULL) + if (::InterlockedDecrement(&m_nDCRefCount) != 0) return; if (m_hOldBitmap) { + ATLASSERT(m_hDC != NULL); ::SelectObject(m_hDC, m_hOldBitmap); m_hOldBitmap = NULL; } - ::DeleteDC(m_hDC); - m_hDC = NULL; + + if (m_hDC) + { + ::DeleteDC(m_hDC); + m_hDC = NULL; + } } BOOL AlphaBlend(HDC hDestDC, @@ -163,7 +170,7 @@ class CImage BOOL BitBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, - int xSrc, int ySrc, DWORD dwROP = SRCCOPY) const throw() + int xSrc, int ySrc, DWORD dwROP = SRCCOPY) const noexcept { GetDC(); BOOL ret = ::BitBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight, @@ -172,18 +179,18 @@ class CImage return ret; } BOOL BitBlt(HDC hDestDC, int xDest, int yDest, - DWORD dwROP = SRCCOPY) const throw() + DWORD dwROP = SRCCOPY) const noexcept { return BitBlt(hDestDC, xDest, yDest, GetWidth(), GetHeight(), 0, 0, dwROP); } BOOL BitBlt(HDC hDestDC, const POINT& pointDest, - DWORD dwROP = SRCCOPY) const throw() + DWORD dwROP = SRCCOPY) const noexcept { return BitBlt(hDestDC, pointDest.x, pointDest.y, dwROP); } BOOL BitBlt(HDC hDestDC, const RECT& rectDest, const POINT& pointSrc, - DWORD dwROP = SRCCOPY) const throw() + DWORD dwROP = SRCCOPY) const noexcept { return BitBlt(hDestDC, rectDest.left, rectDest.top, rectDest.right - rectDest.left, @@ -191,18 +198,18 @@ class CImage pointSrc.x, pointSrc.y, dwROP); } - BOOL Create(int nWidth, int nHeight, int nBPP, DWORD dwFlags = 0) throw() + BOOL Create(int nWidth, int nHeight, int nBPP, DWORD dwFlags = 0) noexcept { return CreateEx(nWidth, nHeight, nBPP, BI_RGB, NULL, dwFlags); } BOOL CreateEx(int nWidth, int nHeight, int nBPP, DWORD eCompression, - const DWORD* pdwBitmasks = NULL, DWORD dwFlags = 0) throw() + const DWORD* pdwBitmasks = NULL, DWORD dwFlags = 0) noexcept { return CreateInternal(nWidth, nHeight, nBPP, eCompression, pdwBitmasks, dwFlags); } - void Destroy() throw() + void Destroy() noexcept { if (m_hBitmap) { @@ -211,7 +218,7 @@ class CImage } BOOL Draw(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, - int xSrc, int ySrc, int nSrcWidth, int nSrcHeight) const throw() + int xSrc, int ySrc, int nSrcWidth, int nSrcHeight) const noexcept { ATLASSERT(IsTransparencySupported()); if (m_bHasAlphaChannel) @@ -235,7 +242,7 @@ class CImage xSrc, ySrc, nSrcWidth, nSrcHeight); } } - BOOL Draw(HDC hDestDC, const RECT& rectDest, const RECT& rectSrc) const throw() + BOOL Draw(HDC hDestDC, const RECT& rectDest, const RECT& rectSrc) const noexcept { return Draw(hDestDC, rectDest.left, rectDest.top, rectDest.right - rectDest.left, @@ -244,28 +251,28 @@ class CImage rectSrc.right - rectSrc.left, rectSrc.bottom - rectSrc.top); } - BOOL Draw(HDC hDestDC, int xDest, int yDest) const throw() + BOOL Draw(HDC hDestDC, int xDest, int yDest) const noexcept { return Draw(hDestDC, xDest, yDest, GetWidth(), GetHeight()); } - BOOL Draw(HDC hDestDC, const POINT& pointDest) const throw() + BOOL Draw(HDC hDestDC, const POINT& pointDest) const noexcept { return Draw(hDestDC, pointDest.x, pointDest.y); } BOOL Draw(HDC hDestDC, int xDest, int yDest, - int nDestWidth, int nDestHeight) const throw() + int nDestWidth, int nDestHeight) const noexcept { return Draw(hDestDC, xDest, yDest, nDestWidth, nDestHeight, 0, 0, GetWidth(), GetHeight()); } - BOOL Draw(HDC hDestDC, const RECT& rectDest) const throw() + BOOL Draw(HDC hDestDC, const RECT& rectDest) const noexcept { return Draw(hDestDC, rectDest.left, rectDest.top, rectDest.right - rectDest.left, rectDest.bottom - rectDest.top); } - void *GetBits() throw() + void *GetBits() noexcept { ATLASSERT(IsDIBSection()); BYTE *pb = (BYTE *)m_bm.bmBits; @@ -276,14 +283,14 @@ class CImage return pb; } - int GetBPP() const throw() + int GetBPP() const noexcept { ATLASSERT(m_hBitmap); return m_bm.bmBitsPixel; } void GetColorTable(UINT iFirstColor, UINT nColors, - RGBQUAD* prgbColors) const throw() + RGBQUAD* prgbColors) const noexcept { ATLASSERT(IsDIBSection()); GetDC(); @@ -291,13 +298,13 @@ class CImage ReleaseDC(); } - int GetHeight() const throw() + int GetHeight() const noexcept { ATLASSERT(m_hBitmap); return m_bm.bmHeight; } - int GetMaxColorTableEntries() const throw() + int GetMaxColorTableEntries() const noexcept { ATLASSERT(IsDIBSection()); if (m_ds.dsBmih.biClrUsed && m_ds.dsBmih.biBitCount < 16) @@ -317,7 +324,7 @@ class CImage } } - int GetPitch() const throw() + int GetPitch() const noexcept { ATLASSERT(IsDIBSection()); if (m_eOrientation == DIBOR_BOTTOMUP) @@ -326,7 +333,7 @@ class CImage return m_bm.bmWidthBytes; } - COLORREF GetPixel(int x, int y) const throw() + COLORREF GetPixel(int x, int y) const noexcept { GetDC(); COLORREF ret = ::GetPixel(m_hDC, x, y); @@ -334,7 +341,7 @@ class CImage return ret; } - void* GetPixelAddress(int x, int y) throw() + void* GetPixelAddress(int x, int y) noexcept { ATLASSERT(IsDIBSection()); BYTE *pb = (BYTE *)GetBits(); @@ -343,35 +350,35 @@ class CImage return pb; } - COLORREF GetTransparentColor() const throw() + COLORREF GetTransparentColor() const noexcept { return m_clrTransparentColor; } - int GetWidth() const throw() + int GetWidth() const noexcept { ATLASSERT(m_hBitmap); return m_bm.bmWidth; } - bool IsDIBSection() const throw() + bool IsDIBSection() const noexcept { ATLASSERT(m_hBitmap); return m_bIsDIBSection; } - bool IsIndexed() const throw() + bool IsIndexed() const noexcept { ATLASSERT(IsDIBSection()); return GetBPP() <= 8; } - bool IsNull() const throw() + bool IsNull() const noexcept { return m_hBitmap == NULL; } - HRESULT Load(LPCTSTR pszFileName) throw() + HRESULT Load(LPCTSTR pszFileName) noexcept { if (!InitGDIPlus()) return E_FAIL; @@ -400,7 +407,7 @@ class CImage Attach(hbm); return (status == Ok ? S_OK : E_FAIL); } - HRESULT Load(IStream* pStream) throw() + HRESULT Load(IStream* pStream) noexcept { if (!InitGDIPlus()) return E_FAIL; @@ -428,13 +435,13 @@ class CImage } // NOTE: LoadFromResource loads BITMAP resource only - void LoadFromResource(HINSTANCE hInstance, LPCTSTR pszResourceName) throw() + void LoadFromResource(HINSTANCE hInstance, LPCTSTR pszResourceName) noexcept { HANDLE hHandle = ::LoadImage(hInstance, pszResourceName, IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); Attach(reinterpret_cast(hHandle)); } - void LoadFromResource(HINSTANCE hInstance, UINT nIDResource) throw() + void LoadFromResource(HINSTANCE hInstance, UINT nIDResource) noexcept { LoadFromResource(hInstance, MAKEINTRESOURCE(nIDResource)); } @@ -442,7 +449,7 @@ class CImage BOOL MaskBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, HBITMAP hbmMask, int xMask, int yMask, - DWORD dwROP = SRCCOPY) const throw() + DWORD dwROP = SRCCOPY) const noexcept { ATLASSERT(IsTransparencySupported()); GetDC(); @@ -454,20 +461,20 @@ class CImage } BOOL MaskBlt(HDC hDestDC, const RECT& rectDest, const POINT& pointSrc, HBITMAP hbmMask, const POINT& pointMask, - DWORD dwROP = SRCCOPY) const throw() + DWORD dwROP = SRCCOPY) const noexcept { return MaskBlt(hDestDC, rectDest.left, rectDest.top, rectDest.right - rectDest.left, rectDest.bottom - rectDest.top, pointSrc.x, pointSrc.y, hbmMask, pointMask.x, pointMask.y, dwROP); } BOOL MaskBlt(HDC hDestDC, int xDest, int yDest, - HBITMAP hbmMask, DWORD dwROP = SRCCOPY) const throw() + HBITMAP hbmMask, DWORD dwROP = SRCCOPY) const noexcept { return MaskBlt(hDestDC, xDest, yDest, GetWidth(), GetHeight(), 0, 0, hbmMask, 0, 0, dwROP); } BOOL MaskBlt(HDC hDestDC, const POINT& pointDest, - HBITMAP hbmMask, DWORD dwROP = SRCCOPY) const throw() + HBITMAP hbmMask, DWORD dwROP = SRCCOPY) const noexcept { return MaskBlt(hDestDC, pointDest.x, pointDest.y, hbmMask, dwROP); } @@ -475,7 +482,7 @@ class CImage BOOL PlgBlt(HDC hDestDC, const POINT* pPoints, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, HBITMAP hbmMask = NULL, - int xMask = 0, int yMask = 0) const throw() + int xMask = 0, int yMask = 0) const noexcept { ATLASSERT(IsTransparencySupported()); GetDC(); @@ -486,26 +493,26 @@ class CImage return ret; } BOOL PlgBlt(HDC hDestDC, const POINT* pPoints, - HBITMAP hbmMask = NULL) const throw() + HBITMAP hbmMask = NULL) const noexcept { return PlgBlt(hDestDC, pPoints, 0, 0, GetWidth(), GetHeight(), hbmMask); } BOOL PlgBlt(HDC hDestDC, const POINT* pPoints, const RECT& rectSrc, - HBITMAP hbmMask, const POINT& pointMask) const throw() + HBITMAP hbmMask, const POINT& pointMask) const noexcept { return PlgBlt(hDestDC, pPoints, rectSrc.left, rectSrc.top, rectSrc.right - rectSrc.left, rectSrc.bottom - rectSrc.top, hbmMask, pointMask.x, pointMask.y); } BOOL PlgBlt(HDC hDestDC, const POINT* pPoints, const RECT& rectSrc, - HBITMAP hbmMask = NULL) const throw() + HBITMAP hbmMask = NULL) const noexcept { POINT pointMask = {0, 0}; return PlgBlt(hDestDC, pPoints, rectSrc, hbmMask, pointMask); } - HRESULT Save(IStream* pStream, GUID *guidFileType) const throw() + HRESULT Save(IStream* pStream, GUID *guidFileType) const noexcept { if (!InitGDIPlus()) return E_FAIL; @@ -536,7 +543,7 @@ class CImage } HRESULT Save(LPCTSTR pszFileName, - REFGUID guidFileType = GUID_NULL) const throw() + REFGUID guidFileType = GUID_NULL) const noexcept { if (!InitGDIPlus()) return E_FAIL; @@ -578,7 +585,7 @@ class CImage } void SetColorTable(UINT iFirstColor, UINT nColors, - const RGBQUAD* prgbColors) throw() + const RGBQUAD* prgbColors) noexcept { ATLASSERT(IsDIBSection()); GetDC(); @@ -586,14 +593,14 @@ class CImage ReleaseDC(); } - void SetPixel(int x, int y, COLORREF color) throw() + void SetPixel(int x, int y, COLORREF color) noexcept { GetDC(); ::SetPixelV(m_hDC, x, y, color); ReleaseDC(); } - void SetPixelIndexed(int x, int y, int iIndex) throw() + void SetPixelIndexed(int x, int y, int iIndex) noexcept { ATLASSERT(IsIndexed()); GetDC(); @@ -601,12 +608,12 @@ class CImage ReleaseDC(); } - void SetPixelRGB(int x, int y, BYTE r, BYTE g, BYTE b) throw() + void SetPixelRGB(int x, int y, BYTE r, BYTE g, BYTE b) noexcept { SetPixel(x, y, RGB(r, g, b)); } - COLORREF SetTransparentColor(COLORREF rgbTransparent) throw() + COLORREF SetTransparentColor(COLORREF rgbTransparent) noexcept { ATLASSERT(m_hBitmap); COLORREF rgbOldColor = m_clrTransparentColor; @@ -617,7 +624,7 @@ class CImage BOOL StretchBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, - DWORD dwROP = SRCCOPY) const throw() + DWORD dwROP = SRCCOPY) const noexcept { GetDC(); BOOL ret = ::StretchBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight, @@ -627,20 +634,20 @@ class CImage } BOOL StretchBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, - DWORD dwROP = SRCCOPY) const throw() + DWORD dwROP = SRCCOPY) const noexcept { return StretchBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight, 0, 0, GetWidth(), GetHeight(), dwROP); } BOOL StretchBlt(HDC hDestDC, const RECT& rectDest, - DWORD dwROP = SRCCOPY) const throw() + DWORD dwROP = SRCCOPY) const noexcept { return StretchBlt(hDestDC, rectDest.left, rectDest.top, rectDest.right - rectDest.left, rectDest.bottom - rectDest.top, dwROP); } BOOL StretchBlt(HDC hDestDC, const RECT& rectDest, - const RECT& rectSrc, DWORD dwROP = SRCCOPY) const throw() + const RECT& rectSrc, DWORD dwROP = SRCCOPY) const noexcept { return StretchBlt(hDestDC, rectDest.left, rectDest.top, rectDest.right - rectDest.left, @@ -653,7 +660,7 @@ class CImage BOOL TransparentBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, - UINT crTransparent = CLR_INVALID) const throw() + UINT crTransparent = CLR_INVALID) const noexcept { ATLASSERT(IsTransparencySupported()); GetDC(); @@ -666,13 +673,13 @@ class CImage } BOOL TransparentBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, - UINT crTransparent = CLR_INVALID) const throw() + UINT crTransparent = CLR_INVALID) const noexcept { return TransparentBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight, 0, 0, GetWidth(), GetHeight(), crTransparent); } BOOL TransparentBlt(HDC hDestDC, const RECT& rectDest, - UINT crTransparent = CLR_INVALID) const throw() + UINT crTransparent = CLR_INVALID) const noexcept { return TransparentBlt(hDestDC, rectDest.left, rectDest.top, rectDest.right - rectDest.left, @@ -680,7 +687,7 @@ class CImage } BOOL TransparentBlt( HDC hDestDC, const RECT& rectDest, - const RECT& rectSrc, UINT crTransparent = CLR_INVALID) const throw() + const RECT& rectSrc, UINT crTransparent = CLR_INVALID) const noexcept { return TransparentBlt(hDestDC, rectDest.left, rectDest.top, rectDest.right - rectDest.left, rectDest.bottom - rectDest.left, @@ -688,7 +695,7 @@ class CImage rectSrc.bottom - rectSrc.top, crTransparent); } - static BOOL IsTransparencySupported() throw() + static BOOL IsTransparencySupported() noexcept { return TRUE; } @@ -874,7 +881,7 @@ class CImage LONG m_nCImageObjects; DWORD m_dwLastError; - void _clear_funs() throw() + void _clear_funs() noexcept { Startup = NULL; Shutdown = NULL; @@ -892,7 +899,7 @@ class CImage } template - T_FUN _get_fun(T_FUN& fun, LPCSTR name) throw() + T_FUN _get_fun(T_FUN& fun, LPCSTR name) noexcept { if (!fun) fun = reinterpret_cast(::GetProcAddress(m_hInst, name)); @@ -915,7 +922,7 @@ class CImage FUN_SaveImageToFile SaveImageToFile; FUN_SaveImageToStream SaveImageToStream; - CInitGDIPlus() throw() + CInitGDIPlus() noexcept : m_hInst(NULL) , m_dwToken(0) , m_nCImageObjects(0) @@ -925,13 +932,13 @@ class CImage ::InitializeCriticalSection(&m_sect); } - ~CInitGDIPlus() throw() + ~CInitGDIPlus() noexcept { ReleaseGDIPlus(); ::DeleteCriticalSection(&m_sect); } - bool Init() throw() + bool Init() noexcept { ::EnterCriticalSection(&m_sect); @@ -968,7 +975,7 @@ class CImage return ret; } - void ReleaseGDIPlus() throw() + void ReleaseGDIPlus() noexcept { ::EnterCriticalSection(&m_sect); if (m_dwToken) @@ -987,14 +994,14 @@ class CImage ::LeaveCriticalSection(&m_sect); } - void IncreaseCImageCount() throw() + void IncreaseCImageCount() noexcept { ::EnterCriticalSection(&m_sect); ++m_nCImageObjects; ::LeaveCriticalSection(&m_sect); } - void DecreaseCImageCount() throw() + void DecreaseCImageCount() noexcept { ::EnterCriticalSection(&m_sect); if (--m_nCImageObjects == 0) @@ -1007,7 +1014,7 @@ class CImage static CInitGDIPlus s_gdiplus; - static bool InitGDIPlus() throw() + static bool InitGDIPlus() noexcept { return s_gdiplus.Init(); } @@ -1016,6 +1023,7 @@ class CImage HBITMAP m_hBitmap; mutable HBITMAP m_hOldBitmap; mutable HDC m_hDC; + mutable LONG m_nDCRefCount = 0; DIBOrientation m_eOrientation; bool m_bHasAlphaChannel; bool m_bIsDIBSection; @@ -1126,7 +1134,7 @@ class CImage } void AttachInternal(HBITMAP hBitmap, DIBOrientation eOrientation, - LONG iTransColor) throw() + LONG iTransColor) noexcept { Destroy(); @@ -1146,7 +1154,7 @@ class CImage BOOL CreateInternal(int nWidth, int nHeight, int nBPP, DWORD eCompression, const DWORD* pdwBitmasks = NULL, - DWORD dwFlags = 0) throw() + DWORD dwFlags = 0) noexcept { ATLASSERT(nWidth != 0); ATLASSERT(nHeight != 0); @@ -1213,7 +1221,34 @@ class CImage DECLSPEC_SELECTANY CImage::CInitGDIPlus CImage::s_gdiplus; -} +class CImageDC +{ +private: + const CImage& m_image; + HDC m_hDC; + +public: + CImageDC(const CImage& image) + : m_image(image) + , m_hDC(image.GetDC()) + { + } + + virtual ~CImageDC() noexcept + { + m_image.ReleaseDC(); + } + + operator HDC() const noexcept + { + return m_hDC; + } + + CImageDC(const CImageDC&) = delete; + CImageDC& operator=(const CImageDC&) = delete; +}; + +} // namespace ATL #endif diff --git a/sdk/lib/rtl/critical.c b/sdk/lib/rtl/critical.c index 9ff313fdfa1..26a9229d162 100644 --- a/sdk/lib/rtl/critical.c +++ b/sdk/lib/rtl/critical.c @@ -28,6 +28,10 @@ extern HANDLE LdrpShutdownThreadId; /* FUNCTIONS *****************************************************************/ +#define CRITSECT_HAS_DEBUG_INFO(CriticalSection) \ + (((CriticalSection)->DebugInfo != NULL) && \ + ((CriticalSection)->DebugInfo != LongToPtr(-1))) + /*++ * RtlpCreateCriticalSectionSem * @@ -119,7 +123,7 @@ RtlpWaitForCriticalSection(PRTL_CRITICAL_SECTION CriticalSection) CriticalSection, CriticalSection->LockSemaphore); - if (CriticalSection->DebugInfo) + if (CRITSECT_HAS_DEBUG_INFO(CriticalSection)) CriticalSection->DebugInfo->EntryCount++; /* @@ -142,7 +146,7 @@ RtlpWaitForCriticalSection(PRTL_CRITICAL_SECTION CriticalSection) for (;;) { /* Increase the number of times we've had contention */ - if (CriticalSection->DebugInfo) + if (CRITSECT_HAS_DEBUG_INFO(CriticalSection)) CriticalSection->DebugInfo->ContentionCount++; /* Check if allocating the event failed */ @@ -404,7 +408,7 @@ RtlDeleteCriticalSection(PRTL_CRITICAL_SECTION CriticalSection) /* Protect List */ RtlEnterCriticalSection(&RtlCriticalSectionLock); - if (CriticalSection->DebugInfo) + if (CRITSECT_HAS_DEBUG_INFO(CriticalSection)) { /* Remove it from the list */ RemoveEntryList(&CriticalSection->DebugInfo->ProcessLocksList); @@ -417,7 +421,7 @@ RtlDeleteCriticalSection(PRTL_CRITICAL_SECTION CriticalSection) /* Unprotect */ RtlLeaveCriticalSection(&RtlCriticalSectionLock); - if (CriticalSection->DebugInfo) + if (CRITSECT_HAS_DEBUG_INFO(CriticalSection)) { /* Free it */ RtlpFreeDebugInfo(CriticalSection->DebugInfo); @@ -543,8 +547,8 @@ RtlInitializeCriticalSection(PRTL_CRITICAL_SECTION CriticalSection) } /*++ - * RtlInitializeCriticalSectionAndSpinCount - * @implemented NT4 + * RtlInitializeCriticalSectionEx + * @implemented NT6.0 * * Initialises a new critical section. * @@ -553,6 +557,8 @@ RtlInitializeCriticalSection(PRTL_CRITICAL_SECTION CriticalSection) * * SpinCount - Spin count for the critical section. * + * Flags - Flags for initialization. + * * Returns: * STATUS_SUCCESS. * @@ -562,10 +568,41 @@ RtlInitializeCriticalSection(PRTL_CRITICAL_SECTION CriticalSection) *--*/ NTSTATUS NTAPI -RtlInitializeCriticalSectionAndSpinCount(PRTL_CRITICAL_SECTION CriticalSection, - ULONG SpinCount) +RtlInitializeCriticalSectionEx( + _Out_ PRTL_CRITICAL_SECTION CriticalSection, + _In_ ULONG SpinCount, + _In_ ULONG Flags) { PRTL_CRITICAL_SECTION_DEBUG CritcalSectionDebugData; + ULONG AllowedFlags; + ULONG OsVersion; + + /* Remove lower bits from flags */ + Flags &= RTL_CRITICAL_SECTION_ALL_FLAG_BITS; + + /* These flags generally allowed */ + AllowedFlags = RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO | + RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN | + RTL_CRITICAL_SECTION_FLAG_STATIC_INIT; + + /* Flags for Windows 7+ (CHECKME) */ + OsVersion = NtCurrentPeb()->OSMajorVersion << 8 | + NtCurrentPeb()->OSMinorVersion; + if (OsVersion >= _WIN32_WINNT_WIN7) + { + AllowedFlags |= RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE | + RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO; + } + + if (Flags & ~AllowedFlags) + { + return STATUS_INVALID_PARAMETER_3; + } + + if (SpinCount & RTL_CRITICAL_SECTION_ALL_FLAG_BITS) + { + return STATUS_INVALID_PARAMETER_2; + } /* First things first, set up the Object */ DPRINT("Initializing Critical Section: %p\n", CriticalSection); @@ -575,62 +612,97 @@ RtlInitializeCriticalSectionAndSpinCount(PRTL_CRITICAL_SECTION CriticalSection, CriticalSection->SpinCount = (NtCurrentPeb()->NumberOfProcessors > 1) ? SpinCount : 0; CriticalSection->LockSemaphore = 0; - /* Allocate the Debug Data */ - CritcalSectionDebugData = RtlpAllocateDebugInfo(); - DPRINT("Allocated Debug Data: %p inside Process: %p\n", - CritcalSectionDebugData, - NtCurrentTeb()->ClientId.UniqueProcess); - - if (!CritcalSectionDebugData) + if (Flags & RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO) { - /* This is bad! */ - DPRINT1("Couldn't allocate Debug Data for: %p\n", CriticalSection); - return STATUS_NO_MEMORY; + CriticalSection->DebugInfo = LongToPtr(-1); } + else + { + /* Allocate the Debug Data */ + CritcalSectionDebugData = RtlpAllocateDebugInfo(); + DPRINT("Allocated Debug Data: %p inside Process: %p\n", + CritcalSectionDebugData, + NtCurrentTeb()->ClientId.UniqueProcess); - /* Set it up */ - CritcalSectionDebugData->Type = RTL_CRITSECT_TYPE; - CritcalSectionDebugData->ContentionCount = 0; - CritcalSectionDebugData->EntryCount = 0; - CritcalSectionDebugData->CriticalSection = CriticalSection; - CritcalSectionDebugData->Flags = 0; - CriticalSection->DebugInfo = CritcalSectionDebugData; + if (!CritcalSectionDebugData) + { + /* This is bad! */ + DPRINT1("Couldn't allocate Debug Data for: %p\n", CriticalSection); + return STATUS_NO_MEMORY; + } - /* - * Add it to the List of Critical Sections owned by the process. - * If we've initialized the Lock, then use it. If not, then probably - * this is the lock initialization itself, so insert it directly. - */ - if ((CriticalSection != &RtlCriticalSectionLock) && (RtlpCritSectInitialized)) - { - DPRINT("Securely Inserting into ProcessLocks: %p, %p, %p\n", - &CritcalSectionDebugData->ProcessLocksList, - CriticalSection, - &RtlCriticalSectionList); + /* Set it up */ + CritcalSectionDebugData->Type = RTL_CRITSECT_TYPE; + CritcalSectionDebugData->ContentionCount = 0; + CritcalSectionDebugData->EntryCount = 0; + CritcalSectionDebugData->CriticalSection = CriticalSection; + CritcalSectionDebugData->Flags = 0; + CriticalSection->DebugInfo = CritcalSectionDebugData; - /* Protect List */ - RtlEnterCriticalSection(&RtlCriticalSectionLock); + /* + * Add it to the List of Critical Sections owned by the process. + * If we've initialized the Lock, then use it. If not, then probably + * this is the lock initialization itself, so insert it directly. + */ + if ((CriticalSection != &RtlCriticalSectionLock) && (RtlpCritSectInitialized)) + { + DPRINT("Securely Inserting into ProcessLocks: %p, %p, %p\n", + &CritcalSectionDebugData->ProcessLocksList, + CriticalSection, + &RtlCriticalSectionList); - /* Add this one */ - InsertTailList(&RtlCriticalSectionList, &CritcalSectionDebugData->ProcessLocksList); + /* Protect List */ + RtlEnterCriticalSection(&RtlCriticalSectionLock); - /* Unprotect */ - RtlLeaveCriticalSection(&RtlCriticalSectionLock); - } - else - { - DPRINT("Inserting into ProcessLocks: %p, %p, %p\n", - &CritcalSectionDebugData->ProcessLocksList, - CriticalSection, - &RtlCriticalSectionList); + /* Add this one */ + InsertTailList(&RtlCriticalSectionList, &CritcalSectionDebugData->ProcessLocksList); + + /* Unprotect */ + RtlLeaveCriticalSection(&RtlCriticalSectionLock); + } + else + { + DPRINT("Inserting into ProcessLocks: %p, %p, %p\n", + &CritcalSectionDebugData->ProcessLocksList, + CriticalSection, + &RtlCriticalSectionList); - /* Add it directly */ - InsertTailList(&RtlCriticalSectionList, &CritcalSectionDebugData->ProcessLocksList); + /* Add it directly */ + InsertTailList(&RtlCriticalSectionList, &CritcalSectionDebugData->ProcessLocksList); + } } return STATUS_SUCCESS; } +/*++ + * RtlInitializeCriticalSectionAndSpinCount + * @implemented NT4 + * + * Initialises a new critical section. + * + * Params: + * CriticalSection - Critical section to initialise + * + * SpinCount - Spin count for the critical section. + * + * Returns: + * STATUS_SUCCESS. + * + * Remarks: + * SpinCount is ignored on single-processor systems. + * + *--*/ +NTSTATUS +NTAPI +RtlInitializeCriticalSectionAndSpinCount( + _Out_ PRTL_CRITICAL_SECTION CriticalSection, + _In_ ULONG SpinCount) +{ + SpinCount &= ~RTL_CRITICAL_SECTION_ALL_FLAG_BITS; + return RtlInitializeCriticalSectionEx(CriticalSection, SpinCount, 0); +} + /*++ * RtlGetCriticalSectionRecursionCount * @implemented NT5.2 SP1 diff --git a/sdk/lib/rtl/runonce.c b/sdk/lib/rtl/runonce.c index 0ffa49b9fa4..da970e9febd 100644 --- a/sdk/lib/rtl/runonce.c +++ b/sdk/lib/rtl/runonce.c @@ -8,52 +8,58 @@ /****************************************************************** * RtlRunOnceInitialize (NTDLL.@) */ -void WINAPI RtlRunOnceInitialize( RTL_RUN_ONCE *once ) +VOID NTAPI RtlRunOnceInitialize(_Out_ PRTL_RUN_ONCE RunOnce) { - once->Ptr = NULL; + RunOnce->Ptr = NULL; } /****************************************************************** * RtlRunOnceBeginInitialize (NTDLL.@) */ -DWORD WINAPI RtlRunOnceBeginInitialize( RTL_RUN_ONCE *once, ULONG flags, void **context ) +_Must_inspect_result_ +NTSTATUS +NTAPI +RtlRunOnceBeginInitialize( + _Inout_ PRTL_RUN_ONCE RunOnce, + _In_ ULONG Flags, + _Outptr_opt_result_maybenull_ PVOID *Context) { - if (flags & RTL_RUN_ONCE_CHECK_ONLY) + if (Flags & RTL_RUN_ONCE_CHECK_ONLY) { - ULONG_PTR val = (ULONG_PTR)once->Ptr; + ULONG_PTR val = (ULONG_PTR)RunOnce->Ptr; - if (flags & RTL_RUN_ONCE_ASYNC) return STATUS_INVALID_PARAMETER; + if (Flags & RTL_RUN_ONCE_ASYNC) return STATUS_INVALID_PARAMETER; if ((val & 3) != 2) return STATUS_UNSUCCESSFUL; - if (context) *context = (void *)(val & ~3); + if (Context) *Context = (void *)(val & ~3); return STATUS_SUCCESS; } for (;;) { - ULONG_PTR next, val = (ULONG_PTR)once->Ptr; + ULONG_PTR next, val = (ULONG_PTR)RunOnce->Ptr; switch (val & 3) { case 0: /* first time */ - if (!interlocked_cmpxchg_ptr( &once->Ptr, - (flags & RTL_RUN_ONCE_ASYNC) ? (void *)3 : (void *)1, 0 )) + if (!interlocked_cmpxchg_ptr( &RunOnce->Ptr, + (Flags & RTL_RUN_ONCE_ASYNC) ? (void *)3 : (void *)1, 0)) return STATUS_PENDING; break; case 1: /* in progress, wait */ - if (flags & RTL_RUN_ONCE_ASYNC) return STATUS_INVALID_PARAMETER; + if (Flags & RTL_RUN_ONCE_ASYNC) return STATUS_INVALID_PARAMETER; next = val & ~3; - if (interlocked_cmpxchg_ptr( &once->Ptr, (void *)((ULONG_PTR)&next | 1), + if (interlocked_cmpxchg_ptr( &RunOnce->Ptr, (void *)((ULONG_PTR)&next | 1), (void *)val ) == (void *)val) NtWaitForKeyedEvent( 0, &next, FALSE, NULL ); break; case 2: /* done */ - if (context) *context = (void *)(val & ~3); + if (Context) *Context = (void *)(val & ~3); return STATUS_SUCCESS; case 3: /* in progress, async */ - if (!(flags & RTL_RUN_ONCE_ASYNC)) return STATUS_INVALID_PARAMETER; + if (!(Flags & RTL_RUN_ONCE_ASYNC)) return STATUS_INVALID_PARAMETER; return STATUS_PENDING; } } @@ -62,25 +68,30 @@ DWORD WINAPI RtlRunOnceBeginInitialize( RTL_RUN_ONCE *once, ULONG flags, void ** /****************************************************************** * RtlRunOnceComplete (NTDLL.@) */ -DWORD WINAPI RtlRunOnceComplete( RTL_RUN_ONCE *once, ULONG flags, void *context ) +NTSTATUS +NTAPI +RtlRunOnceComplete( + _Inout_ PRTL_RUN_ONCE RunOnce, + _In_ ULONG Flags, + _In_opt_ PVOID Context) { - if ((ULONG_PTR)context & 3) return STATUS_INVALID_PARAMETER; + if ((ULONG_PTR)Context & 3) return STATUS_INVALID_PARAMETER; - if (flags & RTL_RUN_ONCE_INIT_FAILED) + if (Flags & RTL_RUN_ONCE_INIT_FAILED) { - if (context) return STATUS_INVALID_PARAMETER; - if (flags & RTL_RUN_ONCE_ASYNC) return STATUS_INVALID_PARAMETER; + if (Context) return STATUS_INVALID_PARAMETER; + if (Flags & RTL_RUN_ONCE_ASYNC) return STATUS_INVALID_PARAMETER; } - else context = (void *)((ULONG_PTR)context | 2); + else Context = (void *)((ULONG_PTR)Context | 2); for (;;) { - ULONG_PTR val = (ULONG_PTR)once->Ptr; + ULONG_PTR val = (ULONG_PTR)RunOnce->Ptr; switch (val & 3) { case 1: /* in progress */ - if (interlocked_cmpxchg_ptr( &once->Ptr, context, (void *)val ) != (void *)val) break; + if (interlocked_cmpxchg_ptr( &RunOnce->Ptr, Context, (void *)val ) != (void *)val) break; val &= ~3; while (val) { @@ -91,8 +102,8 @@ DWORD WINAPI RtlRunOnceComplete( RTL_RUN_ONCE *once, ULONG flags, void *context return STATUS_SUCCESS; case 3: /* in progress, async */ - if (!(flags & RTL_RUN_ONCE_ASYNC)) return STATUS_INVALID_PARAMETER; - if (interlocked_cmpxchg_ptr( &once->Ptr, context, (void *)val ) != (void *)val) break; + if (!(Flags & RTL_RUN_ONCE_ASYNC)) return STATUS_INVALID_PARAMETER; + if (interlocked_cmpxchg_ptr( &RunOnce->Ptr, Context, (void *)val) != (void *)val) break; return STATUS_SUCCESS; default: @@ -104,18 +115,24 @@ DWORD WINAPI RtlRunOnceComplete( RTL_RUN_ONCE *once, ULONG flags, void *context /****************************************************************** * RtlRunOnceExecuteOnce (NTDLL.@) */ -DWORD WINAPI RtlRunOnceExecuteOnce( RTL_RUN_ONCE *once, PRTL_RUN_ONCE_INIT_FN func, - void *param, void **context ) +_Maybe_raises_SEH_exception_ +NTSTATUS +NTAPI +RtlRunOnceExecuteOnce( + _Inout_ PRTL_RUN_ONCE RunOnce, + _In_ __inner_callback PRTL_RUN_ONCE_INIT_FN InitFn, + _Inout_opt_ PVOID Parameter, + _Outptr_opt_result_maybenull_ PVOID *Context) { - DWORD ret = RtlRunOnceBeginInitialize( once, 0, context ); + DWORD ret = RtlRunOnceBeginInitialize( RunOnce, 0, Context ); if (ret != STATUS_PENDING) return ret; - if (!func( once, param, context )) + if (!InitFn( RunOnce, Parameter, Context )) { - RtlRunOnceComplete( once, RTL_RUN_ONCE_INIT_FAILED, NULL ); + RtlRunOnceComplete( RunOnce, RTL_RUN_ONCE_INIT_FAILED, NULL ); return STATUS_UNSUCCESSFUL; } - return RtlRunOnceComplete( once, 0, context ? *context : NULL ); + return RtlRunOnceComplete( RunOnce, 0, Context ? *Context : NULL ); }