2,035 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
81
views
JNA CoCreateInstance returns S_OK but ShellLink/IShellLinkW fails, COM pointer is non-null but object unusable
I'm making a Java app that scans the Windows Recent Files folder and resolves .lnk shorcuts to their actual file paths. I'm doing so using JNA the JNA API and simulating IShellLinkW and IPersistFile.
...
2
votes
1
answer
134
views
How do I create a file through JNA
In the java 25 move, we're removing some code that uses reflection in a soon-to-be-disallowed way. Instead, we're looking at using JNA. I need to access a file descriptor (the unix kind) and I thought ...
Erik's user avatar
- 2,071
3
votes
1
answer
108
views
How to call a COM function with a Variant * parameter using JNA?
Background and environment:
I have a Windows software installed, which has a Component Model Object. The COM provides a function:
long GetValue(VARIANT* v, short a, short b, [optional] VARIANT c, [...
0
votes
0
answers
48
views
How to intercept and modify scroll wheel events on MacOS in JVM
As you already know mouse wheel scroll does not work properly on MacOS. To fix this I tried to intercept all scroll events and modify them. This is what I have currently
import ...
1
vote
1
answer
109
views
Minecraft Forge 1.8.9 Mod Works In Dev Env (Run in IntelliJ Idea) but Not when exported In-Game
When launching my minecraft forge 1.8.9 mod in a dev env (Intellij Idea) it launches perfectly fine but when exporting the mod and using it In-Game it crashes on start-up with this error:
Description: ...
2
votes
0
answers
84
views
How to implement in Java a callback to be called by a COM object?
I'm integrating in Java with a DLL that allows me to add an instance to be notified.
I have tried several solutions and in none of them was the COM object able to notify me. I suspect that the way I ...
0
votes
1
answer
120
views
MAUI Project getting errors after binding android library (.aar)
I am using android library called "autoreplyprint.aar" , this library contains another.jar file called "jna-4.5.1.jar".
I have used following code to bind it in my MAUI project,
&...
2
votes
0
answers
82
views
UnsatisfiedLinkError for Go native method with custom Java return type
I have a Go method that returns 2 byte arrays and 2 strings defined as:
// export GetDetails
func GetDetails() (unsafe.Pointer, unsafe.Pointer, *C.char, *C.char) {
...
return C.CBytes(arr1), C....
1
vote
1
answer
446
views
Problems with Windows graphics capture
I'm trying to use Windows graphics API to capture windows through my Java application with the help of JNA.
I have successfully achieved this, but when running multiple captures it seems to block and ...
0
votes
0
answers
32
views
JNAerator: 2d array
I have multiple structs declared in the header files with many different primitive types as:
uint8_t, uint16_t, uint8_t[], uint8_t[], uint8_t[][], ... , uint16_t[][], ..., uint32_t[][]
In Java, when I ...
2
votes
1
answer
72
views
What's the JNA mapping for 'unsigned char data[1]'?
I'm trying to write JNA wrappers for LibRaw and I'm stumbling over one particular C structure:
typedef struct
{
enum LibRaw_image_formats type;
ushort height, width, colors, bits;
...
0
votes
1
answer
66
views
Struggling with JNA wrappers for LibRaw image data pointers
Background: I'm not a professional developer - I used C a few decades ago and Java a few years ago. I'm rusty.
I'm trying to write JNA wrappers for LibRaw and I'm struggling to get the right JNA '...
-1
votes
1
answer
141
views
Using Java FX and C++ together with JNA/JNI [closed]
I'm working on a class project and about half of our group knows c++ and the other half only knows Java FX. Our project is a synthesizer, which involves a good amount of DSP and GUI stuff. I figured ...
0
votes
0
answers
51
views
Use JNA to call DLLS that have dependency concerns error message Invalid memory access
I created two dll libraries in C# , shuchu.dll AND yinyong.dll
The contents of shuchu dll
namespace shuchu
{
public class Class1
{
[DllExport("getInfo", CallingConvention =...
1
vote
1
answer
243
views
Memory leak in unknown module reported with JNA and JUnit
This is a specific issue I found while making MRE for my earlier question. It's not clear if it's the same issue, even though it seems related, so I'm asking it as a separate question.
Consider the ...