ntvdmx64 icon indicating copy to clipboard operation
ntvdmx64 copied to clipboard

NTVDM will not open anything after updating

Open MeatPony opened this issue 4 years ago • 21 comments

Hello

So I found out there was a couple of new commits recently, to both NTOSBE and NTVDMx64, so I decided to build it again in order to update my install. However I am unable to run literally anything dos. Nothing appeared to error out during building or installation, but running it just doesn't want to work. ntvdmissueturbocplusplus Picture above shows me trying to open the readme.com for Turbo C++ (Don't worry it doesn't spam open windows, I was just holding enter for le funny joke)

This does not only affect readme.com, I have tried all the 16 bit dos programs i have on my computer, and none of them worked.

MeatPony avatar Apr 27 '20 19:04 MeatPony

Hm, so loader fires up NTVDM, but NTVDM bails out? Does DebugView show you any error output maybe? Is the 32bit loader ldntvdm.dll in SysWOW64 directory present and working and i.e not blocked by an Antivirus application? (The 32bit loader is required for NTVDM to start, otherwise Environment cannot be set up properly). Antivirus products are notorious for blocking the loader on every new build, unfortunately.

Theoretically also a bug in the loader could crash the NTVDM upon execution, so did you also change the loader .dlls or just the NTVDM.EXE? The loader dlls that you used on your previous working installation should theoretically also work on the newer installation, just for test. It's not easy to guess what is causing the problem by just seeing the launch error. So we should nail it down to either the loader DLL or the NTVDM.exe

Did you try the emendelson build under #7 for comparison?

leecher1337 avatar Apr 27 '20 20:04 leecher1337

I replaced the ldntvdm.dll in syswow64 from my build to the one from emendelson's build, and it appears to be working properly. However I do not like this solution. image

MeatPony avatar Apr 27 '20 22:04 MeatPony

@MeatPony - Just to be clear - as my web page says, I do not build these downloads; what you download is not "emendelson's build." I get them from an anonymous source who makes the builds. Incidentally, I posted an up-to-date build today.

emendelson avatar Apr 27 '20 23:04 emendelson

oh, sorry

MeatPony avatar Apr 27 '20 23:04 MeatPony

Incidentally, I posted an up-to-date build today.

Hey @emendelson ! I found the working NTVDM from your website but can you pleeease consider adding datestamps to the beginning/end of your article? I half thought the NTVDMx64 build I downloaded from your page was from 2010

AbdullahTrees avatar Apr 28 '20 00:04 AbdullahTrees

is NTVDMx64 even that old?

MeatPony avatar Apr 28 '20 00:04 MeatPony

The earliest commit on this repo says 2016

MeatPony avatar Apr 28 '20 00:04 MeatPony

So this implies that it may be realted to change in the loader code from https://github.com/leecher1337/ntvdmx64/commit/9b966f587023e5c2e36270cdad895ec12ecc8e13 However only FindeResourceEx inline hook was added for 16bit icon parsing, nothing about the loader itself changed. I noticed, that the 32bit loader often is targetted by Antivirus programs (inclusing maybe Windows' own Defender). When you download current ldntvdm.dll for syswow64 from this repository, does it get targetted by Windows Defender maybe? When you use DebugView, the loader usually tells you what it is doing. So if you exchange the loader (you can simply rename the .dll in SysWow64 directory forth and back), does it load into 32bit process?

leecher1337 avatar Apr 28 '20 07:04 leecher1337

Here is the debug log, also could you elaborate on what you mean by "(you can simply rename the .dll in SysWow64 directory forth and back)"?

00000002	0.00763370	[4000] VDMState=00000001	
00000003	0.00767370	[4000] LDNTVDM: Launch DOS!	
00000004	0.11221820	[4212] Hook_IAT_x64(D3D30000, ext-ms-win-kernelbase-processthread-l1-1-0.dll, BasepProcessInvalidImage, D37A2F0C)	
00000005	0.11226330	[4212] Hooked D5EA4790 -> D37A2F0C	
00000006	0.11235540	[4212] LDNTVDM: BasepProcessInvalidImageReal = D5EA4790	
00000007	0.11237320	[4212] LDNTVDM: BaseIsDosApplication = D5EC8EF0	
00000008	0.11241320	[4212] LDNTVDM is running inside ConHost.exe	
00000009	0.11247250	[4212] Hook_IAT_x64_IAT(BE020000, ntdll.dll, RtlAllocateHeap, D37A3530, D37ADB28)	
00000010	0.11252270	[4212] Hooked D6A3B7F0 -> D37A3530	
00000011	0.11256250	[4212] Hook_IAT_x64_IAT(BE020000, user32.dll, NotifyWinEvent, D37A3704, D37ADB20)	
00000012	0.11260760	[4212] Hooked D4CCCC10 -> D37A3704	
00000013	0.11265980	[4212] Hook_Inline(7ffcd4ccb500, 7ffcd37a1a58, 0)	
00000014	0.11271180	[4212] dwOrigSize detected: 7	
00000015	0.11286110	[4212] About to alloc page @7ffcd4caf000	
00000016	0.11288860	[4212] About to alloc page @7ffcd4cae000	
00000017	0.11291350	[4212] About to alloc page @7ffcd4cad000	
00000018	0.11293790	[4212] About to alloc page @7ffcd4cac000	
00000019	0.11296290	[4212] About to alloc page @7ffcd4cab000	
00000020	0.11298810	[4212] About to alloc page @7ffcd4caa000	
00000021	0.11301270	[4212] About to alloc page @7ffcd4ca9000	
00000022	0.11332460	[4212] About to alloc page @7ffcd4bff000	
00000023	0.11337550	[4212] Hook_Inline context=7ffcd4bf0000	
00000024	0.11340050	[4212] Hook_IAT_x64_IAT(D4CB0000, api-ms-win-core-file-l1-2-1.dll, ReadFile, D37A1974, D37ADB50)	
00000025	0.11342640	[4212] Hooking failed (-1).	
00000026	0.11345000	[4212] Hook_IAT_x64_IAT(D4CB0000, api-ms-win-core-file-l1-1-0.dll, ReadFile, D37A1974, D37ADB50)	
00000027	0.11347750	[4212] Hooked D3D55110 -> D37A1974	
00000028	0.11350330	[4212] ldntvdm Init done	
00000029	0.11639300	[4212] PrivateExtractIconsWHook(ntvdm.exe)	
00000030	0.16047961	[4212] EVENT_CONSOLE_START_APPLICATION PID 3532	
00000031	0.16221420	[4212] Before CreatEThread	
00000032	0.16298421	[4212] After CreatEThread	
00000033	0.16311580	[4212] ProcessInitializing = 1	
00000034	0.16525979	[4212] ProcessInitializing = 1	
00000035	0.16744100	[4212] Queued loader injection via APC @74FF9C20	
00000036	0.17658859	[4000] PrivateExtractIconsWHook(c:\windows\system32\ntvdm.exe)	
00000037	0.17715409	[4000] PrivateExtractIconsWHook(C:\windows\system32\imageres.dll)	
00000038	0.23926041	[3532] NTVDM: 24576K Memory: 15360K XMS, 0K EMS, 8192K DPMI

Nukley avatar Apr 28 '20 15:04 Nukley

The earliest commit on this repo says 2016

Hehe, well the first place where I heard of NTVDMx64 was on some Windows XP forum and then I googled and the first thing that lead to anywhere was emendelson's page.

AbdullahTrees avatar Apr 28 '20 21:04 AbdullahTrees

Here is the debug log, also could you elaborate on what you mean by "(you can simply rename the .dll in SysWow64 directory forth and back)"?

I'm not leecher1337, but I think he meant that you can switch the ldntvdm.dll from the setup files with the ones in SysWOW64 folder.

AbdullahTrees avatar Apr 28 '20 21:04 AbdullahTrees

Stupid me, I just uploaded the wrong DLL on last commit, hopefully fixed now.

leecher1337 avatar Apr 28 '20 21:04 leecher1337

appears to work now image

Nukley avatar Apr 28 '20 23:04 Nukley

Can someone help me out with Turbo C++ btw? I wanted to use the Turbo C++ compiler for C compiling only (I remember I had that as a kid), but most of the stuff I'm finding online seems to be C++ compilers... How can I use C language on them?

AbdullahTrees avatar Apr 29 '20 22:04 AbdullahTrees

https://vetusware.com/download/Borland%20Turbo%20C++/?id=169 C++ compilers usually are perfectly compatible with plain C programs, as C++ standard requires the compiler to fully support C anyway.

leecher1337 avatar Apr 30 '20 06:04 leecher1337

No, wait you don't understand... image I had a folder on my PC (the origin of these files are some time around 2010, no idea, my sister downloaded them, I was only 8 or 9 at the time) called 'TC' and 'TC++', and these were the executables inside them. The Turbo C++ executable ran at fullscreen, whereas the Turbo C thing ran in windowed and had a slightly longer window.

Secondly, image The Turbo C compiler didn't save its files as .CPP, it always saved them as .C, without me even renaming it... and the C++ compiler did vice versa.

Maybe there are some configuration files that can be changed, in which case I'd ask for a way to configure them so I can run them both at fullscreen and make 2 copies, one for C and one for C++

AbdullahTrees avatar May 01 '20 15:05 AbdullahTrees

Regarding fullscreen, I guess you mean the .pif file settings for DOS applications. Just go to the properties of the .exe file and there you can set whether it starts fullscreen or windowed: grafik

In Turbo C++ in options/Environment/Preferences... you can set whether it uses a 50 or 25 line screen. In Options/Environment/Editor, you can set the default file extension.

leecher1337 avatar May 01 '20 15:05 leecher1337

:OOO I knew it!! There was an option to run applications in windowed mode after all! Time to try out that Mavis.exe

EDIT: ........ Mavis.exe decides to run in fullscreen anyway ignoring the stipulations....

AbdullahTrees avatar May 01 '20 17:05 AbdullahTrees

Yes, I already explained it to you, why this is the case

leecher1337 avatar May 01 '20 18:05 leecher1337

Oops, Might've confused you, I am MeatPony, forgot to log back into that account.

Nukley avatar May 04 '20 23:05 Nukley

Nukley is me, I wasn't lying :P

MeatPony avatar Nov 22 '20 00:11 MeatPony