开发者

JNA Mapping to C

开发者 https://www.devze.com 2023-02-11 22:16 出处:网络
Hello every one I have following function in c and want to map in JNA what could be equivlent of this in JNA.

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:

  1. DeviceNum—Device index. 0 for first device, 1 for 2nd, etc.

  2. 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)
0

精彩评论

暂无评论...
验证码 换一张
取 消