APISonar


com.sun.jna.platform.win32.OaIdl.DATE.DATE

> com > sun > jna > platform > win32 > OaIdl > DATE > DATE
com APIs sun APIs jna APIs platform APIs win32 APIs OaIdl APIs DATE APIs DATE APIs

Example 1
public void testConvertDate() {
        Date testDate = new Date(2015 - 1900, 1, 1, 9, 0, 0);
        VARIANT resultDate = Convert.toVariant(testDate);
        DATE testDATE = new DATE(testDate);
        VARIANT resultDATE = Convert.toVariant(testDATE);

        assertEquals(testDate, resultDate.dateValue());
        assertEquals(testDate, resultDATE.dateValue());
        assertEquals(testDate, Convert.toJavaObject(resultDate, Object.class, fact, false, false));
        assertEquals(testDate, Convert.toJavaObject(resultDATE, Object.class, fact, false, false));
        assertEquals(testDate, Convert.toJavaObject(resultDate, Date.class, fact, false, false));
        assertEquals(testDate, Convert.toJavaObject(resultDATE, Date.class, fact, false, false));
    }
Example 2
public void testVariantDate() {
        SYSTEMTIME lpSystemTime = new SYSTEMTIME();
        Kernel32.INSTANCE.GetLocalTime(lpSystemTime);

        DoubleByReference pvtime = new DoubleByReference();
        OleAuto.INSTANCE.SystemTimeToVariantTime(lpSystemTime, pvtime);

        VARIANT variantDate = new VARIANT(new DATE(pvtime.getValue()));
    }