- Get rid of alloca, malloc and free.
- Always check the return values of HeapAlloc.
- Rename fUserLocaleChanged to bUserLocaleChanged and fGeoIdChanged to bGeoIdChanged.
- Use WCHAR instead of TCHAR.
- Fix indentation and coding style.
- Remove setupreg.c because it is an unused copy of misc.c.
svn path=/trunk/; revision=74434
- Refactor the code returning PRINTER_INFO_* yet another time to support both EnumPrinters and GetPrinter calls.
- Implement support for PRINTER_INFO_1 through PRINTER_INFO_9 as well as the mostly unknown PRINTER_INFO_STRESS (level 0) structure and return as much information as we can.
- Implement GetPrinterW / LocalGetPrinter.
The Printers Shell folder in Explorer now shows our "Dummy Printer on LPT1" and we pass all 291 winspool:EnumPrinters API tests :)
svn path=/trunk/; revision=74433
- Refactor a bit tests, to split more logically tests
- Fix a bug in tests
- Add new tests for MountMgr showing our storage stack doesn't behave as expected
svn path=/trunk/; revision=74432
- Fix last error value returned from GdiSelectPen for invalid DCs. Fixes the last test failure in gdi32:gdiobj. Patch by Katayama Hirofumi MZ.
CORE-13132 #resolve
svn path=/trunk/; revision=74419
- Avoid two cases of uninitialized variable use in GetEventUserName. Based on a patch by Víctor Martínez Calvo. CID 1401250
CORE-12798 #resolve
svn path=/trunk/; revision=74418
- Display the informative CP-change message on stdout, using the *output* code page (and not the input CP);
- Correctly update the local codepage cache;
- Display the informative CP-change message when the CP change succeeded;
- Add source comments + informative TODO for what remains to be done.
svn path=/trunk/; revision=74416
- Slightly update the description of CP 28599;
- Add descriptions for CPs 28600, 28603, 28604 and 28606;
- Add CP 856 "OEM - Hebrew PC" (which differs from OEM Hebrew CP 862).
Note that while we also have codepages 424, 878 and 1006, I don't add their description because:
- CP 424 is actually CP 20424 "IBM EBCDIC - Hebrew" on Windows (documented in the resource files);
- CP 878 is actually CP 20866 "Russian - KOI8" on Windows (documented in the resource files);
- CP 1006 seems to be "IBM Arabic" according to Wine, but I don't know its corresponding number on Windows.
svn path=/trunk/; revision=74414
- Rework GetLocalisedText helper such that it looks more like LoadStringW. Also, if the string is not found (either because there is no associated string table, or because its resource length is zero), then return zero.
Otherwise we return the correct number of characters copied into the user buffer, not counting the NULL terminator.
This fixes the blank strings showing in the list of codepage user-friendly names in the console properties dialog.
- Simplify the code of NLS_GetGeoFriendlyName: we can directly use the user-provided buffer to retrieve the string.
Addendum to r65157.
CORE-13130 #resolve
svn path=/trunk/; revision=74413
- Touch the virtual address of DMA buffers before calling MmGetPhysicalAddress on them. This ensures page directories are correctly set up for the current process context, and fixes random DMA operation failures ("MM:MmGetPhysicalAddressFailed"). This is not a hack -- using MmGetPhysicalAddress for DMA in the first place is.
CORE-9224 #resolve
svn path=/trunk/; revision=74408
- Button, Trakbar: Send WM_CTLCOLORBTN or WM_CTLCOLORSTATIC and use their return value to paint the control despite the fact that DrawThemeParentBackground was called as well.
Part of the fix for CORE-12978
svn path=/trunk/; revision=74406
- Use a helper function "AddFontToList" to add font names into the font list;
- Use string-safe functions where needed.
svn path=/trunk/; revision=74405
- In PDEVOBJ_vRefreshModeList, restore the current mode pointer, ppdev->pdmwDev, to a valid value.
CORE-13097 #resolve
svn path=/trunk/; revision=74404
Fix heap corruption in EnumDisplaySettingsExA/W:
- Do not overwrite the user-provided buffer size in dmDriverExtra
- Fix broken pointer arithmetic
CORE-13097
svn path=/trunk/; revision=74403
Display a list of available code pages, as done on Windows (NT/2k/2k3/Vista/7/8, when a CJK language is selected, and as always done on Windows 10 for all languages).
But contrary to Windows, do not limit this list to only CJK + CP-437 codepages, but list *all* the available CPs, retrieved from the registry. These CPs are also those available when using the "chcp" or "mode con cp" commands.
And contrary to Windows (where this is done only for the general console properties), always allow the user to view or change the code page even from the console properties dialog.
[CONSRV]: Support changing the current code page from the console properties dialog.
CORE-12451
svn path=/trunk/; revision=74397
- Make a copy of the service list where service and display name strings are separately allocated. We need this to update the service names rather than reload the list when the display name is changed.
- Write the display name, description or binary path to the registry when the user changed them.
- Disable the Edit button after it has been clicked.
- Do not add the service name to the argument vector in the call to StartServiceW. Services.exe already add the service name to the vector.
CORE-12743
svn path=/trunk/; revision=74394
Implement all corner cases of handling the Name parameter in EnumPrinters. This can be done in a common way for all levels.
Fixes more tests.
svn path=/trunk/; revision=74393
- In NtMapViewOfSection, check for address alignment after validating the handles. This fixes the tests from the previous commit, but is also necessary because information about the section object is necessary to avoid the alignment checks for physical memory sections.
CORE-13113
svn path=/trunk/; revision=74391
- Show that NtMapViewOfSection validates section and process handles before checking base address alignment
CORE-13113
svn path=/trunk/; revision=74390
- Check for ROS section object before accessing the AllocationAttributes member in NtMapViewOfSection, since ARM3 sections use a different structure.
CORE-13113
svn path=/trunk/; revision=74389
- Enable MEM_RESERVED test in SimpleErrorChecks() since it no longer asserts. Patch by Serge Gautherie.
ROSTESTS-109 #resolve
svn path=/trunk/; revision=74386
- Remove an unneeded header inclusion;
- Fix a sizeof invocation;
- RegEnumKeyExW and RegEnumValueW take their fourth parameter (size of key / value name, resp.) as a size in number of *characters* (and not in number of bytes);
- Add a missing RegCloseKey call in LocaleList_Create.
svn path=/trunk/; revision=74385