Package com.sun.jna.platform.win32.WinBase

Examples of com.sun.jna.platform.win32.WinBase.SYSTEM_INFO


  public OleAutoTest() {
  }

  public void testSysAllocString() {
    assertEquals(null, OleAuto.INSTANCE.SysAllocString(null));
    BSTR p = OleAuto.INSTANCE.SysAllocString("hello world");
    assertEquals("hello world", p.getValue());
    OleAuto.INSTANCE.SysFreeString(p);
  }
View Full Code Here


      IntByReference lpcValues = new IntByReference();
      IntByReference lpcMaxClassLen = new IntByReference();
      IntByReference lpcMaxValueNameLen = new IntByReference();
      IntByReference lpcMaxValueLen = new IntByReference();
      IntByReference lpcbSecurityDescriptor = new IntByReference();
      FILETIME lpftLastWriteTime = new FILETIME();
      assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegQueryInfoKey(
          WinReg.HKEY_LOCAL_MACHINE, null, lpcClass, null,
          lpcSubKeys, lpcMaxSubKeyLen, lpcMaxClassLen, lpcValues,
          lpcMaxValueNameLen, lpcMaxValueLen, lpcbSecurityDescriptor,
          lpftLastWriteTime));
View Full Code Here

      assertTrue(Native.toString(lpVersionInfo.szCSDVersion).length() >= 0);
      assertTrue(lpVersionInfo.wProductType >= 0);
    }

    public void testGetSystemInfo() {
      SYSTEM_INFO lpSystemInfo = new SYSTEM_INFO();
      Kernel32.INSTANCE.GetSystemInfo(lpSystemInfo);
      assertTrue(lpSystemInfo.dwNumberOfProcessors.intValue() > 0);
    }
View Full Code Here

      }
    }

    public void testGetNativeSystemInfo() {
      try {
          SYSTEM_INFO lpSystemInfo = new SYSTEM_INFO();
          Kernel32.INSTANCE.GetNativeSystemInfo(lpSystemInfo);
          assertTrue(lpSystemInfo.dwNumberOfProcessors.intValue() > 0);
      } catch (UnsatisfiedLinkError e) {
        // only available under WOW64
      }
View Full Code Here

      assertTrue(Native.toString(lpVersionInfo.szCSDVersion).length() >= 0);
      assertTrue(lpVersionInfo.wProductType >= 0);
    }

    public void testGetSystemInfo() {
      SYSTEM_INFO lpSystemInfo = new SYSTEM_INFO();
      Kernel32.INSTANCE.GetSystemInfo(lpSystemInfo);
      assertTrue(lpSystemInfo.dwNumberOfProcessors.intValue() > 0);
    }
View Full Code Here

      }
    }

    public void testGetNativeSystemInfo() {
      try {
          SYSTEM_INFO lpSystemInfo = new SYSTEM_INFO();
          Kernel32.INSTANCE.GetNativeSystemInfo(lpSystemInfo);
          assertTrue(lpSystemInfo.dwNumberOfProcessors.intValue() > 0);
      } catch (UnsatisfiedLinkError e) {
        // only available under WOW64
      }
View Full Code Here

      assertTrue(Native.toString(lpVersionInfo.szCSDVersion).length() >= 0);     
      assertTrue(lpVersionInfo.wProductType >= 0);
    }
   
    public void testGetSystemInfo() {
      SYSTEM_INFO lpSystemInfo = new SYSTEM_INFO();
      Kernel32.INSTANCE.GetSystemInfo(lpSystemInfo);
      assertTrue(lpSystemInfo.dwNumberOfProcessors.intValue() > 0);
    }
View Full Code Here

      }
    }
   
    public void testGetNativeSystemInfo() {
      try {
          SYSTEM_INFO lpSystemInfo = new SYSTEM_INFO();
          Kernel32.INSTANCE.GetNativeSystemInfo(lpSystemInfo);
          assertTrue(lpSystemInfo.dwNumberOfProcessors.intValue() > 0);
      } catch (UnsatisfiedLinkError e) {
        // only available under WOW64
      }
View Full Code Here

    /**
     *
     */
    public MONITORINFO() {
        this.cbSize = new DWORD(size());
    }
View Full Code Here

    private void newAppBar() {
        APPBARDATA data = new APPBARDATA.ByReference();
        data.cbSize.setValue(data.size());
        data.uCallbackMessage.setValue(WM_USER + 1);

        UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_NEW), data);
        assertNotNull(result);
    }
View Full Code Here

TOP

Related Classes of com.sun.jna.platform.win32.WinBase.SYSTEM_INFO

Copyright © 2018 www.massapicom. 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.