Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the WinCE file directory customization and memory adjustment?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This issue of the content of the editor will bring you about WinCE file directory customization and memory adjustment is how, the article is rich and professional point of view for everyone analysis and description, after reading this article, I hope you can get something.

This is relatively simple to say, the file directory structure of WinCE and the location of files are defined in the DAT file. All dat files will be merged into initobj.dat files when WinCE is compiled, and WinCE will generate the corresponding directory according to the description in DAT.

About the format of DAT, you can refer to my previous article: "introduction to the DAT file of WinCE BSP", you will understand it.

I usually customize the directory structure I want in project.dat, for example:

Root:-Directory ("Sounds")

Root:-Directory ("Movies")

Directory ("Movies"):-Directory ("Chinese")

Directory ("Movies"):-Directory ("English")

Directory ("Sounds"):-File ("hello.wav", "Windowshello.wav")

It should be easy to understand, create two root folders Sounds and Movies, create two subfolders Chinese and English in Movies, and copy hello.wav to the Sounds directory.

After editing the project.dat, re-Makeimg is fine. Start WinCE and you can see the folder you created.

Next, let's talk about customization of WinCE memory. The memory available to WinCE systems is divided into Storage Memory and Program Memory. Storage Memory is used for Object Store and Program Memory is used for program memory.

With regard to Object Store, in WinCE, it refers to a storage space that can store data permanently, even in the case of power loss, the data can not be lost with the support of backup power supply, achieving the effect of permanent storage. In fact, it is a piece of memory, which generally includes the file system, database and system registry. The maximum space for Object Store cannot exceed 256MB, and the maximum file that can be contained is 32MB. Object Store is composed of many Object, these Object may be a file, a database, a database record, a registry key, a key value, and so on.

In Object Store, the WinCE system assigns an ID to each Object, which is called CEOID. The CEOID of each Object is unique in the Volume. Similarly, each Volume in Object Store has an ID, called CEGUID, so that the corresponding Object can be found in Object Store using CEGUID and CEOID.

By the way, introduce a function:

BOOL CeOidGetInfoEx (PCEGUID pceguid, CEOID oid, CEOIDINFO* poidInfo) calls this function to get information about an Object in Object Store. Pceguid and oid are information about the CEGUID and CEOID,poidInfo of the object to be found.

So how do you get CEGUID and CEOID? There are different functions for different Object types, as follows:

Directory or File:FindFirstFile (..) / FindNextFile (..) / GetFileInformationByHandler (..)

Database:CeCreateDatabaseEx2 (..) / CeFindNextDatabaseEx (..)

Database record:CeSeekDatabaseEx (..) / CeReadRecordPropsEx (..) / CeWriteRecordPropsEx (..)

Mounted Database volume:CeMountDBVol (..) / CeEnumDBVolumes (..)

Therefore, in WinCE system, the adjustment of memory is to adjust the size of Object Store and program memory. By default, Storage Memory/Program Memory is split equally. There are three ways to adjust memory:

1. Adjust the FSRAMPERCENT in the config.bib file, and how to set it up is explained in the introduction to the BIB file. I won't say much here.

two。 Call the pOEMCalcFSPages function in OAL to allocate memory for Object Store.

3. After WinCE starts, enter the control panel of the system, then open System, and select Memory to make adjustments in the interface.

4. Through the function SetSystemMemoryDivision (..) To adjust. One more word, you can call GetSystemMemoryDivision (..) To get the current Object Store memory usage.

With regard to the adjustment of Storage Memory and Program Memory, it mainly depends on the requirements of the system. In general, Storage Memory does not need to be too large, so it can be adjusted appropriately according to its own needs. However, it should be noted that the two parts of memory can not be adjusted too small, the adjustment is too small will lead to data loss, or even crash, and then can only restart the system.

The above is the WinCE file directory customization and memory adjustment shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report