Examples of DWORD


Examples of com.sun.jna.platform.win32.WinDef.DWORD

   * Returns valid drives in the system.
   * @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);
      if (dwSize.intValue() <= 0) {
        throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
      }

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

Examples of com.sun.jna.platform.win32.WinDef.DWORD

         * Reserved. This value is always 0.
         */
        public DWORDLONG ullAvailExtendedVirtual;
       
        public MEMORYSTATUSEX() {
          dwLength = new DWORD(size());
        }
View Full Code Here

Examples of com.sun.jna.platform.win32.WinDef.DWORD

         * a new process is created
         */
        public boolean bInheritHandle;
       
        public SECURITY_ATTRIBUTES() {
      dwLength = new DWORD(size());
    }
View Full Code Here

Examples of com.sun.jna.platform.win32.WinDef.DWORD

     * buffer.
     */
    public HANDLE hStdError;
   
    public STARTUPINFO() {
      cb = new DWORD(size());
    }
View Full Code Here

Examples of com.sun.jna.platform.win32.WinDef.DWORD

         */
        public char szCSDVersion[];
       
        public OSVERSIONINFO() {
          szCSDVersion = new char[128];
          dwOSVersionInfoSize = new DWORD(size()); // sizeof(OSVERSIONINFO)
        }
View Full Code Here

Examples of com.sun.jna.platform.win32.WinDef.DWORD

         */
        public byte wReserved;
       
        public OSVERSIONINFOEX() {
          szCSDVersion = new char[128];
          dwOSVersionInfoSize = new DWORD(size()); // sizeof(OSVERSIONINFOEX)
        }
View Full Code Here

Examples of com.sun.jna.platform.win32.WinDef.DWORD

   
    /**
     * @param nbOfPrivileges Desired size of the Privileges array
     */
    public TOKEN_PRIVILEGES(int nbOfPrivileges) {
      PrivilegeCount = new DWORD(nbOfPrivileges);
      Privileges = new LUID_AND_ATTRIBUTES[nbOfPrivileges];
    }
View Full Code Here

Examples of com.sun.jna.platform.win32.WinDef.DWORD

      }
      assertTrue(luid != null);     
     
      // Re-enable it. That should succeed.
      tp = new WinNT.TOKEN_PRIVILEGES(1);
      tp.Privileges[0] = new WinNT.LUID_AND_ATTRIBUTES(luid, new DWORD(WinNT.SE_PRIVILEGE_ENABLED));
     
      assertTrue(Advapi32.INSTANCE.AdjustTokenPrivileges(hToken.getValue(), false, tp, 0, null, null));
      assertTrue(Kernel32.INSTANCE.CloseHandle(hToken.getValue()));
    }
View Full Code Here

Examples of com.sun.jna.platform.win32.WinDef.DWORD

      assertEquals(W32Errors.ERROR_ACCESS_DENIED, Kernel32.INSTANCE.GetLastError());
    }
   
    public void testGetTempPath() {
      char[] buffer = new char[WinDef.MAX_PATH];
      assertTrue(Kernel32.INSTANCE.GetTempPath(new DWORD(WinDef.MAX_PATH), buffer).intValue() > 0);     
    }
View Full Code Here

Examples of org.apache.poi.hpsf.littleendian.DWord

     *
     * @return a flag indicating the Clipboard Format Tag
     */
    public int getClipboardFormatTag()
    {
        DWord clipboardFormatTag = new DWord(getThumbnail(),OFFSET_CFTAG);
        return clipboardFormatTag.intValue();
    }
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.