MSFN Forum: Kext: DIY KernelEx extensions - MSFN Forum

Jump to content


  • 12 Pages +
  • 1
  • 2
  • 3
  • 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: -----

#1 User is offline   jumper 

  • Masters HJ/TJ'er (back in training)
  • PipPipPip
  • Group: Members
  • Posts: 361
  • Joined: 21-January 11
  • OS:98SE
  • Country: Country Flag

  Posted 27 June 2012 - 12:20 AM

Kext: DIY KernelEx extensions
A collection of tools for extending KernelEx

Attached File  K452stub.7z (4.65K)
Number of downloads: 38
Core.ini (in Post #144)
Attached File  Ktree9.7z (2.71K)
Number of downloads: 45
Attached File  iphlpapi4.7z (2.55K)
Number of downloads: 51
Attached File  Kstub822.zip (4.75K)
Number of downloads: 123

:D :whistle:


K452stub - monitor and improve KernelEx' pure stubs.
Attached File  K452stub.7z (4.65K)
Number of downloads: 38
Usage: contents=Kstub822,std,kexbases,kexbasen,K452stub
See post #205 for details.



Ktree - KernelEx API viewer (Tree view control for core.ini and KernelEx\KnownDLLs)
Attached File  Ktree9.7z (2.71K)
Number of downloads: 45 - (9Jan13):
  • lists extension modules invoked by "contents=" of Core.ini
  • lists DLLs supported via HKLM\Software\KernelEx\KnownDLLs
  • lists all extensions by DLL
  • lists all extensions by API

Click below to see older updates:
Spoiler



Iphlpapi.dll - Iphlpapi extension wrapper
Attached File  iphlpapi4.7z (2.55K)
Number of downloads: 51 - (7Jan13):
  • For use with or without KernelEx / Kexstubs
  • see Post #116 for details and usage

New in this version:
  • Better GetAdaptersAddresses
  • 10 new stubs

Click below to see older updates:
Spoiler



Kexstubs - better forwarding, better definitions
Attached File  Kstub822.zip (4.75K)
Number of downloads: 123 - Kstub822.dll, Kstub822.ini
  • Latest definitions for all stubbed functions!
  • Fixes two bugs introduced in 816 related to comment processing

New in 816:
  • Forward definitions can now be abbreviated and commented
  • Many new foreward definitions providing full function support
  • Stepload support removed

Click below to see older updates:
Spoiler



Source code available upon request:
Spoiler

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



#2 User is offline   PROBLEMCHYLD 

  • The Resurrector for old Windows OS
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,471
  • Joined: 07-October 05
  • OS:98SE
  • Country: Country Flag

Posted 29 June 2012 - 08:21 AM

Instead of adding all these stubs, why not just update KernelEX altogether :blink:

#3 User is offline   jumper 

  • Masters HJ/TJ'er (back in training)
  • PipPipPip
  • Group: Members
  • Posts: 361
  • Joined: 21-January 11
  • OS:98SE
  • Country: Country Flag

Posted 29 June 2012 - 04:38 PM

Excellent question, PROBLEMCHYLD. :)

Previously, when users trying out new software were confronted with a "missing export" load failure, they had only two options:
    1. Wait for someone else to update KernelEx,
    2. Update KernelEx themselves.

With Kexstubs installed, now there is is third option:
    3. Edit a configuration file and reboot!

And once I get the kinks worked out of the Kext examples, there will be a fourth option:
    4. Add or upgrade specific API's by developing a custom module, without needing to rebuild the entire KernelEx core.

  • Option 3 is the best for normal users (and great for developers as well), and is here right now.
  • Option 4 will be the best for developers, and I expect will be the avenue for most new KernelEx development.

Contributed results from options 3 and 4 can be rolled into the core KernelEx package if and when it is next updated.

#4 User is offline   PROBLEMCHYLD 

  • The Resurrector for old Windows OS
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,471
  • Joined: 07-October 05
  • OS:98SE
  • Country: Country Flag

Posted 29 June 2012 - 04:41 PM

View Postjumper, on 29 June 2012 - 04:38 PM, said:

And once I get the kinks worked out of the Kext examples, there will be a fourth option: [list]
4. Add or upgrade specific API's by developing a custom module, without needing to rebuild the entire KernelEx core.
Thats sounds great :thumbup

#5 User is offline   jds 

  • -DOS+
  • PipPipPipPip
  • Group: Members
  • Posts: 595
  • Joined: 03-June 08
  • OS:98SE
  • Country: Country Flag

Posted 03 July 2012 - 03:46 AM

This looks way cool, jumper! :thumbup

Does this now supersede the previous 'NetApiEx' stuff? :
http://www.msfn.org/...post__p__995632
http://www.msfn.org/...post__p__995699
http://www.msfn.org/...post__p__995828

Joe.

#6 User is offline   schwups 

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

Posted 09 July 2012 - 01:46 AM

1. The msi (windows installer)  of Adobe Flash Player (Opera/Firefox) 11.3 works fine without error message.     
The player only works, if Opera runs with Win2000 mode! It doesn't, if Opera runs with default mode.

Error fixed: missing Export Advapi32.dll:ChangeServiceConfig2W (ChangeServiceConfig2W=z3e)

2. Foxit Reader versions 5.0.x and 5.1.x now start ([Secur32.dll] GetUserNameExW=z3e solves the error). The versions 5.0.x have some graphical issues.

All versions of the Reader work.

3. Stubs.ini "[Kernel32.dll] GetSystemWow64DirectoryA=z3e" entry works for Java updates 33 and 34 (next release). Tested with the msi.

:thumbup

This post has been edited by schwups: 09 July 2012 - 09:15 AM


#7 User is offline   loblo 

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

Posted 09 July 2012 - 03:47 PM

This looks like a great addition to KernelEx but despite I haven't tried it yet there is something I don't quite like about it and that is the need to reboot/restart windows for changes in the ini file to apply. Do you think you could do something about it?

#8 User is offline   loblo 

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

Posted 09 July 2012 - 03:55 PM

View Postschwups, on 09 July 2012 - 01:46 AM, said:

2. Foxit Reader versions 5.0.x and 5.1.x now start ([Secur32.dll] GetUserNameExW=z3e solves the error). The versions 5.0.x have some graphical issues.

Not all 5.x.x versions of Foxit reader have a dependency in secur32.dll, however I just post this to say that KernelEx in 2K compat mode eliminates the graphical issues here. I am still using version 4 as I don't really like the new skinned interface and I have found no way to not use skins in the options unfortunately.

#9 User is offline   jumper 

  • Masters HJ/TJ'er (back in training)
  • PipPipPip
  • Group: Members
  • Posts: 361
  • Joined: 21-January 11
  • OS:98SE
  • Country: Country Flag

Posted 09 July 2012 - 06:47 PM

@jds
>Does this now supersede the previous 'NetApiEx' stuff?

Temporarily, yes. At the moment, Kexstubs has stub support for more Netapi32 functions than NetApiEx. And additional stubs can easily be added as needs arise.

But stubs are only a first step--they allow a program to load, but not to fully function. The next step is to write code that actually does what the calling program expects of it. That will be the role of NetApiEx in the future: to provide working API's rather than simple stubs.

If we keep things open source with the right licensing, we should be able to borrow code from Wine and ReactOS as well as from the excellent work of our own WildBill and blackwingcat.

#10 User is offline   jumper 

  • Masters HJ/TJ'er (back in training)
  • PipPipPip
  • Group: Members
  • Posts: 361
  • Joined: 21-January 11
  • OS:98SE
  • Country: Country Flag

Posted 09 July 2012 - 07:58 PM

Excellent testing and reporting, schwups. :thumbup

During development, I searched the web for references to "missing export" to find needed API's and then added stub definitions. Naturally, I missed some that were right under my nose. Here is an update based largely upon loblo's work:thumbup that can be manually added to stubs.ini to complete MSVC2010 (non-.NET) support. Definitions will take effect after next Windows restart:

[edit]
* Warning: Read posts #15-17 before applying these definitions. Insert definitions one at a time and only as needed. *
[/edit]

[Kernel32.dll]
ActivateActCtx=f2e
CreateActCtxA=t1e
CreateActCtxW=t1e
DeactivateActCtx=f2e
FindActCtxSectionStringA=f5e
FindActCtxSectionStringW=f5e
GetGeoInfoA=z5e
GetGeoInfoW=z5e
GetUserGeoID=t1
GetVolumeNameForVolumeMountPointA=z3e
GetVolumeNameForVolumeMountPointW=z3e
HeapQueryInformation=f5e
InitializeSListHead=f1
InterlockedFlushSList=f1
InterlockedPopEntrySList=f1
InterlockedPushEntrySList=f2
QueryDepthSList=f1
ReleaseActCtx=f1

By the way, sections don't need to be in alphabetical order but there should be no duplicates.

Function definitions should be sorted, but Kexstubs will bubble-sort them (then reorder the strings) if they are not.

This post has been edited by jumper: 11 July 2012 - 02:14 AM


#11 User is offline   jumper 

  • Masters HJ/TJ'er (back in training)
  • PipPipPip
  • Group: Members
  • Posts: 361
  • Joined: 21-January 11
  • OS:98SE
  • Country: Country Flag

Posted 09 July 2012 - 08:20 PM

View Postloblo, on 09 July 2012 - 03:47 PM, said:

This looks like a great addition to KernelEx but despite I haven't tried it yet there is something I don't quite like about it and that is the need to reboot/restart windows for changes in the ini file to apply. Do you think you could do something about it?

I didn't like the idea of needing to restart, either, but trying to avoid it delayed the release by weeks.

I was unable to avoid the fact that KernelEx only loads support DLL's at startup. Even if it were possible to unload and then reload KernelEx like a USB device driver, unloading it would require the termination of all clients and that would pretty much shut down Windows anyway. :(

The next version of Kexstubs, however, will allow for the redefinition of stubs with just the restart of any app that needs the new definition. This will allow for experimentation with various return values and LastError codes without a system restart. :)

#12 User is offline   MiKl 

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

Posted 10 July 2012 - 09:11 AM

View Postschwups, on 09 July 2012 - 01:46 AM, said:

3. Stubs.ini "[Kernel32.dll] GetSystemWow64DirectoryA=z3e" entry works for Java updates 33 and 34 (next release). Tested with the msi.

:thumbup


Hi Schwups and Jumper,

thanks for the above ! So far I just started with only update 32.
It seem to have installed fine on my win98se but I noticed that the control panel where one should deactivate the next generation plug-in is gone. Is it the same on your system ?

Jumper, can you please have a look on OpenOffice !? I have version 3.2 installed and with kstub running it unfortunately won't start. There was an error message about runtime and msvcr90.dll.

Best,

Mikl

This post has been edited by MiKl: 10 July 2012 - 09:38 AM


#13 User is offline   schwups 

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

Posted 10 July 2012 - 09:22 AM

4. SuperAntiSpyware version 4.56 : The folderselection for custom scan now works.

I've managed to start  version 5.0 with Win 2kSP4 mode (XP mode should do it, too). New entry in stubs.ini: [Netapi32.dll] NetUseEnum=04 > rather guessed not known

First start: The folderselection for custom scan works. After the definitions update has finished the system crashed.



#14 User is offline   schwups 

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

Posted 10 July 2012 - 03:01 PM

View PostMiKl, on 10 July 2012 - 09:11 AM, said:

View Postschwups, on 09 July 2012 - 01:46 AM, said:

3. Stubs.ini "[Kernel32.dll] GetSystemWow64DirectoryA=z3e" entry works for Java updates 33 and 34 (next release). Tested with the msi.

:thumbup


Hi Schwups and Jumper,

thanks for the above ! So far I just started with only update 32.
It seem to have installed fine on my win98se but I noticed that the control panel where one should deactivate the next generation plug-in is gone. Is it the same on your system ?

Jumper, can you please have a look on OpenOffice !? I have version 3.2 installed and with kstub running it unfortunately won't start. There was an error message about runtime and msvcr90.dll.

Best,

Mikl


Copy "javacpl.cpl" (C:\Programme\Java\jre6\bin) in your system folder and it should appear in your control panel.


OpenOffice 3.2.1: You must copy the VisualC++ red 2008 files (MSVCM90.DLL; MSVCP90.DLL; MSVCR90.DLL) of the system folder in your system32 folder.  

This post has been edited by schwups: 10 July 2012 - 03:13 PM


#15 User is offline   schwups 

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

Posted 10 July 2012 - 04:34 PM

 Yes there seem to be a problem with the update  - post 10. I couldn't install OO 3.2.1. Message: The I/O operation has been aborted, because either a thread exit or an application request. After I had deleted the update the setup has worked fine and OO has started. 

This post has been edited by schwups: 10 July 2012 - 04:37 PM


#16 User is offline   jds 

  • -DOS+
  • PipPipPipPip
  • Group: Members
  • Posts: 595
  • Joined: 03-June 08
  • OS:98SE
  • Country: Country Flag

Posted 10 July 2012 - 11:34 PM

View Postschwups, on 10 July 2012 - 04:34 PM, said:

 Yes there seem to be a problem with the update  - post #10. I couldn't install OO 3.2.1. Message: The I/O operation has been aborted, because either a thread exit or an application request. After I had deleted the update the setup has worked fine and OO has started. 

I also had problems after the post 10 update :

SAP GUI for Java client produced :

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=1845e578 EBP=1845e5ac
ECX=ffffff64 DS=018f ESI=7813221e FS=4f2f
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:
78132236 01d7dfc2 00000000 78130000 81da92d4 0000000a 00000004 1845e57c 1845e390 1845e774 78138ced 61897136 fffffffe 1845e784 78132348 78130000

OO 3.2.1 (opening an XLSX file) produced :

Microsoft Visual C++ Runtime Library

Runtime Error!

Program .....\SCALC.EXE

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

Joe.

This post has been edited by jds: 16 July 2012 - 03:31 AM


#17 User is offline   jumper 

  • Masters HJ/TJ'er (back in training)
  • PipPipPip
  • Group: Members
  • Posts: 361
  • Joined: 21-January 11
  • OS:98SE
  • Country: Country Flag

Posted 11 July 2012 - 02:11 AM

Good testing guys. I've added a warning to post #10.

These definitions are intended to help the MSVC2010 CRT's so I'm surprised that they affect the 2008 CRT's. Can someone confirm with a process viewer what version of the CRT's are loaded in OO3.2.1 or other apps when the failure occurs?

loblo had mentioned that "HeapQueryInformation -> SetLastError also seems to work but only when the function HeapSetInformation isn't also required".

Try using the updates and commenting out just the "HeapQueryInformation" definition. It that isn't the culprit, a binary search will be needed--comment out half the remaining new definitions on each try.



Unlike core.ini, stubs.ini supports both line and section comments. A semicolon (';') in front of a section name comments out the whole section. In front of a line, it comments out the whole line. Comments can also be place at the end of any line. For C/C++ programmers, a double-slash ("//") should also work. And for batch file programmers, a double-colon ("::"). (Okay, actually it's any character <= ';')

In core.ini, there are no line or end-of-line comments. Whole sections can be commented out by inserting a semicolon (';') before the section name. To comment out a line, I move it to the bottom of the section, then insert a new line with the section header "[;]" above it.

#18 User is offline   schwups 

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

Posted 11 July 2012 - 04:07 AM

 "[Kernel32.dll] GetSystemWow64DirectoryA=z3e" works for Java 6 updates 32/33/34 installation, but Foxit Reader 5.x crashed on start. 

Spoiler



 

This post has been edited by schwups: 16 February 2013 - 05:19 PM


#19 User is offline   schwups 

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

Posted 11 July 2012 - 07:27 AM

5.  I've successfully installed GoogleEarth 6.0.2.2074 (03.23.11) with comp. mode Win2000 and  it has started (comp. mode Win2000) fine, but only in directX mode. Testet only a short time.

Streetview works,too. GE doesn't run with openGL mode. Driver Nvidia 82.69 mdgx. I believe it will run with the driver 82.16 for OpenGL. I guess the same behaviour as for version 5.2. 

Graphics card here Nvidia 5900XT. Latest versions I'll try the next days.

This post has been edited by schwups: 11 July 2012 - 07:28 AM


#20 User is offline   schwups 

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

Posted 11 July 2012 - 03:01 PM

[quote name='jumper' timestamp='1341994263' post='1003616']
Good testing guys. I've added a warning to post #10.

These definitions are intended to help the MSVC2010 CRT's so I'm surprised that they affect the 2008 CRT's.  Can someone confirm with a process viewer what version of the CRT's are loaded in OO3.2.1 or other apps when the failure occurs?
OO3.2.1: Modules (Process Viewer)

PATROLPRO.DLL 01210000 61440 21.12.2011 22:51 C:\PROGRAMME\BILLP STUDIOS\WINPATROL\PATROLPRO.DLL WinPatrol Helper DLL 1.4.0.0. Copyright © 2005-2007 BillP Studios
KSTUB626.DLL 10000000 65536 10.07.2012 14:40 C:\WINDOWS\KERNELEX\KSTUB626.DLL
KEXBASEN.DLL 7d000000 98304 14.11.2011 22:28 C:\WINDOWS\KERNELEX\KEXBASEN.DLL KernelEx Base Non-shared Api Library 4.5.2. Copyright © 2009-2010, Xeno86
KERNELEX.DLL bfa00000 53248 14.11.2011 22:28 C:\WINDOWS\KERNELEX\KERNELEX.DLL KernelEx Core 4.5.2. Copyright © 2009-2010, Xeno86
KEXBASES.DLL bfa40000 229376 14.11.2011 22:29 C:\WINDOWS\KERNELEX\KEXBASES.DLL KernelEx Base Shared Api Library 4.5.2. Copyright © 2009-2010, Xeno86
VERSION.DLL bfe50000 24576 14.04.2011 23:44 C:\WINDOWS\SYSTEM\VERSION.DLL Win32 VERSION core component 4.90.3000. Copyright © Microsoft Corp. 1991-1998
USER32.DLL bfc00000 69632 15.04.2011 11:13 C:\WINDOWS\SYSTEM\USER32.DLL Win32 USER32 core component 4.90.3000. Copyright © Microsoft Corp. 1991-1998
GDI32.DLL bff20000 172032 25.10.2011 21:45 C:\WINDOWS\SYSTEM\GDI32.DLL Win32 GDI core component 4.90.3000. Copyright © Microsoft Corp. 1991-1998
ADVAPI32.DLL bfe60000 65536 14.04.2011 23:43 C:\WINDOWS\SYSTEM\ADVAPI32.DLL Win32 ADVAPI32 core component 4.90.3000. Copyright © Microsoft Corp. 1991-1998
KERNEL32.DLL bff60000 536576 25.10.2011 21:45 C:\WINDOWS\SYSTEM\KERNEL32.DLL Win32 Kernel core component 4.90.3000. Copyright © Microsoft Corp. 1991-2000
COMCTL32.DLL bfb70000 557056 25.10.2011 21:44 C:\WINDOWS\SYSTEM\COMCTL32.DLL Common Controls Library 5.50.4916.400. Copyright © Microsoft Corp. 1981-2001
SHLWAPI.DLL 70bd0000 413696 29.08.2002 09:26 C:\WINDOWS\SYSTEM\SHLWAPI.DLL Shell Light-weight Utility Library 6.00.2800.1106. © Microsoft Corporation. Alle Rechte vorbehalten.
MSVCRT.DLL 78000000 282624 25.10.2011 21:45 C:\WINDOWS\SYSTEM\MSVCRT.DLL Microsoft ® C Runtime Library 6.10.9848.0. Copyright © Microsoft Corp. 1981-1999
SHELL32.DLL 7fbd0000 2285568 25.10.2011 21:45 C:\WINDOWS\SYSTEM\SHELL32.DLL Windows Shell Common Dll 5.50.4134.120. Copyright © Microsoft Corp. 1981-2000
MSVCR90.DLL 78520000 667648 07.11.2007 01:19 C:\WINDOWS\SYSTEM\MSVCR90.DLL Microsoft® C Runtime Library 9.00.21022.8. © Microsoft Corporation. All rights reserved.
SOFFICE.EXE 00400000 11329536 20.05.2010 23:59 C:\PROGRAMME\OPENOFFICE.ORG 3\PROGRAM\SOFFICE.EXE OpenOffice.org 3.2 3.02.9498. Copyright © 2000-2010 by Oracle, Inc.



Error messages:


Microsoft Visual C++ Runtime Library

Runtime Error!

Program .....\SOFFICE.EXE

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


------------------


Error starting Program

The MSVCR90.dll file cannot start. Check the file to determine the problem.



Share this topic:


  • 12 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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



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