Commit graph

90 commits

Author SHA1 Message Date
Thomas Faber d46570474a [0.4.9] cherry-pick [WIN32SS] Mask WndProc exceptions to hide all tickets linked to CORE-11915
e.g. this allows using MsDepends

(cherry picked from commit 9274859438)
cherry-picked by Joachim Henze
2018-05-20 21:31:53 +02:00
Hermès Bélusca-Maïto a55d7c692b
[WIN32K] Implement UOI_FLAGS in NtUserGetObjectInformation(). Based from a patch by Jérôme Gardou.
CORE-13447 CORE-14422

This fixes closing nLite 1.4.9.3 (.NET2) application, as well as any
other program that expects that the interactive window station is
reported as being visible. I thank Mark Jansen and Joachim Henze for
help and testing.
2018-04-22 23:00:55 +02:00
Serge Gautherie 6d912629f7 [LOCALSPL] Fix 2 Clang-Cl warnings about ullResult and "UserName"
- "warning: comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]"
- "warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]"

CORE-14306
2018-04-18 18:10:47 +02:00
Joachim Henze 083c3d992b [USER32] Fix compilation when USE_VERSIONED_CLASSES is not defined
Variable 'Status' would be set but not used otherwise in this case.
This commit will not fix or improve CORE-13278,
but was spotted when having a look at that.
2018-04-12 17:57:38 +02:00
Joachim Henze 14f0e62f9a [WIN32SS][NTDDRAW] Fix ddraw palette regression CORE-13714
This nice patch of Jerome Gardou improves palette
when VBEMP & inbuilt Mesa is used for
Diablo II, MS Age Of Empires 1, Anno 1602
to the state we had in SVN r75060 and below.

We already committed this fix into 0.4.8-release before.
2018-04-11 15:39:54 +02:00
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