Hi BennyF,
For the SharedRetain type there are some specialties you need to know (see also the manual: here).
The remanence on the ctrlX CORE is achieved due to the hardware support. A retain memory of 128 kB is available. 8 kB of this memory are used for internal purposes. 120 kB remain for applications. If the control is used with a PLC, 64 kB of this memory is used for PLC retain data. The memory is emulated for a ctrlX CORE Virtual. The retain memory is only saved from time to time.
Could you check in the Data Layer at datalayer/retain/stats if there is enough space for your SharedRetain memory range available on the ctrlX CORE?
Another hint: "DL_INVALID_HANDLE" indicates a invalid handle argument or NULL pointer argument.
... View more