12 messages in net.java.dev.jna.usersFwd: [jna-users] JNA problems when wo...
FromSent OnAttachments
Stas OskinSep 17, 2008 5:06 am 
Timothy WallSep 17, 2008 6:07 am 
Stas OskinSep 17, 2008 9:55 am 
Timothy WallSep 17, 2008 10:39 am 
Wayne MeissnerSep 17, 2008 10:54 am 
Stas OskinSep 17, 2008 11:07 am 
Timothy WallSep 17, 2008 11:30 am 
Stas OskinSep 18, 2008 2:00 am 
Timothy WallSep 18, 2008 5:50 am 
Stas OskinSep 18, 2008 7:37 am 
Stas OskinSep 18, 2008 11:04 am 
Timothy WallSep 18, 2008 11:29 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Fwd: [jna-users] JNA problems when working with shared memoryActions...
From:Stas Oskin (stas@gmail.com)
Date:Sep 18, 2008 11:04:11 am
List:net.java.dev.jna.users

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.