Hello, I am having difficult with the windows spooler API. I would be grateful if anyone could help or point me in the direction of some further documentation. I have a small application that prints out the contents of a windows spooler queue for a given printer .. varios items from the JOB_INFO_1 structure .. document name and the like. I then wish to, for instance, CANCEL some jobs using the SetJob function call .. this I can do. res = SetJob( hPrinter,pjtmp->JobId,3,(x),JOB_CONTROL_DELETE ); OK! However I am unable to simply change and set some print job parameters like the "priority" of a given job in the spooler. pjtmp->Priority= 22 ; // change a priority res = SetJob( hPrinter,pjtmp->JobId,3,(LPBYTE)( pjtmp ),0); Does not work - i always get the error Error code (hex): 57,(dec): 87 string = The parameter is incorrect. Accroding to the SetJob function description at http:// msdn.microsoft.com/en-us/library/ms535483(VS.85).aspx "Windows NT/ 2000/XP/Vista: You can use the same call to the SetJob function to set print job parameters and to give a command to a print job. Thus, Command does not need to be 0 if you are setting print job parameters, although it can be. " Has anyone any idea what I am doing wrong or not doing or simply missing ? Regards, paul. --- Questions? First check the UndocPrint pages at http://www.undocprint.org/winspool To unsubscribe, visit the List Server page at //www.freelists.org/list/winprndev