Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / May 2006

Tip: Looking for answers? Try searching our database.

Why does WINSPOOL GetPrinter show different job counts on different computers?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lee Gillie - 26 Apr 2006 22:18 GMT
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.

What is going on ??
Herfried K. Wagner [MVP] - 28 Apr 2006 13:26 GMT
"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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.