Jump to content

Use Win98 user32.dll and user.exe in Win95


NoNameNeeded

Recommended Posts

Well, of course I added this function to the dll file.

But I've tested it now.

On Win98 it works just fine. The application uses the function from the dll1.dll file. I've tested this by removing the function again and the application complains about dll1.dll missing that function (which makes perfect sense and proves that the application checks the dll1.dll file for that function)

So, as it seems I did everything correctly as far as this import/export/redirecting stuff is concerned.

The application just doesn't work on Win95 and as it seems, it doesn't even bother to check that dll1.dll. It just complains about a missing function in user32.dll

Strange but true.

Link to comment
Share on other sites


That's because missing function is still in the imports list, you need to "open" your application into HEX editor and rename this missing function to name of some unused function from user32.dll

for example "PaintDesktop" or some other unused function, and that will do the trick.

1YKFVCz.png

Edited by ABCDEFG
Link to comment
Share on other sites

Oh, interesting.

But I don't know how to replace the name of the function.

I've tried it in several different ways but when I save the file as an exe file the icon is gone and Windows says it's not a valid file so how am I supposed to change it?
 

Link to comment
Share on other sites

Probably because you change size of application. Overwrite name letter by letter! Do not use insert / copy&paste method!

And it must be NULL terminated string

54 72 61 63 6B 4D 6F 75 73 65 45 76 65 6E 74 00 00 - TrackMouseEvent
50 61 69 6E 74 44 65 73 6B 74 6F 70 00 00 00 00 00 - PaintDesktop
Link to comment
Share on other sites

That's cumbersome...

It worked now by manually typing it but the application still doesn't work because now there is an error message complaining about a missing function in dll1.dll

Guess which function...
PaintDesktop!
;)

Are you sure it works this way?
 

Link to comment
Share on other sites

 I don't know which file it really uses, but the error message says that there is a missing function in user32.dll and its name is TrackMouseEvent

That's why I started the whole thread and I can only rely on what Windows and dependency walker tells me.

All I know is that it's now looking for PaintDesktop in dll1.dll and even though I really don't know much about this stuff, it kinda makes sense to me, because I pointed it to this function by editing the application, so no big surprise...

Edited by NoNameNeeded
Link to comment
Share on other sites

I just cheked it about 1hour ago and i saw that it does not use that function from user32.dll

so, forward exported functions and additional dlls are not needed for foxit reader.

Link to comment
Share on other sites

But the application thinks it needs this function from user32.dll and won't start without it.

And this redirection stuff only seems to work if there is the same function in user32.dll (like in Win98), which makes no sense, because why would anyone bother to redirect this function if the application still looks for it in its original place?

Link to comment
Share on other sites

...or to put it differently:
Even though this redirection process seems to have worked, there is apparently more that needs to be done because there are still references to this function in user32.dll, even after redirecting.

So these other references apparently also need to be changed to the new dll and just renaming the function to another missing function doesn't seem to help.

Link to comment
Share on other sites

User32.dll : TrackMouseEvent takes one parameter, returns a BOOL (boolean), and sets extended error information.
GetWindowInfo takes two parameters and will corrupt the stack if called when used to replace TrackMouseEvent.

Instead use one of the following:
  CloseDesktop
  CloseWindow
  CopyIcon
  DestroyCursor
  DestroyIcon
  DestroyMenu
  DestroyWindow
  DrawMenuBar
  GetDlgCtrlID
  GetKeyboardType

Do not attempt to use User32.dll from Win98 in Win95.
Do not attempt to redirect DLL's in Win95.

Edited by jumper
Link to comment
Share on other sites

7 hours ago, jumper said:

Do not attempt to use User32.dll from Win98 in Win95.
Do not attempt to redirect DLL's in Win95.
 

Thx for your information!

No, user32.dll from Win98 doesn't work in Win95 anyway, I've tried that even though I didn't expect it to work and I was right.

However, I have another user32.dll from a beta version of Win98, which does work (if replaced together with user.exe from that same build). That's how I found out that several applications would actually work with just a little bit of more functions in user32.dll and that's basically why I started this thread.

So it's in general a bad idea to redirect dlls in Win95?

Why?

Doesn't it work or are applications very prone to crash when redirected?
-------


Could you name a few safe "replacement" functions for kernel32.dll?

Edited by NoNameNeeded
Link to comment
Share on other sites

  • 4 years later...

It is somewere in my archive but i don't know where exactly beacause my archive is ~100TB and

is not well organised so i can not find it right now, but if you need something specific to do just say it,

maybe i can help or someone else...

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