Examples of loadFunction()


Examples of ctypes.java.CDLL.loadFunction()

  }

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

Examples of ctypes.java.CDLL.loadFunction()

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

Examples of ctypes.java.CDLL.loadFunction()

  }

  public void testComparingSystemTimesWithOurAlgorithm2() {
    try {
      CDLL dll = CDLL.LoadLibrary("kernel32.dll");
      CFunction getSystemTimeAsFileTime = dll
          .loadFunction("GetSystemTimeAsFileTime");

      int lowValue = 926944912;
      int highValue = 29767328;
View Full Code Here

Examples of ctypes.java.CDLL.loadFunction()

      FILETIME ft = new FILETIME();
      ft.dwLowDateTime.setValue(lowValue);
      ft.dwHighDateTime.setValue(highValue);

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

      Object o = fileTimeToSystemTime.call(CInt.class, ary1,
          CFunction.FUNCFLAG_STDCALL);
View Full Code Here

Examples of ctypes.java.CDLL.loadFunction()

  }
 
  public void testComparingSystemTimesWithOurAlgorithm() {
    try {
      CDLL dll = CDLL.LoadLibrary("kernel32.dll");
      CFunction getSystemTimeAsFileTime = dll
          .loadFunction("GetSystemTimeAsFileTime");

      String hex = "40B3B13FED2AC001";
      FileTime f = FileTime.parseLittleEndianHex(hex);
View Full Code Here

Examples of ctypes.java.CDLL.loadFunction()

      FILETIME ft = new FILETIME();
      ft.dwLowDateTime.setValue((int) f.getLow());
      ft.dwHighDateTime.setValue((int) f.getHigh());

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

Examples of ctypes.java.CDLL.loadFunction()

      FILETIME ft = new FILETIME();
      ft.dwLowDateTime.setValue((int) 0);
      ft.dwHighDateTime.setValue((int) 0);

      CFunction fileTimeToSystemTime = dll.loadFunction("FileTimeToSystemTime");
      CFunction getFileTimeAsSystemTime = dll.loadFunction("SystemTimeToFileTime");
     
      SYSTEMTIME st = new SYSTEMTIME();
      Object[] ary1 = { ft, st };
View Full Code Here

Examples of ctypes.java.CDLL.loadFunction()

      FILETIME ft = new FILETIME();
      ft.dwLowDateTime.setValue((int) 0);
      ft.dwHighDateTime.setValue((int) 0);

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

      //Sat, 30 September 2000 14:46:43
View Full Code Here

Examples of ctypes.java.CDLL.loadFunction()

   */
  public void testSkewBetweenUNIXEpochAndWindowsEpoch() {
    try {
      CDLL dll = CDLL.LoadLibrary("kernel32.dll");

      CFunction systemTimeToFileTime = dll
      .loadFunction("SystemTimeToFileTime");
     
      SYSTEMTIME zeroTime = new SYSTEMTIME();
      zeroTime.wDay.setValue((short)1);
      zeroTime.wMonth.setValue((short)1);
View Full Code Here

Examples of org.jclouds.scriptbuilder.functionloader.FunctionLoader.loadFunction()

      try {
         references = bundleContext.getServiceReferences(FunctionLoader.class.getName(), filter);
        if (references != null) {
          for (ServiceReference reference : references) {
            FunctionLoader loader = (FunctionLoader) bundleContext.getService(reference);
            String f = loader.loadFunction(function, family);
            if (!Strings.isNullOrEmpty(f)) {
              return f;
            }
          }
        }
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.