HLK, Printer Driver v4, GDL Correctness Test failed

chen shuanglong 0 Reputation points
2025-03-14T11:14:30.8966667+00:00

I'm writing a v4 printer driver.

When I HLK to test my driver, GDL Correctness Test failed. The error is as follows.

<StartTest LA="378775" CA="368068" TUID="" Title="GDLCheck MyPrinterDriver.gpd">
    <rti id="3792832005"/>
    <ctx id="2459959023"/>
</StartTest>
    <StartTest LA="388400" CA="376472" TUID="" Title="LoadGDL">
        <rti id="3792832005"/>
        <ctx id="2713748288"/>
    </StartTest>
        <Error LA="402268" CA="399755" UserText="LoadGDL failed!" ErrorText="Incorrect function." ErrType="WIN32" ErrCode="0x1" Line="852" File="printscan\test\printing\gdl\gdlcheck\gdlcheck.cpp">
            <rti id="3792832005"/>
            <ctx id="2713748288"/>
        </Error>
        <Msg LA="409533" CA="406606" UserText="ParseLineBreaks: *Include: File not found in driver package: stdschmx.gdl. Error occured at State: ESTATE_NEWENTRY, Substate: ESUBSTATE_DELIMITER_FOUND Scrfile name: C:\Windows\system32\spool\V4Dirs\F0AF86FE-31C8-41DB-BEA2-1795252A625A\462844de.gpd (line: 1) : >> * C_TREEWRAPPER::C_TREEWRAPPER(): constructor failed. ">
            <rti id="3792832005"/>
            <ctx id="2713748288"/>
        </Msg>
    <EndTest LA="413393" CA="410226" TUID="" Title="LoadGDL" Repro="GDLCheck.exe " Result="Fail">
        <rti id="3792832005"/>
        <ctx id="2713748288"/>
    </EndTest>
<EndTest LA="426687" CA="410328" TUID="" Title="GDLCheck MyPrinterDriver.gpd" Repro="GDLCheck.exe " Result="Fail">
    <rti id="3792832005"/>
    <ctx id="2459959023"/>
</EndTest>

I use the default driver configurations.

I've also check the MyPrinterDriver.pgd, it does not include the stdschmx.gdl file. Maybe it's an environment issue?

How can I fix this issue?

The "windows-hardware-lab-kit-filters" are already updated.

Parts of the gpd file.

*%******************************************************************************
*%: The following root-level attributes should be modified to suit your printer
*%******************************************************************************
*GPDFileName: "
*GPDFileVersion: "1.0"
*GPDSpecVersion: "1.0"
*Include:      "StdNames.gpd"
*%**************************************************
*% V4 GPD-based printer drivers must include msxpsinc.GPD file
*%**************************************************
*Include:      "msxpsinc.gpd"
*ModelName:    "Model name goes here"
*MasterUnits:  PAIR(1200, 1200)
*PrinterType:  PAGE
*MaxCopies:    1
*Command: CmdSendBlockData { *Cmd : "" }
*PrintSchemaPrivateNamespaceURI: "Your private namespace URI goes here"

The manifest.ini file.

[DriverConfig]
DataFile=MyPrinterDriver.gpd
PrinterDriverID={c185ec4f-16b1-4384-92fc-b8cc015b3424}

RequiredFiles=UNIRES.DLL,STDNAMES.GPD,MSXPSINC.GPD
DriverCategory=PrintFax.Printer

UserPropertyBagScope=Queue

[DriverRender]
XpsFormat=XPS
Windows for business | Windows Client for IT Pros | Devices and deployment | Set up upgrades and drivers
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. André van den Berg 246 Reputation points MVP
    2025-03-16T10:50:17.3266667+00:00

    The error you are encountering when running the GDL Correctness Test in the Windows Hardware Lab Kit (HLK) is due to a missing reference to the stdschmx.gdl file in your driver package files. Let’s address this issue step-by-step based on official Microsoft recommendations and best practices for printer driver development.

    Problem Analysis:

    The error message indicates:

    1. The GDL parser (LoadGDL) cannot find a required file stdschmx.gdl in your driver package.
    2. The *Include directive in your .gpd file does not reference stdschmx.gdl. Instead, it references StdNames.gpd and msxpsinc.gpd.
    3. The .ini manifest file doesn’t explicitly list stdschmx.gdl as a required file.
    4. The error suggests a missing dependency or incomplete inclusion of required files for your printer driver.

    While the default configurations should include essential files, it’s possible the required file (stdschmx.gdl) was either not added to your driver package or not referenced correctly.


    Solution for Fixing the GDL Correctness Test Failure

    1. Ensure All Necessary Files Are Included in the Driver Package

    As per the Microsoft Printer Driver GPD Reference documentation, printer drivers that depend on Microsoft-defined GPD extensions must include all required GDL/GPD files.

    Verify that the stdschmx.gdl file is present in your spool\V4Dirs directory.

    • The expected path for this missing file is:Code
       C:\Windows\System32\spool\V4Dirs\<your-printer-driver-ID>\
    

    In your scenario:Code

       C:\Windows\System32\spool\V4Dirs\F0AF86FE-31C8-41DB-BEA2-1795252A625A\
    

    If the file does not exist in this directory, this is the root cause of the problem.

    Compare your GPD’s dependency list with the required files specified in the official driver development documentation.

    1. Add Missing File to the Manifest

    The stdschmx.gdl file is a standard schema extension that should be listed under the RequiredFiles section of the manifest.ini file if your driver relies on it. Modify your manifest.ini file as follows:

    INI

    [DriverConfig]
    

    After making this change, rebuild and repackage your driver using the Visual Studio Printer Driver project or associated deployment tools.

    1. Update the GPD File

    To explicitly include the missing stdschmx.gdl file, modify your .gpd file. Add the following line under existing *Include directives:

    gpd

    *Include:      "stdschmx.gdl"
    

    This ensures the GDL parser (LoadGDL) is aware of the additional schema and can successfully validate your GPD file.

    1. Verify the File Path

    Ensure that the stdschmx.gdl file is copied to the correct path during package creation. For a V4 printer driver, the HLK test environment typically looks in the following directories:

    • C:\Windows\System32\spool\V4Dirs\<Driver GUID>\
    • Your installation path in the staged driver directory.

    Ensure your INF and packaging script (if applicable) install this file correctly.

    1. Re-run the HLK Test

    After making the changes:

    1. Repackage your printer driver.
    2. Reinstall the updated package in the HLK test environment using pnputil or via an INF file.
    3. Run the GDL Correctness Test again.
    4. Verify with Microsoft-Defined Files

    stdschmx.gdl is part of Microsoft-provided resources for printer drivers. If you do not have this file, download and install the latest version of the Windows Driver Kit (WDK) and HLK from the official Windows Hardware Developer Center. These kits provide the standard files required for developing drivers.


    Additional Resources

    If the issue persists, consider checking the HLK release notes for any specific updates regarding GDL Correctness Test issues or submit the problem through the official Windows Hardware Developer Support.


    Let me know if you need further clarification or additional details!The error you are encountering when running the GDL Correctness Test in the Windows Hardware Lab Kit (HLK) is due to a missing reference to the stdschmx.gdl file in your driver package files. Let’s address this issue step-by-step based on official Microsoft recommendations and best practices for printer driver development.

    Problem Analysis:

    The error message indicates:

    1. The GDL parser (LoadGDL) cannot find a required file stdschmx.gdl in your driver package.
    2. The *Include directive in your .gpd file does not reference stdschmx.gdl. Instead, it references StdNames.gpd and msxpsinc.gpd.
    3. The .ini manifest file doesn’t explicitly list stdschmx.gdl as a required file.
    4. The error suggests a missing dependency or incomplete inclusion of required files for your printer driver.

    While the default configurations should include essential files, it’s possible the required file (stdschmx.gdl) was either not added to your driver package or not referenced correctly.


    Solution for Fixing the GDL Correctness Test Failure

    1. Ensure All Necessary Files Are Included in the Driver Package

    As per the Microsoft Printer Driver GPD Reference documentation, printer drivers that depend on Microsoft-defined GPD extensions must include all required GDL/GPD files.

    Verify that the stdschmx.gdl file is present in your spool\V4Dirs directory.

    • The expected path for this missing file is:Code
       C:\Windows\System32\spool\V4Dirs\<your-printer-driver-ID>\
    

    In your scenario:Code

       C:\Windows\System32\spool\V4Dirs\F0AF86FE-31C8-41DB-BEA2-1795252A625A\
    

    If the file does not exist in this directory, this is the root cause of the problem.

    Compare your GPD’s dependency list with the required files specified in the official driver development documentation.

    2. Add Missing File to the Manifest

    The stdschmx.gdl file is a standard schema extension that should be listed under the RequiredFiles section of the manifest.ini file if your driver relies on it. Modify your manifest.ini file as follows:

    INI

    [DriverConfig]
    

    After making this change, rebuild and repackage your driver using the Visual Studio Printer Driver project or associated deployment tools.

    3. Update the GPD File

    To explicitly include the missing stdschmx.gdl file, modify your .gpd file. Add the following line under existing *Include directives:

    gpd

    *Include:      "stdschmx.gdl"
    

    This ensures the GDL parser (LoadGDL) is aware of the additional schema and can successfully validate your GPD file.

    4. Verify the File Path

    Ensure that the stdschmx.gdl file is copied to the correct path during package creation. For a V4 printer driver, the HLK test environment typically looks in the following directories:

    • C:\Windows\System32\spool\V4Dirs\<Driver GUID>\
    • Your installation path in the staged driver directory.

    Ensure your INF and packaging script (if applicable) install this file correctly.

    5. Re-run the HLK Test

    After making the changes:

    1. Repackage your printer driver.
    2. Reinstall the updated package in the HLK test environment using pnputil or via an INF file.
    3. Run the GDL Correctness Test again.

    6. Verify with Microsoft-Defined Files

    stdschmx.gdl is part of Microsoft-provided resources for printer drivers. If you do not have this file, download and install the latest version of the Windows Driver Kit (WDK) and HLK from the official Windows Hardware Developer Center. These kits provide the standard files required for developing drivers.


    Additional Resources

    If the issue persists, consider checking the HLK release notes for any specific updates regarding GDL Correctness Test issues or submit the problem through the official Windows Hardware Developer Support.


    Let me know if you need further clarification or additional details!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.