Solved

File Handling in WinCE

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

With Windows Embedded Handheld, called Windows Mobile, Microsoft re-designed the user interface. The Start Icon moved down to the bottom, inside the menu bar area.   If you need to hide the Start Icon and/or the SIP (soft input panel, softwar…
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 discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

759 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

18 Experts available now in Live!

Get 1:1 Help Now