Windows 11 error in reading minidump produced from an app in Windows 10

Michael Chourdakis 66 Reputation points
2022-02-02T10:33:16.43+00:00

After this code generates a dump:

MINIDUMP_EXCEPTION_INFORMATION mei;
mei.ExceptionPointers = p;
mei.ClientPointers = false;
mei.ThreadId = GetCurrentThreadId();
MINIDUMP_USER_STREAM usp;
usp.BufferSize = 0;
usp.Type = CommentStreamA;
usp.Buffer = 0;
MINIDUMP_USER_STREAM_INFORMATION uspi;
uspi.UserStreamCount = 0;
uspi.UserStreamArray = &usp;
MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hF, MiniDumpNormal, &mei, &uspi, 0);
CloseHandle(hF);

then I was able to read it in Windows 10 VS 2022. In Windows 11, the crash dump cannot be read when generated from a Windows 10 machine.
It loads it but without the call stack trace, which renders it useless.

When I load the same crash dump into a Windows 10 machine, it loads correctly.
Also, when my app generates a dump when run in Windows 11, Windows 11 can read it.

Windows development | Windows API - Win32
Developer technologies | C++
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.