RemovePrinterConnection Method |
Description
Adds a remote MS-DOS based printer connection to your computer system.
PowerBASIC Syntax
Arguments
The RemovePrinterConnection method removes both Windows and MS-DOS based printer connections. If the printer was connected using the method AddPrinterConnection, bstrName must be the printer's local name. If the printer was connected using the AddWindowsPrinterConnection method or was added manually (using the Add Printer wizard), then bstrName must be the printer's UNC name.
Example [PowerBASIC]
#INCLUDE "WSHOM.INC"
DIM pWshNetwork AS IWshNetwork DIM bstrLocalName AS STRING DIM bstrRemoteName AS STRING
pWshNetwork = NEWCOM "WScript.Network" pWshNetwork.RemovePrinterConnection UCODE$("\\printserv\DefaultPrinter"), %VARIANT_TRUE, %VARIANT_TRUE
|