No navigation frame on the left?  Click here.

NetUseEnum

The following three samples demonstrate the functions NetUseAdd(), NetUseEnum(), and NetUseDel(). I strongly recommend using the WNet*() APIs whenever possible. Only NetUseEnum() (and NetUseGetInfo() might still be of some value, as they are able to extract the current use counts for connected shares. (That is what "net.exe use <drive>: employs.)

nusea.cpp, 2 KB, NetUseAdd()
nusee.cpp, 2 KB, NetUseEnum()
nused.cpp, 2 KB, NetUseDel()