In this topic, it was mentioned by @mLipok that it could be doable to manage printers with winspool.drv DLL. It was enough to get my attention on it. I do not remember seeing any UDF gathering all those functions.
Func _PRNT_GetDefaultPrinter()
Func _PRNT_SetDefaultPrinter($sPrinter)
Func _PRNT_OpenPrinter($sName)
Func _PRNT_ClosePrinter($hPrinter)
Func _PRNT_GetPrinterInfo($hPrinter, $bGlobal, $bRAW = False)
Func _PRNT_SetPrinterInfo($hPrinter, $iProp, $iValue, $bGlobal)
Func _PRNT_EnumPrinters()
Func _PRNT_IsValidDevmode($tDevMode)
Func _PRNT_EnumJobs($hPrinter)
Version 2023-10-17
*added new functions _PRNT_IsValidDevmode and _PRNT_EnumJobs
Version 2023-10-15
* solved a problem where garbage collector would destroy $tDevMode after a while on return of _PRNT_GetPrinterInfo
There is a multitude of other functions that could be part of this UDF, but I have decided to stop here and see how you like it.
If you have comments or suggestions, they are always welcome.
Printer_UDF.zip