"Lee Gillie" <Lee@nospam.odp.com> schrieb:
>I am interoping WINSPOOL, and retrieving LEVEL 2 info for each printer
>using GetPrinter. On two W2K computers it correctly returns the number of
>jobs waiting in the queue for the paused printer, and the paused status. On
>two W2003 computers, however, it always shows ZERO JOBS waiting to print,
>yet shows the correct paused status.
I recommend to post the declares and code you are using to get the
information about print jobs.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Lee Gillie - 28 Apr 2006 23:27 GMT
> "Lee Gillie" <Lee@nospam.odp.com> schrieb:
>
[quoted text clipped - 6 lines]
> I recommend to post the declares and code you are using to get the
> information about print jobs.
H -
That's a lot of code to post. Can I presume that you feel my
declarations are such that they behave differently on W2003, and there
are not any known variations in W2003 that might instead explain it?
TIA - Lee
Lee Gillie - 01 May 2006 17:23 GMT
H -
I tried to get it all in a small test app to show you and it wouldn't
compile in the new project. Hmmmmm... I made the changes to get it to
compile, and now I get consistent results on 2000 and 2003.
There are lots of examples of GetPrinter out there for VB6, but I
couldn't find them for VB.NET
Thanks for getting me pointed in the right direction. It wasn't making
any sense before.
- Lee
>> I recommend to post the declares and code you are using to get the
>> information about print jobs.
Lee Gillie - 02 May 2006 20:18 GMT
Nope, I take it back. Must have had something to do with how I was
queueing up test jobs. Today I see 3 and 9 jobs in 2 queues from 2 W2K
systems, but see only 2 and 0 jobs from W2003. It is just squirrely.
Lee Gillie - 03 May 2006 16:17 GMT
Ok, I found the need to pass the security descriptor on OpenPrinter.
Without it, the PRINTER_INFO_2 returned was sometimes not complete, and
made no sense when it was wrong.
- Lee