On 2024-05-11 05:30, Roland Mainz via Cygwin wrote:
I'm writing a test program for |FileNormalizedNameInfo| right now (see
https://rovema.kpaste.net/07074abc).
Per 
https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ne-minwinbase-file_info_by_handle_class
|FileNormalizedNameInfo| should be |24|, but on Cygwin 3.6 I get the
value |48|.
Since |GetFileInformationByHandleEx()| gives me error 87 (="Invalid
Parameter") for |48|, but works as intended for |24| I assume that the
Cygwin header is wrong.

Could someone please check the Cygwin header files ?

Could someone please read the enum constant names and classes carefully?

Package w32api-headers:

Headers:
---- snip ----
$ grep -r FileNormalizedNameInfo /usr/include/
/usr/include/w32api/ddk/wdm.h:  FileNormalizedNameInformation,
/usr/include/w32api/minwinbase.h:    *FileNormalizedNameInfo*,
/usr/include/w32api/winternl.h:    FileNormalizedNameInformation = 48,
---- snip ----

*FileNormalizedNameInfo* 24/0x18 is defined in minwinbase.h FILE_INFO_BY_HANDLE_CLASS for GetFileInformationByHandleEx whereas *FileNormalizedNameInformation* 44/0x2e is defined in winternl.h FILE_INFORMATION_CLASS for NtQueryInformationFile:

https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-ntqueryinformationfile

ditto in ddk/wdm.h!

--
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                -- Antoine de Saint-Exupéry

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to