1
Embedded Computing / Re: WINCE question
« Last post by discomike on Today at 10:21:52 am »Yes it's like you're assuming.
When building a .Net (C#/VB.net) executable for WinCe/Phone you target the .Net compact framework which is a subset of the normal desktop .Net framework. And the windows PE (.exe) format is platform agnostic so that is why you can have the same .exe and run it on x86 win10 as well as some MIPS WinCE 5.0 =) The IL get's compiled at runtime (or installation).
Some requirements for this to work properly is that the executable is flagged as re-targetable (some option during compilation, can maybe be patched afterwards) and you have to be aware to not use any feature that is not present in both versions of the .Net platform you target.
If you use any native code/dll, you can write your application to load different DLLs depending on what platform you're running on etc.
I used to do this as a quick solution when customers wanted to run some embedded applications we developed on the desktop, without having to provide support/deliveries/testing of a real desktop solution. One alternative here would be to use the mobile device emulator, but that used to be quite slow compared to this approach, but could help you if you need to run some native code.
You also had to be aware that some GUI controls etc behave slightly different depending on platforms and add a few workarounds/tweaks/etc.
Now it's been 10 years since I last touched this stuff, but I did save one customer from having to buy 300 new Android hand-scanners that would only be used for 6 months (during a system migration, of which later they would only need ~30 new units) using this trick (and writing a slim WinCE client for their old PDAs to connect to the new WEB/HTTP/REST back-end system).
When building a .Net (C#/VB.net) executable for WinCe/Phone you target the .Net compact framework which is a subset of the normal desktop .Net framework. And the windows PE (.exe) format is platform agnostic so that is why you can have the same .exe and run it on x86 win10 as well as some MIPS WinCE 5.0 =) The IL get's compiled at runtime (or installation).
Some requirements for this to work properly is that the executable is flagged as re-targetable (some option during compilation, can maybe be patched afterwards) and you have to be aware to not use any feature that is not present in both versions of the .Net platform you target.
If you use any native code/dll, you can write your application to load different DLLs depending on what platform you're running on etc.
I used to do this as a quick solution when customers wanted to run some embedded applications we developed on the desktop, without having to provide support/deliveries/testing of a real desktop solution. One alternative here would be to use the mobile device emulator, but that used to be quite slow compared to this approach, but could help you if you need to run some native code.
You also had to be aware that some GUI controls etc behave slightly different depending on platforms and add a few workarounds/tweaks/etc.
Now it's been 10 years since I last touched this stuff, but I did save one customer from having to buy 300 new Android hand-scanners that would only be used for 6 months (during a system migration, of which later they would only need ~30 new units) using this trick (and writing a slim WinCE client for their old PDAs to connect to the new WEB/HTTP/REST back-end system).