WNetOpenEnum(), with its companion functions WNetEnumResource() and WNetCloseEnum(), iterates through a specific level of what NT4 and Win95 users know as the "Network Neighbourhood". It can be called recursively to drill down in the tree, and that is what this sample does.

Note that WNetEnumResource() does not list hidden shares; use NetShareEnum() for this task.

wnoe_wner.c, 2 KB