Hi,
On 2023-06-06 18:16, LIU Hao wrote:
Attached are some patches about APIs yesterday.
This is an attempt to make these import libraries closer to MS
documentation [1] [2], but:
1) `GetFileVersionInfoW` isn't mentioned anywhere. According to its
documentation [3] it should be imported from
`api-ms-win-core-version-l1-1-0.dll` but that DLL exports no such
function.
I think you mean api-ms-win-core-version-l1-1-1. This is how it's
exported in the WACK XML files and also what WindowsApp.lib uses (in 19041).
The MS documentation is not 100% reliable. I started trying to update
the doc with what is available in UWP 19H1 (what we target in VLC) but
it turns out everything that has been added since RS5 is not mentioned
in any doc. Check the last 2 commits in [5].
I sent patches upstream to see if they are willing to update the doc.
This single change [6] for *all* Win10 UWP is still pending... I have
little hope going forward...
For GetFileVersionInfoW it is documented to be in
api-ms-win-core-version-l1-1-1, but in the MarkDown version of the
documentation [7] under the "api_location" list. So I suggest relying on
the markdown files, rather than the published version.
VerFindFileW is documented in the MarkDown file [8].
The changes in api-ms-win-core-winrt-error-l1-1-1 are documented as
belonging there. For example, for RoClearError it doesn't show in the
webpage but it does show in the MarkDown file, in the "api_location"
element [9].
2) `HSTRING_UserFree64` is documented as removed in 10.0.16299 [1] and
should be imported from `combase.dll` [4]; and likewise others.
Indeed. I made a tool (private as I'm not sure how legally safe it is)
to generate the .def files from the WACK XML files. I used it to find
which DLLs are needed to export some functions. However, it seems that
this export doesn't match any version of WindowsApp.lib (from 10240 to
22261). So it's correct to remove all these calls. In this case the
MarkDown doc is incorrect [10].
The entries in api-ms-win-ro-typeresolution-l1-1-1 are present in the
DLLs and WindowsApp.lib but only since the 22000 SDK. They are not in
sdk-api, so they can be removed.
3) The change against `api-ms-win-security-cryptoapi-l1-1-0.def` should
probably be reverted, as in 9464ea241865f218cdfee9784bb6dc1731a23647.
These are found in the WACK, in WindowsApp.lib since 16299 and in the
MarkDown doc [11]. We should actually allow them in the headers for
16299+ UWP builds. That will save me a few patches in VLC contribs.
BTW, since the online doc is now generated from the MarkDown files in
that sdk-api repo, would it make sense to put some tools in mingw-w64 to
parse those files and extract some data. I have some Python code that
parses the frontmatter part of files to find various information. For
example we could verify that the headers match the minimum allowed
version for each API entry.
It would also be possible to make a tool that checks that we don't
export any undocumented API, as your current patches do.
[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis
[2]
https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-extension-apis
[3]
https://learn.microsoft.com/en-us/windows/win32/api/winver/nf-winver-getfileversioninfow
[4]
https://learn.microsoft.com/en-us/windows/win32/api/inspectable/nf-inspectable-hstring_userfree64
[5] https://github.com/robUx4/sdk-api/commits/uwp-allowed-19041
[6] https://github.com/MicrosoftDocs/sdk-api/pull/1555
[7]
https://github.com/MicrosoftDocs/sdk-api/blob/780ec86ec4992638894e184beed82690d84b0308/sdk-api-src/content/winver/nf-winver-getfileversioninfow.md?plain=1#L42
[8]
https://github.com/MicrosoftDocs/sdk-api/blob/780ec86ec4992638894e184beed82690d84b0308/sdk-api-src/content/winver/nf-winver-verfindfilew.md?plain=1#L42
[9]
https://github.com/MicrosoftDocs/sdk-api/blob/780ec86ec4992638894e184beed82690d84b0308/sdk-api-src/content/roerrorapi/nf-roerrorapi-roclearerror.md?plain=1#L41
[10]
https://github.com/MicrosoftDocs/sdk-api/blob/780ec86ec4992638894e184beed82690d84b0308/sdk-api-src/content/inspectable/nf-inspectable-hstring_userfree64.md?plain=1#L42
[11]
https://github.com/MicrosoftDocs/sdk-api/blob/780ec86ec4992638894e184beed82690d84b0308/sdk-api-src/content/wincrypt/nf-wincrypt-cryptacquirecontexta.md?plain=1#L42
--
Best regards,
LIU Hao
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public