How to read text file from SD Card
I am trying to read a text file from the SD card. Any pointers / code samples would be very handy. I have been trying to read through the documentation and I am really confused as to what I need to do... (VFS, Expansion Manager Volumes arghhh... it should be as easu as FileOpen!!) Thanks Carlos -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: How to read text file from SD Card
On 1/8/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am trying to read a text file from the SD card. Any pointers / code samples would be very handy. I have been trying to read through the documentation and I am really confused as to what I need to do... (VFS, Expansion Manager Volumes arghhh... it should be as easu as FileOpen!!) http://www.palmos.com/dev/dl/dl_codesamples/ http://www.palmos.com/dev/dl/dl_codesamples/sample_features.html http://www.palmos.com/dev/dl/dl_codesamples/expansion_samples.html and... some code http://kb.palmsource.com/cgi-bin/palmsource.cfg/php/enduser/std_adp.php?p_faqid=174 you have to use the expansion manager to obtain a volume. when you have a volume; you can then open a file quite easily. its not FileOpen, but, VFSFileOpen (below, is a stripped chunk of a functino) static Err HandleCardFile(UInt16 volRefNum, Char *fileName) { FileRef ref=0; Err err=0; err = VFSFileOpen(volRefNum, fileName, vfsModeRead, ref); if (err) return err; ... VFSFileSeek(ref, vfsOriginBeginning, resOffset); ... VFSFileRead(ref, resLen, mybuffer, numBytesRead); if (ref) VFSFileClose(ref); return err; } to get a handle on the volume: UInt16 volRefNum; UInt32 volIterator; volIterator = vfsIteratorStart; while (volIterator != vfsIteratorStop) { err = VFSVolumeEnumerate(volRefNum, volIterator); if (err == errNone) // volRefNum = valid!! else volIterator = vfsIteratorStop; // handle error by breaking out of the loop } now; there may be multiple volumes on a device; so, you need to do a little extra checking to make sure you have the right one. -- // Aaron Ardiri -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: How to read text file from SD Card
[EMAIL PROTECTED] wrote: I am trying to read a text file from the SD card. Any pointers / code samples would be very handy. I have been trying to read through the documentation and I am really confused as to what I need to do... (VFS, Expansion Manager Volumes arghhh... it should be as easu as FileOpen!!) No, FileOpen() is for File Streams, which are the pseudo-files that are encapsulated in databases that are on board the device. FileOpen() can never be used to open files on a VFS volume. For that, you want VFSFileOpen(), which is a completely separate function. - Logan -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: [OT, kind of] Best way to convert Palm app to Pocket PC?
For starters, this is probably the wrong newsgroup - a PPC one would be better :-) Future versions of eVC++ are no longer be free - it is part of VS from VS2005 onwards WindowsCE is the generic term for the mobile versions of Windows, PocketPC is specific to PDAs and smartphones (and there is a version for each). There are various sites dedicated to PPC development, but the best place to start is MSDN. Bear in mind that much of your code probably won't port - things are quite different. FWIW, I believe MS are strongly encouraging people to go to managed code for PPC development Cheers, Jim Cooper __ Jim Cooper[EMAIL PROTECTED] Skype : jim.cooper Tabdee Ltdhttp://www.tabdee.ltd.uk TurboSync - Connecting Delphi to your Palm __ -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: [OT, kind of] Best way to convert Palm app to Pocket PC
At 03:15 AM 1/8/2006, you wrote: Subject: [OT, kind of] Best way to convert Palm app to Pocket PC? From: David Linker [EMAIL PROTECTED] Date: Sat, 7 Jan 2006 22:36:23 -0800 I have a Palm OS app that I would like to make available to those who use Pocket PC. I could use some some pointers and ideas. You are correct, this is both off topic and an inappropriate posting to this forum. Roger Stringer Marietta Systems, Inc. (www.rf-tp.com) -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: [OT, kind of] Best way to convert Palm app to Pocket PC
Roger Stringer wrote: At 03:15 AM 1/8/2006, you wrote: I have a Palm OS app that I would like to make available to those who use Pocket PC. I could use some some pointers and ideas. You are correct, this is both off topic and an inappropriate posting to this forum. On the other hand, it would be on topic to discuss general ways of writing a Palm app so that it would be in the Palm idiom and also portable to other operating systems. (And I'd be interested to know if anyone has good ideas in that area.) - Logan -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: [OT, kind of] Best way to convert Palm app to Pocket PC
You are correct, this is both off topic and an inappropriate posting to this forum. On the other hand, it would be on topic to discuss general ways of writing a Palm app so that it would be in the Palm idiom and also portable to other operating systems. (And I'd be interested to know if anyone has good ideas in that area.) I'm interested in this topic too and would like to hear for developers working in both platforms. If the original author was creating a new application from scratch then I'd agree this isn't the forum. But, since I'm guessing a lot of us here are looking at porting existing Palm apps to that other platform, I'm hoping for some insight for abstracting Palm-specific functions, classes, etc. Rich -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: [OT, kind of] Best way to convert Palm app to Pocket PC
I'm interested in this topic too and would like to hear from developers working in both platforms. I've completed two large commercial applications on Palm, Windows Mobile/Pocket PC, and Windows Mobile/Smartphone. I'm currently working on a third and adding Symbian into the mix. Here are some general things that I've found: 1. It is better to start on Palm and move to the other platforms. The Palm has a more restrictive environment (memory, resources, segments, etc.) than either of the other two platforms. Starting there is much easier than starting in the WM environment where you tend to be sloppier because things are easier. 2. If you don't know Windows programming, start there before going to Windows Mobile. The best background (IMO) is good Windows API knowledge in C. I'd definitely stay away from MFC for now. In a related manner, stay away from any of the Palm libraries, especially the C++ ones. There is a good match up between the architectures of Palm and WM if you use straight C to start with. 3. Going from WM/PPC to WM/SP is very easy programmatically but very difficult with user-interface issues because you lose the touch screen. If you built your app to make good use of the 5-way navigation pad on later Palm's, you'll be in better shape because you're closer to a non-touchscreen UI. Again, start on the Palm and get everything solid with key navigation before moving to the other platforms. 4. Symbian has some nice tools and documentation. They even have a developer document called something like Symbian Development for Palm Developers. I don't think that Symbian should be ignored. Their platform is very similar to Palm in many ways. If you're interested in applications outside the US, you can't ignore Symbian. The development environment for the WM platforms has gotten pretty good. I still prefer the Palm developer tools but that might just be because I've been using them for longer. ...Jeff -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: [OT, kind of] Best way to convert Palm app to Pocket PC?
Couple points (continuing this probably off topic conversation). First, for multi-platform development, there are several development platforms that can oblige. Java (Waba/SuperWaba), NS Basic, and Casl are three that come to mind. Casl was designed for multiplatform development - write once and compile for either platform. For non-commercial development the package is free. Check out www.caslsoft.com For conversion, that will be harder. The whole paradigm is different - single tasking vs multitasking, etc. That said, for the sort of program you are writing (age+BUN=Lasix dose), probably any development package for Pocket PC will be fine once you get used to it (and the different libraries of functions for Pocket vs Palm). But, if you are going to have to rewrite anyway, why not write it in something that allows you to work in both platforms, like CASL or Java? Email me offline if you want more detail/help. I too am a medical professional and write medically related software. /js In your message regarding [OT, kind of] Best way to convert Palm app to Pocket PC? dated Sat, 7 Jan 2006 22:36:23 -0800, David Linker said that ... I have a Palm OS app that I would like to make available to those who use Pocket PC. I could use some some pointers and ideas. It is written using the gcc toolset (prc-tools), written in C. I have another version in java that runs as a java applet on a web browser. The application is an aid for physicians treating patients with heart failure. The current executable is a single file, about 40K on the Palm. I have tried to understand what I have to do, but I am confused, and thought that others on this list must have experience and knowledge about this issue. First, I am confused about the differences between the available platforms. Windows CE, Pocket PC, Win32, ARM, etc. Any guidance gratefully accepted. Second, what development environment would be good to use? I should mention that this is NOT a commercial development, and the budget is limited. So far, the expenditure is about $00.00, and ideally, I would like to keep it that way. I have downloaded eMbedded Visual Studio 4.0, but it appears to be set up to compile for a device with a larger screen. I have previously written programs in waba, but found the execution speed quite slow. Finally, where can I find documentation and tutorials like the excellent ones for the Palm? Thanks in advance for any pointers or links! David Linker -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: [OT, kind of] Best way to convert Palm app to Pocket PC
This is great info. Like others in this forum, we have many Palm apps which would like to also support in WinCE environment. We are not looking to leave Palm development, but simply expand our offerings. If this is considered [OT, kind of] I hope a thread/forum can be dedicated to this issue of Multi-Development Platform Support. I look forward to seeing more knowledge sharing on this subject. -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re(2): [OT, kind of] Best way to convert Palm app to Pocket PC
At 03:15 AM 1/8/2006, you wrote: I have a Palm OS app that I would like to make available to those who use Pocket PC. I could use some some pointers and ideas. Why not give StyleTap a try? http://www.styletap.com/ -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: [OT, kind of] Best way to convert Palm app to Pocket PC?
David Linker [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] I have a Palm OS app that I would like to make available to those who use Pocket PC. I could use some some pointers and ideas. If you are not using conduits, look at www.styletap.com its an exelent product IMO -- Regis St-Gelais www.laubrass.com -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Memory error
The project runs successfully at the beginning on clie,but being approximately a half,the error occures. if there is a NULL pointer on the clie,why there is not on zodiac? if the clie handles NULL pointer is different from zodiac,why it is successful at the beginning? Thanks in advance! -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Memory error
[EMAIL PROTECTED] wrote: The project runs successfully at the beginning on clie,but being approximately a half,the error occures. if there is a NULL pointer on the clie,why there is not on zodiac? if the clie handles NULL pointer is different from zodiac,why it is successful at the beginning? The correct answer to this question is this: if you have an error in your application where you are accessing a pointer which is invalid, the implementation (the compiler and the device that runs the compiled code) is free to do anything it wants. The behavior is undefined. Therefore, you should EXPECT inconsistent results until you resolve the problem. If you access a invalid pointer, then crashing is a perfectly reasonable behavior for the system. Also, working perfectly is a perfectly reasonable behavior for the system. However, if the system does work as you expect, you should not see that as an indication that nothing is wrong and that your code is written correctly but only incompatible with other systems. One possible answer, by the way, is that you are doing a MemPtrNew() and the Zodiac (which has a large heap) returns a valid pointer but the Clie (which might have a smaller dynamic heap) would return NULL for that MemPtrNew(). But that is only one possible explanation and there are many others. The best plan is to see what parts of your code this problem is related to, and then check over the code for coding errors. - Logan -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Field Level Crashing...
Hello EB, I have Created Dynamic Field Control but it Crash's at FldSetTextHandle(Fld_ptr,mHandle) event...any sensible reason for it? Also My Application Size is above 44kb and I am not getting Segmentation problem. Isn't it strange? Will I have this crashing problem if my Application size increases tremendously at runtime? Regards, -Pritam. __ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Memory error
yes ,you are right,i found out the error,there was a invalid pointer,and i tried to accesse it. thanks again! -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
re: Regarding TCP/IP request
Hi I'm sending this request for downloading the bitmap file. StrCopy(data,POST Content-Type: image/bitmap MyNetworkpth/waves.bmp); But it is giving me error No: 400 which means this is the bad request. I've tried all other combination but could not success. Can any one give me exact fromat for sending the request.. It's really urgent for me. Thank you advance. smartslack -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
the function is sensitive to the location of segments?
ever post here, no response until now. i have debuged the program some more time and has some detailed information. the .cpp file containing sound stream creation, playing and callback resided in the other segment other than first one. and when excuted to the SndStreamStart the program will halt there without any response, i had to reset the device. then i move the files related to sound playing to the first segment, it could playing the sound correctly. my project setting is large mode, if the function is sensitive to the segment where it is located, what's the problem? And another question about file stream database reading is still there, i have a 5Mb stream database, after hotsyn to the device, i used the file stream API to access its content. when read the former part, everything is ok, but when reading the latter part, the program always read one or more records later after the correct postion. as you know, one record in stream database is 4096 bytes, maybe this problem is also segment issue -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Regarding TCP/IP request
smartslack wrote: Hi I'm sending this request for downloading the bitmap file. StrCopy(data,POST Content-Type: image/bitmap MyNetworkpth/waves.bmp); But it is giving me error No: 400 which means this is the bad request. I've tried all other combination but could not success. Can any one give me exact fromat for sending the request.. Gosh, it almost sounds like you're trying to do HTTP in particular, not just TCP/IP in general. In which case, I guess you ought to refer to some HTTP documentation. You could check out http://www.w3.org/Protocols/rfc2616/rfc2616.html , specifically all of chapter 5 for making the GET request, and chapter 6 for understading the response, and 9.3 for understanding the semantics of the GET method. For example, to get something from http://www.google.com/index.html, you will probably want something like this: GET /index.html HTTP/1.1 [cr-lf] Host: www.google.com [cr-lf] [cr-lf] You may want to specify other headers besides just Host; that's just an example. Of course, once the server replies, you will need to pay attention to stuff like Content-Length, Content-Type, response code (first line of the response), and maybe the Content-Encoding. By the way, it can often be helpful to fire up a telnet client (even Windows has telnet.exe) and connect to port 80 of a web server and experiment with making your own GET requests. It's much easier than trying to build it into an application before you know that you've got the protocol right. - Logan -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/