Return Code

Return Code Value Meaning
PCS_SUCCESSFUL 0 The function ended successfully.
PCS_INVALID_ID 1 An incorrect session ID was specified.
PCS_DIALOG_IN_USE 3 Failed because the host session Page Setup or Printer Setup dialog was in use.
PCS_PRINTING 4 The printer settings could not be changed because the host session was printing. The application must retry later.
PCS_FAILURE 6 No host session printer settings were applied. This might occur because invalid data was given for some or all of the fields in the PRINTINFO structure. pErrorInfo contains details about the errors.
PCS_SYSTEM_ERROR 9 A system error occurred.