Introduction to DAT files in WinCE BSP

Source: Internet
Author: User

DAT files are used to define the structure of the file system when the wince is started, that is, what folders are defined, and which files are located. Each time the cold starts, the Filesys module creates the directory and the files in the directory based on the contents of the. dat file.

We can find Platform.dat in the BSP. After creating a WinCE project, you can find Project.dat under the engineering directory. You can define the root directory and the corresponding subdirectories and files in these two. dat files, with the exception of the Windows folder and the subfolders it contains. Users can refer to files in the Windows directory by defining shortcuts.

For an example of the exact format of DAT files:

root:-Directory("My Documents")
root:-Directory("Program Files")
Directory("\Program Files"):-Directory("My Projects")
Directory("\Program Files"):-Directory("Accessories")
Directory("\Program Files"):-Directory("Communication")
Directory("\Program Files\My Projects"):-File("My Project Program", "\Windows\Myproj.exe")
root:-File("\control.lnk", "\Windows\control.lnk")

To explain briefly, the above is to first create My Documents and program files two root directory, and then under Program Files, create my projects,accessories and communication three subdirectories, The copy is then defined under the Windows directory Myproj.exe files that exist in ROM to the My Projects directory, and the name is my Project program. The point to note here is that files such as Myproj.exe are copied from ROM, so the file must be included in the bib file. The last line is to create a control.lnk under the root path, which comes from the Control.lnk file in ROM and is a shortcut file.

Explain some of the above formats:

1. Syntax format for Root directory:

root:[-Directory("dir_name")] [-Permdir("dir_name")]
[-File("target_filename", "source_location")]

Root: Represents the root directory.

-directory ("Dir_name"): Defines the directory name under the root directory.

-permdir ("Dir_name"): Defines a permanent directory that the user cannot delete through the RemoveDirectory function.

-file ("Target_filename", "Source_location"): Defines a target file that is copied from the ROM. Target_filename is the file name of the target file, Source_location is a file in ROM that refers to a file name under a path under the Windows directory.

2. Syntax format for directory:

Directory("dir_name"):[-Directory("dir_name")]
[-File("target_filename", "source_location")]

Directory ("Dir_name"): Represents a directory name. "\" represents the root directory.

-directory ("Dir_name"): Represents the path under the directory, which is the subdirectory.

-file ("Target_filename", "Source_location"): Defines a target file that is copied from the ROM. Target_filename is the file name of the target file, Source_location is a file in ROM that refers to a file name under a path under the Windows directory.

The syntax definitions used in DAT are simpler, look at the example to know how to modify, in general we will modify the Project.dat and Platform.dat to change the file path structure after wince startup. The platform.dat is related to the Mir, while the Project.dat is related to the WinCE project.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.