MSFN Forum: Add functions to kernel32.dll - MSFN Forum

Jump to content



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Add functions to kernel32.dll VirtualAllocEx, VirtualFreeEx, CreateRemoteThread Rate Topic: -----

#1 User is offline   LLXX 

  • MSFN Junkie
  • PipPipPipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 3,399
  • Joined: 04-December 05

Posted 26 February 2006 - 06:07 PM

This patch was given to me by an individual that wishes to remain anonymous. It patches the kernel32.dll in Windows 98 and 98SE to add support for the previously NT-only APIs VirtualAllocEx, VirtualFreeEx, and CreateRemoteThread. Might be useful in getting a few more NT-only programs to run on 9x.

Source code is included.

Attached File(s)




#2 User is offline   Chozo4 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 392
  • Joined: 31-July 05

Posted 26 February 2006 - 06:49 PM

I don't have any NT-Based programs that I know of which call those API's so am Unable to test the functionality. However, I have downloaded and installed the patch.

Confirmed that the exports were installed using ExeScope... So far so good. System still stable and no problems have cropped up. Whoever this anonymous person is, I would like to thank them for extending support of the 9X Kernel. It is a great thing to be able to add additional API support to the 9X kernel and would love to see additional extentions in the future.

Anyone who continues to support 9X have my highest regards. Thank you everyone and many many thanks to the anonymous submitter.

This post has been edited by Chozo4: 26 February 2006 - 07:00 PM


#3 User is offline   Tihiy 

  • god of the ancient world
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,285
  • Joined: 19-November 04

Posted 26 February 2006 - 11:59 PM

Excellent. :thumbup

#4 User is offline   PROBLEMCHYLD 

  • MSFN Addict
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,605
  • Joined: 07-October 05
  • OS:98SE
  • Country: Country Flag

Posted 27 February 2006 - 01:56 AM

installed it
Don't kno wut is does
but my computer still workin

#5 User is offline   LLXX 

  • MSFN Junkie
  • PipPipPipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 3,399
  • Joined: 04-December 05

Posted 27 February 2006 - 04:13 AM

View PostPROBLEMCHYLD, on Feb 27 2006, 01:56 AM, said:

installed it
Don't kno wut is does
but my computer still workin
It just adds three more functions to the kernel, so that some NT-only programs may be able to run. Pleased to hear your system is still working fine.

Any reports on system (in)stability are greatly appreciated. This is currently a beta-test, as I am considering to ask for inclusion of this into the next version of 98SE USP.

Coming soon in a few months: LARGE DISK SUPPORT! :)

This post has been edited by LLXX: 27 February 2006 - 04:17 AM


#6 User is offline   StateS 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 22-February 05

Posted 27 February 2006 - 04:25 AM

zis ist vonderbra just vonderbra :D you guys are really doing great with all of these modifications and stuff. Keep it up!!! :thumbup :thumbup :thumbup Three thumbs up for you.

#7 User is offline   LLXX 

  • MSFN Junkie
  • PipPipPipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 3,399
  • Joined: 04-December 05

Posted 27 February 2006 - 08:51 PM

Good to see no problems so far.

Keep posting whether it works or not, so that in the event of any system instability being noticed I can try to resolve the problem as soon as possible. This is still in beta stage.

#8 User is offline   Petr 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 981
  • Joined: 15-April 05
  • OS:98SE
  • Country: Country Flag

Posted 28 February 2006 - 12:52 AM

And what about SetFilePointerEx function required by Adobe Reader 7 (AcroRd32.exe, reader_sl.exe)?

Would it be sufficient to run Adobe Reader 7 or also function SHGetFolderPathA required by ACE.DLL (Adobe Color Engine) has to be added to shell32.dll?

Or even this would not help to run AR7?

To run Excel 2003 Viewer and Word 2003 viewr it would be necessary to add the following function:

missing functions in kernel32.dll
VerifyVersionInfoW (required by MSO.DLL)
VerSetConditionMask (required by MSO.DLL)
SetFilePointerEx (required by OSE.DLL)
GetFileSizeEx (required by OSE.DLL)
CreateHardLinkW (required by OSE.DLL)

missing function in user32.dll
GetLastInputInfo
AllowSetForegroundWindow
SetLayeredWindowAttributes
SHGetFolderLocation

missing functions in advapi32.dll
LsaClose
LsaStorePrivateData
LsaRetrievePrivateData
LsaNtStatusToWinError
LsaOpenPolicy
ConvertSidToStringSidW
DecryptFileW
EncryptFileW
ConvertStringSecurityDescriptorToSecurityDescriptorW
ConvertSidToStringSidA
CheckTokenMembership

Petr

#9 User is offline   eidenk 

  • MSFN Addict
  • PipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 1,527
  • Joined: 28-March 05

Posted 28 February 2006 - 09:29 AM

What about one for WinME also, LLX ?

#10 User is offline   LLXX 

  • MSFN Junkie
  • PipPipPipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 3,399
  • Joined: 04-December 05

Posted 28 February 2006 - 10:03 PM

Kernel32.dll
VerifyVersionInfoW (required by MSO.DLL) possible - but then what would 98SE identify itself as?
VerSetConditionMask (required by MSO.DLL) possible - see above
SetFilePointerEx (required by OSE.DLL) possible
GetFileSizeEx (required by OSE.DLL) possible
CreateHardLinkW (required by OSE.DLL) NTFS only, no chance

User32.dll
GetLastInputInfo probably unlikely
AllowSetForegroundWindow no functionality to be implemented
SetLayeredWindowAttributes too much work required to implement transparent windows

Shell32.dll
SHGetFolderLocation available in Windows ME shell32.dll (5.0 or later version)

AdvApi32.dll - All the functions below will require extensive work and thus won't be implemented - would a replacement ADVAPI32.DLL from a newer Windows version work?
LsaClose
LsaStorePrivateData
LsaRetrievePrivateData
LsaNtStatusToWinError
LsaOpenPolicy
ConvertSidToStringSidW
DecryptFileW
EncryptFileW
ConvertStringSecurityDescriptorToSecurityDescriptorW
ConvertSidToStringSidA
CheckTokenMembership

'eidenk said:

What about one for WinME also, LLX ?
This patch will also work on WinME if you disable the SFP, otherwise the original kernel will be restored.

This post has been edited by LLXX: 28 February 2006 - 10:12 PM


#11 User is offline   Tihiy 

  • god of the ancient world
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,285
  • Joined: 19-November 04

Posted 01 March 2006 - 01:07 AM

Well, LLXX, i'm not sure what it is so easy to add functions.
In the patch you've submitted, no new functions were added into export table - they were in 98 kernel, but unimplemented.
I know, adding functions to entry table is much harder. Are you sure that it is possible?

#12 User is offline   noguru 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 307
  • Joined: 24-February 06

Posted 03 March 2006 - 02:32 PM

Being new here I would like to thank al those skillful people overhere who keep updating and improving my old Win98se!

Sadly I must say that with this modified kernel I ran into a few problems. First I noticed that a dotnet 2.0 application (please dont ask, some sort of "hiding" thing) wasn't running anymore.

More important for me, I couldn't install a DVD-ram driver because my OS wasn't recognized, " Your OS is not suitable to install this software" ?
Not true offcourse. Is the date of my kernel32.dll, 27-02-06, causing this? Other programs install ok. I installed a new ZoneAlarm without a glitch.

Reverting back to original kernel32.dll from Win98 CD solved both these problems.
Hope that this info wil be of use.



off topic: A DVD-ram works fine with Win98, just like a very fast 4.6 gig floppydisk. See how capable this old OS still is!

#13 User is offline   Tihiy 

  • god of the ancient world
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,285
  • Joined: 19-November 04

Posted 03 March 2006 - 03:23 PM

I think that's because this patch modifies GetVersionInfoEx build number hi word to detect itself;
propertly written applications should never examine buld number hi word.

Better not to rely on GetVersionEx, i hope it'll be solved in next patch version (?).

#14 User is offline   PROBLEMCHYLD 

  • MSFN Addict
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,605
  • Joined: 07-October 05
  • OS:98SE
  • Country: Country Flag

Posted 20 March 2006 - 10:02 PM

Can we x-pec an update soon?

#15 User is offline   Fredledingue 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,139
  • Joined: 10-February 05
  • OS:98SE
  • Country: Country Flag

Posted 23 March 2006 - 02:12 AM

"XXLL" said:

Kernel32.dll
VerifyVersionInfoW (required by MSO.DLL) possible - but then what would 98SE identify itself as?


That's it! Now we are changing the kernel is it still w98?
Should it be recognized as NT-based (XP?!) ?
Should we install versions "for w98" or for "XP"?
Should the patch cheat installers by saying it's "XP" instead of 98?
How will react the "XP/2000-only" software community? Aren't they gonna be puzzled?

But awesome job anyway! Gonna test it soon! Thanks!

#16 User is offline   MDGx 

  • 98SE2ME + 98MP10
  • Group: Super Moderator
  • Posts: 2,677
  • Joined: 22-November 04
  • OS:none specified
  • Country: Country Flag

Posted 23 March 2006 - 12:08 PM

I have tested kernel32.dll with NTx enhancements.
Got an error when trying to install .Net Framework Redistributable (NFR), any version:
http://www.mdgx.com/add.htm#NFR
I had to restore original kernel32.dll file in order to install NFR. ;(

Hope this helps.

#17 User is offline   LLXX 

  • MSFN Junkie
  • PipPipPipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 3,399
  • Joined: 04-December 05

Posted 24 March 2006 - 10:02 PM

I probably won't be continuing development on this. I'm too busy with other things.

It's open-source and public domain, so you can easily fix it yourself ;)

#18 User is offline   PROBLEMCHYLD 

  • MSFN Addict
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,605
  • Joined: 07-October 05
  • OS:98SE
  • Country: Country Flag

Posted 25 March 2006 - 08:15 PM

Another gr8 project gone 2 waste.
Will somebody please continue 2 work on this project if possible?
This could be a big step 4 Win98 users

This post has been edited by PROBLEMCHYLD: 25 March 2006 - 08:54 PM


#19 User is offline   Xeno86 

  • KernelEx Creator
  • PipPip
  • Group: Members
  • Posts: 241
  • Joined: 26-March 06
  • OS:98SE
  • Country: Country Flag

Posted 26 March 2006 - 02:35 PM

WIN98UPDT0002


Hello to everyone!


I have been playing with this expansion pack for Windows 98 for the last week.

I have made it possible to add new exports into existing export table and also fixed other function which added modified export table at the end of the file.

Here are the results:
* add GlobalMemoryStatusEx() EXPERIMENTAL!
* removed GetVersionEx modification
- changed the way of checking if patch was previously applied - now checks if UPDATE section exists


Ofcourse it is still open-source :)

Now the bad things:
My implementation of GlobalMemoryStatusEx() seems to be quite buggy ;)
It works nice with NFS:MW and the provided testapp.exe but it does not with Q4 and Doom3 and also causes trouble with GCC.
For this reason there are two exe's inside - one which adds GlobalMemoryStatusEx() and one without it :)
Does anybody here know asm and is able to fix it?

Please test it with .Net apps which caused problems with previous version.
Also tell me whether "Method 1" (recommended) of adding new functions to export table works for you.

Cheers,
Xeno86

Attached File  win98updt0002.rar (61.96K)
Number of downloads: 135

#20 User is offline   Tihiy 

  • god of the ancient world
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,285
  • Joined: 19-November 04

Posted 26 March 2006 - 03:01 PM

Very nice! I'm impressed, but I can't test now: i'm falling asleep.
I'll explore into this tomorrow... Also, Xeno86, make sure you're targeting kernel32.dll 4.10.2225: it has significally less space between sections so i'm not sure in Method 1. :wub:

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

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



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