Jump to content

uxtheme.dll substitute


jds

Recommended Posts

I came across this interesting and potentially useful extension, a substitute for 'uxtheme.dll' which was introduced in XP. It's actually built from Wine sources, intended to fill the same hole in W2000, but according to Dependency Walker, it's fine for W98 too :

http://kzar.co.uk/blog/view/fixing-spotify-uxtheme.dll-error-on-windows-2000

This is also a potentially useful approach to filling other holes in W98's set of DLL's.

Joe.

Link to comment
Share on other sites


Good find, Joe. :thumbup

Tapping into the on-going Wine development will be key to playing catch-up to new MS API's.

ReactOS has a later Win32 build of uxtheme.dll that is probably also based on the Wine sources, but it has heavy dependencies on newer system API's as well. Other versions of uxtheme.dll that I've found are only stubs or very limited implementations.

For DLL's that don't exist in 9x, we should be able to build with Mingw compatible versions from the latest Wine sources using the instructions in your linked article.

For DLL's that do, we can build full or partial (just the needed API's) DLL's and modify in core.ini the KernelEx compatibility modes to invoke them as needed. This would require some extra (Kext) code in each DLL, or the use of Kexstubs API forwarding. For non-KernelEx users, RLoew's API hook tool could be used instead.

Link to comment
Share on other sites

For DLL's that do, we can build full or partial (just the needed API's) DLL's and modify in core.ini the KernelEx compatibility modes to invoke them as needed. This would require some extra (Kext) code in each DLL, or the use of Kexstubs API forwarding. For non-KernelEx users, RLoew's API hook tool could be used instead.

My API Hook Tool DLLHOOK has been updated to support KernelEx 4.5.2. I have been developing a KernelEx specific addon called KEXEX that contains a DLL with functions I have implemented and an .INI File with redirects for these functions and numerous others that have to be forwarded to new names and/or Modules.

Link to comment
Share on other sites

BlackWingCat's kdw and KernelEx only offer stubs and limited support for Uxtheme. That may be enough for now, as 9x doesn't seem to contain the infrastructure to really support much more yet. But ideally we'd like to have a complete implementation for when all the other pieces fall into place.

For weeks I've been researching projects that might be helpful in extending KernelEx once API forwarding was functional. Until last night I hadn't really focused on Uxtheme, however. Here are some options:

Uxtheme.dll support

Project Date Size API count
----------------------- --------------- ------- ---------
KernelEx 4.52 11/14/2011 5K 48
BWC KB935839-v15y 3/17/2012 16K 48
BlackWingCat kdw096m 2/10/2012 17K 48
OldCigarette W2KXPAPI 2/27/2011 44K 18
win2000-uxthemedll/Wine 10/06/2010 337K 52
ReactOS LiveCD 2/05/2012 232K 53


Quotes from "Windows NT4/2000/2003 > PE Tool for creating patches" posts:


  • Uxtheme without Critical Section (Ctx) support causes problems in .NET apps:

These APIs are present in BWC kernel's kernel32.dll and are not included in yours:
ActivateActCtx
CheckRemoteDebuggerPresent
CreateActCtxA
CreateActCtxW
DeactivateActCtx
GetGeoInfoA
GetGeoInfoW
GetUserGeoID
ReleaseActCtx
WTSGetActiveConsoleSessionId


Would it be difficult to add them in the future version, especially the ones which have sth to do with ActCtx, i.e. ActivateActCtx, CreateActCtxA, CreateActCtxW, DeactivateActCtx & ReleaseActCtx? They help fix a lot of dependencies and also make it possible to use uxtheme.dll directly from %systemroot%\system32. Without these dependencies there are problems with .NET Framework (when uxtheme.dll is present in the system, that is).

Uxtheme causes .NET problems on Win2K:

I've removed KB908536.
Uxtheme.dll seems to cause problems with .NET Framework based applications. I tried both versions - one from OldCigarette and the other one from BlackWingCat but unfortunately it's always the same. There's an error when trying to launch .NET based programs.

Link to comment
Share on other sites

Quotes from "Windows NT4/2000/2003 > PE Tool for creating patches" posts:


  • Uxtheme without Critical Section (Ctx) support causes problems in .NET apps:

These APIs are present in BWC kernel's kernel32.dll and are not included in yours:
ActivateActCtx
CheckRemoteDebuggerPresent
CreateActCtxA
CreateActCtxW
DeactivateActCtx
GetGeoInfoA
GetGeoInfoW
GetUserGeoID
ReleaseActCtx
WTSGetActiveConsoleSessionId


Would it be difficult to add them in the future version, especially the ones which have sth to do with ActCtx, i.e. ActivateActCtx, CreateActCtxA, CreateActCtxW, DeactivateActCtx & ReleaseActCtx? They help fix a lot of dependencies and also make it possible to use uxtheme.dll directly from %systemroot%\system32. Without these dependencies there are problems with .NET Framework (when uxtheme.dll is present in the system, that is).

Uxtheme causes .NET problems on Win2K:

I've removed KB908536.
Uxtheme.dll seems to cause problems with .NET Framework based applications. I tried both versions - one from OldCigarette and the other one from BlackWingCat but unfortunately it's always the same. There's an error when trying to launch .NET based programs.

Yeah, I saw some of these issues mentioned in regards the alternative 'uxtheme.dll' files from some of the unofficial W2000 updates, which is why I looked further afield.

The only dotNet application I use (that I'm aware of) is the command line "odfconverter" utility. This seems to be functioning normally after installing the Wine-derived 'uxtheme.dll' file (and 'libwine.dll') in the 'system' directory. Also, the "netfx_setupverifier" utility says my dotNet (2.0) installation is still OK.

Joe.

Edited by jds
Link to comment
Share on other sites

BlackWingCat's kdw and KernelEx only offer stubs and limited support for Uxtheme. That may be enough for now, as 9x doesn't seem to contain the infrastructure to really support much more yet. But ideally we'd like to have a complete implementation for when all the other pieces fall into place.

So I take it you'd like to implement full XP theming support in 98/ME but I personally think there is no point to it since it's not something that's going to make more recent programs run on our systems.

Link to comment
Share on other sites

The only dotNet application I use (that I'm aware of) is the command line "odfconverter" utility. This seems to be functioning normally after installing the Wine-derived 'uxtheme.dll' file (and 'libwine.dll') in the 'system' directory. Also, the "netfx_setupverifier" utility says my dotNet (2.0) installation is still OK.

Well that's not surprising since that application is not dependent on uxtheme.dll... :whistle:

Btw guys, it's possible to run quite a few dotnet 3.0/3.5 applications by getting the missing assemblies they may depend on from dotnet 3.5 installer and putting them in the system dir or the application folder. Remotesoft .NET Explorer is a good free tool for identifying missing .net dependencies. The WPF files won't work but often it's only just system.core.dll that's missing and this one runs just fine. I have tried hard to get some net 4.0 apps to run but to no avail even the simplest ones.

Link to comment
Share on other sites

Actually the problem with .NET Framework 2.0 and uxtheme.dll doesn't affect only the applications which use uxtheme.dll itself. I think the core of the problem is that .NET Framework 2.0 "thinks" that the OS is XP/2003 when uxtheme.dll is present in %windir%\system32 and calls for APIs which don't exist in Windows older than XP. Programs which simply need .NET Framework 2.0 files to be present in the system will probably work anyway but if they really use some of the .NET functions and call for them then the issue will occur.

Link to comment
Share on other sites

Btw guys, it's possible to run quite a few dotnet 3.0/3.5 applications by getting the missing assemblies they may depend on from dotnet 3.5 installer and putting them in the system dir or the application folder.

Hey, that's great news, loblo. :)

Are you able to give a little more details on the process?

Joe.

Link to comment
Share on other sites

Btw guys, it's possible to run quite a few dotnet 3.0/3.5 applications by getting the missing assemblies they may depend on from dotnet 3.5 installer and putting them in the system dir or the application folder.

Hey, that's great news, loblo. :)

Are you able to give a little more details on the process?

Joe.

I am not sure what more details I can give about that however I can say that the difficulty lies in determining whether a dotnet app which doesn't start has missing dependencies and which ones as the usual tool, dependency walker isn't useful and that's why I mentioned the Remotesoft .NET Explorer (which runs as a standalone program) as it allows to determine that, although not as straightforwardly as dependency walker does for non dotnet apps.

Link to comment
Share on other sites

  • 2 weeks later...

I am not sure what more details I can give

Well, I started looking at this by extracting the dotNet 3 installer contents with 7-Zip. That resulted in a reasonably large bunch of files to sift through. So I deleted all the localized versions of the various files, which was about half of them, then all the files that had "setup" in their name or within their Version information, similarly any download related files, then anything else that didn't look useful. In the end, I had no files left.

So it's not clear to me at all where are these "missing assemblies" that you mention within the dotNet 3 installer. If it's a file called 'system.core.dll', well this wasn't present in the stuff extracted by 7-Zip. BTW, I also don't know what is a "WPF" file, I presume it's not a Wordperfect Form?

I don't think I would be alone in needing an extra little clue or two to get started with this dotNet 3.X stuff.

TIA,

Joe.

Edited by jds
Link to comment
Share on other sites

Joe, if you google WPF you'll find out that 90% of the top results are about the Windows Presentation Foundation graphical subsystem introduced with dotnet 3.0.

As for system.core.dll it's a dotnet 3.5 file and you can find it at the following location (navigating the installer with 7-Zip):

dotnetfx35SP1.exe\wcu\.\.\.\.\.\dotNetFramework\dotNetFX35\x86\netfx35_x86.exe\vs_setup.cab\FL_System_Core_dll_Gac_24763_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8

Edited by loblo
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...