WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.


Printer Controller

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Check if Printer is Shared


I'm attempting to return a printer attribute on my default printer, specifically if the printer is shared.

Using pGetPrtInfo (12) only returns a number, how do I find out specifically if the PRINTER_ATTRIBUTE_SHARED is true or not?

I could not find any sample code on pGetPrtInfo printer attributes, any help would be appreciated.

defprtname = pGetDefPrtInf(1)
pshare = pGetPrtInfo("%defprtname%",12)
message("printerShare", pshare)


Using the bitwise AND operator ('&'):
defprtname = pGetDefPrtInf(1)
pshare = pGetPrtInfo(defprtname,12) & 8

Article ID:   W16352
File Created: 2017:07:28:13:58:37
Last Updated: 2005:02:18:12:19:58