Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-06-17
7
Medium Priority
?
395 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
[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
  • 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 38

Accepted Solution

by:
Geert Gruwez earned 1000 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 38

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

Independent Software Vendors: 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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

715 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