Martin Storsjö <[email protected]> wrote:

> On Fri, 29 May 2026, Kirill Makurin wrote:
>
>> After some testing, I realized that while `HeapSummary` and related
>> types are exposed for UWP compilation even in Microsoft's haeders, it
>> seems like `HeapSummary` is not available in any API set; `dumpbin
>> -imports` lists `HeapSummary` as imported directly from kernel32.dll
>> rather than an API set. This article[1] further confirms it...
>
> It's not the case that everything in UWP must come from an API set DLL.

Is that so? Good to know, then. It really stood out in output of `dumpbin 
-imports` that `HeapSummary` was imported directly from kernel32.dll while 
everything else is imported from API sets...

> If you look in "App Certification Kit/SupportedAPIs-x64.xml" in a WinSDK
> (I used version 10.0.26100.0), you'll see that it lists HeapSummary as an
> allowed symbol to import directly from kernel32.dll.

I'm pretty sure I checked same `SupportedAPIs-x64.xml` before sending the 
patch, which is why I was pretty sure that `HeapSummary` should be available on 
UWP.

> (It also lists that the symbol may be imported from
> api-ms-win-core-heap-l1-1-0.dll. Not sure why that's the case; perhaps
> older WinSDK imported it from there, but they stopped for some unknown
> reason?)

In the link I attached, there are references to 
`api-ms-win-core-heap-l1-1-0.dll` like this:

```
HeapCreate  Introduced into api-ms-win-core-heap-l1-2-0.dll in 10.0.10240. 
Moved into api-ms-win-core-heap-l1-1-0.dll in 10.0.16299.
```

In output of `dumpbin -imports` I can see that other heap APIs are imported 
from that `api-ms-win-core-heap-l1-1-0.dll`:

```
    api-ms-win-core-heap-l1-1-0.dll
             180004780 Import Address Table
             180004548 Import Name Table
                     0 time date stamp
                     0 Index of first forwarder reference

                           2 HeapAlloc
                           7 HeapLock
                           9 HeapReAlloc
                           A HeapSetInformation
                           C HeapUnlock
```

Meanwhile...

```
    KERNEL32.dll
             180004638 Import Address Table
             180004400 Import Name Table
                     0 time date stamp
                     0 Index of first forwarder reference

                         38B HeapSummary
```

- Kirill Makurin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to