Solved

File Handling in WinCE

Posted on 2003-11-07
6
1,235 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 200 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
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.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

689 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