Solved

File Handling in WinCE

Posted on 2003-11-07
6
1,210 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mini micro sd card 7 139
Missing phones pictures in Google 9 96
Airwatch Agent 2 61
Smartphone change 3 78
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.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now