Solved

Printer Problem

Posted on 1998-08-24
7
626 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month6 days, 11 hours left to enroll

623 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