MSFN Forum: Kext: DIY KernelEx extensions - MSFN Forum

Jump to content


  • 12 Pages +
  • « First
  • 6
  • 7
  • 8
  • 9
  • 10
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Kext: DIY KernelEx extensions Latest: K452stub (25Feb); Core.ini (2Feb, post#144); Ktree9 (9Jan) Rate Topic: -----

#141 User is offline   schwups 

  • schwups
  • PipPip
  • Group: Members
  • Posts: 280
  • Joined: 11-November 09
  • OS:ME
  • Country: Country Flag

Posted 18 January 2013 - 06:32 AM

View Posttogermano, on 18 January 2013 - 05:59 AM, said:

View Postschwups, on 17 January 2013 - 03:02 PM, said:

View Posttogermano, on 17 January 2013 - 08:59 AM, said:

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 User is offline   schwups 

  • schwups
  • PipPip
  • Group: Members
  • Posts: 280
  • Joined: 11-November 09
  • OS:ME
  • Country: Country Flag

Posted 18 January 2013 - 08:12 AM

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 User is offline   loblo 

  • Oldbie
  • PipPipPipPip
  • Group: Members
  • Posts: 679
  • Joined: 12-January 10
  • OS:ME
  • Country: Country Flag

Posted 02 February 2013 - 08:42 AM

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:

Quote

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?

This post has been edited by loblo: 02 February 2013 - 08:53 AM


#144 User is offline   jumper 

  • 2013 All-American Masters HJ/TJ'er
  • PipPipPip
  • Group: Members
  • Posts: 362
  • Joined: 21-January 11
  • OS:98SE
  • Country: Country Flag

Posted 02 February 2013 - 10:14 PM

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:

This post has been edited by jumper: 03 February 2013 - 05:05 AM


#145 User is offline   MiKl 

  • Junior
  • Pip
  • Group: Members
  • Posts: 64
  • Joined: 01-December 11
  • OS:98SE
  • Country: Country Flag

Posted 03 February 2013 - 08:25 AM

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 ?

This post has been edited by MiKl: 03 February 2013 - 08:26 AM


#146 User is offline   loblo 

  • Oldbie
  • PipPipPipPip
  • Group: Members
  • Posts: 679
  • Joined: 12-January 10
  • OS:ME
  • Country: Country Flag

Posted 03 February 2013 - 12:17 PM

View Postjumper, on 02 February 2013 - 10:14 PM, said:

[*] 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 User is offline   loblo 

  • Oldbie
  • PipPipPipPip
  • Group: Members
  • Posts: 679
  • Joined: 12-January 10
  • OS:ME
  • Country: Country Flag

Posted 03 February 2013 - 10:06 PM

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 User is offline   loblo 

  • Oldbie
  • PipPipPipPip
  • Group: Members
  • Posts: 679
  • Joined: 12-January 10
  • OS:ME
  • Country: Country Flag

Posted 04 February 2013 - 03:27 AM

View Postjumper, on 07 January 2013 - 07:11 PM, said:



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:

Quote

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.

This post has been edited by loblo: 04 February 2013 - 03:27 AM


#149 User is offline   loblo 

  • Oldbie
  • PipPipPipPip
  • Group: Members
  • Posts: 679
  • Joined: 12-January 10
  • OS:ME
  • Country: Country Flag

Posted 04 February 2013 - 03:38 AM

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 User is offline   jumper 

  • 2013 All-American Masters HJ/TJ'er
  • PipPipPip
  • Group: Members
  • Posts: 362
  • Joined: 21-January 11
  • OS:98SE
  • Country: Country Flag

Posted 04 February 2013 - 03:51 AM

View PostMiKl, on 03 February 2013 - 08:25 AM, said:

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.

#151 User is offline   schwups 

  • schwups
  • PipPip
  • Group: Members
  • Posts: 280
  • Joined: 11-November 09
  • OS:ME
  • Country: Country Flag

Posted 04 February 2013 - 04:28 AM

Post 144 - method 4:

My confiurations:

Core.ini

[ApiConfigurations]
default=0


Renamed both files ini and dll to Kexstubs

Kexstubs.ini:

[iphlpapi.dll]

GetAdaptersAdresses=t5  (no wrapper)




Result:

µTorrent and OpenOffice runs and for the moment I can't see a problem.

New setting "Win2000 SP4, no ACTCTX  doesn't persist. The setting jumps to base enhancements.




BTW Fresh Diagnose works up to the latest version 8.66. With October 7, 2010 - Release of Fresh Diagnose 8.46
a new windows user rights module was introduced.
Kext supports NetApi32.dll:NetApiBufferFree




#152 User is offline   jumper 

  • 2013 All-American Masters HJ/TJ'er
  • PipPipPip
  • Group: Members
  • Posts: 362
  • Joined: 21-January 11
  • OS:98SE
  • Country: Country Flag

Posted 04 February 2013 - 04:01 PM

Excellent feedback, schwups! :thumbup
It has highlighted several problems that I need to fix....


>Renamed both files ini and dll to Kexstubs
:blushing: Oops, please undo that! In a number of posts I have incorrectly :wacko: referred to "stubs.ini" as "Kexstubs.ini" and this has probably caused many of our testing problems. :ph34r:

"Kexstubs" has become in practice just the family name.
+ Each version of Kstubnnn.dll (e.g. Kstub822.dll) should be used as is, without renaming.
+ The stable definitions file should be named stubs.ini.
+ The test definitions file(s) should be named Kstubnnn.ini (e.g. Kstub822.ini, Kstub626.ini, etc.) and will override stubs.ini.

This allows overriding of the stable definitions while testing. This also allows the use of multiple versions of Kexstubs simultaneously with different definitions/logging options.

I will edit the erroneous posts, but will also need to release a new version of Kexstubs that makes the search order: Kstubnnn.ini, Kexstubs.ini, stubs.ini. For testing at this time, please use the names Kstub822.dll and Kstub822.ini .

@Everyone: Suggestions for KstubE05 (E=14th month of 2012) upgrades requested!


>New setting "Win2000 SP4, no ACTCTX doesn't persist. The setting jumps to base enhancements.
KernelEx is rejecting this profile probably because the ActCtx functions aren't getting created by Kexstubs, so can't be uncreated in Core.ini!
You can use Ktree to confirm whether or not Kexstubs is creating stubs for the KERNEL32:*ActCtx* functions.

#153 User is offline   MiKl 

  • Junior
  • Pip
  • Group: Members
  • Posts: 64
  • Joined: 01-December 11
  • OS:98SE
  • Country: Country Flag

Posted 04 February 2013 - 05:44 PM

Hi Jumper, using Method 4 I could activate 6 of the 7 ActCtx and Open Office worked as it should.
After activating FindActCtxSectionStringW=f5e it crashes on start.

But unfortunately with even one ActCtx running MultiPlayerClassic6491 do not start at all. So I again had to take these out.

#154 User is offline   jumper 

  • 2013 All-American Masters HJ/TJ'er
  • PipPipPip
  • Group: Members
  • Posts: 362
  • Joined: 21-January 11
  • OS:98SE
  • Country: Country Flag

Posted 04 February 2013 - 06:39 PM

>Hi Jumper, using Method 4 I could activate 6 of the 7 ActCtx and Open Office worked as it should.
After activating FindActCtxSectionStringW=f5e it crashes on start.

What version of OO and what all ActCtx functions does it use?
Please test return codes other than false for FindActCtxSectionStringW [edit]such as f5e120 and t5[/edit].

[Edit]
Here's a custom profile for Core.ini to disable just FindActCtxSectionStringW:
[ApiConfigurations]
10=NOFACSS

[NOFACSS]
inherit=NT2K
desc=Win2000 SP4 (for OpenOffice)

[NOFACSS.names]
KERNEL32.FindActCtxSectionStringW=none 
[/Edit]

>But unfortunately with even one ActCtx running MultiPlayerClassic6491 do not start at all. So I again had to take these out.
Did you try the new "no ActCtx" mode?

This post has been edited by jumper: 05 February 2013 - 03:33 AM


#155 User is offline   schwups 

  • schwups
  • PipPip
  • Group: Members
  • Posts: 280
  • Joined: 11-November 09
  • OS:ME
  • Country: Country Flag

Posted 05 February 2013 - 04:32 AM

Quote

>New setting "Win2000 SP4, no ACTCTX doesn't persist. The setting jumps to base enhancements.
KernelEx is rejecting this profile probably because the ActCtx functions aren't getting created by Kexstubs, so can't be uncreated in Core.ini! You can use Ktree to confirm whether or not Kexstubs is creating stubs for the KERNEL32:*ActCtx* functions.
Ktree doesn't list stubs for the KERNEL32:*ActCtx* functions. So Kexstubs hasn't created them.

I will rename the files back to Kexstub822.



#156 User is offline   schwups 

  • schwups
  • PipPip
  • Group: Members
  • Posts: 280
  • Joined: 11-November 09
  • OS:ME
  • Country: Country Flag

Posted 05 February 2013 - 08:17 AM

Quote

>Renamed both files ini and dll to Kexstubs
Oops, please undo that! In a number of posts I have incorrectly  referred to "stubs.ini" as "Kexstubs.ini" and this has probably caused many of our testing problems.  

"Kexstubs" has become in practice just the family name.
+ Each version of Kstubnnn.dll (e.g. Kstub822.dll) should be used as is, without renaming.
+ The stable definitions file should be named stubs.ini.
+ The test definitions file(s) should be named Kstubnnn.ini (e.g. Kstub822.ini, Kstub626.ini, etc.) and will override stubs.ini.

This allows overriding of the stable definitions while testing. This also allows the use of multiple versions of Kexstubs simultaneously with different definitions/logging options.

I will edit the erroneous posts, but will also need to release a new version of Kexstubs that makes the search order: Kstubnnn.ini, Kexstubs.ini, stubs.ini. For testing at this time, please use the names Kstub822.dll and Kstub822.ini .
OK,

method 4

my cofigurations now:

Core.ini:

[ApiConfigurations]
default=0
0=DCFG1
|

|
9=NOHEAP
10=NOFACSS

[DCFG1]
contents=Kstub822,std,kexbases,kexbasen
desc=Base enhancements
|

......

|

[NOFACSS]
inherit=NT2K
desc=Win2000 SP4 (for OpenOffice)

[NOFACSS.names]
KERNEL32.FindActCtxSectionStringW=none


Kstub822.ini:

The seven ActCtx api's in Kstub822.ini

Kstub822 and stable stubs.ini now in the KernelEX folder

Result:

Now Ktree lists the stubs for the KERNEL32:*ActCtx* functions.

The Explorer is unusable: => Runtime Error.... Program: C:....Explorer  => later  a message "Explorer caused an error in WEBVW.dll"

Can't run OpenOffice: default mode KernelEX enabled  => Runtime Error.... Program: C:....swriter.exe ... R6034...and then "Error starting program - The msvcr90.dll file cannot start"

 Mode Win 2000 SP4 (for OpenOffice) => doesn't persist  =>  changes to base enhancements => Runtime Error.... Program: C:....swriter.exe and then "Error starting program - The the msvcr90.dll file cannot start"

Kstub822.log: = Kernel32.dll:CreateActCtxW=t1e =


This post has been edited by schwups: 05 February 2013 - 08:29 AM


#157 User is offline   jumper 

  • 2013 All-American Masters HJ/TJ'er
  • PipPipPip
  • Group: Members
  • Posts: 362
  • Joined: 21-January 11
  • OS:98SE
  • Country: Country Flag

Posted 05 February 2013 - 06:33 PM

>The seven ActCtx api's in Kstub822.ini

Good. Make sure you reboot after adding (including uncommenting!) definitions.


>Now Ktree lists the stubs for the KERNEL32:*ActCtx* functions.

Only valid if you rebooted after adding definitions.


>The Explorer is unusable: => Runtime Error.... Program: C:....Explorer => later a message "Explorer caused an error in WEBVW.dll"

As I recall, you use an extension that requires KernelEx. Find that extension and set it to "no ActCtx". Or try setting Explorer.exe.


>Can't run OpenOffice: default mode KernelEX enabled => Runtime Error.... Program: C:....swriter.exe ... R6034...and then "Error starting program - The msvcr90.dll file cannot start"

We keep referring to "OpenOffice" but it is actually a suite and individual apps/dll's might need to have their modes set individually.


>Mode Win 2000 SP4 (for OpenOffice) => doesn't persist

If your Core.ini contains all the following and "Win2000 SP4 (for OpenOffice)" won't stick, Kexstubs isn't providing KERNEL32.FindActCtxSectionStringW. Make sure the definition is enabled in Kstub822.ini and you reboot after enabling it.
[ApiConfigurations]
default=0
0=DCFG1
1=WIN95
2=WIN98
3=WINME
4=NT40
5=NT2K
6=NOAC
7=WINXP
8=VISTA
9=NOHEAP
10=NOFACSS

[NOFACSS]
inherit=NT2K
desc=Win2000 SP4 (for OpenOffice)

[NOFACSS.names]
KERNEL32.FindActCtxSectionStringW=none


Reminder to everyone: Kexstubs allows for modifying existing definitions with just an app restart, but additions and/or deletions of definitions requires an Immediate reboot! Changes to Core.ini don't take effect until after the next reboot, but it does not have to happen immediately.

This post has been edited by jumper: 05 February 2013 - 06:37 PM


#158 User is offline   loblo 

  • Oldbie
  • PipPipPipPip
  • Group: Members
  • Posts: 679
  • Joined: 12-January 10
  • OS:ME
  • Country: Country Flag

Posted 06 February 2013 - 02:23 AM

I confirm that iphlpapi4 doesn't work with the Windows Me version of iphlpapi.

I have now replaced the ME version (4.90.3000) in the sysdir with the 98SE one (5.0.1717.2) and it works OK which is cool. :thumbup

Successfully tested with the program Zulu btw: http://www.nch.com.au/dj/index.html

#159 User is offline   schwups 

  • schwups
  • PipPip
  • Group: Members
  • Posts: 280
  • Joined: 11-November 09
  • OS:ME
  • Country: Country Flag

Posted 06 February 2013 - 04:15 AM

Of course, always I do rebooting.

#160 User is offline   jumper 

  • 2013 All-American Masters HJ/TJ'er
  • PipPipPip
  • Group: Members
  • Posts: 362
  • Joined: 21-January 11
  • OS:98SE
  • Country: Country Flag

Posted 06 February 2013 - 06:14 PM

If you have an NT2K mode that sticks and supports KERNEL32.FindActCtxSectionStringW, NOFACSS should also stick--those are the only two dependencies:
    [NOFACSS]
    inherit=NT2K
    desc=Win2000 SP4 (for OpenOffice)

    [NOFACSS.names]
    KERNEL32.FindActCtxSectionStringW=none

Perhaps the KernelEx bug that limits the number of modes that stick to 11 (0..10) limits ME to something even lower. Try renumbering the modes like this:
[ApiConfigurations]
default=0
0=DCFG1
1=WIN95
2=WIN98
3=WINME
4=NT40
5=NT2K
6=NOFACSS
7=NOAC
8=WINXP
9=VISTA
10=NOHEAP 

If this works, check to see if NOHEAP and VISTA will stick.

You can also drop from the numbering sequence any modes you don't use (e.g. NOHEAP, NT40, etc.), just make sure to leave the sections for inheritance purposes.

Share this topic:


  • 12 Pages +
  • « First
  • 6
  • 7
  • 8
  • 9
  • 10
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy