Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Kext: DIY KernelEx extensions

- - - - -

  • Please log in to reply
281 replies to this topic

#126
MiKl

MiKl

    Member

  • Member
  • PipPip
  • 108 posts
  • OS:98SE
  • Country: Country Flag
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, 11 January 2013 - 05:42 AM.



How to remove advertisement from MSFN

#127
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 413 posts
  • OS:ME
  • Country: Country Flag

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, 11 January 2013 - 07:03 AM.


#128
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 413 posts
  • OS:ME
  • Country: Country Flag
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.




#129
TmEE

TmEE

    Mega Drive Modding Master

  • Member
  • PipPipPip
  • 361 posts
  • OS:98SE
  • Country: Country Flag
winhttp.dll from XP makes Open Modplug Tracker run too.
Posted Image Mida sa loed ? Nagunii aru ei saa ;)

#130
FlippX

FlippX

    Junior

  • Member
  • Pip
  • 60 posts
  • OS:none specified
  • Country: Country Flag
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.. ;) )

#131
Foxbat

Foxbat

    Member

  • Member
  • PipPip
  • 122 posts
  • OS:none specified
  • Country: Country Flag
Have you read the first several posts?

#132
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 413 posts
  • OS:ME
  • Country: Country Flag
 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: Attached File  jvm.zip   543bytes   9 downloads

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

Edited by schwups, 15 January 2013 - 09:32 AM.


#133
PROBLEMCHYLD

PROBLEMCHYLD

    The Resurrector for old Windows OS

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,528 posts
  • OS:98SE
  • Country: Country Flag

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, 16 January 2013 - 12:50 PM.

Believe God is the Alpha and Omega.
Believe Jesus Christ died for our sins.
Repent for your sins now or there will be
BLOOD

The Path to God


U98SESP3 03-11-2013


#134
MiKl

MiKl

    Member

  • Member
  • PipPip
  • 108 posts
  • OS:98SE
  • Country: Country Flag
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, 17 January 2013 - 04:05 PM.


#135
togermano

togermano

    Member

  • Member
  • PipPip
  • 105 posts
I got kernelex installed but not sure how to install these mods? can anyone help a noob out?

#136
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 413 posts
  • OS:ME
  • Country: Country Flag

I got kernelex installed but not sure how to install these mods? can anyone help a noob out?


Look into the Kstub Spoiler on the first page. Or here (Api GetSystemWow64DirectoryA=z2e120 for Java 6 updates 32 and higher). 

Edited by schwups, 17 January 2013 - 08:51 AM.


#137
togermano

togermano

    Member

  • Member
  • PipPip
  • 105 posts
oh i see what happened the directions are now wrong because the updates change the ini file name

#138
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 413 posts
  • OS:ME
  • Country: Country Flag

oh i see what happened the directions are now wrong because the updates change the ini file name


Please give us more details!  I don't understand what happened. What exactly have you done? Which directions are wrong, which ini file do you mean has changed?  Reinstall KernelEX if you run into problems.

Edited by schwups, 17 January 2013 - 03:06 PM.


#139
jumper

jumper

    2014 All-American Masters HJ'er

  • Member
  • PipPipPip
  • 474 posts
  • OS:98SE
  • Country: Country Flag
I've happily followed all the activity here and in related topics over the last few days, but have been a bit busy. It seems there is much energy in 2013, and much to do!

I'll catch up on responding to each issue later tonight, but for now here are some new stub definitions to verify:

; Remote Access Service Functions (Windows)
[RASAPI32.dll]
RasGetAutodialAddressW=t5
RasGetAutodialEnableW=t2
RasGetAutodialParamW=t3
RasSetAutodialAddressW=t5

[;RASDLG.dll] --- see Lz32 ---
RasDialDlgW=f4 ;needs error set in struct
RasPhonebookDlgW=f3 ;needs error set in struct

; Authentication Functions (Windows)
[Secur32.dll]
AcquireCredentialsHandleW=t9
DecryptMessage=t4
EncryptMessage=t4
GetComputerObjectNameW=z3e120
GetUserNameExA=z3e
GetUserNameExW=z3e
InitSecurityInterfaceW=z0
InitializeSecurityContextW=t12
LsaEnumerateLogonSessions=t2
LsaFreeReturnBuffer=t1
LsaGetLogonSessionData=t2
QueryContextAttributesW=t3

Design feedback requested:
IHAtool - IpHlpApi tester; call various functions and report results
--status-> framework is solid; 22 api's fully supported; preview release coming soon
ComDlg32 wrapper - ComDlgEx meets IpHlpApi wrapper
--status-> PrintDlgExW working in latest SumatraPDF 8^)
Future projects: ImportPatcher40 - dialog interface; Kexter - IP40+Ktree+Kexstubs

#140
togermano

togermano

    Member

  • Member
  • PipPip
  • 105 posts


oh i see what happened the directions are now wrong because the updates change the ini file name


Please give us more details!  I don't understand what happened. What exactly have you done? Which directions are wrong, which ini file do you mean has changed?  Reinstall KernelEX if you run into problems.


the directions say to do this

modify contents= line in Core.ini to read:

contents=std,kexbases,kexbasen,Kstub730

but the version I downloaded was version 822 so I had to change kstub730 to kstub822

Edited by togermano, 18 January 2013 - 05:59 AM.


#141
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 413 posts
  • OS:ME
  • Country: Country Flag



oh i see what happened the directions are now wrong because the updates change the ini file name


Please give us more details!  I don't understand what happened. What exactly have you done? Which directions are wrong, which ini file do you mean has changed?  Reinstall KernelEX if you run into problems.


the directions say to do this

modify contents= line in Core.ini to read:

    contents=std,kexbases,kexbasen,Kstub730

but the version I downloaded was version 822 so I had to change kstub730 to kstub822


Of course you must must write Kstub822, if you installed version 822!


My sequence: contents=Kstub822,std,kexbases,kexbasen. The sequence can have an effect on your system. Read topic - posts 65 and 66.



#142
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 413 posts
  • OS:ME
  • Country: Country Flag
The new stub definitions of secur32.dll seem to be OK so far. There are no new log entries. 

[Secur32.dll]
AcquireCredentialsHandleW=t9
DecryptMessage=t4
EncryptMessage=t4
GetComputerObjectNameW=z3e120
InitializeSecurityContextW=t12
QueryContextAttributesW=t3




But I don't know which apps need them.



#143
loblo

loblo

    Oldbie

  • Member
  • PipPipPipPipPip
  • 755 posts
  • OS:ME
  • Country: Country Flag
OK so, I have finally installed KxStub and there is some good and bad. I'll start with the bad as it's very bad:

it seems I can't use any program requiring msvcr90.dll anymore.

When I attempt to launch any such program I get first a Microsoft Visual C++ Runtime Library popup message which says:

Runtime Error!

Program: path to whatever program dependant on msvcr90.dll

R6034
An application has made an attempt to load the C runtime library incorrectly
Please contact the application's support team for more information.


and then after I click on the OK button I get another message that says that msvcr90 can't start.

I couldn't find a single program dependant on msvcr90 that would run at all.

Examples: Audacity 2.0.3, Blender 2.49, FreeCAD, Scribus, TapinRadio

I deleted the whole block of msvcr90 entries in kxstub821.ini, thinking this was the problem but it made no difference.

And then I realized that most programs dependant on mscvr80 were also unusable, some crashing exactly like above and the others merely crashing in kernel32 on launch.

Examples: SEO Note, Seamonkey 10.0.0.4407, K-Meleon 1.6.0.0, Google Sketchup 8

After some further testing I can say that no program dependant on msvcr70, msvcr71, msvcr100 or msvcr110 appears affected.

LuxRender 0.8, 0.9 and 1.0 which rely on msvcr90 all crash but versions 1.1 and 1.2, which rely on msvcr100, run normally.I have many programs dependant on msvcr100 and they are mostly, like LuxRender develloped using the Nokia QT toolkit. I have only one program dependant on msvcr110 and that is the latest version of the fractal flame renderer Chaotica. I can run msvcr100 and 110 thanks to hexing them as explained in my little hex hacks thread, all functions not catered for by KernelEx being replaced by SetLastError as KxStub appears to crash native mscvr100.

Now for the good: if the ActCtx entries of KxStub.ini crash msvcr100 and don't appear to allow starting programs needing those functions, they have however allowed me to run VST audio plugins which I haven't otherwise been able to run.

Plugins made with the latest versions of Synthmaker which require the function FindActCtxSectionStringA can run normally with KxStub. I hadn't been able to attempt hexing of that function to SetLast Error as those plugins are UPX compressed in a special way that breaks the dll when unUPXing them. Plugins made with the latest versions of Synthedit which require all 5 ActCtx functions can be loaded and they work normally as far as DSP and host interfacing goes but unfortunately they only display a blank UI which is another story. I couldn't manage to get those plugins to run by hexing the ActCtx functions to SetLastError but the ActCtx entries of KxStub.ini do.

Now of course, I'd like to be able to run those plugins but without not being able to run msvcr80 and 90 dependant programs. I have no clue as to whether I can do something about it with the KxStub ini file?

Edited by loblo, 02 February 2013 - 08:53 AM.


#144
jumper

jumper

    2014 All-American Masters HJ'er

  • Member
  • PipPipPip
  • 474 posts
  • OS:98SE
  • Country: Country Flag
loblo, excellent report with lots of precise details! :thumbup

The Active Context function stubs have been giving us more trouble than anything else. As you noted, some apps need them present, others need them to be missing. Here are the options we currently have for dealing with this problem:

  • Implement the functions with real code (ala PrintDlgEx/ComDlgEx and IpHlpApi)
    + Best solution for all apps, even if we just fake it!
    + Wine/ReactOS should provide implementation ideas
  • Find better stub definitions that will satisfy all apps
    + Everyone is welcome to help search
    + Just edit stubs.ini and save, then restart test app (no reboot needed!)
  • Hex the MSVCRT 8 & 9 dll's to look for ActCxx instead of ActCtx
    + If ActCtx api's are missing, they work; so hex to look for something known to be missing
    - might not fix all apps--others may need hexing, too, or help from (2.)
  • Use custom Core.ini profiles, possibly with multiple Kexstubs versions/definitions
    ~ I've had mixed success with custom profiles, but should be able to derive a non-ActCtx profile that inherits from W2K and disables ActCtx support
    + If core.ini can't do it alone, a second version of Kexstubs can be loaded to provide alternate definitions to the custom profile
I'll get to working on (4). It'll require some reboots and creation of a test app. I'll update the post when I get it working.

 Update: Method 4 is ready for testing. Add the seven ActCtx api's back into stubs.ini and copy the Core.ini from the spoiler below, then reboot. :)

After removing two Core.ini profiles to make room under the cap, these lines did the trick:
[ApiConfigurations]
6=NOAC

[NOAC]
inherit=NT2K
desc=Win2000 SP4, no ActCtx (for MSVCRT 8+)

[NOAC.names]
KERNEL32.ActivateActCtx=none
KERNEL32.CreateActCtxA=none
KERNEL32.CreateActCtxW=none
KERNEL32.DeactivateActCtx=none
KERNEL32.FindActCtxSectionStringA=none
KERNEL32.FindActCtxSectionStringW=none
KERNEL32.ReleaseActCtx=none

I found that any profile past number ten gets displayed in the pick list, but won't "stick". So to make room for this new profile plus one more in the future, I removed the Win2003 and Win2008 profiles. Here is my complete Core.ini:
Spoiler

Other changes to note:
  • [ApiConfigurations] default=2
    "2" for SE, "3" for ME users; probably should be "0" to autoselect.
    Should NOT be "5" for 2K--we aren't 2K and at best can only partially fake it when absolutely necessary!
  • ComDlg32.PrintDlgEx overrides are in the Win95 section.
  • DCFG1 description changed to "Base enhancements" to avoid the confusing overuse of the term "default".
  • Make sure you have renamed Kstub822.dll to Kexstubs.dll :yes:

Edited by jumper, 03 February 2013 - 05:05 AM.

Design feedback requested:
IHAtool - IpHlpApi tester; call various functions and report results
--status-> framework is solid; 22 api's fully supported; preview release coming soon
ComDlg32 wrapper - ComDlgEx meets IpHlpApi wrapper
--status-> PrintDlgExW working in latest SumatraPDF 8^)
Future projects: ImportPatcher40 - dialog interface; Kexter - IP40+Ktree+Kexstubs

#145
MiKl

MiKl

    Member

  • Member
  • PipPip
  • 108 posts
  • OS:98SE
  • Country: Country Flag
SeaMonkey 2.0.14 works fine but OpenOffice crashes on start and the message box states Runtime Error R6034.
Do I have to use iphlpapi4 here ?

Edited by MiKl, 03 February 2013 - 08:26 AM.


#146
loblo

loblo

    Oldbie

  • Member
  • PipPipPipPipPip
  • 755 posts
  • OS:ME
  • Country: Country Flag

[*] Hex the MSVCRT 8 & 9 dll's to look for ActCxx instead of ActCtx
+ If ActCtx api's are missing, they work; so hex to look for something known to be missing
- might not fix all apps--others may need hexing, too, or help from (2.)

I read your unedited post yesterday and choose to do the above as the safest, most foolproof and almost 100% guaranteed to work immediately method.

At the end, I got an almost 100% fix for all the crashing programs I had after hexing out actctx strings in the following dlls I have in the winsys dir:

atl80.dll
mfc80.dll
mfc80d.dll
mfc80ud.dll
mfc90.dll
mfc90u
msvcr80.dll
msvr80d.dll
msvcr90.dll
msvcr90d.dll
vcomp.dll
vcomp90.dll

After doing this I had only 2 progs out of around 200 that still wouldn't run including K-Meleon 1.6. It turned out that they had those actctx strings in themselves, probably statically linked at compile with one of the above dlls, and hexing the strings out of the programs fixed them too.

So I have a perfect 100% fix for all the issues I had and can run my VST plugins relying on actctx functions.

:thumbup

I'll be reading up the rest you've written now.

Cheers.

#147
loblo

loblo

    Oldbie

  • Member
  • PipPipPipPipPip
  • 755 posts
  • OS:ME
  • Country: Country Flag
Thanks Jumper for the new solution but I am going to stick with the hexed crt80+ runtimes as it's done now, can't theoretically break anything and avoids me to have to put all the affected programs and any similar new ones I'll install in a specific compatibility mode.

#148
loblo

loblo

    Oldbie

  • Member
  • PipPipPipPipPip
  • 755 posts
  • OS:ME
  • Country: Country Flag

 
Iphlpapi wrapper
Usage without Kexstubs (or without KernelEx):
* Put a copy renamed to iphlpapi.dll in the folder with any app that needs it.

I did try that before trying to integrate it into KexStub but I get an error message that says:

C:\WINDOWS\SYSTEM\iphlpapi.dll : IpHlpDllEntry not found. (7b610000 0)

Presumably it does work only with the Windows 98SE version and not the ME one and I guess it wouldn't work with KexStub either.

Edited by loblo, 04 February 2013 - 03:27 AM.


#149
loblo

loblo

    Oldbie

  • Member
  • PipPipPipPipPip
  • 755 posts
  • OS:ME
  • Country: Country Flag
Btw I added a couple of minor definitions to my KexStub ini file:

[Kernel32.dll]
AttachConsole=f1

Works with Xaos 3.5 http://wmi.math.u-sz...u/xaos/doku.php

[SHELL32.DLL]
PathCleanupSpec=f1

Works with Lite Radio 2.3: http://hase85.wordpr...-v2-3-released/

In both cases any values would work so I did put f1 for both at the end, I am not sure if it's optimal as I frankly can't figure out those return codes yet.

#150
jumper

jumper

    2014 All-American Masters HJ'er

  • Member
  • PipPipPip
  • 474 posts
  • OS:98SE
  • Country: Country Flag

SeaMonkey 2.0.14 works fine but OpenOffice crashes on start and the message box states Runtime Error R6034.
Do I have to use iphlpapi4 here ?

What did you do to make SeaMonkey 2.0.14 work fine?
What have you tried since you last reported this OpenOffice failure?

Set the compatibility mode on all MSVCR 8 and 9 dll's to "Win2000 SP4, no ActCtx (for MSVCRT 8+)". You can find them by searching for dll's containing the text "ActCtx" and by looking at loblo's list.

Iphlpapi4 might help and shouldn't hurt...Please report your findings.
Design feedback requested:
IHAtool - IpHlpApi tester; call various functions and report results
--status-> framework is solid; 22 api's fully supported; preview release coming soon
ComDlg32 wrapper - ComDlgEx meets IpHlpApi wrapper
--status-> PrintDlgExW working in latest SumatraPDF 8^)
Future projects: ImportPatcher40 - dialog interface; Kexter - IP40+Ktree+Kexstubs




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN