wntAddPrinter

Maps a printer resource to a local port.

Syntax:

wntAddPrinter(user-id, pswd, net-resource, local device, persist)

Parameters:

(s) user-id: user-id or @DEFAULT for current user

(s) pswd: password or @DEFAULT for current password or @NONE for no password

(s) net-resource: UNC netname of net resource

(s) local devic:e  local printer port e.g. ("lpt1") or @NONE for connect only

(s) persist: @TRUE - Specifies persistent connection, one that will automatically reconnect when you reboot windows. @FALSE - Specifies a temporary connection.

Returns:

(i) @TRUE if the port was mapped; @FALSE the port was not mapped.

 

This function allows a connection to be made to a net resource, and, optionally, a local device to be mapped to the net resource.

 

Example:
; Load Appropriate Extender
AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')

wntAddPrinter(@DEFAULT,@DEFAULT,"\\SERVER\LJ4","lpt2",@FALSE) Exit
See Also:

wntDirDialog, wntCancelCon