PMGetPrintSettingsExtendedData
Obtains extended print settings data previously stored by your application.
Declaration
OSStatus PMGetPrintSettingsExtendedData (
PMPrintSettings printSettings,
OSType dataID,
UInt32 *size,
void *extendedData
);Parameters
- printSettings:
The print settings object whose extended data you want to obtain.
- dataID:
The unique 4-character code of the data to retrieve. This is typically your application’s creator code. However, if your creator code is outside the ASCII 7-bit character range 0x20–0x7F, you need to use a different 4-character code.
- size:
A pointer to a value that specifies the size of the buffer you have allocated for the extended print settings data. On return, this variable contains the number of bytes read into the buffer or the size of the extended data. You can pass the constant
kPMDontWantSizeif you do not need this information. (See Data_not_wanted_constants for more information.) - extendedData:
A pointer to a buffer to receive the extended data. Pass the constant
kPMDontWantDataif you do not want to read the data. (See Data_not_wanted_constants for more information.)
Return Value
A result code. See Result Codes.
Overview
Your application typically needs to call PMGetPrintSettingsExtendedData two times in order to retrieve the extended print settings data. The first time, pass the constant kPMDontWantData in the extendedData parameter to obtain the buffer size required for the extended data. Then allocate the buffer and call the function a second time to read the extended data into your buffer.
You may find it easier to use the functions PMPrintSettingsSetValue and PMPrintSettingsGetValue to store and retrieve user-defined data in a print settings object. If you use these functions, make sure that the custom keys you define for your private data do not conflict with other print settings keys.
See Also
Accessing Data in Print Settings Objects
PMSetPrintSettingsExtendedDataPMGetFirstPagePMSetFirstPagePMGetLastPagePMSetLastPagePMGetPageRangePMSetPageRangePMPrintSettingsGetJobNamePMPrintSettingsSetJobNamePMGetCopiesPMSetCopiesPMGetCollatePMSetCollatePMGetDuplexPMSetDuplexPMPrintSettingsGetValuePMPrintSettingsSetValuePMPrintSettingsCopyAsDictionaryPMPrintSettingsCopyKeysPMGetJobNameCFStringPMSetJobNameCFString