如何将以下参考变量转换为 Java JNA?

How can I convert the following reference variable into Java JNA?

我在C中有如下语法方法

ipj_error ipj_get_value(
ipj_iri_device* iri_device,     /**< [in] IRI device data structure */
ipj_key key,                    /**< [in] Key code to get */
uint32_t* value)                /**< [out] Data buffer to store retrieved value */
{
    return ipj_get(iri_device, key, 0, 0, value);
}

在此方法中对值的引用。我如何在 JNA 中定义它?我尝试声明为 int 但它没有任何意义。因为在 C 值 returns 中,而在 Java 中,如果我将其声明为 int,则意味着我将一个整数值传递给该方法。那么我该如何声明这个 ipj_get_value 以及如何声明这个值呢?请指教

我也尝试了 IntByReference。但是当我尝试使用 getValue() 获取值时,它总是返回 0。

JNA 提供 IntByReference 通过引用传递 32 位值。

int passedValue = ...;
IntByReference iref = new IntByReference(passedValue);
lib.invokeMyMethod(iref);
int returnedValue = iref.getValue();