Commit graph

19 commits

Author SHA1 Message Date
jimtabor b784074c2f [0.4.13][WIN32SS][RTL] Fix regression CORE-16769 + BSOD CORE-13907 & CORE-14857
Thanks to Jim Tabor, Mark Jansen & Thomas Faber
By squashed backmerge of the following commits:
--------------
[NTUSER] Fix Strings and Format to Hooks

Allocate heap instead of data segment to be used for callbacks on user side.
Move and correct initial hook call out setup. Use it in more than one hook call.

This fixes issues with strings out of alignment and use of kernel pointers.

See CORE-13907 and CORE-16769. KsStudio still needs retested.

Small wow update.

cherry picked from commit 0.4.14-dev-1287-g
568b6d0558
--------------
[RTL] Introduce RtlpImageNtHeader,
which implements the required functionality.
ntdll and ntoskrnl now have a wrapper for this, with SEH.
This protects the function against malformed / bad images,
whilst still being able to use the code in freeldr et al.
Idea from Thomas.
CORE-14857

cherry picked from commit 0.4.14-dev-1255-g
177ae91bf6
--------------
[WIN32SS] Form Sanity to Hook Callbacks

Fix WH_CALLWNDPROC/RET data to user hook calls. See CORE-13019 and CORE-13907.

cherry picked from commit 0.4.14-dev-1241-g
915a5764a9
--------------
[USER32] Fix null return.

See CORE-16769.

cherry picked from commit 0.4.14-dev-1240-g
d8add40e89
2020-04-03 14:51:10 +02:00
James Tabor d48345a0ee Update Headers for Printing and Other
Add missing flags and function types. Fix typos.
2019-08-15 21:39:26 -05:00
jimtabor 4563ca28d3 [GDI32] Add more to Local DC structure.
Make the two structures identical. These are used for printing and
enhanced metafile support.
2019-07-27 14:13:14 -05:00
James Tabor 40c42305c3 [Win32SS] Add Driver Callback
Add user driver callback to be used later on.
2019-06-21 13:10:03 -05:00
jimtabor da264743e1 [Win32SS] Support Clipboard Metafile
Major fix ups and plugging in missing code changes. Handle code is from
another project currently being developed for ReactOS.
See CORE-12143
2019-05-31 21:44:17 -05:00
Andrew Boyarshin 458a26ab76
[WIN32SS:NTUSER] Use the 2nd parameter of NtUserGetThreadDesktop() as fallback. (#1065)
- The 2nd parameter is already passed in user-mode by GetThreadDesktop().
  It is then used by NtUserGetThreadDesktop() as a fallback for console
  threads.

- Lookup and validate the thread by using the IntTID2PTI() helper.
- Don't reference the desktop with too many access rights.
- Get rid of the old-school DECLARE_RETURN() & co. macros.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2019-04-28 19:27:45 +02:00
Katayama Hirofumi MZ 811faed421
[GDI32][NTGDI][SETUP] Fix font enumeration part 2 (#1492)
Eliminate some bugs about font enumeration. CORE-15755

- Add "Microsoft Sans Serif" font substitution.
- Fix and improve the treatment of the nominal font names.
- Split IntGetFontFamilyInfo function from NtGdiGetFontFamilyInfo.
- Add DoFontSystemUnittest function for font system unittest to GDI32.
- Call DoFontSystemUnittest function at CreateFontIndirectW first call.
2019-04-11 11:46:52 +09:00
James Tabor d57f7becc3 [Win32SS] Add TextOut to GDI Batch
Add fix ups to PolyPatBlt and freetype.
TextOut supports 580 characters w/o Dx and Dx at a max of 193 characters
with Dx*1, both if offset is 0.

Noticed a lot of over drawing with start menu from ComCtl32 SB_SETTEXT
going through User32 DrawText/Worker ExtTextOutW. Explain why it might
be slowing down.

If issues arise, commenting out lines in win32ss/include/gdi32p.h can
help.

Example:
else if (Cmd == GdiBCTextOut) cjSize = 0;//sizeof(GDIBSTEXTOUT); <----
this one most of all.
 else if (Cmd == GdiBCExtTextOut) cjSize = 0;//sizeof(GDIBSEXTTEXTOUT);

Test results:
https://reactos.org/testman/compare.php?ids=66260,66262
2019-03-08 22:21:41 -06:00
Katayama Hirofumi MZ f469acacec
[WIN32SS][USER32] Add Ghost codes (retrial of #1100) (#1112)
CORE-11944
2018-12-11 12:30:59 +09:00
Katayama Hirofumi MZ 99b055a506
Revert "[WIN32SS][USER32] Add codes for Ghost Window (#1100)" (#1110)
This reverts commit 1adefd180c. ReactOS wouldn't startup.
2018-12-11 11:30:00 +09:00
Katayama Hirofumi MZ 1adefd180c
[WIN32SS][USER32] Add codes for Ghost Window (#1100)
CORE-11944
2018-12-11 10:48:23 +09:00
Baruch Rutman e7d2bbe726 [WIN32SS][LPK] Add BiDi support to menus and window captions (#738)
Added callback function that redirects calls to GreExtTextOutW that didn't went through lpk BiDi processing, calls that are from the kernel.

Completely solves JIRA issue CORE-6910.
2018-08-23 19:43:12 +02:00
Hermès Bélusca-Maïto c697f191cf
[WIN32K:NTUSER] Make NtUserResolveDesktop() and IntResolveDesktop() work in a more Win2k3-compatible manner.
CORE-11933 and PR #621.

Since this API is also called from WINSRV when calling the AllocConsole() API,
it can be tested more-or-less easily. The internal helper IntResolveDesktop()
is also tested during process connection to a window station, when such process
first calls a USER32 or GDI32 function.
This is also the functionality tested by the user32:desktop apitest.

- Adjust how IntResolveDesktop() is called.
2018-08-19 22:18:37 +02:00
Hermès Bélusca-Maïto b003d68ca5
[WIN32SS:NTUSER] Update SetWindowStationUser() and NtUserSetWindowStationUser() prototypes.
Also, improve NtUserSetWindowStationUser() capture order, make psid optional as it should (and avoid a user-mode triggered BSOD), and initialize luidUser only when everything succeeded.
2018-07-22 19:26:53 +02: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
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
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
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
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