return new TestSuite(TestPlatform.class);
}
public void testSystemTimeAPIs() {
try {
CDLL dll = CDLL.LoadLibrary("kernel32.dll");
CFunction getSystemTimeAsFileTime = dll
.loadFunction("GetSystemTimeAsFileTime");
FILETIME ft = new FILETIME();
Object[] ary = { ft };
Object o = getSystemTimeAsFileTime.call(null, ary,
CFunction.FUNCFLAG_STDCALL);
long lowValue = ft.dwLowDateTime.getValue();
long highValue = ft.dwHighDateTime.getValue();
System.out.println(lowValue);
System.out.println(highValue);
assertTrue(highValue >= 29767328);
/*
* BOOL FileTimeToSystemTime( const FILETIME* lpFileTime, LPSYSTEMTIME
* lpSystemTime );
*/
CFunction fileTimeToSystemTime = dll.loadFunction("FileTimeToSystemTime");
SYSTEMTIME st = new SYSTEMTIME();
Object[] ary1 = { ft, st };
o = fileTimeToSystemTime.call(CInt.class, ary1,
CFunction.FUNCFLAG_STDCALL);
int year = st.wYear.getValue();