On Windows 11, for TwinCAT 4026.5, it seems TcAdsDll.dll has moved and we can not rely on TWINCAT3DIR. I have added to the resolution method to first search for a different variable TWINCATSDK, which seems to be the basis for the correct DLL. I've tested this on two separate systems.
On Windows 11, for TwinCAT 4026.5, it seems TcAdsDll.dll has moved and we can not rely on TWINCAT3DIR. I have added to the resolution method to first search for a different variable TWINCATSDK, which seems to be the basis for the correct DLL. I've tested this on two separate systems.