19.1.4 Sharing Devices

Windows 3.1 includes three functions that an application can use to manage its network connections: WNetAddConnection, WNetCancelConnection, and WNetGetConnection. The WNetAddConnection function redirects a local device (either a disk drive or a printer port) to a shared device on a remote server.

The WNetCancelConnection function cancels a redirection to a shared device. The WNetGetConnection function returns the name of the network resource associated with a redirected local device. For more information about these network functions, see the Microsoft Windows Programmer's Reference, Volume 2.