• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
M()zart

userenv.dll 0.0.3 for Windows 9x

11 posts in this topic

I have created userenv.dll (an NT only dll) for Windows 9x. The dll is currently intended to work with single-user Windows 9x (user profiles disabled). It may not work as expected in multi-user Windows 9x. The profile folder is considered the same as Windows folder.

0.0.1

GetAllUsersProfileDirectory

GetDefaultUserProfileDirectory

GetUserProfileDirectory

both ANSI and Unicode versions.

0.0.2

Added:

CreateEnvironmentBlock

DestroyEnvironmentBlock

LoadUserProfile (a bit incorrect implementation, but should work)

UnloadUserProfile

0.0.3

Added:

ExpandEnvironmentStringsForUser

Stubbed

DeleteProfile

With this dll and KernelEx, X-Moto open-source game ( http://xmoto.sourceforge.net/ ) can be run on Windows 98.

Currently I have not seen other application, that can be launched on Windows 98 with this DLL (and KernelEx) and cannot be launched without it. If you can use it for other apps, please write here. If you need other functions to be implemented or stubbed in this dll, write here too, I'll try.

userenv.zip

Edited by M()zart
0

Share this post


Link to post
Share on other sites
If you need other functions to be implemented or stubbed in this dll, write here too, I'll try.

Found one of those rarities that need another API in userenv.dll to function. The theme configurators for the latest RainMeter v1.1 call for the following API and will not run as a result:

USERENV.DLL

LoadUserProfileW

It's just the themes configurators that seem to require it and doesn't affect the normal skin/plugin portion of the program as those don't call for it.

0

Share this post


Link to post
Share on other sites

OK, I'll try to implement it. It's a bit harder, but possible. I have already studied other API, this one can be fully implemented. In a few days, may be a week if I will be too busy.

Oups, I meant another function. Not sure if I can implement this. But I'll try.

Edited by M()zart
0

Share this post


Link to post
Share on other sites

Userenv.dll ver 0.0.2 (download link in the first post).

Added:

CreateEnvironmentBlock

DestroyEnvironmentBlock

LoadUserProfile (a bit incorrect implementation, but should work)

UnloadUserProfile

Though I doubt that anybody need it. Chozo4, as I see, the theme configurators for the latest RainMeter v1.1 need other missing APIs in advapi32.dll (InitiateSystemShutdownExW and CreateProcessWithLogon) and in Kernel32.dll (GetProcessIoCounters or something like this, may be this names are not correct), that are currently not implemented in KernelEx. So it will not work under Windows 98 regardless of userenv.dll.

Edited by M()zart
0

Share this post


Link to post
Share on other sites

Can you add ExpandEnvironmentStringsForUserW to your stub?

0

Share this post


Link to post
Share on other sites
Can you add ExpandEnvironmentStringsForUserW to your stub?

I'll try. Which app do you need it for?

0

Share this post


Link to post
Share on other sites
Can you add ExpandEnvironmentStringsForUserW to your stub?

I'll try. Which app do you need it for?

Micro$oft Activesync 4.5

0

Share this post


Link to post
Share on other sites

Userenv.dll ver 0.0.3 (download link in the first post).

Added:

ExpandEnvironmentStringsForUser

Stubbed

DeleteProfile

Code is far from perfect and needs much rewriting.

PROBLEMCHYLD, I'm not sure if the Micro$oft Activesync 4.5 will work even with this dll. It contains several .sys files with dependecies to ntoskrnl.exe. But you may still try. Write here about your experiences.

When I started this project I was not aware about multiuser Windows 9x, so this dll may not work with such systems as expected. Please sombody tell me how can I programmatically verify if the user profiles are enabled, to change the dll behavior.

0

Share this post


Link to post
Share on other sites

You could check the location of the Application Data folder and check it in relation with the windows folder.

IE: If %appdata% is in "%windir%/Application Data" it's single User, if it's not (%windir%/Profiles/*/Application Data), it's multiuser.

This is however a *very* bad way of doing it, and would probably fail with translated versions of windows. :whistle:

I'd have to start digging in the registry to work out if there's a simple way to measuring it.

Oh, and remember that even when multi-user is enabled, you can still hit cancel, and load up the single-user profile. :blink:

0

Share this post


Link to post
Share on other sites

Have you given up on this?

Edited by PROBLEMCHYLD
0

Share this post


Link to post
Share on other sites

A better version of userenv.dll (based on Wine sources) was included to KernelEx. After this I didn't see a reason to continue it.

0

Share this post


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