DWORD WNetCloseEnum(hEnum) | |||||
HANDLE hEnum; | /* enumeration handle returned by WNetOpenEnum | */ |
The WNetCloseEnum function ends a network-resource enumeration started by the WNetOpenEnum function.
hEnum
Identifies an enumeration instance. This handle must have been returned by the WNetOpenEnum function.
If the function is successful, the return value is NO_ERROR. Otherwise, it is an error code, which may be one of the following:
Value | Meaning |
ERROR_NO_NETWORK | Network is not present. This condition is tested before hEnum is tested for validity. |
ERROR_INVALID_HANDLE | hEnum is not a valid handle. |
ERROR_EXTENDED_ERROR | A network-specific error occurred. Use the WNetGetLastError function to obtain a description of the error. |
This function returns error codes for compatibility with Windows 3.1. For compatibility with Win32, the function also sets the error-code value returned by the GetLastError function.
WNetEnumResource, WNetOpenEnum