Any idea on the below, and what I'm doing wrong?
Regards.
---------- Forwarded message ----------
From: Stas Oskin <stas...@gmail.com>
Date: 2008/9/18
Subject: Re: [jna-users] JNA problems when working with shared memory
To: use...@jna.dev.java.net
Hi.
Looks like your VZFrame overrides useMemory (both signatures), then calls
super.useMemory (in both).
Here is the structure I defined to read from shared memory:
public class VZFRAME extends Structure{
public int lRowNumber;
public boolean bCleanCommit;
@Override
protected void useMemory(Pointer m)
{
super.useMemory(m);
super.read();
}
@Override
protected void useMemory(Pointer m, int offset) {
super.useMemory(m, offset);
super.read();
}
}
If you're calling VZFrame.useMemory explicitly, why? What does the
"getRowNumber" code look like around line 83?
I had to to access the useMemory, which is a protected protected member. Is
there any other way to do it?
Here is the getRowNumber():
public int getRowNumber()
{
data_struct.useMemory(sharedMemoryPointer);
return data_struct.lRowNumber;
}
Thanks for your help.