Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JNA Java struct from pointer
- public class DISPLAY_DEVICE extends Structure {
- public char DeviceName[] = new char[32];
- public int StateFlags;
- }
- DISPLAY_DEVICE displayDevice = new DISPLAY_DEVICE();
- int i = 0;
- while((CLibrary.INSTANCE.EnumDisplayDevicesA(Pointer.NULL, i, displayDevice.getPointer(), 0))) {
- System.out.println("screen" + i);
- displayDevice.read();
- System.out.println(displayDevice.StateFlags);
- System.out.println(displayDevice.DeviceName);
- public class MyStruct extends Structure {
- public char[] DeviceName = new char[32];
- public char StateFlags;
- public byte[] dontcare = new char[128];
- }
Advertisement
Add Comment
Please, Sign In to add comment