Commit graph

285 commits

Author SHA1 Message Date
Adam Słaboń abe6bbabfb [TRANSLATION] Polish translation update for drwtsn32, winlogon and usersrv. (#475) 2018-04-10 22:54:34 +02:00
Hermès Bélusca-Maïto 75e80632d1
[USERSRV] HardError: Fix compilation warning; fix few comments; fix the default empty window title string. 2018-04-08 16:15:56 +02:00
Hermès Bélusca-Maïto 29d56f2b29
[USERSRV] Hard-error improvements 7/7
- Use a more descriptive "unknown hard error" string than Windows' one.
- Improve the computation of the buffer size for the hard error message
  by using _vscwprintf() instead of just "guessing" which size the fully
  printf'ed message could be.
2018-04-07 18:48:13 +02:00
Hermès Bélusca-Maïto 2363fee51f
[USERSRV] Hard-error improvements 6/7
Make UserpFormatMessages() return the possible timeout for the hard error; use it when displaying the hard error message boxes.
2018-04-07 18:48:12 +02:00
Hermès Bélusca-Maïto 08d70697a3
[USERSRV] Hard-error improvements 5/7 - Implement STATUS_SERVICE_NOTIFICATION handling.
- In UserpCaptureStringParameters(), always capture the parameter
  strings with a terminating NULL. Also, no need to convert them to
  ANSI if they are used with a STATUS_SERVICE_NOTIFICATION message.
- Determine within UserpFormatMessages() the message box flags to be
  used, either from the message parameters (if STATUS_SERVICE_NOTIFICATION)
  or from the proposed response options and message status severity.
  These flags are then used by both UserpShowInformationBalloon()/UserpShellHardError()
  and by UserpMessageBox().
- Improve Message validation (especially for STATUS_SERVICE_NOTIFICATION).
- Try to display the hard error status number if it's an unknown one.
2018-04-07 18:48:11 +02:00
Hermès Bélusca-Maïto 9ea2783e56
[USERSRV] Hard-error improvements 4/7
- Make UserpFormatMessages() always succeed by falling back on
  static string buffers if allocating large string buffers fail due to
  lack of memory. Then the hard error popups will have truncated
  strings, but at least something will be displayed instead of nothing,
  thus alerting the user that something went wrong anyway.
- Simplify a bit the code by moving the NtOpenProcess(),
  UserpCaptureStringParameters() and UserpFreeStringParameters() calls
  inside UserpFormatMessages(). This also allows simplifying its
  prototype.
2018-04-07 18:48:10 +02:00
Hermès Bélusca-Maïto 5a1a35ca5a
[USERSRV] Hard-error improvements 3/7
- Cache localized hard error message components: the status severity,
  the system process name and the unhandled exception debug strings.
- Try not to fail too much. In particular, don't fail if a string could
  not be correctly captured in UserpCaptureStringParameters() (we then
  use a default empty string). The next aim is to make UserpFormatMessages()
  not failing at all.
- Use RtlStringCbPrintf(Ex)W where possible so that one can use counted
  (and not NULL-terminated) UNICODE_STRINGs where possible. This allows
  using counted resource strings without having to allocate memory.
- If available, prepend the window title of the application that
  triggered the hard error to the hard error message box caption.
2018-04-07 18:48:09 +02:00
Hermès Bélusca-Maïto 2b299f5fec
[USERSRV] Hard-error improvements 2/7 - More failure path handling.
In particular do not always fail as soon as there is an error, because they may be the sign of an OS problem and this is precisely in this case that we want to display a hard-error.
2018-04-07 18:48:08 +02:00
Hermès Bélusca-Maïto 6718a1aa83
[USERSRV] Hard-error improvements 1/7
- Use hard-error captions depending on the status code severity.
- Improve handling of the STATUS_UNHANDLED_EXCEPTION error. Start
  implementing the display of the dialog button descriptions ("OK" to
  terminate the application; "Cancel" to debug the application).
- Add support for the "ErrorMode" and "ShellErrorMode" registry values
  under HKLM\System\CurrentControlSet\Control\Windows.
- Use MessageBoxTimeoutW() in UserpMessageBox() to support different
  message box timeouts.
- Log hard errors into the System event log.
2018-04-07 18:48:06 +02:00
Ercan Ersoy 8c2e91897a [TRANSLATIONS] Update and add Turkish translations (#455)
- Added Turkish translations for winetests/GUI and localmon.
- Modified Turkish translations for usersrv, user32, localmon, logon,
  3dtext, kbswitch, winemine, spider, solitarie, clipbrd and charmap_new.
2018-04-01 19:27:08 +02:00
Kláben Szabolcs Bence (Tudi20) a1e061499f [TRANSLATION][USERSRV] Add Hungarian Translation (#442) 2018-04-01 19:13:35 +02:00
Serge Gautherie a0b5b47352 [WIN32SS:FRAMEBUF] Improve/Fix DrvSetPointerShape(), from r7864 (#457)
- Fix a copypasta.
- Remove dead code.

Thanks to mudhead, who spotted most of these.

NB:
This EXPERIMENTAL_MOUSE_CURSOR_SUPPORT code isn't compiled by default since r7865.

CORE-14511
2018-04-01 18:51:54 +02:00
Amine Khaldi 407c54bae3 [LOCALUI] Sync with Wine Staging 3.3. CORE-14434 2018-03-25 12:47:19 +01:00
Timo Kreuzer 2d9c88e0c5
[WIN32K] Fix 64 bit issues (#420)
- Fix ULONG/SIZE_T issues
- Use LOWORD/HIWORD
- Change a struct member to HANDLE
- Implement lstrlenW helper function
2018-03-18 15:53:52 +01:00
Hermès Bélusca-Maïto 68430db462
[USER32] Fix GetWindowTextLength() blocking call using the same technique as in GetWindowText(). Fix indentation in GetWindowText(). 2018-03-17 23:47:16 +01:00
Mark Jansen 428e4617e9
[WIN32K] Do not try to compare a long name against a truncated name.
This fixes gdiplus_winetest:font crashing.
ROSTESTS-154
2018-03-15 20:16:04 +01:00
Mark Jansen 37a34a21a9
[WIN32K] Do not truncate localized font names.
ROSTESTS-154
2018-03-15 20:16:04 +01:00
Pierre Schweitzer 741ae8ccdc
[CONSRV] Fix build 2018-03-11 21:19:11 +01:00
Michael Fritscher 602db40277
[CONSRV] Initialize rcFramebuffer in every case, otherwise it is left unintialized in case of e.g. console termination. (#428, #429)
Fixes CORE-14463. Debugged and and fix suggested by Timo Kreuzer.

Signed-off-by: Michael Fritscher <reactos@mifritscher.de>
2018-03-11 20:31:40 +01:00
Hermès Bélusca-Maïto 8bdebb1fed
[CONSRV] Silence a noisy DPRINT. 2018-03-10 20:37:08 +01:00
Thomas Faber c7c36702d2
[USER32] ForceResetUserApiHook is WINAPI, not FASTCALL. CORE-14450
Fixes stack pointer corruption when using Windows's uxtheme.dll.
2018-03-09 09:06:12 +01:00
Thomas Faber 3159de5573
[WINSRV] Don't try to remove messages from the queue without dispatching them. CORE-13734
This partially reverts r58615 / 01729482ae.
2018-03-07 13:32:38 +01:00
Thomas Faber 56fdb7adde
[WIN32K:NTUSER] Handle IntGetSystemMenu failure cases. CORE-12180 2018-03-03 17:19:26 +01:00
Thomas Faber b7aa1e3122
[WIN32K:NTUSER] Correctly delete menus in failure cases in MENU_GetSystemMenu. CORE-12180 2018-03-03 17:19:16 +01:00
Thomas Faber 89217e3df5
[WIN32K:NTUSER] Handle IntCloneMenu failure in MENU_GetSystemMenu. CORE-12180 2018-03-03 17:18:55 +01:00
Giannis Adamopoulos e3610035ce [USER32] Small fixes for messages carrying pointers
SendNotifyMessageW: It doesn't support messages with pointers so there is no need to call MsgiUMToKMMessage
SendMessageTimeoutW, SendMessageTimeoutA: These two do support marshaling pointers so they need to use MsgiUMToKMMessage.
This is actually a bug that happens only in the rare case where we send a WM_COPYDATA with a timeout.
2018-02-26 16:51:59 +02:00
Giannis Adamopoulos ec91188fff [WINSRV] Implement sending the hard error balloon package to explorer
[EXPLORER] Implement showing the hard error balloon
2018-02-26 16:51:59 +02:00
Timo Kreuzer 6771bf55a0 [WIN32K] Get rid of some instances of the ugly RETURN() macro 2018-02-24 17:17:25 +01:00
Timo Kreuzer e688aab6b3 [FORMATTING] Fix indentation, no functional changes. 2018-02-24 17:17:25 +01:00
Timo Kreuzer 173971d947 [WIN32K] Implement NtUserSetWindowLongPtr for 64 bit builds
Also fix return type of NtUserQueryWindow and type of WND::dwUserData and the value for bAnsi in SetWindowLongPtrA
2018-02-19 22:36:36 +01:00
Thomas Faber b030836b40
[WIN32K:NTUSER] Safely handle allocation failure in IntCloneMenu. CORE-14222 2018-02-18 11:27:35 +01:00
Thomas Faber 1969094028
[WIN32K:NTUSER] Avoid allocating an extra item in IntCloneMenuItems. CORE-14222 2018-02-18 11:27:32 +01:00
Thomas Faber de455c4d50
[WIN32K:NTUSER] Handle realloc failure in IntRemoveMenuItem. CORE-14222 2018-02-18 11:27:29 +01:00
Thomas Faber c464f4f2e3
[WIN32K:NTUSER] Handle allocation failure in PopupMenuWndProc. CORE-14222 2018-02-18 11:27:27 +01:00
Serge Gautherie b789161199
[DXG] Fix a Clang-Cl warning about DDHAL_CB32_CANCREATESURFACE
"warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]"

CORE-14306
2018-02-10 18:04:05 +01:00
Thomas Faber 862b82f3fa
[WIN32K:NTGDI] Fix more uses of RtlCreateUnicodeString. CORE-14271
Addendum to 7f687154a0. Spotted by Hermès.
2018-01-31 12:35:30 +01:00
Thomas Faber 7f687154a0
[WIN32K:NTGDI] Correctly interpret RtlCreateUnicodeString return value. CORE-14271 2018-01-31 10:38:06 +01:00
Stanislav Motylkov c22c6e3ba3 [WIN32K:NTUSER] Fix color indices for themes
CORE-14231 #resolve
2018-01-22 21:45:50 +02:00
Jérôme Gardou c4ee1a3460 [WINSRV] -Fix inline functions definitions
This fixes -O0 compilation
2018-01-22 18:17:50 +01:00
Stanislav Motylkov dade22f479 [WIN32K:NTUSER] Fix hardcoded color for MF_GRAYED menu items
CORE-14196 #resolve
2018-01-21 00:27:23 +02:00
Colin Finck 22ffe5300b [PRINTING] Replace all my custom marshalling code by calls to the newly implemented APIs, thereby significantly reducing the codebase and providing a sane template to implement more Printing APIs. 2018-01-17 12:52:12 +01:00
Colin Finck 35ef5a3c24 [PRINTING] Try to fix Linux build #2 2018-01-17 10:55:02 +01:00
Colin Finck 86c59690da [PRINTING] Try to fix Linux build.
Why this previously built without any errors using GCC and MSVC under Windows is left as an exercise to the reader.
2018-01-17 10:41:55 +01:00
Colin Finck f3ea8225cb [PRINTING] Implement the undocumented MarshallDownStructure, MarshallDownStructuresArray, MarshallUpStructure, and MarshallUpStructuresArray to the extent I need and could find out through black-box testing.
PDBs reveal that these functions are also used in winspool.drv, but not imported from spoolss.dll to retain the client/server architecture.
As winspool.drv highly benefits from the MarshallUp* functions, I put them in a source file shared between spoolss.dll and winspool.drv.

The added API Tests cover my testing and all implemented features.
One more item done from https://reactos.org/wiki/Printing !
2018-01-17 10:13:25 +01:00
Giannis Adamopoulos 6318e47bb9 [USER32] InternalGetWindowText: Write to caller's buffer only when one was provided. CORE-13614 2018-01-15 12:45:41 +02:00
Giannis Adamopoulos bd193c4534 [USER32] Stop hiding exceptions left and right 2018-01-15 12:36:45 +02:00
Erdem Ersoy ba3f074320 [TRANSLATIONS] Update the email address and add a note in the Turkish translation document (#271) 2018-01-07 22:09:42 +01:00
Joachim Henze 79d392c53c [WIN32K] revert PR173 to fix regressions in Chrome/Chromium CORE-14170
This reverts ea4daf8b68 committed 2017-12-09 to master, the commit was named
"[WIN32K] Fix NtGdiGetTextFaceW to report face name correctly (#173)",
reverting got ack of khmz,
reopening less severe CORE-14071 accordingly
2018-01-07 17:58:47 +01:00
Katayama Hirofumi MZ e9d8fa57c3
[TRANSLATION][BASE][FDEBUG][MODULES][WIN32SS] Use correct font name in Chinese resources, CORE-9566 (#227).
Localized resources should use the correct Traditional/Simplified Chinese fonts
that are most suitable for UI and compatible with Windows.
2017-12-29 01:51:06 +01:00
Timo Kreuzer 456e2192b7 [WIN32K] Check for empty output rect in GreGradientFill
Fixes a failed ASSERT.
CORE-14148 #resolve
2017-12-28 10:46:01 +01:00
Amine Khaldi 2367206744 [USER32] Fix RealUserDrawCaption() return type. Rename {HFONT,UISTATE}_GWL_OFFSET and pfPaint. #179 2017-12-25 14:36:33 +01:00
Colin Finck 3b93ba0f31 [LOCALSPL] Fix parameter handling in LocalSetJob and add tests for the few ways we can easily test this function.
Yes, it checks the input handle and doesn't fail if an invalid level is given, because someone may still send a Command.
This also fixes CORE-12794. Thanks for reporting!
2017-12-25 14:30:47 +01:00
Giannis Adamopoulos c5db5399dc [USER32] Implement the index -1 for GetWindowLong which returns a pointer to WW
We don't have this struct but WND already contains the same fields in the right
order so we can just return the pointer to the first one.

The meaning of the -1 index was found here: http://www.geoffchappell.com/studies/windows/win32/user32/structs/wnd/index.htm
2017-12-25 00:12:45 +02:00
Amine Khaldi 3d93998d6e [USER32] Add wine/debug.h to the PCH and remove an unneeded wine/unicode.h inclusion. 2017-12-23 23:42:40 +01:00
Joachim Henze 82caf5f823 [WIN32K] avoid BSOD in Bochs 2.6.8 CORE-13629, patch by Mark Jansen
We applied this patch also last second in 0.4.7rls, now in master.

IntTrackPopupMenuEx() caused the BSOD when called while window is in the process of being destroyed.
2017-12-20 17:38:36 +01:00
Katayama Hirofumi MZ 10910ca9e1 [GDI32] Fix TextOutA multibyte text length overgoing. CORE-14070 2017-12-17 02:04:31 +01:00
Colin Finck 3a69fd4e96 [PRINTING] Fix GetPrinterW, add tests for it and GetDefaultPrinterA/W, and add a proper stub for GetPrinterDriverDirectoryA.
* Pass the correct handle to _RpcGetPrinter in GetPrinterW.
* Pass an empty string instead of a NULL pointer as wszComputerName to the GetPrinterLevel* functions, because this variable is later used as source for StringCbCopyExW.
* Don't check for GetLastError() == ERROR_SUCCESS in tests. Windows apparently only sets the last error in case of failure.
  The Printing code should probably be changed similarly in a future commit.

Should fix CORE-14072
2017-12-10 12:28:08 +01:00
Colin Finck 46b9165909 [WINSPOOL] Provide stubs with tracing and reasonable failure codes for even more popular Spooler APIs.
This may get more applications to work which previously called into the WINE-generated stubs (that throw an exception).
It also improves debug logs when the "winspool" debug channel is enabled. With such detailed debug logs, we may get an idea which winspool APIs need to be implemented sooner than others.
2017-12-09 14:14:05 +01:00
Colin Finck 1f6f08eca0 [WINSPOOL] Add tracing to all exported APIs. 2017-12-09 14:14:05 +01:00
Colin Finck 45b9b5c1ef [WINSPOOL] Convert the returned Unicode string back to ANSI in GetDefaultPrinterA.
Thanks to Mark for the hint in CORE-14072!
2017-12-09 14:14:05 +01:00
Amine Khaldi a308735be6 [VGA] Correct VgaInterpretCmdStream() declaration. 2017-12-09 13:11:45 +01:00
Katayama Hirofumi MZ ea4daf8b68 [WIN32K] Fix NtGdiGetTextFaceW to report face name correctly (#173)
Initialize TEXTOBJ.FaceName member in TextIntRealizeFont and use it in NtGdiGetTextFaceW 
CORE-14071
2017-12-09 12:06:51 +02:00
Amine Khaldi 6429bfcd8f [CONSRV] Deduplicate GetScreenBufferSizeUnits(), SmallRectToRect() and ConsoleInput. Rename ConsoleList and InsertConsole(). #179 2017-12-08 23:04:48 +01:00
James Tabor c45a6e15bf [User32|IMM32] Fix a recursion crash in IMM. See CORE-14041.
Required a sync port from wine. This is a hack fix with Win32SS until
proper IMM support is added to Win32SS.
2017-12-07 21:14:21 -06:00
Amine Khaldi 5633423086 [FREETYPE][PORTCLS][RPCSS][SPOOLSV][STLPORT][USETUP][WLANSVC] Silence some clang-cl warnings. 2017-12-07 23:26:59 +01:00
Amine Khaldi 917b74b0dc [USER32] We're still using this one. Fixes build. 2017-12-07 22:37:40 +01:00
Amine Khaldi 9443165625 [USER32] Remove unused debug channels. Silences some clang-cl warnings. 2017-12-07 22:25:30 +01:00
James Tabor e1e79f248b [GDI] Fix metafile crashes and null driver issues.
Patch by Jérôme Gardou modified by me.
CORE-14023 : Fix SetWorldTransform for metafiles #137
Includes CORE-12832 and CORE-13627.
2017-11-26 14:48:06 -06:00
jimtabor d85023c9c9 [GDI] - Add type for setting world transform modification modes.
References:
https://msdn.microsoft.com/en-us/library/cc230538.aspx
https://github.com/KDE/krita/blob/master/libs/vectorimage/libemf/EmfEnums.h
2017-11-24 17:22:43 -06:00
Giannis Adamopoulos febf9acfee [GDI32] GdiDrawStream: Improve handling of small rcDest sizes
- Abort drawing if rcDest has negative height or width.
- Ignore sizing margins if rcDest is too small.
CORE-13513
2017-11-22 17:28:18 +02:00
Jérôme Gardou 89dbc88a2c [WIN32SS]
- Unconditionally enter NtUser implementation in EngCreateWnd and EngDeleteWnd
CORE-7727
2017-11-18 12:15:45 +01:00
Jérôme Gardou 3e1a54151f [WIN32SS]
- Do not call the driver Escape routine while holding locks on GDI objects
CORE-7727
2017-11-18 12:15:45 +01:00
Mark Jansen 9e4d2f1f9e
[WIN32K] Check if the window being destroyed is currently tracked. (#103)
* [WIN32K] Check if the window being destroyed is currently tracked.
CORE-13619
2017-11-04 15:00:54 +01:00
Amine Khaldi d56c9a8927 [INCLUDE/REACTOS][LOCALMON][LOCALSPL][SPOOLSS] Add some missing VOIDs. CORE-11799 (#94) 2017-10-30 22:43:47 +01:00
Amine Khaldi 5cb0615147 [BROWSEUI][DEVMGR][EXPLORER][NTGDI][NTOBJSHEX][NTVDM][SETUPAPI] Remove/comment out some unused variables. CORE-11799 (#94) 2017-10-28 15:04:18 +01:00
Amine Khaldi 0625e4d4f5 [SPOOLSV] Add some missing VOIDs. CORE-11799 (#94) 2017-10-28 14:43:14 +01:00
Amine Khaldi 706a70c9e1 [NTDLL][NTUSER][SPOOLSS][WINSPOOL] Add some missing VOIDs. CORE-11799 (#94) 2017-10-28 13:46:11 +01:00
Katayama Hirofumi MZ 85ae842105 [WIN32SS] fix font extent.
CORE-13840
2017-10-25 21:10:35 +02:00
Waritnan Sookbuntherng 1128447196 [WIN32K][DESK.CPL]: Add fit and fill background placement options (#28)
- WIN32K and DESK.CPL: Add fit and fill background placement options.
- DESK.CPL: Define wallpaper placement constants; update translations.
- WIN32K: Fix coding style.
CORE-13360
2017-10-13 21:44:02 +02:00
Adam Słaboń 9c790dfc3b Polish translation update (#29)
* Polish translation update
2017-10-10 12:14:38 +02:00
jimtabor 31aab36e88 [Win32SS]
- Merge path objects with gdi path structure. See CORE-13536.
2017-10-06 11:54:27 -05:00
gigaherz aff6757284 [NTUSER] Fix rogue CR in a LF-only file. 2017-10-06 00:04:46 +02:00
Timo Kreuzer 5c4d857407 [WIN32K] Add a comment regarding UserEnterExclusive() in UserGetDesktopDC()
This is a test-commit using GitHubs SVN interface.
2017-10-05 18:40:33 +02:00
Hermès Bélusca-Maïto acdf04bad2 Add .keep guard files in order to restore lost but empty directories we had with SVN.
Note that when you start populating these directories, you can remove the associated .keep guard file(s)!
2017-10-04 10:28:36 +02:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00