Solved

TPrinter usage in NT Service

Posted on 2000-03-24
2
328 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
[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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

690 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