I'm sorry for disturbing you again but I'm still not able to get the correct
data. Can you check if the method declarations in the Java-interface are
correct?
Here the specification of (one part of) the dll:
HCTX WINAPI WTOpenA(HWND hWnd, LPLOGCONTEXTA lpLogCtx, BOOL fEnable)
BOOL WINAPI WTClose(HCTX hCtx)
UINT WINAPI WTInfoA(UINT wCategory, UINT nIndex, LPVOID lpOutput)
int WINAPI WTPacketsGet(HCTX hCtx, int cMaxPkts, LPVOID lpPkts)
Here (one part of) my Java-interface:
public interface Wintab32 extends W32API {
HDC WTOpenA(HWND hwnd, Logcontexta s, boolean b);
boolean WTClose(HDC hDC);
int WTInfoA(int category, int index, Logcontexta s);
int WTPacketsGet(HDC hdc, int max, Packet[] p);
}
}
WTOpenA, WTInfoA and WTClose seems to work correctly, but WTPacketsGet
doesn't.
thx again,
Michele
2007/10/29, Timothy Wall <twal...@dev.java.net >:
On Oct 29, 2007, at 11:05 AM, Michele Croci wrote:
I get alway ' 0 ' for x and y values.
Maybe the problem is in the definition of my custom structures.
Here the conversion I have made:
DWORD -> int
UINT -> int
LONG -> long
BOOL -> int
Are they right?
LONG is 32 bits on windows, so you should use "int".
You can use "boolean" for BOOL if you pass W32API.DEFAULT_OPTIONS as
the options in your loadLibrary call.