2 messages in net.java.dev.jna.usersRe: [jna-users] [jna-users]: File * a...
FromSent OnAttachments
amina guermoucheAug 27, 2008 12:16 am 
Timothy WallAug 27, 2008 4:31 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] [jna-users]: File * and File **Actions...
From:Timothy Wall (twal@dev.java.net)
Date:Aug 27, 2008 4:31:12 am
List:net.java.dev.jna.users

Your sparse_fd variable should be used to initialize the PointerByReference, and you should update sparse_fd from PointerByReference.getValue() after a call to change_to_next_files.

On Aug 27, 2008, at 3:16 AM, amina guermouche wrote:

Hello, I've read that if therer's a File * in C, it's replaced by a Pointer in Java. My C program is like that: File * sparse_fd; bunch_of_ray(sparse_fd); (the prototype is: void bunch_of_ray(File *f) change_to_next_files (&sparse_fd); (the prototype is void change_to_next_files(File ** a)

I don't know how to declare sparse_fd. If is was used just as a File *, I'd have declared it as a Pointer, and if it was just used as a File ** (with &sparse_fd) I'd have declared it as a PointerByReference (I think). But as it's used as both File * and File **, I don't know what to do.

Thanks.

Envoyé avec Yahoo! Mail. Une boite mail plus intelligente.