FindFirstFileName function kernel32

Win32Result<HANDLE> FindFirstFileName(
  1. PCWSTR lpFileName,
  2. int dwFlags,
  3. Pointer<Uint32> stringLength,
  4. PWSTR linkName,
)

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 learn more, see learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-findfirstfilenamew.

Implementation

Win32Result<HANDLE> FindFirstFileName(
  PCWSTR lpFileName,
  int dwFlags,
  Pointer<Uint32> stringLength,
  PWSTR linkName,
) {
  final result_ = FindFirstFileNameW_Wrapper(
    lpFileName,
    dwFlags,
    stringLength,
    linkName,
  );
  return .new(value: .new(result_.value.ptr), error: result_.error);
}