Examples of DWORD


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

    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

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

    }

    private void removeAppBar() {
        APPBARDATA data = new APPBARDATA.ByReference();
        data.cbSize.setValue(data.size());
        UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_REMOVE), data);
        assertNotNull(result);

    }
View Full Code Here

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

        assertNotNull(result);

    }

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

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

    }
View Full Code Here

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

        data.rc.bottom = User32.INSTANCE.GetSystemMetrics(User32.SM_CYFULLSCREEN);
        data.rc.right = User32.INSTANCE.GetSystemMetrics(User32.SM_CXFULLSCREEN);

        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

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

        data.rc.bottom = RESIZE_HEIGHT;
        data.rc.right = User32.INSTANCE.GetSystemMetrics(User32.SM_CXFULLSCREEN);

        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

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

        // the method returns FALSE if the monitor driver doesn't support it,
        // but verifies that the JNA mapping is correct (no exception)
        DWORDByReference pdwCapabilitiesStringLengthInCharacters = new DWORDByReference();
        Dxva2.INSTANCE.GetCapabilitiesStringLength(hPhysicalMonitor, pdwCapabilitiesStringLengthInCharacters);
        DWORD capStrLen = pdwCapabilitiesStringLengthInCharacters.getValue();

        LPSTR pszASCIICapabilitiesString = new LPSTR(new Memory(capStrLen.intValue()));
        Dxva2.INSTANCE.CapabilitiesRequestAndCapabilitiesReply(hPhysicalMonitor, pszASCIICapabilitiesString, capStrLen);
    }
View Full Code Here

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

        TYPEATTR typeAttr = new TYPEATTR();
        typeAttr.guid = GUID
            .fromString("{50A7E9B0-70EF-11D1-B75A-00A0C90564FE}");
        typeAttr.lcid = Kernel32.INSTANCE.GetSystemDefaultLCID();
        typeAttr.dwReserved = new DWORD(1);
        typeAttr.memidConstructor = new MEMBERID(2);
        typeAttr.memidDestructor = new MEMBERID(3);
        typeAttr.lpstrSchema = new LPOLESTR("Hello World");
        typeAttr.cbSizeInstance = new ULONG(4);
        typeAttr.typekind = new TYPEKIND(5);
View Full Code Here

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

      lpRect.left = 100;
      lpRect.top = 200;
      lpRect.bottom = 300;
      lpRect.right = 500;
     
      assertTrue(User32.INSTANCE.AdjustWindowRect(lpRect, new DWORD(WinUser.WS_THICKFRAME), new BOOL(1)).booleanValue());
     
      assertTrue(lpRect.left < 100);
      assertTrue(lpRect.top < 200);
      assertTrue(lpRect.bottom > 300);
      assertTrue(lpRect.right > 500);
View Full Code Here

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

    }
   
    @Ignore("Shutsdown the workstation")
    @Test
    public final void testExitWindows() {
    assertTrue(User32.INSTANCE.ExitWindowsEx(new UINT(WinUser.EWX_LOGOFF), new DWORD(0x00030000)).booleanValue()); //This only tries to log off.
    }
View Full Code Here

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

   * Return the path designated for temporary files.
   * @return
   *  Path.
   */
  public static String getTempPath() {
    DWORD nBufferLength = new DWORD(WinDef.MAX_PATH);
      char[] buffer = new char[nBufferLength.intValue()];
      if (Kernel32.INSTANCE.GetTempPath(nBufferLength, buffer).intValue() == 0) {
        throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
      }
      return Native.toString(buffer);
  }
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.