Hello every one I have following function in c and want to map in JNA what could be equivlent of this in JNA.
2.3. SI_Open
Description: Opens a device (using device number as returned by SI_GetNumDevices) and returns
a handle which will be used for开发者_如何学运维 subsequent accesses.
SI_STATUS SI_Open (DWORD DeviceNum, HANDLE *Handle)
Parameters:
DeviceNum—Device index. 0 for first device, 1 for 2nd, etc.
Handle—Pointer to a variable where the handle to the device will be stored.
Return Value:
SI_SUCCESS
SI_DEVICE_NOT_FOUND
SI_INVALID_PARAMETER
SI_STATUS
is not a common type you should look at your header file for this answer I will take for granted that SI_STATUS
type is DWORD
(or 32 bit integer).
This would give the following mapping in jna
int SI_Open(int DeviceNum, PointerByReference handle)
精彩评论