Windows CE下无显示设备从定向控制台方法

本文介绍Windows CE中的命令处理器(Cmd.exe)及其控制台窗口的功能与配置方法。包括命令处理器依赖项、实现考虑因素及如何通过串口操作命令处理器。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 
The Command Processor functionality in Microsoft® Windows® CE includes a command processor shell (Cmd.exe) that is similar to Command.com in Windows 95 and Cmd.exe in Microsoft Windows NT®. The command processor shell is a command-line-driven shell that provides a limited number of commands. The Console Window is available on display-based systems to provide a window through which the Command Processor can provide output and accept input.
OS Design Information
The following table shows operating system design information for the Command Processor and Console Window.
Concept
Description
Dependencies
The Command Processor requires the Standard IO (STDIO) Catalog item. For headless OS designs, the Command Processor also requires the FormatMessage API and Full C Run-Time Catalog items and either the National Language Support (NLS) Catalog item or the English (US) National Language Support only Catalog item. The Console Window requires the Command Processor Catalog item.
Hardware considerations
None.
Modules and Components
The following table shows the components and modules that implement the Command Processor and Console Window.
Item
Module
Component
Command Processor
cmd
None
Console
console
None
Command Processor Implementation Considerations
You can include the Command Processor and Console Window in your OS design by adding these Catalog items. Adding one of these Catalog items sets the appropriate environmental variable, which enables the functionality in your OS design.
The following table shows the Sysgen variables that enable the Command Processor and Console Window.
Sysgen variable
Description
SYSGEN_CMD
When this variable is set, the Command Processor Catalog item is included in the OS design.
When this variable is not set, the Command Processor Catalog item is excluded from the OS design.
SYSGEN_CONSOLE
When this variable is set, the Console Window Catalog item is included in the OS design.
When this variable is not set, the Console Window Catalog item is excluded from the OS design.
 
 
To use the Command Processor shell as a command-line interface for target devices with no displays, configure the Command Processor to operate over a serial port. The following example shows how to set the registry values to allow the Command Processor to operate over a serial port.
 
[HKEY_LOCAL_MACHINE/Drivers/Console]
    “OutputTo” = dword:1                // Redirects CMD to COM1
    “COMSpeed” = dword:9600            // Speed of serial connection
These registry settings redirect input and output for all console applications to the serial port, unless explicitly redirected to a file or other target device.
 
注意,上面的COMSpeed=dword:9600。这个9600是十六进制的数,因此在实际PC机上串口的波特率应选择38400。因为十六进制的9600等于十进制38400。这样,当启动Windows CE操作系统后,再运行CMD.exe,则命今行将串口一作为输入输入设备。
设置OutPutTo = dword : -1 (HEX(FFFFFFFF) 从定位CMD到调试端口.
 
 
 
2006年11月3日星期五
周群威
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值