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
Solved

Access to shared printer is creating an exception (XP SP3)

Posted on 2008-06-17
7
390 Views
Last Modified: 2010-04-04
I am using in my software Printer.Handle & Printer to set some settings.
This worked till now fine.

After installing the SP3 of XP the program is crashing on some computers. This happens mostly when the standard printer is a shared network printer.
Printer is not nil, but when I try to access Printer.Handle or retrieve printer.pagewidth then the program is crashing.

Is there a way to find out whether the printer is a shared one?!
Or what could be the reason that there is no access to the handle.
0
Comment
Question by:Treppenmeister
  • 5
  • 2
7 Comments
 

Author Comment

by:Treppenmeister
ID: 21801894
I think that the name of a shared printer starts always with '\\' - so the half of my question is certainly answered.

I have to add still some information:
I access to the printer while the initialization.
If I set the printerindex to a non-shared printer then there is no crash and later I have normal access to the shared printer when I choose it after the initialization.

But what a difference does it make to have a non-shared printer and a shared printer?!
0
 
LVL 37

Accepted Solution

by:
Geert Gruwez earned 250 total points
ID: 21810085
For some printers the drivers are for certain service packs.
reinstall the printer driver after installing a service pack.

Usually the printer drivers get updated with the windows updates too.
with a manual install of a service pack the printers get overlooked sometimes.

Sometimes creating a printjob gives an error, but the printer automatically reinstalls it's driver.
Repeatedly calling the print job until ok is 1 solution



0
 

Author Comment

by:Treppenmeister
ID: 21810642
In one of the examples we have a network with two machines with SP3. On the one machine the program works fine, on the other machine it creates the axception.
The printer driver is not included in the SP but was installed seperately on the server and was installed on the clients automatically.  

I have at the moment a workaround: I am looking whether the name of the standard printer starts with '\\' and then I skip it till I find one with a 'good' name. But this cannot be the solution.

I have the problems only in the initialization process. Later I can access the shared network printers.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:Treppenmeister
ID: 21810704
Very strange - today everything works fine (with the old program without the workaround).
I am not sure whether I should be now happy or not.
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 21811240
Once you can get a printer to work, i keeps on working ...
until the next windows update
0
 

Author Comment

by:Treppenmeister
ID: 21872626
I cannot give you feedback yet since there was no time yet to reinstall SP3 on the one computer.
I would like  to verify it before I accept your answer as solution.
0
 

Author Comment

by:Treppenmeister
ID: 21972230
Re-installing the printer driver solved the problem.

Thanks for your help! 
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 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