java-native-access / java-native-access/jna

win32 platform's EvtSubscribe has a bad signature

Open
#1,059 1 comment 0 reactions 0 assignees View on GitHub

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.

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.