Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

userenv.dll 0.0.3 for Windows 9x

- - - - -

  • Please log in to reply
10 replies to this topic

#1
M()zart

M()zart

    Member

  • Member
  • PipPip
  • 284 posts
  • Joined 17-June 08
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.

Attached Files


Edited by M()zart, 16 November 2009 - 05:39 AM.



How to remove advertisement from MSFN

#2
Chozo4

Chozo4

    Advanced Member

  • Member
  • PipPipPip
  • 370 posts
  • Joined 31-July 05

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.

#3
M()zart

M()zart

    Member

  • Member
  • PipPip
  • 284 posts
  • Joined 17-June 08
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, 01 November 2009 - 11:44 PM.


#4
M()zart

M()zart

    Member

  • Member
  • PipPip
  • 284 posts
  • Joined 17-June 08
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, 02 November 2009 - 02:46 PM.


#5
PROBLEMCHYLD

PROBLEMCHYLD

    The Resurrector for old Windows OS

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,431 posts
  • Joined 07-October 05
  • OS:98SE
  • Country: Country Flag
Can you add ExpandEnvironmentStringsForUserW to your stub?

Believe God is the Alpha and Omega.
Believe Jesus Christ died for our sins.
Repent for your sins now or there will be
BLOOD

The Path to God


U98SESP3 03-11-2013


#6
M()zart

M()zart

    Member

  • Member
  • PipPip
  • 284 posts
  • Joined 17-June 08

Can you add ExpandEnvironmentStringsForUserW to your stub?

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

#7
PROBLEMCHYLD

PROBLEMCHYLD

    The Resurrector for old Windows OS

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,431 posts
  • Joined 07-October 05
  • OS:98SE
  • Country: Country Flag

Can you add ExpandEnvironmentStringsForUserW to your stub?

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

Micro$oft Activesync 4.5

Believe God is the Alpha and Omega.
Believe Jesus Christ died for our sins.
Repent for your sins now or there will be
BLOOD

The Path to God


U98SESP3 03-11-2013


#8
M()zart

M()zart

    Member

  • Member
  • PipPip
  • 284 posts
  • Joined 17-June 08
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.

#9
kamahl

kamahl

    Newbie

  • Member
  • 24 posts
  • Joined 09-June 08
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:
Images in signatures shall NOT exceed a total of 300x100 and 80kb.

#10
PROBLEMCHYLD

PROBLEMCHYLD

    The Resurrector for old Windows OS

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,431 posts
  • Joined 07-October 05
  • OS:98SE
  • Country: Country Flag

Have you given up on this?


Edited by PROBLEMCHYLD, 03 March 2014 - 01:06 PM.

Believe God is the Alpha and Omega.
Believe Jesus Christ died for our sins.
Repent for your sins now or there will be
BLOOD

The Path to God


U98SESP3 03-11-2013


#11
M()zart

M()zart

    Member

  • Member
  • PipPip
  • 284 posts
  • Joined 17-June 08

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 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users