PMPrinterCopyHostName(_:_:)
Obtains the name of the server hosting the print queue for a given printer.
Declaration
func PMPrinterCopyHostName(_ printer: PMPrinter, _ hostNameP: UnsafeMutablePointer<Unmanaged<CFString>?>) -> OSStatusParameters
- printer:
The printer whose print queue host name you want to obtain.
- hostNameP:
A pointer to your Cfstring variable. On return, the variable refers to a Core Foundation string containing the name of the specified printer’s server. You are responsible for releasing the string.
Return Value
A result code. See Result Codes.
Discussion
This function is typically used to obtain the name of the computer that hosts a shared printer, possibly for display in a user interface. In macOS 10.5 and later, the typical way that users browse and communicate with a shared printer creates a local print queue and PMPrinterCopyHostName for such a print queue will return the name of the local host.
See Also
Accessing Information About a Printer
PMPrinterCopyDescriptionURL(_:_:_:)PMPrinterCopyDeviceURI(_:_:)PMPrinterCopyPresets(_:_:)PMPrinterGetCommInfo(_:_:_:)PMPrinterGetDriverCreator(_:_:)PMPrinterGetID(_:)PMPrinterGetLocation(_:)PMPrinterGetMakeAndModelName(_:_:)PMPrinterGetMimeTypes(_:_:_:)PMPrinterGetName(_:)PMPrinterGetOutputResolution(_:_:_:)PMPrinterSetOutputResolution(_:_:_:)PMPrinterGetPaperList(_:_:)PMPrinterGetPrinterResolutionCount(_:_:)PMPrinterGetIndexedPrinterResolution(_:_:_:)PMPrinterGetState(_:_:)PMPrinterSetDefault(_:)PMPrinterIsDefault(_:)PMPrinterIsFavorite(_:)PMPrinterIsPostScriptCapable(_:)PMPrinterIsPostScriptPrinter(_:_:)PMPrinterIsRemote(_:_:)