Follow

Trying to invoke wintun using jnr-ffi, with zero knowledge of modern Cpp and jnr framework.

The first obstacle is figuring out wtf happened in c headers. I know you should define functions in headers. I expect soemthing like "int foo (int a, char *b);", but I got "typedef int(*FOO)(int a, char *b);", except there is no simple int and char as type, everything is micro.

After knowing I have no way to figure it out in a short amount of time, I decided to try jnr and see what I got.

But wintun is built for windows. The first function required a GUID, which has no official support in jnr.

Now it's 0130+0800. I decided to switch to jna (tomorrow, of course), which offers some win32 support. I don't care about performance anymore. As long as it works, I'm happy.

And I hope project Panama can go faster, so I don't have to go through this undocumented path. (JNR-FFI offers almost no documents, only basics, and those don't help)

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.