Lazarus

Programming => Operating Systems => Windows CE => Topic started by: tsr on July 15, 2014, 11:35:42 am

Title: Simple Application, Error 216 on one WinCE Device
Post by: tsr on July 15, 2014, 11:35:42 am
Hello,

This simple program:
Code: [Select]
program _simple;

var
  tmpstr:string;
  tmppchar:PChar;
  buf: array[0..2] of Char;

begin

  buf[0]:='A'; buf[1]:='B'; buf[2]:=#0;
  tmppchar := @buf[0];
  tmpstr := tmppchar;

end. 

... works on most WinCE devices except one I have. Windows Embedded 6.0 core, ARM Mstar 2531.
I have got "Runtime Error 216". I have tried different options like optimalizations levels and different target processors without luck.

Any ideas?
Title: Re: Simple Application, Error 216 on one WinCE Device
Post by: Laksen on July 15, 2014, 01:05:46 pm
Which FPC version, and what processor was the RTL compiled for?
Title: Re: Simple Application, Error 216 on one WinCE Device
Post by: tsr on July 15, 2014, 04:00:05 pm
Tried FPC versions: 2.6.4 and 2.7.1, crosscompile: i386-win32 -> arm-wince.
Title: Re: Simple Application, Error 216 on one WinCE Device
Post by: CM630 on January 03, 2015, 07:19:48 pm
Did you have some success with your Mstar 2531 device? I have troubles with a navigation system with the same processor.
Title: Re: Simple Application, Error 216 on one WinCE Device
Post by: CM630 on January 03, 2016, 03:50:06 pm
A year later- I wonder if wince support is still developed? If so, maybe it is worth trying to build a simple app again and try if it will work on my device.
Title: Re: Simple Application, Error 216 on one WinCE Device
Post by: vincococka on January 03, 2016, 04:10:38 pm
@CM630: from my experience applications developed for WinCE (LCL and non-LCL) platform works fine on current/3.0 FPC and Lazarus/trunk. That`s pretty cool if we consider when WinCE platform was active in mobile segment.

Exception is FPC/trunk after 32803 commit - apps refuses to run on ARM CPU (which WinCE devices usually uses). There is some hidden bug which prevents applications to start.