Sample Code

Windows Driver Samples/ Print Auto Configuration Sample/ C++/ ACnfgPS.gdl/

*%******************************************************************************************
*% ACnfgPS.GDL
*% This file implements the *BidiQuery, *BidiResponse and *Option elements that correspond to  
*% the InstalledMemory, DuplexUnit and HardDisk features in AutoCnfg.PPD file. The feature  
*% name in the GDL file should exaclty match the corresponding feature and option names in the PPD. 
*%******************************************************************************************


%*******************************************************************************************
*%                                                         Memory
*%
*%******************************************************************************************

*Feature: InstalledMemory
{
	*FeatureType: PRINTER_PROPERTY
        *BidiQuery: InstalledMemory
	{
		*QueryString: "\Printer.Configuration.Memory:Size"
	}

	*BidiResponse: InstalledMemory
	{
		*ResponseType: BIDI_INT
		*ResponseData: ENUM_OPTION(Memory)
	}
        *Option: 32Meg
	{
 		*BidiValue: INT(32768)
	}
	*Option: 64Meg
	{
		*BidiValue: INT(65536)
	}
	*Option: 128Meg
	{
		*BidiValue: INT(131072)
	}
	*Option: 256Meg
	{
		*BidiValue: INT(262144)
	}
	
}


*%******************************************************************************************
*%                                      Duplex Unit
*%******************************************************************************************

*Feature: DuplexUnit
{
        *FeatureType: PRINTER_PROPERTY
	*BidiQuery: DuplexUnit
	{
		*QueryString: "\Printer.Configuration.DuplexUnit:Installed"
	}

	*BidiResponse: DuplexUnit
	{
		*ResponseType: BIDI_BOOL
		*ResponseData: ENUM_OPTION(DuplexUnit)
	}

	*Option: False
	{
		*BidiValue: BOOL(FALSE)
	}

	*Option: True
	{
		*BidiValue: BOOL(TRUE)
	}
}

*%******************************************************************************************
*%                                      Hard Disk
*%******************************************************************************************

*Feature: HardDisk
{
    *FeatureType: PRINTER_PROPERTY
    *BidiQuery:HardDisk
    {
		*QueryString: "\Printer.Configuration.HardDisk:Installed"
    } 
    *BidiResponse: HardDisk
    {
		*ResponseType: BIDI_BOOL
		*ResponseData: ENUM_OPTION(PrinterHardDisk)
    }		
    *Option: False
    {
		*BidiValue: BOOL(FALSE)
	}
    *Option: True
    {
		*BidiValue: BOOL(TRUE)
    }
}

Our Services

  • What our customers say about us?

© 2011-2024 All Rights Reserved. Joya Systems. 4425 South Mopac Building II Suite 101 Austin, TX 78735 Tel: 800-DEV-KERNEL

Privacy Policy. Terms of use. Valid XHTML & CSS