Solved

Printer Problem

Posted on 1998-08-24
7
617 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 100 total points
ID: 1430664
The GetPrinterData call isn't for returning print jobs,

Try the EnumJobs Call, for job list.


0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to open Waze.com/livemap from address saved in DB? 26 189
Vb.net 2008 2 59
Macro: print each sheet to pdf using ExportAsFixedFormat 11 48
RUNRMTCMD from AS/400 12 47
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 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