5 messages in net.java.dev.jna.usersRe: [jna-users] Mapping questions
FromSent OnAttachments
Phil BorlinSep 3, 2007 12:16 pm 
Timothy WallSep 3, 2007 12:45 pm 
Phil BorlinSep 4, 2007 10:48 am 
Timothy WallSep 4, 2007 10:55 am 
Phil BorlinSep 4, 2007 11:07 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:Re: [jna-users] Mapping questionsActions...
From:Phil Borlin (ranc@gmail.com)
Date:Sep 4, 2007 11:07:00 am
List:net.java.dev.jna.users

char * psz_device; char * psz_block; char * psz_error;

It all depends on how your native code uses the pointers. String is technically mapped to "const char*", meaning the native code is only going to read the memory. Native writes are ignored, unless they write outside the allocated string, which usually crashes the VM.

What are the psz_block/error parameters for, and how are they used? Did you initialize pointers to pass, or just use "null"?

That makes sense. This is part of libdvdcss and the psz_device is the dvd drive or the file/dir where the dvd information is. This will not change over the course of the program so it is read only as far as the program is concerned. The psz_block has to do with where the css key is stored and psz_error is part of the library's error handling. Both of these probably change over the course of the run.

-Phil