Platform SDK: Windows Networking |
The WNetCloseEnum function ends a network resource enumeration started by a call to the WNetOpenEnum function.
DWORD WNetCloseEnum( HANDLE hEnum // handle to enumeration );
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value can be one of the following error codes.
Value | Meaning |
---|---|
ERROR_NO_NETWORK | The network is unavailable. (This condition is tested before the handle specified in the hEnum parameter is tested for validity.) |
ERROR_INVALID_HANDLE | The hEnum parameter does not specifiy a valid handle. |
ERROR_EXTENDED_ERROR | A network-specific error occurred. To obtain a description of the error, call the WNetGetLastError function. |
For a code sample that illustrates an application-defined function that enumerates all the resources on a network, see Enumerating Network Resources.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winnetwk.h.
Library: Use Mpr.lib.
Windows Networking (WNet) Overview, Windows Networking Functions, WNetEnumResource, WNetOpenEnum