Jump to content

Use Win98 user32.dll and user.exe in Win95


NoNameNeeded

Recommended Posts

I can't comment on the other Export Patchers, but there is a bug in KERNEL32.DLL that can cause a problem with using Redirected Exports in Windows 98SE. This is not a problem in XP so it works for Dibya.

Link to comment
Share on other sites


7 hours ago, rloew said:

My DLLHOOK Program intercepts the system Import resolver and provides an alternative Address. You can redirect the problem Import to your replacement DLL using a DLLHOOK.INI File.
My MODEXP Program allows you to add, change, or delete Exports. You can add a Redirection Export to the original pointing to your replacement DLL. A KERNEL32.DLL Patch to fix a bug, is needed in most cases under Windows 98 for this to work.

You would probably need to Compile a Replacement DLL unless you can find a suitable Stub or Function in some existing DLL.

Sounds quite complicated to me.

But the dllhook program seems to be less intrusive to me.

How can I add a redirection export to a file?
 

Link to comment
Share on other sites

So, all I could do was to copy that function to the empty dll and then I used this import adder to tell the application to look for this dll file but the application will not start. It only complains about a missing function in user32.dll (the one I added to the dllfile1.dll).

So obviously the application either isn't aware of the new dll file or it expects this function to reside in user32.dll or something like that. Or maybe something completely different.

ScreenShot 511.jpg

Link to comment
Share on other sites

The missing import is tied to USER32.DLL. Adding another import, even with the same name, will not resolve it.

A redirection Export can be added, to USER32.DLL in this case, with my MODEXP Program or equivalent. It has to specify the DLL and the new name of the Import, such as DLLFILE.Stub1

DLLHOOK does the same thing without Patching any Files. It uses a similar method to KernelEx.

Link to comment
Share on other sites

@NoNameNeeded

Of course it complains about a missing function because it have different address and procedure that call

this fuctuion have to be patched.

For example: Procedure from app call MesageBoxA and it is at 000ABCDEFG But function in your impoted module is at defferent address e.g. 000ABCDEFH

So you need to change that address in procedure that calls it.

And please be patient, i will make some videos as soon as i find some free time.

Link to comment
Share on other sites

The addresses in my file only consist of 4 digits (like 0244) but moving the function to this address didn't change anything either.

But whatever, that's way above my head.

I didn't intend to reinvent Windows, I only wanted to add that one function but it doesn't work.

I'll accept that.

Link to comment
Share on other sites

Imports are stored in a two level tree.

The first level is the Library (DLL or SYS) File. The second is the Function Name. Function names do not need to be Unique across Libraries although they usually are.

The 4 digit number stored with the Function Name is not an Address. It is an Ordinal Hint to speed up searching for the matching Export during Loading.

The actual Address is not known until after the Import is resolved. This resolved Address is inserted into the Memory Image of the Import Table. Code that uses this Import make Indirect Calls through the in-memory Import Table Entry.

This structure makes editing the Import Table much more complicated.

Link to comment
Share on other sites

I'm not sure what you are asking.

The Import is resolved during loading to point to the Address Exported by the Destination Library. That Address is the location of the corresponding Code in RAM when the Library is loaded.

You don't specify an Address unless you embed the Code in your Program and eliminate the Import.

Link to comment
Share on other sites

Well, I don't think I will be able to succeed in what I was trying to do anyway so if anyone is really bored and always wanted to get an application for Win98 to run on Win95, here is your chance!

:D


I've uploaded the application and both the original user32.dll and the one from Win98.

http://members.kabsi.at/LIGHTYEAR/user32.zip

Link to comment
Share on other sites

Ok, thx a lot for your detailed explanation video!

But unfortunately I couldn't get the application to run.

First of all, I had the problem that there were actually three functions of the same name, so I had to redirect all three of them.

I think I did that correctly and I also added the dll file to the exe file but when I try to open that application in Win95, it still complains about a missing function in user32.dll so it doesn't even seem to bother to look for that function in dll1.dll (the dll file with the added function).

I don't really know what's wrong.

Link to comment
Share on other sites

P.S. Maybe, I did something wrong when I copied the function from the user32.dll to the dll1 file?
To me, it looks correct, but how am I to know?
 

Could you explain how to correctly copy the function to the dll file?

Link to comment
Share on other sites

2 hours ago, NoNameNeeded said:

P.S. Maybe, I did something wrong when I copied the function from the user32.dll to the dll1 file?
To me, it looks correct, but how am I to know?

1. Yes, because my dllfile have no imports or exports it's just dll skeleton, so if you want to add forward exported fuctions to it

you have to import target dll to it, otherwise it would not be able to redirect calls to target dll.

2. I think it's not necessary to do this forward exporting stuff, it wold be enough to just rename win98 user32.dll and then import it to your application

and then just do for your missing functions this what i show in my video...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...