开发者

JNA Mapping to C

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜