Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Printer Problem

Posted on 1998-08-24
7
Medium Priority
?
638 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
ID: 1430662
Why don't you check the VB section? =)

Regards,
Viktor Ivanov
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1430663
Opss....sorry...the mistake is mine...once again sorry =|

Regards,
Viktor Ivanov
0
 
LVL 1

Accepted Solution

by:
blwatkins earned 400 total points
ID: 1430664
The GetPrinterData call isn't for returning print jobs,

Try the EnumJobs Call, for job list.


0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:epos
ID: 1430665
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
ID: 1430666
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
ID: 1430667
Okay... thanks...
I will try these calls tomorrow, when I'm back @ the company...

;o)
0
 

Author Comment

by:epos
ID: 1430668
Thank You very much :o)
I've got it !

Epos.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

885 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