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代碼中的指針。你能用它做什麼? –