java-native-access / java-native-access/jna
win32 platform's EvtSubscribe has a bad signature
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.9k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
EvtSubscribe's second parameter is supposed to be a HANDLE to a signal event as returned from CreateEvent, but in the current jna API, it is incorrectly set to be an EVT_HANDLE, which can't function as expected. This is an understandable mistake, given the confusing name conflict in windows with the word "event", and using both meanings in the same function call here.
- EvtSubscribe's documentation: https://docs.microsoft.com/en-us/windows/desktop/api/winevt/nf-winevt-evtsubscribe
- CreateEvent's documentation: https://docs.microsoft.com/en-us/windows/desktop/api/synchapi/nf-synchapi-createeventw
- Current location in JNA of EvtSubscribe: https://github.com/java-native-access/jna/blob/9a1be160d1d7ffa1dc2b64d7e3efd26aa454572e/contrib/platform/src/com/sun/jna/platform/win32/Wevtapi.java#L202
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in contrib/platform/src/com/sun/jna/platform/win32/Wevtapi.java around line 202 and compare EvtSubscribe's second parameter with the linked Microsoft documentation. Check CreateEvent's return type and the expected EvtSubscribe signature; done means the JNA declaration accepts the signal-event HANDLE rather than an EVT_HANDLE.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100