126.96.36.199.8.6 PRINTER_CONTAINER Parameters
pPrinterContainer: This parameter is a pointer to a PRINTER_CONTAINER (section 188.8.131.52.9) structure, which specifies printer information. The Level member of the PRINTER_CONTAINER MUST be between 0x00000000 and 0x00000008, inclusive. When the Level member is 0x00000002, the Status, cJobs, and AveragePPM members of the PRINTER_INFO_2 structure (sections 184.108.40.206.6 and 220.127.116.11.3) MUST be set to zero by the caller and MUST be ignored on receipt. For details concerning PRINTER_INFO structures, see section 18.104.22.168.
The individual method sections include the following parameter validation steps by reference:
If the pPrinterContainer parameter is declared with the "unique" IDL attribute, and its value is NULL, skip the validation steps and assume validation success.
Verify that pPrinterContainer points to a PRINTER_CONTAINER that specifies an appropriate level as defined in the referring method definition. If that verification fails, return ERROR_INVALID_LEVEL.
If pPrintProcessor is not NULL, verify that it points to a string that identifies a print processor. If that verification fails, return ERROR_UNKNOWN_PRINTPROCESSOR.
If pSepFile is not NULL, verify that it points to a string that names an existing file on the server. If that verification fails, return ERROR_INVALID_SEPARATOR_FILE.
Verify that pPortName is not NULL and points to a string that identifies an existing port on the server. If that verification fails, return ERROR_UNKNOWN_PORT.
Verify that pDriverName is not NULL and points to a string that identifies an existing printer driver on the server. If that verification fails, return ERROR_UNKNOWN_PRINTER_DRIVER.
Verify that, if the Attributes parameter has the flag PRINTER_ATTRIBUTE_SHARED (section 22.214.171.124) set, the printer driver identified by pDriverName does not have the attribute that printers using that printer driver cannot be shared (section 3.1.1). If that verification fails, return ERROR_PRINTER_NOT_SHAREABLE.
Verify that the Priority member of PRINTER_INFO_2 is within the range specified in section 126.96.36.199.3. If that verification fails, return ERROR_INVALID_PRIORITY.
Verify that all members of the PRINTER_CONTAINER structure comply with the constraints defined in section 188.8.131.52, with the exception of pServerName, which SHOULD be ignored.
Unless noted otherwise, if any of the preceding validation steps fail, return ERROR_INVALID_PARAMETER.
The individual method sections further include the following parameter processing steps by reference:
If the value of the Level member specifies a PRINTER_INFO structure that contains a pDevMode member (section 184.108.40.206.6), replace the value of that member with the pDevMode value of the DEVMODE_CONTAINER structure (section 220.127.116.11.1) that is pointed to by the pDevModeContainer parameter of the method.
If the value of the Level member specifies a PRINTER_INFO structure that contains a pSecurityDescriptor member (section 18.104.22.168.6), replace the value of that member with the pSecurity value of the SECURITY_CONTAINER structure (22.214.171.124.13) that is pointed to by the pSecurityContainer parameter of the method.