Solved

Printer Problem

Posted on 1998-08-24
7
613 Views
Last Modified: 2008-02-01
(Using Visual Basic 5 - Enterprise Edition)

I have the following problem:

I am trying to catch printer-information (about actual job, user, paper-status, etc.) through our companies network by using the "OpenPrinter", "GetPrinter" and "GetPrinterData" calls... but it doesn't seem to work although I've passed all neccessary parameters. The Return-Code stays "0" :-(
Is there anyone, who knows, how to catch a printer's status ?

Thanks in advance,
Epos
0
Comment
Question by:epos
  • 3
  • 2
  • 2
7 Comments
 
LVL 10

Expert Comment

by:viktornet
Comment Utility
Why don't you check the VB section? =)

Regards,
Viktor Ivanov
0
 
LVL 10

Expert Comment

by:viktornet
Comment Utility
Opss....sorry...the mistake is mine...once again sorry =|

Regards,
Viktor Ivanov
0
 
LVL 1

Accepted Solution

by:
blwatkins earned 100 total points
Comment Utility
The GetPrinterData call isn't for returning print jobs,

Try the EnumJobs Call, for job list.


0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:epos
Comment Utility
Alright...
now I get a "1" as result...
but I need something like a list of jobs...
For example:
Printer:           Job:             User:        Status:
1 HP LaserJet 5Si  Crystal          Paridon      80%
3 HP LaserJet 5Si  Word             Germer       20%
9 HP LaserJet 4    Visual Basic     Pohl         <PAPER OUT>
Is it possible ???    
0
 
LVL 1

Expert Comment

by:blwatkins
Comment Utility
Ya there is a list of these commands I'll give them to you.  Try the other "Enum" Functions  Thanks....


Following are the functions used to access the print spooler.  
 
AbortPrinter
AbortProc
AddForm
AddJob
AddMonitor
AddPort
AddPrinter
AddPrinterConnection
AddPrinterDriver
AddPrintProcessor
AddPrintProvidor
AdvancedDocumentProperties
ClosePrinter
ConfigurePort
ConnectToPrinterDlg
DeleteForm
DeleteMonitor
DeletePort
DeletePrinter
DeletePrinterConnection
DeletePrinterData
DeletePrinterDriver
DeletePrintProcessor
DeletePrintProvidor
DocumentProperties
EndDocPrinter
EndPagePrinter
EnumForms
EnumJobs
EnumMonitors
EnumPorts
EnumPrinterData
EnumPrinterDrivers
EnumPrinters
EnumPrintProcessorDataTypes
EnumPrintProcessors
FindClosePrinterChangeNotification
FindFirstPrinterChangeNotification
FindNextPrinterChangeNotification
FreePrinterNotifyInfo
GetForm
GetJob
GetPrinter
GetPrinterData
GetPrinterDriver
GetPrinterDriverDirectory
GetPrintProcessorDirectory
OpenPrinter
PrinterMessageBox
PrinterProperties
ReadPrinter
ResetPrinter
ScheduleJob
SetForm
SetJob
SetPort
SetPrinter
SetPrinterData
StartDocPrinter
StartPagePrinter
WaitForPrinterChange
WritePrinter

0
 

Author Comment

by:epos
Comment Utility
Okay... thanks...
I will try these calls tomorrow, when I'm back @ the company...

;o)
0
 

Author Comment

by:epos
Comment Utility
Thank You very much :o)
I've got it !

Epos.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now