Skip to content

Conversation

@JerryShea
Copy link
Contributor

@JerryShea JerryShea commented Jun 21, 2021

3rd party bom 3.19.8

CLibrary INSTANCE = Native.load("kernel32", CLibrary.class);

int GetProcessAffinityMask(final int pid, final PointerType lpProcessAffinityMask, final PointerType lpSystemAffinityMask) throws LastErrorException;
int GetProcessAffinityMask(final WinNT.HANDLE pid, final PointerType lpProcessAffinityMask, final PointerType lpSystemAffinityMask) throws LastErrorException;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the fix to stop the exceptions

interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary("c", CLibrary.class);
CLibrary INSTANCE = Native.load("c", CLibrary.class);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this and above are de-deprecations

public void testGettid() {
System.out.println("pid=" + getImpl().getProcessId());
System.out.println("tid=" + getImpl().getThreadId());
AffinitySupport.setThreadId();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

de-deprecate

@JerryShea JerryShea changed the title Jna 5.8.0 compatibility with JNA 5.8.0 Jun 21, 2021
@JerryShea JerryShea merged commit 36d5657 into develop Jun 21, 2021
@JerryShea JerryShea deleted the jna_5_8_0 branch June 21, 2021 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants