microsoft / microsoft/wil

hlocal_deleter, unique_hlocal_security_descriptor (and others) incorrectly behind WINAPI_PARTITION_DESKTOP

Open
#150 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
3k
Forks
300
Avg merge
19h 12m
Merged PRs (30d)
1

Description

The Windows SDK headers don't hide LocalAlloc or LocalFree behind that API partition, they put it behind

#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)

This means that if I have an app that's using WINAPI_PARTITION_APP, I have access to these functions, but WIL is incorrectly disabling the RAII wrappers.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the declarations for hlocal_deleter and unique_hlocal_security_descriptor, along with the other affected wrappers, and compare their WINAPI_PARTITION guards with the Windows SDK guards for LocalAlloc and LocalFree. The change is complete when these RAII wrappers remain available under WINAPI_PARTITION_APP, consistent with the SDK.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.