MSFN Forum: userenv.dll 0.0.3 for Windows 9x - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

userenv.dll 0.0.3 for Windows 9x Wrote a stub with some functions for X-Moto game Rate Topic: -----

#1 User is offline   M()zart 

  • Member
  • PipPip
  • Group: Members
  • Posts: 229
  • Joined: 17-June 08

Posted 18 October 2009 - 12:28 PM

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 File(s)


This post has been edited by M()zart: 16 November 2009 - 05:39 AM



#2 User is offline   Chozo4 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 392
  • Joined: 31-July 05

Posted 01 November 2009 - 02:56 AM

Quote

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 User is offline   M()zart 

  • Member
  • PipPip
  • Group: Members
  • Posts: 229
  • Joined: 17-June 08

Posted 01 November 2009 - 01:30 PM

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.

This post has been edited by M()zart: 01 November 2009 - 11:44 PM


#4 User is offline   M()zart 

  • Member
  • PipPip
  • Group: Members
  • Posts: 229
  • Joined: 17-June 08

Posted 02 November 2009 - 02:45 PM

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.

This post has been edited by M()zart: 02 November 2009 - 02:46 PM


#5 User is offline   PROBLEMCHYLD 

  • MSFN Addict
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,809
  • Joined: 07-October 05
  • OS:98SE
  • Country: Country Flag

Posted 03 November 2009 - 11:53 PM

Can you add ExpandEnvironmentStringsForUserW to your stub?

#6 User is offline   M()zart 

  • Member
  • PipPip
  • Group: Members
  • Posts: 229
  • Joined: 17-June 08

Posted 04 November 2009 - 05:12 AM

View PostPROBLEMCHYLD, on Nov 4 2009, 12:53 AM, said:

Can you add ExpandEnvironmentStringsForUserW to your stub?

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

#7 User is offline   PROBLEMCHYLD 

  • MSFN Addict
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,809
  • Joined: 07-October 05
  • OS:98SE
  • Country: Country Flag

Posted 04 November 2009 - 11:33 AM

View PostM()zart, on Nov 4 2009, 05:12 AM, said:

View PostPROBLEMCHYLD, on Nov 4 2009, 12:53 AM, said:

Can you add ExpandEnvironmentStringsForUserW to your stub?

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

Micro$oft Activesync 4.5

#8 User is offline   M()zart 

  • Member
  • PipPip
  • Group: Members
  • Posts: 229
  • Joined: 17-June 08

Posted 16 November 2009 - 05:49 AM

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 User is offline   kamahl 

  • Newbie
  • Group: Members
  • Posts: 34
  • Joined: 09-June 08

Posted 25 December 2009 - 05:21 PM

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:

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy