5

If I open up "Devices and Printers" on my machine (Windows 7), I see something like this for the printers:

Printers with Images

Is there a way to get these images from the OS in my WPF application? I would like to list printers much like this, but right now I only have the text for the printers (not the images).

Vaccano
  • 78,325
  • 149
  • 468
  • 850

1 Answers1

1

You need to call SetupDiLoadDeviceIcon. You'll have to read up on MSDN and play with p-Invoke a bit to get this working from the managed side...

The info comes from registry, but you shouldn't look for it yourself. See Providing Vendor Icons for the Shell and AutoPlay.

Remus Rusanu
  • 288,378
  • 40
  • 442
  • 569