delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/05/11/12:18:06

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B89333870863
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1715444283;
bh=DvPvW5XQCSh5+IzhNpTS66CQ3ntmLyiXEzX98Gn3fJg=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=GpvM77pVe8LXSagYmEgQJSPO5x/kI91udMvyWtMg93Htf/yLWPU/R00EqO0s5Xzb4
lvjgyec46AC1NBlstxMSGbu7SqheM5aLMnjK8vaFUIL7S90dihbEdMMC+BPtxyfkZ2
BEXUz/TlLBW3zqidq8WezUyHGihxgEhwgwA2/FI8=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EE3183858D28
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EE3183858D28
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715444262; cv=none;
b=LJji6cctJ9j43w18JKd3gopxb9jPx2R09PkaenfvhDbuNdYYkfyQ5mFEnoVPZup7W77RfLZIggJ28nm1OOIipH5wJMtrRp2EkGeg2z0J6qXXJS1QO3NlFPnSk9WIK4WfgDyr7gyCnjGUtD3wHtJ8Q3nUjdIn8fD4K2Pd7573E0M=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1715444262; c=relaxed/simple;
bh=GR+kKP9kd2Wuz9f+xrVPbFSwbEZl5paA/N12aOzLhOI=;
h=Message-ID:Date:MIME-Version:Subject:To:From;
b=sd5pp9Jqo5usHYu4r2dFPoMBfqtoaGv/oAifw8H0lHhsXqYnQnU+cwg646nOj7YwO0zZZSL0seaEi+i0WEL38yQFIMYl+IJHaHO//vgFIcdwG/2qSBDPhZc5Tb67u9v+jqTAYincMWAWPuK3Uk3MubfDiYDCbx3z0gtTE4vFIgc=
ARC-Authentication-Results: i=1; server2.sourceware.org
Message-ID: <de5b72e5-6168-45ae-b9d8-7f94175720b7@SystematicSW.ab.ca>
Date: Sat, 11 May 2024 10:17:18 -0600
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Wrong value for |FileNormalizedNameInfo| (|24| vs. |48|) in
Cygwin 3.6 /usr/include ...
To: cygwin AT cygwin DOT com
References: <CAKAoaQ=+MnexxHnoapGLk2iL0G49iBpqK-AoP_28KfD_00Q46Q AT mail DOT gmail DOT com>
Organization: Systematic Software
In-Reply-To: <CAKAoaQ=+MnexxHnoapGLk2iL0G49iBpqK-AoP_28KfD_00Q46Q@mail.gmail.com>
X-Rspamd-Server: rspamout02
X-Rspamd-Queue-Id: 286F920029
X-Stat-Signature: oh1oz77bep8phu9a35dikff1j7ykw5m8
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,
SPF_PASS, TXREP,
UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6
X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361
X-Session-ID: U2FsdGVkX1/IgpIIe0lQX2xc3nFjrYDAvHmuS7OUh/Q=
X-HE-Tag: 1715444239-313931
X-HE-Meta: U2FsdGVkX1+PG2JKreMDLUT1O2FHDdKJX68A7Or7DFgXV3ntHiFsFDa01PHKf88lV/CYx8d3abbjsip3BSSqHA9EPqQK2lcCN5y1lEQKWxCRiVrqmZPrCFhIhHchRFcstWGtbyT7Baz45bLs+ulFV+vj4XeUBcCl4EEW0yOmuLlEnejoEwXWlZly+B1fpRcF4/HT82FsUF3rzESLWwPdgdBFs/HHbBeJSpzJ2E46dtXgxfFkDHN2N07zVJfhaJuhu8Kee/F1WJFDLwr6w+eaA51DAWqpuAzvsczWM+rn7RjdF/cZUPbHVwzDhvczdszkEaVarmjMEEQpN5zIRDIfyAr1eDum8/mrQVBiJN+GFBuwOyNkIfSpWOO6afeJdYDNX4WcYijtS5MCjRso4G08rxhTKtWzeIdFU2iaTJmV4IBZXOOK7Bqoug==
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Brian Inglis <Brian DOT Inglis AT SystematicSW DOT ab DOT ca>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 44BGI5iE308010

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019