Package com.sun.jna.platform.win32.WinDef

Examples of com.sun.jna.platform.win32.WinDef.DWORD.intValue()


        queryPos(data);

        UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_SETPOS), data);

        assertNotNull(h);
        assertTrue(h.intValue() >= 0);

        removeAppBar();

    }
View Full Code Here


        enableButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                HRESULT hResult;
                hResult = LibDwmApi.INSTANCE.DwmEnableComposition(LibDwmApi.DWM_EC_ENABLECOMPOSITION);
                System.out.println("DwmEnableComposition hResult=" + hResult.intValue());
                dumpStatus();
            }
        });

        disableButton = new JButton("Disable");
View Full Code Here

        disableButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                HRESULT hResult;
                hResult = LibDwmApi.INSTANCE.DwmEnableComposition(LibDwmApi.DWM_EC_DISABLECOMPOSITION);
                System.out.println("DwmEnableComposition hResult=" + hResult.intValue());
                dumpStatus();
            }
        });

        contentPane = new JPanel();
View Full Code Here

    }

    private void dumpStatus() {
        IntByReference pfEnabled = new IntByReference();
        HRESULT hResult = LibDwmApi.INSTANCE.DwmIsCompositionEnabled(pfEnabled);
        System.out.println("DwmIsCompositionEnabled hResult=" + hResult.intValue());
        if(hResult.intValue() == LibDwmApi.S_OK) {
            System.out.println("Desktop composition is " + (pfEnabled.getValue() != 0 ? "enabled" : "disabled"));
        }
    }
}
View Full Code Here

    private void dumpStatus() {
        IntByReference pfEnabled = new IntByReference();
        HRESULT hResult = LibDwmApi.INSTANCE.DwmIsCompositionEnabled(pfEnabled);
        System.out.println("DwmIsCompositionEnabled hResult=" + hResult.intValue());
        if(hResult.intValue() == LibDwmApi.S_OK) {
            System.out.println("Desktop composition is " + (pfEnabled.getValue() != 0 ? "enabled" : "disabled"));
        }
    }
}
View Full Code Here

    CLSID.ByReference clsid = new CLSID.ByReference();
    // get CLSID from string, Microsoft Scripting Engine
    HRESULT hr = Ole32.INSTANCE.CLSIDFromString(new WString(
        "{420B2830-E718-11CF-893D-00A0C9054228}"), clsid);
    COMUtils.checkRC(hr);
    assertEquals(0, hr.intValue());

    // get user default lcid
    LCID lcid = Kernel32.INSTANCE.GetUserDefaultLCID();
    PointerByReference pWordTypeLib = new PointerByReference();
    // get typelib version 1.0
View Full Code Here

    LCID lcid = Kernel32.INSTANCE.GetUserDefaultLCID();
    PointerByReference pWordTypeLib = new PointerByReference();
    // get typelib version 1.0
    hr = OleAuto.INSTANCE.LoadRegTypeLib(clsid, 1, 0, lcid, pWordTypeLib);
    COMUtils.checkRC(hr);
    assertEquals(0, hr.intValue());
  }

}
View Full Code Here

        Native.toString(lpsz));
  }

  public void testCoInitializeEx() {
    HRESULT hr = Ole32.INSTANCE.CoInitializeEx(null, 0);
    assertTrue(W32Errors.SUCCEEDED(hr.intValue())
        || hr.intValue() == W32Errors.RPC_E_CHANGED_MODE);
    if (W32Errors.SUCCEEDED(hr.intValue()))
      Ole32.INSTANCE.CoUninitialize();
  }
View Full Code Here

  }

  public void testCoInitializeEx() {
    HRESULT hr = Ole32.INSTANCE.CoInitializeEx(null, 0);
    assertTrue(W32Errors.SUCCEEDED(hr.intValue())
        || hr.intValue() == W32Errors.RPC_E_CHANGED_MODE);
    if (W32Errors.SUCCEEDED(hr.intValue()))
      Ole32.INSTANCE.CoUninitialize();
  }

  public void testCoCreateInstance() {
View Full Code Here

  public void testCoInitializeEx() {
    HRESULT hr = Ole32.INSTANCE.CoInitializeEx(null, 0);
    assertTrue(W32Errors.SUCCEEDED(hr.intValue())
        || hr.intValue() == W32Errors.RPC_E_CHANGED_MODE);
    if (W32Errors.SUCCEEDED(hr.intValue()))
      Ole32.INSTANCE.CoUninitialize();
  }

  public void testCoCreateInstance() {
    HRESULT hrCI = Ole32.INSTANCE.CoInitializeEx(null, 0);
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.