Jump to content

Kext: DIY KernelEx extensions


Recommended Posts

So far I can't see any problems with version 816, if the sequence in the core.ini is: "contents=Kstub816,std,kexbases,kexbasen"

Same for 8.22 with the following 'core.ini' entries :

[DCFG1]

contents=Kstub822,std,kexbases,kexbasen

[NT2K.names]

ComDlg32.PrintDlgExA=Kstub822.0

ComDlg32.PrintDlgExW=Kstub822.0

:thumbup

Joe.

Edited by jds
Link to comment
Share on other sites


So far I can't see any problems with version 816, if  the sequence in the core.ini is: "contents=Kstub816,std,kexbases,kexbasen"

Same for 8.22 with the following 'core.ini' entries :

[DCFG1]

contents=Kstub822,std,kexbases,kexbasen

[NT2K.names]

ComDlg32.PrintDlgExA=Kstub822.0

ComDlg32.PrintDlgExW=Kstub822.0

:thumbup

Joe.

Confirmed: So far no problems with version 822 and there isn't any log entry. 

If I change the sequence to "contents=std,kexbases,kexbasen,Kstub822", I still get these log entries:

= Kernel32.dll:GetUserGeoID=t1 =

= Shlwapi.dll:SHRegisterValidateTemplate=t2 =

And I still can't open the control panel. Shlwapi.dll is installed with IE6 SP1 and KernelEX is set by XENO to disabled. 

What's correct for Java updates 32+ "Kernel32.dll:GetSystemWow64DirectoryA"=((NTSTATUS)0xC0000002L) or =e1? Entry "z2e" works, but probable wrong. MS says: On 32-bit Windows, the function always fails, and the extended error is set to ERROR_CALL_NOT_IMPLEMENTED.

Link to comment
Share on other sites

A new function must be added for Opera 12.5 alpha build 1546:

[iPHLPAPI.DLL]

GetAdaptersAddresses

It isn't necessary for build 1513.

IPHLPAPI.DLL (5.1.2600.5512 (xpsp.080413-0852)) does have 'GetAdaptersAddresses !!

Maybe this version can be used ?

Link to comment
Share on other sites

If I change the sequence to "contents=std,kexbases,kexbasen,Kstub822", I still get these log entries:

= Kernel32.dll:GetUserGeoID=t1 =

= Shlwapi.dll:SHRegisterValidateTemplate=t2 =

And I still can't open the control panel. Shlwapi.dll is installed with IE6 SP1 and KernelEX is set by XENO to disabled.

Tests to try:

  1. contents=std,Kstub822,kexbases,kexbasen
    This should work the same as "contents=Kstub822,std,kexbases,kexbasen". My reading of the KernelEx source code is that 'std' is assigned priority slot zero and then up to 255 modules are parsed from "contents=", skipping 'std' which is already assigned.
  2. contents=std,kexbases,kexbasen,Kstub822
    with these options:
    • Core.ini [ApiConfigurations] default=3
    • set compatibility mode of Explorer.exe to "Windows Millennium"
    • comment out: [Kernel32.dll] ;GetUserGeoID
    • comment out: [shlwapi.dll] ;SHRegisterValidateTemplate


What's correct for Java updates 32+ "Kernel32.dll:GetSystemWow64DirectoryA"=((NTSTATUS)0xC0000002L) or =e1? Entry "z2e" works, but probable wrong. MS says: On 32-bit Windows, the function always fails, and the extended error is set to ERROR_CALL_NOT_IMPLEMENTED.

Good research! MSDN says:

If the function fails, the return value is zero. To get extended error information, call GetLastError.

On 32-bit Windows, the function always fails, and the extended error is set to ERROR_CALL_NOT_IMPLEMENTED.

  • ERROR_CALL_NOT_IMPLEMENTED 120L
    is an extended error code for functions that call SetLastError.
  • STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002L)
    is a return code for functions that return an NTSTATUS value.

We want the extended error code, so these should be correct:

[Kernel32.dll]

GetSystemWow64DirectoryA=z2e120

GetSystemWow64DirectoryW=z2e120

In the next beta, I'll change the default for 'e' from '1' to '120'

Link to comment
Share on other sites

Test 1: contents=std,Kstub822,kexbases,kexbasen

=>The IE script error occurs, if I try to open the control panel.

Details:

An error occurred in the script on this page.

Line: 107

Char: 21

Error: permission denied

Code: 0

URL: file://C:\Windows\Web\controlp.htt

Kstub822.log:

(= Kernel32.dll:GetSystemWow64DirectoryA=z2e120 = (appears, if I try to install java with the exe installer))

= Shlwapi.dll:SHRegisterValidateTemplate=t2 =

Test 2: contents=std,kexbases,kexbasen,Kstub822

with these options:

Core.ini [ApiConfigurations] default=3

set compatibility mode of Explorer.exe to "Windows Millennium"

comment out: [Kernel32.dll] ;GetUserGeoID

comment out: [shlwapi.dll] ;SHRegisterValidateTemplate

The control panel opens!

The Kstub822.log file is empty.

Edited by schwups
Link to comment
Share on other sites

The Test 1 results are surprising, but good to know.

Test 2 was sure to work using all four options at the same time--and naturally there is nothing in the log file, because the two functions are no longer stubbed!

I just realized that the first two options can't help with this problem without addition configuration lines in several sections of Core.ini. However, '3' is a better default than '5' for ME systems and should prevent apps like Dependency Walker from misbehaving. Other apps that do need NT2K mode will need to be individually configured.

The SHRegisterValidateTemplate stub should only exist for systems that don't have the IE6 shlwapi.dll. Upgrading the dll is probably better than adding the stub--I'll unstub it in the next release with a comment.

If SHRegisterValidateTemplate is only called because GetUserGeoID exists, unstubbing GetUserGeoID may also solve the problem by itself. Otherwise just unstubbing SHRegisterValidateTemplate should also solve things.

So after all that diagnosing and testing, it now seems that the solution was to simply look into the log file and unstub the last function handled! :lol:

Link to comment
Share on other sites

A new function must be added for Opera 12.5 alpha build 1546:

[iPHLPAPI.DLL]

GetAdaptersAddresses

It isn't necessary for build 1513.

IPHLPAPI.DLL (5.1.2600.5512 (xpsp.080413-0852)) does have 'GetAdaptersAddresses !!

Maybe this version can be used ?

The XP file looks like a can of worms (Pandora's box), but you can certainly try it! I recommend trying Wild Bill's patched version for Win2K, MS11-020, instead. Read the following post as well and get both packages from the links in post #3.

In the meantime, I suggest the following definition:

Returns an error code (not status) and has five parameters:

[iPHLPAPI.DLL]

GetAdaptersAddresses=r120s5

Link to comment
Share on other sites

Still no success to install and run Opera 12.5 alpha build 1546. The installer crashed, but I unpacked it with 7Zip. Opera starts with comp. mode Win2000. Unfortunately I get an internal connection error.

Kstub822.ini: [iPHLPAPI.DLL]

GetAdaptersAddresses=r120s5 (the same result with z5e before)

Link to comment
Share on other sites

Still no success to install and run Opera 12.5 alpha build 1546. The installer crashed, but I unpacked it with 7Zip. Opera starts with comp. mode Win2000. Unfortunately I get an internal connection error.

You have seen this?

Link to comment
Share on other sites

Still no success to install and run Opera 12.5 alpha build 1546. The installer crashed, but I unpacked it with 7Zip. Opera starts with comp. mode Win2000. Unfortunately I get an internal connection error.

You have seen this?

I believe we 've to look in the future,too, otherwise Opera 13 will not work anymore on ME/98 next year. Yes, I had installed version 12.02 RC1 and it works. :hello:

Link to comment
Share on other sites

Still no success to install and run Opera 12.5 alpha build 1546. The installer crashed, but I unpacked it with 7Zip. Opera starts with comp. mode Win2000. Unfortunately I get an internal connection error.

Kstub822.ini: [iPHLPAPI.DLL]

GetAdaptersAddresses=r120s5 (the same result with z5e before)

What's in the log file? That will tell us which api's are being used that we can try to do something about. icon12.gif

I'm working on a new definitions file that will include stubs to duplicate KernelEx's built-in stubs (but not the better replacements). This will allow us to log all function stubs so we can get a better idea of what is getting called, and when.

Link to comment
Share on other sites

Kstub822.log:

= IPHLPAPI.DLL:GetAdaptersAddresses=r120s5 = ( in order to start Opera 1546)

Today I defragmented with Diskeeper. A bit strange: Opera 1546 crashed on start, if DK is installed. After removing Opera has started again.

Yesterday I checked out to paste the iphlpapi.dll of Wild Bill's patched MS11-020 into the system folder and commented out in the Kstub822.ini ";GetAdaptersAddresses=r120s5". Opera crashed on start. Tomorrow I can send the crashlog.

Edited by schwups
Link to comment
Share on other sites

  • 2 weeks later...

Some printing tests with Kext and ComDlgKs.dll installed:

Sumatra pdf => OK

Firefox 8 and 9 => a lot of print jobs have perfomed correct (especially text contents), but others fail with an error message or the print is incomplete. Usually these versions don't crash in order to print.

Edited by schwups
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...