Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function ends a network resource enumeration started by the WNetOpenEnumfunction.

Syntax

DWORD WNetCloseEnum(
  HANDLE 
hEnum 
);

Parameters

hEnum

[in] Handle to an enumeration instance. This handle must be returned by the WNetOpenEnumfunction.

Return Value

This function does return correct values. For more information, call GetLastErrorto retrieve the correct result. Possible GetLastErrorvalues are described in the following table.

Value Description

ERROR_SUCCESS

Indicates success.

ERROR_NO_NETWORK

A network is not present.

ERROR_INVALID_HANDLE

The handle specified in hEnumis not valid.

Requirements

Header winnetwk.h
Library coredll.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later