There's a few functions you'll need. WNetOpenEnum, followed by repeated calls to WNetEnumResource, and finally WNetCloseEnum. Note that these functions will not give you the whole network in one go - they only give you one "level", and you'll need to recurse down to build up a picture of the entire network.