WNetCloseEnum function
The WNetCloseEnum function ends a network resource enumeration started by a call to the WNetOpenEnum function.
Syntax
DWORD WNetCloseEnum( _In_ HANDLE hEnum );
Parameters
- hEnum [in]
-
Handle that identifies an enumeration instance. This handle must be returned by the WNetOpenEnum function.
Return value
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is a system error code, such as one of the following values.
| Return code | Description |
|---|---|
|
The network is unavailable. (This condition is tested before the handle specified in the hEnum parameter is tested for validity.) |
|
The hEnum parameter does not specifiy a valid handle. |
|
A network-specific error occurred. To obtain a description of the error, call the WNetGetLastError function. |
Examples
For a code sample that illustrates an application-defined function that enumerates all the resources on a network, see Enumerating Network Resources.
Requirements
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also