2 messages in net.java.dev.jna.users[jna-users] Fw:Please help me ,a JNA ...
FromSent OnAttachments
circle19851127Jun 21, 2009 7:19 pm 
Timothy WallJun 22, 2009 7:15 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:[jna-users] Fw:Please help me ,a JNA problemActions...
From:circle19851127 (circ@126.com)
Date:Jun 21, 2009 7:19:08 pm
List:net.java.dev.jna.users

Hello,everyone: I'm so sorry for my terribal English ,and I'll work on that. I am a green on JNA.Lately I met a problem when I was working on this.My
question is like that: The DLL is written by C++ which I know nothing about.The function descriped
in the .h file is int DUABind(struct UserInfo* puserinfo, char* dsaip_address, int port_no, SOCKET* psock, int bindseconds) I wrote the follow code in Java: int DUABind(TUserInfo.ByReference puserinfo, ByteByReference[] dsaip_address , int port_no, Socket psock, int bindseconds); P.S.: public class TUserInfo extends Structure implements Invariable{ public static class ByReference extends TUserInfo implements
Structure.ByReference{} public static class ByValue extends TUserInfo implements Structure.ByValue{} public byte[] Name = new byte[20]; //name public byte[] Password = new byte[20]; //password } There is 9 results it maybe return.I got a '3' which means "connect
failed!".If it return a '0' which means connet is successful,it will init the
forth parameter 'SOCKET* psock'.So I defined a 'Socket psock = null; ' in java
project .I don't know where I was wrong . Is there another type which is for
SOCKET* in JNA? or other mistake? I really don't know. Because it's really a little enmergency,please help me ! Thank you very much! circle 6.21

200万种商品,最低价格,疯狂诱惑你