Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
NoNameNeeded

Use Win98 user32.dll and user.exe in Win95

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.

Share this post


Link to post
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?
 

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

But why did ABCDEFG say that I've probably used the wrong address if I don't have to specify any address?

 

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...