Difference between revisions of "Win32k.sys"

From ReactOS Wiki
Jump to: navigation, search
 
(33 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Rewrite suggestions
+
{{stub}}
 +
'''Kernel-mode subsystem server (Win32K)'''
  
* A special heap manager for the objects to be stored on the (shared) desktop heaps.
+
The Graphics Device Interface Provides functionality for outputting graphical content to monitors, printers and other output devices. It resides in gdi.exe on 16-bit Windows, and [[gdi32.dll]] on 32-bit Windows in user-mode. Kernel-mode GDI support is provided by <code>win32k.sys</code> which communicates directly with the graphics driver.
* Input processing (in progress due to [[i8042prt]])
 
* Text rendering
 
* manage multiple user sessions (see terminal services)
 
  
 +
{{Code history|subsystems/win32/win32k}}
  
Rewrite / reworking plan by hardon and w3seek:
+
== See also ==
 +
* [[Arwinss]] page for the alternative win32 subsystem implementation effort.
 +
* [[Win32k design guideline]]
 +
* [[Csrss.exe|User-mode subsystem server]]
 +
* [[wikipedia:Windows API#Overview]]
  
* Use one win32k.USER global read/write lock (ERESOURCE). No other lock should be used! This essentially makes win32k.USER singlethreaded. This is how Windows does it also, so the perf. should be ok.
+
[[Category:Development]]
 
+
[[Category:Drivers]]
* Use shared desktop heap mapped into each User process. This makes perf. even better. The code interaction with the shared heap in user32.dll will only be one/two functions, so at first we may use a slow path to win32k and later when we impl. the shared heap we only change one/two funcs, like seen below:
+
[[Category:System Services]]
 
 
RECT GetWindowRect(hwnd)
 
{
 
  Wnd = GetWnd(hwnd);
 
  return Wnd->Rect;
 
}
 
 
 
/*initial*/
 
Wnd GetWnd(hwnd)
 
{
 
  NtUserGetWindow(hwnd);
 
}
 
 
 
/*final*/
 
Wnd GetWnd(hwnd)
 
{
 
  e = LoockupHandleEntryInSharedHeap(hwnd);
 
  return e->Wndptr;
 
}
 
 
 
* DONT use callbacks to umode! This makes programming win32k much easier since we dont have to worry about what has changed in win32k after returnig from a callback (and tons of other calls reentering win32k in the mean time).
 
 
 
* Dont rely on Windows NtUserXxx names! Those names only pollutes our impl. and makes us think we should impl. stuff in win32k, just because a function NtUserXxx exist.
 

Latest revision as of 07:57, 15 May 2014

The page Win32k.sys is a short article on something that should have a lot more information written on it.
If you know anything else about it, you are STRONGLY encouraged to add the information in. If you are unsure of proper formatting or style, add it to the talk page or this page itself as you think best and others will help.


Kernel-mode subsystem server (Win32K)

The Graphics Device Interface Provides functionality for outputting graphical content to monitors, printers and other output devices. It resides in gdi.exe on 16-bit Windows, and gdi32.dll on 32-bit Windows in user-mode. Kernel-mode GDI support is provided by win32k.sys which communicates directly with the graphics driver.

Commit history (Source code can be found in: /reactos/subsystems/win32/win32k)

See also