8 messages in net.java.dev.jna.usersRe: [jna-users] Invoking WinINet Inte...
FromSent OnAttachments
Rogan DawesApr 28, 2008 9:39 am 
Albert StrasheimApr 28, 2008 1:04 pm 
Timothy WallApr 28, 2008 1:22 pm 
Rogan DawesApr 28, 2008 1:29 pm 
Rogan DawesApr 28, 2008 1:30 pm 
Timothy WallApr 28, 2008 1:45 pm 
Rogan DawesApr 28, 2008 3:21 pm 
Timothy WallApr 28, 2008 5:17 pm 
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] Invoking WinINet InternetQueryOption/InternetSetOption?Actions...
From:Timothy Wall (twal@dev.java.net)
Date:Apr 28, 2008 1:45:37 pm
List:net.java.dev.jna.users

On Apr 28, 2008, at 12:40 PM, Rogan Dawes wrote:

INTERNET_PER_CONN_OPTION and INTERNET_PER_CONN_OPTION_LIST are defined as:

typedef struct { DWORD dwSize; LPTSTR pszConnection; DWORD dwOptionCount; DWORD dwOptionError; LPINTERNET_PER_CONN_OPTION pOptions; } INTERNET_PER_CONN_OPTION_LIST, *LPINTERNET_PER_CONN_OPTION_LIST;

The type of pOptions should be Pointer or StructureByReference, which will make it 4 bytes and given the structure a total size of 20 bytes.

public static class INTERNET_PER_CONN_OPTION_LIST extends Structure { public int dwSize; public WString pszConnection; public int dwOptionCount; public int dwOptionError; public INTERNET_PER_CONN_OPTION[] pOptions; }

Change pOptions to be Pointer, and use structs[0].getPointer() to initialize it.