John Fritch
Oct 3rd, 2000, 02:36 PM
With two print jobs queued, the first call to EnumJobs, shown below,
retval = EnumJobs(hPrinter, 0, 100, 2, ByVal 0, 0, needed, numitems)
returns retval = 1 and needed = numitems = 0. It should have returned retval = 0, numitems = 2, and needed = a non-zero number of bytes needed in the byte buffer to be filled with Job_Info_2 data during the second call to EnumJobs. What gives? I’m running vanilla VB 6 SP4 on Windows 95 and have a single printer, an Epson Color Stylus 600. The api calls correctly identify the name of my printer, and the hwnd value returned for the printer (hPrinter = 5308460) appears to be correct.
I’m also experiencing a similar problem with GetPrinter, for which I am never able to get a cJobs return value of anything other than zero.
John Fritch
retval = EnumJobs(hPrinter, 0, 100, 2, ByVal 0, 0, needed, numitems)
returns retval = 1 and needed = numitems = 0. It should have returned retval = 0, numitems = 2, and needed = a non-zero number of bytes needed in the byte buffer to be filled with Job_Info_2 data during the second call to EnumJobs. What gives? I’m running vanilla VB 6 SP4 on Windows 95 and have a single printer, an Epson Color Stylus 600. The api calls correctly identify the name of my printer, and the hwnd value returned for the printer (hPrinter = 5308460) appears to be correct.
I’m also experiencing a similar problem with GetPrinter, for which I am never able to get a cJobs return value of anything other than zero.
John Fritch