1
我的工作JNA我的申请,我感到困惑的在Java中使用typedef结构指针。 请检查我的代码并指导我。 预先感谢您!typedef结构指针到JNA
下面是我的C++代码
typedef struct tagHWDeviceInfo
{
USHORT VendorID; // vendor id
USHORT ProductID; // product id
DWORD nXExt; // firmware width
DWORD nYExt; // firmware height
DWORD preesure; // pressure level
DWORD penState; // pen state
}HWDeviceInfo, *PHWDeviceInfo;
和Java代码
public class HWDeviceInfo extends Structure{
short VendorID;
short ProductID;
int nXExt; // firmware width
int nYExt; // firmware height
int preesure; // pressure level
int penState;
}
现在我的问题是:这是什么在C++代码的意思*PHWDeviceInfo
和哪能在我的java代码中使用这个指针?
你可能想[阅读关于指针/引用(http://softwareengineering.stackexchange.com/a/141838)。 –
你不明白什么?这是一个指针。在这里看到: http://stackoverflow.com/questions/1543713/c-typedef-of-pointer-to-structure –
你不能真正用在Java代码中的指针。你能用它做什么? –