12 messages in net.java.dev.jna.usersRe: [jna-users] Re: GetlastError alwa...
FromSent OnAttachments
Timothy WallAug 7, 2007 7:52 am 
Thomas BörkelAug 8, 2007 5:15 am 
Timothy WallAug 8, 2007 6:35 am 
Thomas BörkelAug 8, 2007 6:45 am 
Kim ValentineAug 8, 2007 7:02 am 
Timothy WallAug 8, 2007 7:26 am 
Timothy WallAug 8, 2007 7:34 am 
Timothy WallAug 8, 2007 7:42 am 
Thomas BörkelAug 8, 2007 8:00 am 
Thomas BörkelAug 8, 2007 8:05 am 
Thomas BörkelAug 8, 2007 8:21 am 
Timothy WallAug 8, 2007 8:50 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] Re: GetlastError always returns 0Actions...
From:Timothy Wall (twal@dev.java.net)
Date:Aug 8, 2007 8:50:17 am
List:net.java.dev.jna.users

On Aug 8, 2007, at 11:22 AM, Thomas Börkel wrote:

HI!

I have to correct myself here.

It was not the Unicode params, it was the int instead of NativeLong for the last parameter!

But this is a DWORD in the original definition and those *should* be mapped to NativeLong, right?

SC_HANDLE WINAPI OpenSCManager( LPCTSTR lpMachineName, LPCTSTR lpDatabaseName, DWORD dwDesiredAccess )

Pay attention to the native size, not necessarily the native name. NativeLong is required on Linux systems, because a native "long" is a different size on 32 vs 64-bit implementations.

Windows, on the other hand, allocates 32 bits for both 32- and 64-bit native "long". There's no need to use "NativeLong" on windows.

There should probably be a section on the main page or the overview to specifically address NativeLong.