microsoft / microsoft/win32metadata

`FindNextPrinterChangeNotification`'s 3rd parameter name is confusing

Open
#2,148 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

external
Dominant language
C++
Stars
1.5k
Forks
149
Avg merge
5d 16h
Merged PRs (30d)
4

Description

### Summary

According to https://learn.microsoft.com/en-us/windows/win32/printdocs/findnextprinterchangenotification the signature of `FindNextPrinterChangeNotification` is:
```c
BOOL FindNextPrinterChangeNotification(
_In_ HANDLE hChange,
_Out_opt_ PDWORD pdwChange,
_In_opt_ LPVOID pPrinterNotifyOptions,
_Out_opt_ LPVOID *ppPrinterNotifyInfo
);
```

In windows-rs the function is defined as (https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Graphics/Printing/fn.FindNextPrinterChangeNotification.html):
```rust
pub unsafe fn FindNextPrinterChangeNotification(
hchange: HANDLE,
pdwchange: Option<*mut u32>,
pvreserved: Option<*const c_void>,
ppprinternotifyinfo: Option<*mut *mut c_void>,
) -> BOOL
```

The 3rd parameter should be named `pprinternotifyoptions` instead of `pvreserved`.

### Crate manifest

```TOML

```

### Crate code

```Rust

```

Contributor guide

Open the contributing guide

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

Start by comparing the Win32 metadata for FindNextPrinterChangeNotification with the Microsoft API signature and the generated windows-rs declaration shown in the issue. Update the metadata so the third parameter is named pprinternotifyoptions, then verify that the generated declaration and documentation use the corrected name.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, rust
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.