Solved

TPrinter usage in NT Service

Posted on 2000-03-24
2
326 Views
Last Modified: 2010-04-04
1) Attempting to set Printers.PrinterIndex within an NT Service causes a 'No Default Printer Selected' exception.
The same app written as a stand alone exe works fine.

2) Network printers don't show in the Printers.printers list, but they do under Win98. I suppose I can do my own EnumPrinters call but if TPrinter doesn't know about them it doesn't do me any good. I won't have a valid printerIndex to set it to! Help!  
0
Comment
Question by:wesr
2 Comments
 
LVL 1

Accepted Solution

by:
snoop_doggy_dogg earned 100 total points
ID: 2655589
I'm not sure, but aren't default printers setup on an account-by-account basis?  Perhaps the account your service is running under does not have a default printer.  If you are running under the localsystem account, you probably won't be able to access a network printer anyway.

....just a guess

Woof!
http://www.brighteroutlook.com
0
 

Expert Comment

by:davecee
ID: 2656911
It means that the account you're running the service under doesn't have any printers set up. You need to either change the account it runs under (in the Services control panel) or set up a network printer in the account it's running under now.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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 Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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