public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Wrong value for |FileNormalizedNameInfo| (|24| vs. |48|) in Cygwin 3.6 /usr/include ...
Date: Sat, 11 May 2024 10:17:18 -0600	[thread overview]
Message-ID: <de5b72e5-6168-45ae-b9d8-7f94175720b7@SystematicSW.ab.ca> (raw)
In-Reply-To: <CAKAoaQ=+MnexxHnoapGLk2iL0G49iBpqK-AoP_28KfD_00Q46Q@mail.gmail.com>

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

  reply	other threads:[~2024-05-11 16:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-11 11:30 Roland Mainz
2024-05-11 16:17 ` Brian Inglis [this message]
2024-05-15 10:12   ` Roland Mainz
2024-05-15 14:45     ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
     [not found]   ` <DM8PR09MB7095035B890E1D7401D8DBB6A5E22@DM8PR09MB7095.namprd09.prod.outlook.com>
2024-05-15 14:14     ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de5b72e5-6168-45ae-b9d8-7f94175720b7@SystematicSW.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).