Jump to content

Kext: DIY KernelEx extensions


Recommended Posts

Only API names are case-sensitive.

Multiple definitions are allowed and can be accessed individually in Core.ini by different profiles.

Test Kexstubs.dll and clones with Ktree v10 or higher. Load by dropping the dll onto the open window; reload after updating definitions by pressing <F6><F5>.

 

Link to comment
Share on other sites


2 hours ago, jumper said:

API names are case-sensitive.

That part is true. I am not lying about what I said that my build recognizes case changes in file names lower case being the default but I had uppercase and lower case mix, Kstub01 to be precise. I do not want to be chatted about mentioning other OSes but I have a directory named Videos on the network drive and if you write to that drive via those OSes then it renames the videos folder "videos". When I access the network drive via WinME afterwards I then have 2 folders named "Videos" and "videos" both contain the same thing which means I have 2 names for the same folder showing up in WinME on the Android based network drive. Your Kstub824 needed to have the same characters in the INI as the DLL including case.

2 hours ago, jumper said:

Multiple definitions are allowed and can be accessed individually in Core.ini by different profiles.

Can this statement be explained further, Please explain definitions and profiles and how they can be accessed in Core.ini.

Link to comment
Share on other sites

SumatraPDF 3.2 needs Legacy Base Enhancements mode selection where VerifyVersionInfoW is enabled in later KEX otherwise if selecting another 2K setting prevents eBook's from displaying. The menu only displays with 2K settings and it took me a while to figure this out. So DCFG1 is special.

Link to comment
Share on other sites

See GetVersion in Core.ini and Ktree (and version.c) for a multi-definition usage example.

The contents= line in DCFG1 without a qualifying .names section does make it special, and a problem. DCFG1 will be gone by the end of this month, so you need to figure out now which line(s) in BASE.names give SPDF problems:

Create [DCFG1.names] and copy into it from [BASE.names] in binary search fashion (add half the remaining lines until there is an issue, then remove half the last adds until it resolves). Reboot each time, five times max per issue.

Then rename DCFG1 to a custom profile name (or do this first!) and report here the results so I can improve KernelEx so that we don't need as many custom profiles.

 

Link to comment
Share on other sites

Take note I said this.

On 9/23/2022 at 9:40 PM, Goodmaneuver said:

The Kexbasen and Kexbases Dlls of 2016 wrap around 4.5.2 versions of both items and the original 4.5.2 CORE names are still functioning as they were in 4.5.2 even though CORE24 asks for a different definition name like BASE.

The original naming must be written into 4.5.2. If the original mode/profile names are changed then the functioning of KEX is altered. The new BASE core names are only good if I do not alter my 4.5.2 settings. If I do then system will be corrupted and will not do as it was doing prior to changing mode settings to new names. It does not work properly upgrading to new names. Please do not change the original naming. To get SumatraPDF to display eBooks all that was required was to add a mode name of SPDF for example and I placed it below MIN; 6=SPDF

[SPDF]
inherit=BASE
contents=std,kexbasen,kexbases
desc=eBook Paser

[SPDF.names]
KERNEL32.VerSetConditionMask=kexbases.0
KERNEL32.VerifyVersionInfoA=kexbases.0
KERNEL32.VerifyVersionInfoW=kexbases.0

Link to comment
Share on other sites

On 11/9/2022 at 10:41 AM, jumper said:

Create [DCFG1.names] and copy into it from [BASE.names] in binary search fashion (add half the remaining lines until there is an issue, then remove half the last adds until it resolves).

I have experimented before and taking out certain (most of them) DCFG1 names is not a good idea. It would corrupt the system. Even taking out SHELL32.SHParseDisplayName=none had consequences. WMP10 WMP.dll if not using XP mode took on a silvery skin colour like WMP11. The blue skin returns once making WMP.dll XP mode. Inheritance in Core.ini takes on the contents as well so there is no need to include it in any inherited modes later on down the list. Ktree does no necessarily pick up on Modes that do not have Contents though and therefore will need to be altered or just be aware of that fact. Adding Content down lower in Core.ini may have made Ktree list all modes but alters KEX functioning. You would think that Microsoft would know what was NT SP4 and what was NT SP5. I have tested it also on several games as well and they do not install complaining that NT40 mode is not SP5.

Here is a proposal and I am confident that the new custom mode of BASE can be taken on as the Default Mode if desired. Also BASE settings will not need altering prior to rebooting. Not anymore as I have included GDI32.GetCharABCWidthsI=kexbasen.0 This is important as explained later. Watch out though I have added 4 x Kstubs so make sure that is configured/corrected before rebooting. I do not think that all OS version Modes included are needed though and some could be trimmed out. Core.ini proposal is in the zip.

CORE_8.zip

Edited by Goodmaneuver
Purple text
Link to comment
Share on other sites

In the Core_8.zip is Core.ini and in Core.ini I had made default=1. This did not make default mode = Base. Default mode is still DCFG1. So making default = 1 did not do as I thought it would and Base (Verify Version) needs to be selected to enable that mode and make SumatraPDF work. The "default=" option in CORE.ini only makes the Sheet open on that selection. That is all it does.

Edited by Goodmaneuver
Edited to suit previous post.
Link to comment
Share on other sites

It is probably best to use ROS WindowsCodecs of 2011 era as it loads better without any missing imported APIs from OLE32 and is equivalent to Vista SP1 6001. 2017 6003 vs would not register.

On 3/11/2019 at 8:05 PM, jumper said:

But does the use of Uxtheme actually allow any theming?

It makes a difference to KMPlayer 4.06's preferences menu where the different KMP themes change appearances.

Edited by Goodmaneuver
Sorry Jumper; I removed statement because I realised I had made a mistake and the statement may not be correct yet.
Link to comment
Share on other sites

On 1/6/2023 at 3:07 AM, Goodmaneuver said:

It makes a difference to KMPlayer 4.06's preferences menu where the different KMP themes change appearances.

Maybe on XP or Vista, but we don't have the underlying OS theming support for Uxtheme to wrap.

 

Link to comment
Share on other sites

I have said a few things about RADMIN32 and Kstub redirects before; some things now can be disregarded. What works 100% is if you directly link to RADMIN32 using hex editor when there are no missing imported APIs. If there are some missing RADMIN32 export entries, then you use a renamed RADMIN32, say we use MEDAL, and use KexStubs to redirect the missing APIs to MEDAL. These redirections seem to have no restriction on what client redirect module you choose. Do not use system redirects in registry KnownDlls to MEDAL. I have RAD32 redirected in system KnownDlls to RADMIN32. This is so that shorter named APIs can be replaced with RAD32 when there are no missing APIs. The registry then redirects RAD32 to RADMIN32.

There is no need to worry about a solution for ResolveDelayLoadedAPI; ResolveDelayLoadedAPI=>KERNEL32:BeginUpdateResourceW seems to work.

Link to comment
Share on other sites

Radmin32 is still on my radar. Thanks for the reminder. The idea is to make Radmin32 and Unicows both optional add-ons. This can be done now with Kexstubs (without all your extra redirection), but I want to split Unicows out of Kexbasen and handle Radmin32 the same way.

 

Link to comment
Share on other sites

On 1/9/2023 at 7:23 PM, jumper said:

This can be done now with Kexstubs (without all your extra redirection),

Yes and no on that. You see as well as RAD32 I also have these module redirects in system KnownDLLs to RADMIN32.

API-MS-WIN-CORE-RTLSUPPORT-L1-2-0
API-MS-WIN-DOWNLEVEL-ADVAPI32-L1-1-0
API-MS-WIN-SECURITY-LSALOOKUP-L2-1-0
API-MS-WIN-SECURITY-LSALOOKUP-L2-1-1
API-MS-WIN-SECURITY-LSAPOLICY-L1-1-0
API-MS-WIN-SERVICE-MANAGEMENT-L1-1-0
API-MS-WIN-SERVICE-MANAGEMENT-L2-1-0
API-MS-WIN-SERVICE-WINSVC-L1-1-0
API-MS-WIN-SERVICE-WINSVC-L1-2-0
BROWCLI
NETAPI
NETRAP
SAMCLI
SAMLIB
SRVCLI
WKSCLI

Redirecting to a module named RADMIN32 with Kstubs does not work for me. Obviously if those KnownDlls above are missing an API for a particular module then the MEDAL option is to be applied.

On 1/9/2023 at 7:23 PM, jumper said:

I want to split Unicows out of Kexbasen

Unicows; depending on what you have in mind; if the first part of the CTRAS API 's names are ignored then CTRAS vs 0.2.0.3 is an alternative. For example GetCharABCWidthsI=>CTRAS:WAPI_CTGetCharABCWidthsI. CTRAS was distributed with MSreader. There is no trouble though with UNICOWS or Kexbasen showing up for me. Folder path mapping is a problem showing up with JAVA and it occurred a long time ago in KEX but not 4.5.2. It would help if I find out just when it occurred. It occurs win Windows 7 32 bit and it makes a folder path in Users\*login name*\ folder. I tend to think that the NT folder path conversion APIs should not be stubbed.

On 1/7/2023 at 10:33 PM, jumper said:

we don't have the underlying OS theming support for Uxtheme to wrap.

Yes but KMPlayer modifies the skin with a variable color control. Their browser uses Windows system but changes color scheme to dark. Even an error message will be dark theming. Their alpha transparency does not work though. 

A renaming of GDI32 from 5.1.2454 will load and the 2 theme entries of UXTHEME 5.1.2454 namely PaintMenuBar and CalcMenuBar could be stubbed. I am using modern ROS UXTHEME feeding ROS 2011 era as base and this has the first use of Kstub825 as an ordinal redirect. UXTHEME is loaded with Mozilla browser, Internet Explorer and therefore Explorer plus KMP, PotPlayer ecectera WMP9 but not 7. I have incorporated UXTHEME from 5.1.2223.

The HTML upload will show what modules in use that load with IE6. An insight into what is happening at the moment.

horizontal.htm

Edited by Goodmaneuver
I did not get GetCharABCWidthsI without a copy and paste correct. I thought it important to correct.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...