itsmattkc / dotnet9x

Backport of .NET 2.0 - 3.5 to Windows 9x
2.11k stars 144 forks source link

Support for NT4 SP6a? #7

Open Gianluca18092004 opened 2 months ago

Gianluca18092004 commented 2 months ago

I know that NT4 is not 9x, but it is the counterpart to Windows 95 and only supports up to net framework 1.1, which is very basic. I tried installing it on an NT4.0 SP6a installation with IE6SP1 installed and it doesn't work. On the other hand, great job supporting Windows 95.

itsmattkc commented 2 months ago

I do agree that NT 4 support would be ideal, though I've never tested it so I'm not sure what the roadblocks are yet. If you get any error messages, feel free to post them here since they'll probably help with diagnosing!

Gianluca18092004 commented 2 months ago

Windows NT-2024-04-11-23-33-17 Windows NT-2024-04-11-23-39-19 When starting applications (whether WinForms or Console) an error appears about a dependency called CreateToolhelp32Snapshot that does not exist in kernel32. According to Dependency Walker, dependencies are missing in mscorwks.dll and mscoree.dll, in both kernel32, advapi32 and ole32.

GravisZro commented 2 months ago

CreateToolhelp32Snapshot was first introduced in Windows 2000 which means it's recognizing the NT kernel. Someone wrote a set of functions that have very similar functionality that could help understand how to implement this function.

GravisZro commented 2 months ago

It looks like you could just use the implementation from ReactOS. https://github.com/reactos/reactos/blob/master/dll/win32/kernel32/client/toolhelp.c

itsmattkc commented 2 months ago

I did some work on this in 86d0cae272619539d512a449100873e6a5aafb9e (the CreateToolhelp32Snapshot is a red herring for a different issue) and it gets a little further, but unfortunately gets caught in another "unhandled exception" when you try to run a WinForms app. Might have to pull out a debugger again (but thankfully I've been clued into better stuff than WinDbg)

whindsaks commented 2 months ago

95 only has toolhelp. NT4 only has performance counters (and the undocumented NT API) but the psapi redistributable was fairly popular and easier to use. 2000 has all of the above.

RaulMerelli commented 1 week ago

I don't know if this could be useful, but I found this project, NT4EXkernel: https://msfn.org/board/topic/183418-i-am-trying-to-create-an-extended-kernel-for-nt4/page/2/ . I tested it in my NT4 VM and i don't get the CreateToolhelp32Snapshot error anymore, but it now misses "CryptEnumProvidersA" from Advapi32.dll. As far as I know, this entry point was patched in wrappers of dotnet9x, but because of my limited knowledge I don't know how to apply it on top of the Advapi32.dll from NT4EXkernel. image

whindsaks commented 1 week ago

CryptEnumProvidersA

Which version of IE do you have? First install IE4 with the shell update, then install 6.0 SP1.

RaulMerelli commented 1 week ago

CryptEnumProvidersA

Which version of IE do you have? First install IE4 with the shell update, then install 6.0 SP1.

I have installed in order: NT4 SP6A, NT4 Q299444I Patches, IE4 with the new file Explorer, IE6 SP1 and then NT4EXkernel. The latter replaces the Advapi32 DLL, but even in the original file the entry point is missing.

RaulMerelli commented 4 days ago

I managed to compile the advapi32 DLL wrapper (I used the MSVC 4.20 as suggested, with the NT4 SDK) and put it in the Net Framework folder. I don't know if I compiled it right, but this is what I get now:

image

I will go no further with my tests, since I am unable to debug compiled code that is not coming from managed code.