Книга: Microsoft Windows Embedded CE 6.0 Exam Preparation Kit

The Startup Folder

The Startup Folder

If you are using the standard shell on your target device, you can drop the application or a shortcut to the application into the WindowsStartup folder of the device. Explorer.exe examines this folder and starts all found applications.

NOTE

StartupProcessFolder function

Only use the WindowsStartup folder if your target device runs the Windows Embedded CE standard shell. If you are not using the standard shell, then create a custom launch application for the same purpose and initiate it at start time based on entries under the HKEY_LOCAL_MACHINEINIT registry key. For sample code that demonstrates how to examine the Startup folder and launch the applications, find the Explorer.cpp file in the %_WINCEROOT%PublicShellOAKHPCExplorerMain folder. Look for a function called StartupProcessFolder and use it as a starting point for your own implementation.

The Windows Embedded CE standard shell can handle executable and shortcut files. Windows Embedded CE shortcut files differ from the shortcut files of Windows XP, but provide similar functionality. CE shortcut files are text files with an .lnk file-name extension. They contain the command-line parameters for the linked target according to the following syntax:

nn# command [optional parameters]

The placeholder nn stands for the number of characters followed by a pound sign (#), and the actual command, such as 27#Windowsiexplore.exe -home to start Internet Explorer® and open the home page. After creating and adding the desired .lnk file to the run-time image, edit the Platform.dat or Project.dat file to map the .lnk file to the Startup folder, similar to the following .dat file entry:

Directory("WindowsStartup"):-File("Home Page.lnk", "Windowshomepage.lnk")

Chapter 2 covers these configuration tasks in more detail.

NOTE

Startup folder restriction

The key advantage of the Startup folder is that the applications placed in this folder do not need to implement the SignalStarted API to inform the kernel that the initialization and start process completed successfully. However, this also implies that the operating system cannot manage dependencies between applications or enforce a specific startup sequence. The operating system starts all applications in the Startup folder concurrently.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.373. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз