WNetCloseEnum function (winnetwk.h)
The WNetCloseEnum function ends a network resource enumeration started by a call to the WNetOpenEnum function.
Syntax
DWORD WNetCloseEnum(
[in] HANDLE hEnum
);
Parameters
[in] hEnum
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 specify a valid handle. |
|
A network-specific error occurred. To obtain a description of the error, call the WNetGetLastError function. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winnetwk.h |
Library | Mpr.lib |
DLL | Mpr.dll |