?
Solved

File Handling in WinCE

Posted on 2003-11-07
6
Medium Priority
?
1,243 Views
Last Modified: 2013-12-27
What is the best way for file handling in WinCE. NET 4.1. Is it safe enough to use the winCE API's, i.e CreateFile, ReadFile, WriteFile, SetFilePointer etc. If not then please suggest the best way for handling files.
0
Comment
Question by:manas_ghosal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 800 total points
ID: 9702908
For MFC programs, use the CFile class for binary files or the CStdioFile class for text files.

For non-MFC programs, use the API functions CreateFile, ReadFile, WriteFile, etc.

You can also use the C Run-Time library functions _tfopen, fread, fwrite, etc.

But those classes and library functions all end up with calling the API functions.
0
 
LVL 3

Expert Comment

by:cindy_k
ID: 9703798

If you are using an eMbedded Windows CE 4.1 device just be careful of the file size while you are writing.
I found a bug in the Operating System, where you can continue to write files even after there is no more storage memory left available. Writefile will continue working and it will allow you to write into the Program memory section of the memory which corrupts the whole operating system and you are forced to Cold Boot to fix it, since files are not deleted on a Warm Boot.
My company did report this problem to Microsoft.

Even with this problem chensu is correct. Those are the functions to use in CE to create files.

Good Luck,
Cynthia
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 9733356
what language are you writing the code?
0
 

Expert Comment

by:suminda
ID: 9830004
if u langvage are evc++ i thing best using crearte file
if u write to file best way write CHUNK (1 Chuck size 4kb) read also same
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are anything like me, you install many apps on your phone and have your life on it, sometimes literally.  When I bought my current phone, a Samsung Galaxy S5 from Verizon, they were only selling the versions with 16 GB internal.  I didn't rea…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month11 days, 23 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question