microsoft / microsoft/win32metadata
Friendly overload for MsiFormatRecord() can't accept a null hInstall value.
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 149
- Avg merge
- 5d 16h
- Merged PRs (30d)
- 4
Description
## Actual behavior
Another one where the [docs](https://learn.microsoft.com/en-us/windows/win32/api/msiquery/nf-msiquery-msiformatrecordw) say this should accept a null handle:
> Parameters
> [in] hInstall
>
> Handle to the installation. This may be omitted, in which case only the record field parameters are processed and properties are not available for substitution.
## Expected behavior
That hInstall accepts null, same as mentioned in https://github.com/microsoft/win32metadata/issues/2177.
## Repro steps
1. `NativeMethods.txt` content:
```
MsiFormatRecord
```
2. `NativeMethods.json` content (if present): N/A
3. Any of your own code that should be shared? N/A
### Context
- CsWin32 version: 0.3.257
- Win32Metadata version (if explicitly set by project): N/A
- Target Framework: net472
- `LangVersion` (if explicitly set by project): N/A
Contributor guide
Research direction
Start by locating the Win32 metadata definition or generation entry point for MsiFormatRecord, using the NativeMethods.txt repro and the linked API documentation as context. Confirm how the hInstall parameter is represented in the generated friendly overload; done means a null hInstall is accepted as documented while record fields remain processable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100