Network Connect Get Disconnect
Article
A C program that connects to a network share with WNetAddConnection, queries it with WNetGetConnection, and disconnects with WNetCancelConnection — each with full error reporting.
A C program that connects to a network share with WNetAddConnection, queries it with WNetGetConnection, and disconnects with WNetCancelConnection — each with full error reporting.
A small C program that uses WNetGetUser to retrieve the username associated with a mapped network drive, with full error reporting.
The WNetAddConnection2 variant of the network-drive example, using a NETRESOURCE structure to map a share with full error reporting.