DOS Fn 5f03H: Make Network Connection
Compatibility: 3.1+
Expects: AX 5f03H
BL 03H = it's a printer (DS:SI name is "PRN", "LPT1", etc.)
04H = it's a drive (DS:SI name is "A:", "B:", etc.)
CX user value--arbitrary code returned by fn 5f02H
DS:SI addr of ASCIIZ▲ device name
ES:DI addr of two ASCIIZ strings (network name and password)
──────────────────────────────────────────────────────────────────
Returns: AX error code if CF is set to CY
──────────────────────────────────────────────────────────────────
Info: Creates a connection to a network device or drive by associating
a local drive ID or device name with a network device.
The value of CX is arbitrary and is not used by DOS. It may be
used by applications as a way to mark the device for internal
processing. Its value is returned by fn 5f02H.
BL=03H connects a network printer
■ Set DS:SI to point to a printer name such as "LPT1",0
■ Set ES:DI to point to the name of a printer on the network
followed by a password. For instance,
"\\SERVER\HP4",0,"MYPASSWORD",0
If no password is needed, you must append a null string to the
end of the network device name; e.g., "\\SERVER\HP4",0,0
BL=04H connects a network drive
■ Set DS:SI to point to a local drive name such as "E:",0 or a
null string (beginning with a 0). In that case, DOS attempts
to provide access to the network without usurping a drive ID.
■ Set ES:DI to point to the name of a network drive name,
followed by a password. For instance,
"\\SERVER\FILES",0,"MYPASSWORD",0
If no password is needed, you must append a null string to the
end of the network device name; e.g., "\\SERVER\FILES",0,0
Notes: ■ Network redirection is normally handled by system-level
utilities rather than application programs.
■ The value in CX is stored in the CurDirRec for a drive.
See Also: Network Functions
DOS Functions
-♦-