Package com.sun.jna.platform.win32.WinNT

Examples of com.sun.jna.platform.win32.WinNT.HRESULT.intValue()


   * @return
   *  An array of valid drives.
   */
  public static String[] getLogicalDriveStrings() {
      DWORD dwSize = Kernel32.INSTANCE.GetLogicalDriveStrings(new DWORD(0), null);
      if (dwSize.intValue() <= 0) {
        throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
      }
     
      char buf[] = new char[dwSize.intValue()];
      dwSize = Kernel32.INSTANCE.GetLogicalDriveStrings(dwSize, buf);
View Full Code Here


      DWORD dwSize = Kernel32.INSTANCE.GetLogicalDriveStrings(new DWORD(0), null);
      if (dwSize.intValue() <= 0) {
        throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
      }
     
      char buf[] = new char[dwSize.intValue()];
      dwSize = Kernel32.INSTANCE.GetLogicalDriveStrings(dwSize, buf);
      if (dwSize.intValue() <= 0) {
        throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
      }
View Full Code Here

        throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
      }
     
      char buf[] = new char[dwSize.intValue()];
      dwSize = Kernel32.INSTANCE.GetLogicalDriveStrings(dwSize, buf);
      if (dwSize.intValue() <= 0) {
        throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
      }

      List<String> drives = new ArrayList<String>();     
      String drive = "";
View Full Code Here

      assertEquals(0, lpBuffer.ullAvailExtendedVirtual.intValue());
    }

    public void testGetLogicalDriveStrings() {
      DWORD dwSize = Kernel32.INSTANCE.GetLogicalDriveStrings(new DWORD(0), null);
      assertTrue(dwSize.intValue() > 0);
      char buf[] = new char[dwSize.intValue()];
      assertTrue(Kernel32.INSTANCE.GetLogicalDriveStrings(dwSize, buf).intValue() > 0);
    }
   
    public void testGetDiskFreeSpaceEx() {
View Full Code Here

    }

    public void testGetLogicalDriveStrings() {
      DWORD dwSize = Kernel32.INSTANCE.GetLogicalDriveStrings(new DWORD(0), null);
      assertTrue(dwSize.intValue() > 0);
      char buf[] = new char[dwSize.intValue()];
      assertTrue(Kernel32.INSTANCE.GetLogicalDriveStrings(dwSize, buf).intValue() > 0);
    }
   
    public void testGetDiskFreeSpaceEx() {
      LARGE_INTEGER.ByReference lpFreeBytesAvailable = new LARGE_INTEGER.ByReference();
View Full Code Here

    private void queryPos(APPBARDATA data) {
        UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_QUERYPOS), data);

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

    }

    public void testResizeDesktopFromBottom() throws InterruptedException {
View Full Code Here

        queryPos(data);

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

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

        removeAppBar();
    }

    public void testResizeDesktopFromTop() throws InterruptedException {
View Full Code Here

        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

    private void queryPos(APPBARDATA data) {
        UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_QUERYPOS), data);

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

    }

    public void testResizeDesktopFromBottom() throws InterruptedException {
View Full Code Here

        queryPos(data);

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

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

        removeAppBar();
    }

    public void testResizeDesktopFromTop() throws InterruptedException {
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.