Jump to content

Kext: DIY KernelEx extensions


Recommended Posts

Ktree9 has been posted. :hello:

Nice!!! :yes:

Hi Jumper, with iphlpapi4 running both Sunbird 0.5 and OpenOffice 3.2 crash on start on my system so I had to go back to #3.

FWIW, version 4 works fine with HoverIP and SAP GUI for Java (so too does version 3, of course).

Joe.

Edited by jds
Link to comment
Share on other sites


Thanks again to everyone for testing. It seems I've make too many changes all at once and it's not clear where something has gone wrong.

@MiKl: Sunbird 0.5 (zip version) does not require KernelEx (Depends and IP36 both give it a clean bill of health). It runs fine in 98SE for me with Kex disabled or in any mode. It does link to Iphlpapi.dll but has no problems with iphlpapi4 using either the Kexstubs or local copy method. Using the local copy method I can see in a process viewer (TaskInfo2000) that both the original and wrapper are loaded. Questions: Are you using the new definitions? Are you using the Kstub or local-copy method? "Crash" is extremely vague--can you provide some details?

@schwups: "...IpHlpDll Entry not found (7b340000 0)" is my debug message from the DLL startup function as the load is about to fail. 7b340000 is the address returned by LoadLibrary for C:\Windows\System\iphlpapi.dll and 0 is the address returned by GetProcAddress for ??? (silly me for not including the API name in the debug message :wacko: ). It appears from the log that it actually loaded successfully on the first call to GetAdaptersAddresses, then failed on the second call--this could be because it follows a call to CreateActCtxW (that has caused trouble in the past) or something to do with how KernelEx hooks GetProcAddress. Try commenting out Kernel32:CreateActCtxW (and rebooting); if that doesn't help, please try the local-copy method.

@jds: Can you test using the Kexstubs method (clear the KnownDLLs entry and use the new definitions)? It looks like the global- and local-copy methods might be immune to something that is ailing the Kexstubs method.

For anyone experiencing R6034 runtime errors in OpenOffice or other apps, try commenting out the Msvcr90 and/or the Msvcr sections-> "[;Msvcr90.dll]", "[;Msvcrt.dll]". [ reference1, reference2 ]

If the three of you can confirm that apps that worked with iphlpapi3 and older definitions also work with iphlpapi3 and the new definitions, that will isolate iphlpapi4 as the problem. If modifications to the new definitions are needed to get iphlpapi3 to work again, perhaps iphlpapi4 will also work.

Edited by jumper
Link to comment
Share on other sites

Error message from Sunbird. Text is unfortunately in German.

SUNBIRD verursachte einen Ausnahmefehler 03H in Modul KERNEL32.DLL bei 0187:bff768a1.

Register:

EAX=c0030900 CS=0187 EIP=bff768a1 EFLGS=00000246

EBX=00000000 SS=018f ESP=00c9fbb8 EBP=00c9fbec

ECX=ffffff64 DS=018f ESI=7813221e FS=39df

EDX=00000000 ES=018f EDI=00000000 GS=0000

Bytes bei CS:EIP:

c3 cc cc 55 8b ec 56 57 68 c0 d4 fc bf e8 01 d9

Stapelwerte:

78132236 9c193b66 00000000 78130000 822e65f8

0000000a 00000004 00c9fbbc 00c9f9d0 00c9fdb4

78138ced e4cb8bd2 fffffffe 00c9fdc4 78132348

78130000

After closing the error box another message appears saying that NEGOTIAT.DLL is missing.

Hope that helps.

Will test more later this evening.

Follow up:

When using the new defs Sunbird and OpenOffice crash no matter if iphlpapi 3 or 4 is 'called'. Is this the correct term ?

Follow up #2:

Commenting out the msvcr... sections seem to have no positive effect on my system.

Edited by MiKl
Link to comment
Share on other sites

MiKl> SUNBIRD verursachte einen Ausnahmefehler 03H in Modul KERNEL32.DLL bei 0187:bff768a1.

A Google search for "03H KERNEL32.DLL bff768a1" led me to this post by jds, so clearly the Active Context (*ActCtx*) stubs are not working and need to be removed. SAP GUI for Java will surely break for jds when he tests with the "new" definitions because of this regression.

Also, make sure you have the Kex default in Core.ini [ApiConfigurations] set to "default=2" (WIN98). default=5 is incorrect. Your system seems to have mismatched msvcrt DLLs or other DLLs used by Sunbird that are causing the problem, not Sunbird itself. If your default is already at "2", please disable KernelEx extensions completely on Sunbird.

> After closing the error box another message appears saying that NEGOTIAT.DLL is missing.

This has to do with Directory Services. Maybe Sunbird is trying to access Outlook? This doesn't seem to be related to Kex or Kext.

> When using the new defs Sunbird and OpenOffice crash no matter if iphlpapi 3 or 4 is 'called'. Is this the correct term ?

"Called" is okay; "active", "used", "being used" might be better. The Active Context stubs seem to be the problem, not iphlpapi4--this is good.

>Commenting out the msvcr... sections seem to have no positive effect on my system.

Okay, thanks.

It now looks like iphlpapi4 is probably okay; the problem seems to be the ActCtx definition regression. I'll correct post #116

Link to comment
Share on other sites

@jds: Can you test using the Kexstubs method (clear the KnownDLLs entry and use the new definitions)? It looks like the global- and local-copy methods might be immune to something that is ailing the Kexstubs method.

Hi jumper, here are the results :

1) HoverIP : Seems OK.

2) SAP GUI : crashed with the following :


JAVAW caused an exception 03H in module KERNEL32.DLL at 0187:bff768a1.
Registers:
EAX=c0030900 CS=0187 EIP=bff768a1 EFLGS=00000246
EBX=00000000 SS=018f ESP=1818e604 EBP=1818e638
ECX=ffffff64 DS=018f ESI=7813220d FS=5c27
EDX=00000000 ES=018f EDI=00000000 GS=0000
Bytes at CS:EIP:
c3 cc cc 55 8b ec 56 57 68 c0 d4 fc bf e8 01 d9
Stack dump:
78132225 bf4d735b 00000000 78130000 81daa5d8 0000000a 00000004 1818e608 1818e41c 1818e800 78138ad1 df4ede3b fffffffe 1818e810 78132337 78130000

3) In addition, Dependency Walker didn't run (no error message) and Open Office 3.2 produced an error R6034 when I double-clicked an XLSX file.

Then I commented out all the evil *ActCtx* functions in 'Kstub822.ini' and rebooted. Then everything worked OK.

Joe.

Edited by jds
Link to comment
Share on other sites

Hi Jumper, my Sunbird installation must have been really screwed because after re-installing it works flawlessly with I4 and the new defs ! Thank you very much - sometimes I am to blind to see the obvious thing :blushing:

And after commenting out these 'evil' actctx-entries OpenOffice is working here again too !! Even with msvcr...'s active again.

Edited by MiKl
Link to comment
Share on other sites

It appears from the log that it actually loaded successfully on the first call to GetAdaptersAddresses, then failed on the second call--this could be because it follows a call to CreateActCtxW (that has caused trouble in the past) or something to do with how KernelEx hooks GetProcAddress. Try commenting out Kernel32:CreateActCtxW (and rebooting); if that doesn't help, please try the local-copy method.

Commenting out Kernel32:CreateActCtxW isn't enough (experiencing R6034 runtime errors). After commenting out all ActCtx api's

ActivateActCtx=f2e

AddVectoredExceptionHandler=z2

CreateActCtxA=t1e

CreateActCtxW=t1e

DeactivateActCtx=f2e

FindActCtxSectionStringA=f5e

FindActCtxSectionStringW=f5e

ReleaseActCtx=f1

OpenOffice 3.2.1 works again.

µTorrent 2.0.4 doesn't.

Kstub822.log:

= Iphlpapi.dll:GetAdaptersAddresses=>iphlpapi4: =

It works, if I commented out

GetAdaptersAddresses=>iphlpapi4:

GetPerAdapterInfo=>iphlpapi4:

Edited by schwups
Link to comment
Share on other sites

Hello jumper,

you added winhttp.dll with four api's in the Kstub822 update (post 116) to experiment. I've good experience with this dll of XP in my system folder. It already supports WinHttpCloseHandle, WinHttpGetIEProxyConfigForCurrentUser, WinHttpGetProxyForUrl and WinHttpOpen. It makes no problems so far. The Foxit Reader updater of latest versions (5.3 and 5.4) needs it, the msi of the Flash Player versions 11.3 - 11.5 and Google Earth 6.0 to start, too.

Link to comment
Share on other sites

Hello,

please excuse my ignorance, but what is this?!?

Since KEX seems to be dead, or at least frozen, this sounds like it's successor...

But it does not sound like some kind of end-user software.

Is there something like a database sothat one just can install it resulting in more programs working/starting??

As far as I can see you have to be a programmer to use this, right?!

I am a graphical programmer if at all... But I do not really have an idea of windows file-types etc.. I guess I should in order to use this?!?

So can't you make something like an update for KEX out of this??? That would be the easiest (..at least for anyone but you guys.. ;) )

Link to comment
Share on other sites

I'm able to install Java 7 with the msi. Thanks to Kext. Also InterlockedPOPEntrySList is now supported. Of course it doesn't work. I think the main problem is VC++2010 - msvcr100 as with Gecko based browsers like Firefox 13 and higher. At the end of the setup a message says "Error loading jvm.dll" (...\bin\client). If I wait a while the message disappears and the setup finished successfully. The Java Control Panel doesn't open. It also says Error loading jvm.dll. Pluginchecker on Firefox 3.5.19 gives the same message.

The ImportPatcher generates this ini file for jvm.dll: jvm.zip

After uninstalling remain some entries of Java 1.7 in the registry - HKLM ... Software/JavaSoft. I had to delete them manually!

Edited by schwups
Link to comment
Share on other sites

So can't you make something like an update for KEX out of this??? That would be the easiest (..at least for anyone but you guys.. ;) )

I asked this question a long time ago. I guess its easier to stub it out. I guess some people don't grasp the concept as easy as others. Kernel Ex is pretty stable for many users but has its bugs like any other unofficial projects on here. Adding stubs to the somewhat buggy Kernel Ex doesn't help but adds more bugs IMHO :unsure: Iguess it easier to try and cover up bugs (forget about them) than actually trying to fix them. Edited by PROBLEMCHYLD
Link to comment
Share on other sites

Hi Jumper,

in the last few days I have compared the performance of my system using i3 and i4 with SeaMonkey 2.0.14 and when using i4 there are some crashes of SM out of the blue doing nothing else than browsing.

Printing is also much more reliable because although I can print using i4 - SM crashes right after the printing is done !! So I went back to i3. (I also have the feeling that GetTcpTable2 improves stability very much !!)

I tried later versions of SM 2.0.14 as you have suggested before (thank you for looking into the matter !!) but they work very, very, very slowly and websites are not displayed correctly, mouse-over not working, etc.

So unless there is now some progress on KernelEx I think I am stuck with 2.0.14. :}

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