My win32 program is crashing with (0xc0000018) error in Windows 7 but not Windows 10/11

Mats 1 Reputation point
2022-07-28T12:14:52.96+00:00

I think it has to do with that the program is loading 'C:\Windows\SysWOW64\kernel32.dll' twice.
This does not happen when I run the program on other systems than Windows 7.
Here is a screenshot of the launch output in Windows 7. (Visual Studio 2019) - programming in C.
225770-kernel32-dll.png

This did not happen to programs that I compiled 1 month ago, but now it crashes on Windows 7. I have even tried to recompile old versions that worked before and thy do not work in Windows 7 any longer. I have many users running the program on Windows 7 machines so I really need to fix this.
Thanks

Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | Visual Studio | Other
{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.