-
-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Hi Yoann
I am looking into adding support for macOS, I have ran into the following issue.
The NativeLong size is 4 bytes on Windows 64-bit, but on macOS 64-bit this is 8 bytes:
+---------------------+---------------------+---------------------+
| Property | macOS | Windows |
+---------------------+---------------------+---------------------+
| OS Name | Mac OS X | Windows 11 |
| OS Arch | aarch64 | amd64 |
| Java Version | 17.0.14 | 21.0.1 |
| JNA Platform | 0 | 2 |
| Is 64-bit | true | true |
+---------------------+---------------------+---------------------+
| NativeLong.SIZE | 8 bytes | 4 bytes |
+---------------------+---------------------+---------------------+
For example, in EdsdkLibrary.java look at the EdsRetain. I have chosen this one because it has a good description about the return size in the Canon documentation
/**
* -----------------------------------------------------------------------------<br>
* //<br>
* // Function: EdsRetain<br>
* //<br>
* // Description:<br>
* // Increments the reference counter of existing objects.<br>
* //<br>
* // Parameters:<br>
* // In: inRef - The reference for the item.<br>
* // Out: None<br>
* //<br>
* // Returns: Any of the sdk errors.<br>
* -----------------------------------------------------------------------------<br>
* Original signature : <code>__attribute__((dllimport)) EdsUInt32 EdsRetain(EdsBaseRef)</code><br>
* <i>native declaration : sdk-header\EDSDK.h:105</i>
*
* @param inRef the reference for the item
* @return any of the sdk errors
*/
NativeLong EdsRetain(EdsBaseRef inRef);
Description from the Canon EDSDK pdf
Syntax
EdsUInt32 EdsRetain( EdsBaseRef inRef )
Return Values
Returns a reference counter if successful. For errors, returns 0xFFFFFFFF.
The return value is 4 bytes, and the maximum value of the reference counter is 65535.
Changing this is quite a big change, what do you think about this?
Best regards, Arnoud
Metadata
Metadata
Assignees
Labels
No labels