Solved

Printer Problem

Posted on 1998-08-24
7
622 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
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!

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

734 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