Solved

Where in a system, does vb get the list of installed printers

Posted on 2006-07-21
4
353 Views
Last Modified: 2010-05-18
Hi

I'm working on an application which needs to obtain the list of printers installed on the machine. I am working with my software and an external software program. I need to know where this external program gets it's list of printers from, does anyone know where in the system software usually gets this info from and are there several different registery locations

Any ideas appreciated.
0
Comment
Question by:eneate
[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
4 Comments
 
LVL 43

Assisted Solution

by:TimCottee
TimCottee earned 125 total points
ID: 17153164
Hi eneate,

VB has a Printers collection which enumerates all the available printers installed on a machine. This uses an API call internally to generate the list. All applications should use the same API call, either natively or wrapped into a collection as vb does. After all, that is what it is there for.

Tim Cottee
0
 

Author Comment

by:eneate
ID: 17153207
Hi Tim

Thanks for that the problem is that in the one app it is sometimes listing the printers with capital letters and others without, and this seams to effect how the software then sees the call and sometimes a printer is output to and other times not. Any idea why this would be? I was wondering if there were diffferent registry files which the software might call the list of printers from.

eneate
0
 
LVL 4

Accepted Solution

by:
JRCSystems earned 125 total points
ID: 17159628

Key for all local printers:
HKEY_LOCAL_Machine\System\CurrentControlSet\Control\Print\Printers

Network Printer(s) and User-modes of local printers:
HKEY_CURRENT_USER\Printers\Connections
and
HKEY_CURRENT_USER\Printers\DevModes2

I would point out, if the original problem, has only to do with uppercase, vs lowercase....

Why not use either $UCASE() or LCASE$() on both arguments in the comparision to force them to the same case?
That would seem easier than digging through the registry.
0
 

Author Comment

by:eneate
ID: 17160398
yo  thanks for that, it all seams to do the trick.
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

Suggested Solutions

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

737 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