From: geekgrrl on
Hello,

Does anyone know if there is a limit on the value of JobID that is
returned from the JOB_INFO_X structures?


I am currently using the JobID to track and store information about
jobs being submitted to a print queue using the FindFirst/
FindNextPrinterChangeNotification.


My storage and retreival is based off a key-value map mapped against
the JobID.


What I am finding in Vista is that the job ID starts at 1 ( if I've
reset the print spooler using net stop/start spooler) and goes to 255
at which point the number wraps back to 1. If I print more than 255
jobs, my jobID key-mapping will break.


This seems like a very low number as the JobID is a DWORD and can be
much higher.


Is this a new Vista "feature"?


Thanks in advance.


Geekgrrl.

From: Christoph Lindemann on
From my experience the JobID will go from 1-255 then it will reuse the IDs
again from 1-255, if currently all 255 IDs are allocated to queued jobs, the
the spooler will assign IDs greater then 255.
So you should expect IDs 1-4294967295, as JobID is defined as a 32bit
(DWORD) value.

My experience is that you should be ok only to take the lower 16bit
(1-65535). I even had problems with JobIDs where the higher 16bit contained
garbage. So I do mask out the higher 16bit.
But this is only my personal experience, I take no responsibility for this
beeing correct.

--
Christoph Lindemann
Undocumented Printing
http://www.undocprint.org/


"geekgrrl" <geekgrrl71(a)hotmail.com> wrote in message
news:031525db-a3bc-4de8-8ffc-4e10def12c00(a)v67g2000hse.googlegroups.com...
> Hello,
>
> Does anyone know if there is a limit on the value of JobID that is
> returned from the JOB_INFO_X structures?
>
>
> I am currently using the JobID to track and store information about
> jobs being submitted to a print queue using the FindFirst/
> FindNextPrinterChangeNotification.
>
>
> My storage and retreival is based off a key-value map mapped against
> the JobID.
>
>
> What I am finding in Vista is that the job ID starts at 1 ( if I've
> reset the print spooler using net stop/start spooler) and goes to 255
> at which point the number wraps back to 1. If I print more than 255
> jobs, my jobID key-mapping will break.
>
>
> This seems like a very low number as the JobID is a DWORD and can be
> much higher.
>
>
> Is this a new Vista "feature"?
>
>
> Thanks in advance.
>
>
> Geekgrrl.
>


From: geekgrrl on
Thanks for the feedback, Christoph.

I just hadn't hit this particular case before when on other operating
systems, but this new code where I'm keeping a log of all the print
information has brought it to light.
This changes how I need to store the job information internally to my
job info tracking code, as I can't be guaranteed that the job id's are
unique.

Thanks again,
Geekgrrl.