NetUseGetInfo or Net32UseGetInfo

The NetUseGetInfo API retrieves information about a connection to a shared resource.