Just for the sake of completeness, I'd like to say that I have managed
to open the serial port as a file under Windows Mobile 5 with no major
problems.

The code I used was almost identical to that supplied in
misc/telecom.ijs, with the following alterations:

1) System functions are called from coredll.dll, not kerenel32
2) There is a small variation due to WinCE's native unicode, for
instance You have "CreateFileW" instead of "CreateFileA", and all
strings have to be passed as wide; J's u: works just fine for this
together with the *w pointer.
3) There was one gotcha, the port had to be referred to as 'COMn:'
rather than 'COMn' as stated, i.e. must have the trailing colon.
Happily a very brief web trawl sorted that out.

I'm pleased to see there are no major problems and look forward to
mucking around with some serious trig  :)



On Tue, 2010-11-09 at 09:51 +0000, Alex Gian wrote:
> Thanks for that Alex, some helpful ideas there.
> However, I really do need real-time.
> 
> Anyways looking into it a bit, I found that "cd" works just fine for
> calling DLLs on Pocket PCs, you just have to call the system files from
> coredll.dll instead of kernel32, and also remember that WinCE is
> unicode-native, so all strings need u: and *w in the DLL call.
> It's fairly easy to modify the suggestions in packages/misc/telecom.ijs
> 
> However, I also found out that most of the work I thought of doing in J
> (parsing NMEA, location calculations, etc) has already been done in WM5
> by an intermediate library called gpsapi.dll, so this might be a bit
> easier than I thought.  Might still mess with it a bit, just for J
> practice on trilateration.
> 


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to