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

#51
jumper

jumper

    2014 All-American Masters HJ'er

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

After updating to 730 an IE script error occured in windows\web\controlp.htt, if I tried open the control panel. This happened on two of three machines.

Run => regsvr32 webvw.dll doesn't work. Downgrading to 626 fixed the error.

Probably one of the new definitions. First we need to look at what was reported in the Kstub730.log file. Each action is now logged. :sneaky:

The next thing would be to try the older definitions with Kstub730.dll. You can do this by removing Kstub730.ini--Kstub730 will use Kex stubs.ini if it doesn't find Kstub30.ini. (Kstub626.dll also has this feature.:yes:)

Edited by jumper, 08 August 2012 - 06:09 PM.

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


How to remove advertisement from MSFN

#52
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 417 posts
  • OS:ME
  • Country: Country Flag
Kstub730.log file:

= Shlwapi.dll:SHRegisterValidateTemplate=t2 ? =
= Kernel32.dll:GetUserGeoID=t1 =




#53
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 417 posts
  • OS:ME
  • Country: Country Flag
The next thing would be to try the older definitions with Kstub730.dll. You can do this by removing Kstub730.ini--Kstub730 will use Kexstubs.ini if it doesn't find Kstub30.ini. (Kstub626.dll also has this feature.

Do you mean Kexstubs.ini = stubs.ini of version 626 and I have to paste it in the KernelEx folder? If so, then I always get questions of Kexstub730 before opening a new Explorer window: 

Shlwapi.dll:SHRegisterValidateTemplate=t2?


SetLastError (1/0)    [Yes/No]

more options            [Cancel]

and

Shlwapi.dll:SHRegisterValidateTemplate=t2?

return -1/0                  [Yes/no]

more options            [Cancel]


Edited by schwups, 08 August 2012 - 05:10 AM.


#54
jumper

jumper

    2014 All-American Masters HJ'er

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

Kstub730.log file:

= Shlwapi.dll:SHRegisterValidateTemplate=t2 ? =
= Kernel32.dll:GetUserGeoID=t1 =

Both of these definitions already existed, so the problem is likely a definition that was removed. I'll address that in the next post.

Using this Table of Geographical Locations, we can now upgrade GetUserGeoID from GEOID_NOT_AVAILABLE (-1), to:
[Kernel32.dll]
GetUserGeoID=r0xF4s1 ;US
; or
GetUserGeoID=r0x5Es1 ;Germany

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

#55
jumper

jumper

    2014 All-American Masters HJ'er

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

Do you mean Kexstubs.ini = stubs.ini of version 626 and I have to paste it in the KernelEx folder?

Yes, or leave it if it is still there. I'll correct post #51. Thanks!

If so, then I always get questions of Kexstub730 before opening a new Explorer window:

Shlwapi.dll:SHRegisterValidateTemplate=t2?

SetLastError (1/0) [Yes/No]
more options [Cancel]

and

Shlwapi.dll:SHRegisterValidateTemplate=t2?

return -1/0 [Yes/no]
more options [Cancel]

The prompt occurs because Kstub730 supports the '?' directive (whereas Kstub626 did not):
; =r#s#[e[#]][?]
Remove the '?' to use the 't2' without prompting.

I added the '?' because the function is undocumented and the 't' was a guess. Users can try 'f2' or 'r<n>s2' to change the return value. An 'e' can also be tried. This is the purpose of the prompt sequence: to be able to experiment with different options without restarting the app. When prompted, Cancel+Yes is equivalent to 't2'--what combinations of responses have or haven't worked for you?


SHRegisterValidateTemplate was first introduced in Windows 2000, so you are using a W2K+ file somewhere in your WinMe(?) system. This isn't a bad thing, but it would be good to know what file is making the call. Please search your <WinSys> folder for files containing "SHRegisterValidateTemplate". Also, check what modules are in use by Explorer at the time of this prompt. Does your system that is not having a problem happen to be SE, or not have all the same SP's/upgrades?

Thanks for the report and good followup! :thumbup
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

#56
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 417 posts
  • OS:ME
  • Country: Country Flag
what combinations of responses have or haven't worked for you?

All combinations work to open a folder, but no combination work to open the control panel.




Does your system that is not having a problem happen to be SE, or not have all the same SP's/upgrades?

I corrected the post #50. The IE script error occurred on all three Win ME test systems. The SP1 isn't installed.


Installed: 1. IE6 SP1  2. DirectX9c  3. NetFramework 1.1 and 2.0    4. unicows.dll (1.1.3790.0)    5. VisualBasic 6.0 SP6 (vbrun60sp6.exe)    6.  MDAC 2.81 SP1   7.  VisualC++ red 2005 (SP) and 2008  8. MS Win ME Update User / GDI    9. GDIPLUS (WinXP)   

Edited by schwups, 09 August 2012 - 10:18 AM.


#57
schwups

schwups

    schwups

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

After updating to 730 an IE script error occured in windows\web\controlp.htt, if I tried open the control panel. This happened on two of three machines.  

Run => regsvr32 webvw.dll doesn't work. Downgrading to 626 fixed the error.




Alteration of the sequence in the core.ini from "contends=std,kexbases,kexbasen,Kstub730" to "contents=Kstub730,std,kexbases,kexbasen" solves the problem.  :rolleyes:

Edited by schwups, 10 August 2012 - 10:32 AM.


#58
jumper

jumper

    2014 All-American Masters HJ'er

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

Alteration of the sequence in the core.ini from "contends=std,kexbases,kexbasen,Kstub730" to "contents=Kstub730,std,kexbases,kexbasen" solves the problem. :rolleyes:

Very good. This means that one of the definitions is colliding with a standard function or one in kexbases or kexbasen. I wasn't aware of any with SE other than the intentional PrintDlgEx, but will recheck.

Testload.exe can be used to detect collisions (load addresses of functions in stubs.ini above 0x10001nnn), but I'll design a better tool.

The reason for increasing the priority of Kstub730 was to override KernelEx on ComDlg32:PrintDlgExA/W. That can also be done with a .names definition in Core.ini:
[NT2K.names]
ComDlg32.PrintDlgExA=Kstub730.0
ComDlg32.PrintDlgExW=Kstub730.0
I've now rechecked for conflicts using TestLoad and found none on my SE system, but the Msvcr90.dll section would probably be an issue for those with the latest version installed (definitions are meant to augment the original version). Before Kstub730, [Msvcr90.dll] was missing the '0'.

Edited by jumper, 10 August 2012 - 09:03 PM.

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

#59
jumper

jumper

    2014 All-American Masters HJ'er

  • Member
  • PipPipPip
  • 476 posts
  • OS:98SE
  • Country: Country Flag
Kstubs816 now posted with better forwarding, better definitions

+ Forwards can now be abbreviated and commented
+ Many new forward definitions providing full function support
+ Complete definitions for all stubbed functions
- Stepload support removed

Note: Full-line comments got broken last week when I was trying a trick to avoid needing system restarts in some cases. The workaround is to remove from Kstub816.ini / stubs.ini all definitions that are commented out. I've posted a new download with the updated Kstub816.ini.

Edit: 822 is what 816 was supposed to be. It has the same features, but without the full-line and end-of-forwards-line comment bugs.

Edited by jumper, 23 August 2012 - 03:16 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

#60
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 417 posts
  • OS:ME
  • Country: Country Flag
So far I can't see any problems with version 816, if the sequence in the core.ini is: "contents=Kstub816,std,kexbases,kexbasen"

#61
jds

jds

    -DOS+

  • Member
  • PipPipPipPip
  • 603 posts
  • OS:98SE
  • Country: Country Flag

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, 23 August 2012 - 11:12 PM.


#62
schwups

schwups

    schwups

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


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.









#63
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 417 posts
  • OS:ME
  • Country: Country Flag
A new function must be added for Opera 12.5 alpha build 1546:


[IPHLPAPI.DLL]
GetAdaptersAddresses


It isn't necessary for build 1513.






#64
MiKl

MiKl

    Member

  • Member
  • PipPip
  • 110 posts
  • OS:98SE
  • Country: Country Flag

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 ?

#65
jumper

jumper

    2014 All-American Masters HJ'er

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

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:
  • 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.
  • 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'
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

#66
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 417 posts
  • OS:ME
  • Country: Country Flag
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, 27 August 2012 - 04:59 PM.


#67
jumper

jumper

    2014 All-American Masters HJ'er

  • Member
  • PipPipPip
  • 476 posts
  • OS:98SE
  • Country: Country Flag
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:
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

#68
jumper

jumper

    2014 All-American Masters HJ'er

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


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

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

#69
schwups

schwups

    schwups

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



#70
rainyd

rainyd

    Advanced Member

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

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?

#71
schwups

schwups

    schwups

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


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:



#72
jumper

jumper

    2014 All-American Masters HJ'er

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

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. Posted Image

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.
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

#73
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 417 posts
  • OS:ME
  • Country: Country Flag
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, 29 August 2012 - 06:43 PM.


#74
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 417 posts
  • OS:ME
  • Country: Country Flag
Firefox 13 - 15 doesn't start (comp. mode XP). Firefox causes an error in MSVCR100.dll. Kstub822.log: = Kernel32.dll:InitializeSListHead=f1 =



#75
schwups

schwups

    schwups

  • Member
  • PipPipPip
  • 417 posts
  • OS:ME
  • Country: Country Flag
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, 13 September 2012 - 04:49 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN