Package ctypes.java

Examples of ctypes.java.CFunction.call()


      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);
View Full Code Here


       */

      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();
      assertTrue(year >= 2006);

    } catch (Exception e) {
View Full Code Here

      CFunction fileTimeToSystemTime = dll.loadFunction("FileTimeToSystemTime");
      SYSTEMTIME st = new SYSTEMTIME();
      Object[] ary1 = { ft, st };

      Object o = fileTimeToSystemTime.call(CInt.class, ary1,
          CFunction.FUNCFLAG_STDCALL);
      assertEquals(2006, st.wYear.getValue());
      assertEquals(2, st.wMonth.getValue());
      assertEquals(21, st.wDay.getValue());
      assertEquals(4, st.wHour.getValue());
View Full Code Here

      CFunction fileTimeToSystemTime = dll.loadFunction("FileTimeToSystemTime");
      SYSTEMTIME st = new SYSTEMTIME();
      Object[] ary1 = { ft, st };

      //Sat, 30 September 2000 14:46:43
      Object o = fileTimeToSystemTime.call(CInt.class, ary1,
          CFunction.FUNCFLAG_STDCALL);
      assertEquals(2000, st.wYear.getValue());
      assertEquals(9, st.wMonth.getValue());
      assertEquals(30, st.wDay.getValue());
      assertEquals(14, st.wHour.getValue());
View Full Code Here

      assertEquals(0, st.wSecond.getValue());
      assertEquals(0, st.wMilliseconds.getValue());

      FILETIME zeroFileTime = new FILETIME();
      Object[] a = { st, zeroFileTime };
      Object o1 = getFileTimeAsSystemTime.call(CInt.class, ary1,
          CFunction.FUNCFLAG_STDCALL);
     
      assertEquals(0, zeroFileTime.dwHighDateTime.getValue());
      assertEquals(0, zeroFileTime.dwLowDateTime.getValue());
     
View Full Code Here

     
      FILETIME zeroFileTime = new FILETIME();
      FILETIME UNIXepochFileTime = new FILETIME();

      Object[] ary1 = { zeroTime, zeroFileTime };
      CInt o = (CInt) systemTimeToFileTime.call(CInt.class, ary1,
          CFunction.FUNCFLAG_STDCALL);
      assertTrue(o.getValue() != 0);

      Object[] ary2 = { UNIXepochTime, UNIXepochFileTime };
      CInt o1 = (CInt) systemTimeToFileTime.call(CInt.class, ary2,
View Full Code Here

      CInt o = (CInt) systemTimeToFileTime.call(CInt.class, ary1,
          CFunction.FUNCFLAG_STDCALL);
      assertTrue(o.getValue() != 0);

      Object[] ary2 = { UNIXepochTime, UNIXepochFileTime };
      CInt o1 = (CInt) systemTimeToFileTime.call(CInt.class, ary2,
          CFunction.FUNCFLAG_STDCALL);
      assertTrue(o.getValue() != 0);
     
      long zeroCount = (zeroFileTime.dwHighDateTime.getValue() << 32) + (zeroFileTime.dwLowDateTime.getValue());
      long hi = U32Jint2Jlong(UNIXepochFileTime.dwHighDateTime.getValue());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.