All-
I need help figuring out how to enumerate local printer share names in either
VB.NET or C#.
I can enumerate the printer names easily (I put my code to do this below in case someone might want it), but this does not get me the share names. I need the share names to print some raw print data to the printer.
If you can help, I'd appreciate it.
Hubman
My code to enumerate printer names:
Public Function GetPrinterList() As String
Dim PrinterName As String = ""
Dim objPrint As New System.Drawing.Printing.PrinterSettings
Dim i As Integer = 0
Dim Printers() As String
For Each PrinterName In objPrint.InstalledPrinters
ReDim Preserve Printers(i)
Printers(i) = PrinterName
i += 1
Next
If Printers.Length > 0 Then
Return Printers
Else
Return Nothing
End If
End Function