FindFirstFileNameW function
Applies to: desktop apps only
Creates an enumeration of all the hard links to the specified file. The FindFirstFileNameW function returns a handle to the enumeration that can be used on subsequent calls to the FindNextFileNameW function.
To perform this operation as a transacted operation, use the FindFirstFileNameTransactedW function.
Syntax
HANDLE WINAPI FindFirstFileNameW( __in LPCWSTR lpFileName, __in DWORD dwFlags, __inout LPDWORD StringLength, __inout PWCHAR LinkName );
Parameters
- lpFileName [in]
-
The name of the file.
- dwFlags [in]
-
Reserved; specify zero (0).
- StringLength [in, out]
-
The size of the buffer pointed to by the LinkName parameter, in characters. If this call fails and the error returned from the GetLastError function is ERROR_MORE_DATA (234), the value that is returned by this parameter is the size that the buffer pointed to by LinkName must be to contain all the data.
- LinkName [in, out]
-
A pointer to a buffer to store the first link name found for lpFileName.
Return value
If the function succeeds, the return value is a search handle that can be used with the FindNextFileNameW function or closed with the FindClose function.
If the function fails, the return value is INVALID_HANDLE_VALUE (0xffffffff). To get extended error information, call the GetLastError function.
Requirements
|
Minimum supported client | Windows Vista |
|---|---|
|
Minimum supported server | Windows Server 2008 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 4/17/2012