自动检测 PPD 的打印机硬盘驱动器
为 PPD 文件中的任何硬盘驱动器相关功能向 GDL 文件添加条目。 为此,可以使用上一示例中所示的相同技术在 GDL 文件中创建相应的特征构造。 以下 GDL 构造自动检测是否已安装硬盘。
*% The GDL parser merges this feature definition with the
*% corresponding feature construct in the GPD file
*Feature: PrinterHardDisk
{
*FeatureType: PRINTER_PROPERTY
*BidiQuery: PrinterHardDisk
{
*QueryString: "\Printer.Configuration.HardDisk:Installed"
}
*BidiResponse: PrinterHardDisk
{
*ResponseType: BIDI_BOOL
*ResponseData: ENUM_OPTION (PrinterHardDisk)
}
*Option: FALSE
{
*BidiValue: BOOL(FALSE)
}
*Option: TRUE
{
*BidiValue: BOOL(TRUE)
}
}