Monday, March 06, 2023

Windows 11 22H2 unable to connect to some Windows 10 via RDP

Windows 11 22H2 unable to connect to some Windows 10 via RDP

I have one machine that got pushed an upgrade from Windows 10 to Windows 11 22H2. Before the upgrade remote desktop was working to all of my Windows machines. 

After the upgrade to Windows 11 22H2 RDP only works for certain machines. It was working for domain joined machines and machines that were using default local/domain policies related to RDP. 

Below was the error message I am getting from RDP client (Microsoft Windows 11 Version 22H2 [Version 10.0.22621.1344])

[Window Title]
Remote Desktop Connection

[Content]
An internal error has occurred.

[^] Hide details  [OK]

[Expanded Information]
Error code: 0x4
Extended error code: 0x0
Timestamp (UTC): 03/04/23 04:00:05 AM

Press Ctrl+C to copy.
 

As a workaround, on the target machine (RDP server), change the following policy using gpedit.msc.

Local Computer Policy | Computer Configuration | Administrative Templates | Windows Components | Remote Desktop Services | Remote Desktop Session Host | Security

Require use of specific security layer for remote (RDP) connections = Enabled
Security Layer = RDP

//end

Sunday, March 05, 2023

Microsoft Visual C++ Runtime Library - Debug Assertion Failed!

Microsoft Visual C++ Runtime Library - Debug Assertion Failed!

Running an application in a debug environment throws the following assertion message.

---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Debug Assertion Failed!

Program: x:\test\myapp.exe
File: minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp
Line: 996

Expression: __acrt_first_block == header

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)

---------------------------
Abort   Retry   Ignore   
---------------------------

In my specific case, this was caused by a string created in the heap by a DLL and freed in the executable.  The DLL was built using /MDd [Configuration Properties | C/C++ | Code Generation | Runtime Library = Multi-threaded Debug DLL (/MDd)] and the executable was built /MTd with MFC as static library [Configuration Properties | C/C++ | Code Generation | Runtime Library = Multi-thread Debug (/MTd)]/[Configuration Properties | Advanced | Use of MFC = Use MFC in a Static Library]. 

The fix/workaround is to change the executable to use MFC as a shared library [Configuration Properties | Advanced | Use of MFC = Use MFC in a Shared DLL]

//end

Configuring TUN/TAP virtual network interface for use with QEMU on Xubuntu 24.04

Configuring TUN/TAP virtual network interface for use with QEMU on Xubuntu 24.04 I am planning to run qemu-system-ppc to play around QEMU ...