User:Petr-akhlamov/Compatibility mode

From ReactOS Wiki
< User:Petr-akhlamov
Revision as of 19:42, 2 March 2018 by Petr-akhlamov (talk | contribs) (NT 6.0 API support)
Jump to: navigation, search

Mark Jansen implements this function in ReactOS.

NT 6.0 API support

  • CORE-11288 - Currently ReactOS targets only Windows Server 2003 SP2. Developer plans to implement a mechanism for user mode applications to be able to use APIs from Windows NT 6.0 and later, while still keeping the original 2k3 environment.
    • CORE-11289 - Research and document Windows compatibility settings
    • CORE-11290 - Make sure the loader respects compatibility settings
    • CORE-11291 - Create Windows 7 spec files for core DLLs
    • CORE-11292 - Core win32 API organization
    • CORE-11293 - Research kernel requirements for NT 6+ user mode APIs

CORE-11292 - PR-397 Timo Kreuzer will implement export versioning support.

"The idea is to allow building sets of "wrapper DLLs", one for each OS version. They all forward their exports to a base version (like "roskernelbase.dll") except for those that need special handling. All this can be done without creating half a dozen of copies of the spec file." - Timo Kreuzer, PR-397

Compatibility mode implementation

CORE-10366

NtApphelpCacheControl

NtApphelpCacheControl is a kernel function used by apphelp.dll to save 200 last run apps in RAM for faster search. After logging out, the list is saved in the registry, and loaded back when logging on.

Implementing apphelp sdb layer

Implements most Sdb* API's that is related to reading and writing of Sdb files.

Sdb files are application compatibility databases, containing information about known bad applications, and a list of 'shims' to be applied to those applications.

This is used as base: http://github.com/krofna/wine/tree/master/dlls/apphelp

Tab in shortcut properties

Tab in the explorer

In newer Windows versions, this is implemented as shell extension (acppage.dll). It uses SetPermLayerState and SdbGetPermLayerKeys functions.

Now it's implemented with a function which allows applying needed "layers".

Integrating apphelp

Apphelp is integrated in process creation (LDR), COM, MSI and driver loading.

  • CORE-10368
    • 03-06-2017 Integration of apphelp in process creation was started CORE-13284
      • June 27 first patch was published
      • June 29 SdbpMatchExe function was implemented
      • July 1 integration of apphelp to process creation was implemented

Shim infrastructure

It implements base infrastructure, so that shims can leverage to do their work.

Providing default shims

It provides:

ShimLib

ShimLib contains helper functions registering shims and handling common tasks.

First commit - r73461.

Shim data in links

Applies compatibility environment for shortcuts, but not *exe-file.

Status

  • 05-09-2015 NtApphelpCacheControl function was implemented in the kernel (CORE-9914)
  • 31-03-2016 apphelp.dll library was added (CORE-10367)
  • 28-05-2016 List of "emulated" API versions was added (CORE-11299)
  • 16-12-2016 Settings for Resolution/Bitdepth/DisableThemes was added 1 2 (CORE-11927)
  • 22-04-2017 - Implemented custom compatibility mode selection as shell extension in acppage
  • 19-05-2017 Initial implementation of integration of apphelp to process creation (LDR), COM, MSI and driver loading was added (CORE-10368)
  • 29-06-2017 SdbpMatchExe function was implemented, that allows matching applications/files based on properties (CORE-13284)
  • 01-07-2017:
  • 30-07-2017 ShimLib implementation was finished
  • 17-08-2017 Compatibility mode was enabled by default (but, it won't be able to be applied to system files - in system32 and WinSxS folders)
  • 10-01-2018 Beginnings of support for NT6 applications was implemented (details in mailing list) (Colin Finck)
  • 24-02-2018:
    • VersionLie for WIN8 and WIN8.1 was implemented[1][2]
    • NT6+ systems was added to acppage[3]

Compatibility apps

Apps, which are known to work in compatibility mode:

  • VMware Horizon Client for 32-bit Windows[4][5]
  • Windows Media Player 6.4[6]
  • Windows Media Player 7[7]
  • Krita 3.2.1.0[8]
  • QuickTime Player 7.7.9[9]

*_vista-libraries

In ReactOS there are some libraries such as advapi32_vista, kernel32_vista, ntoskrnl_vista and ntdll_vista. You can think that they are for the implementation of Vista+ APIs in ReactOS, but it's a mistake. For now these are present to provide needed functions for linking Wine's dlls which ReactOS uses. [10]

Links