Created
March 3, 2011 18:49
-
-
Save netmindz/853267 to your computer and use it in GitHub Desktop.
Buffer JNA issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C++ header | |
extern "C" __declspec(dllexport) int __stdcall API_USBMF_Request( | |
HANDLE commHandle, int DeviceAddress, | |
unsigned char inf_mode, unsigned char *Buffer); | |
// Java - Returns a single byte, which I think is a valid result | |
public int API_USBMF_Request(HANDLE commHandle, int DeviceAddress, char inf_mode, ByteByReference Buffer); | |
// Java - No change to byte array | |
public int API_USBMF_Request(HANDLE commHandle, int DeviceAddress, char inf_mode, byte[] Buffer); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any ideas why using Pointer.getString() failed with access exception, weridly using IntByReferernce returns values, though quite what this number is when what I want is a String I'm not sure. Some native thing ?