Search in sources :

Example 6 with ULONG_PTR

use of com.sun.jna.platform.win32.BaseTSD.ULONG_PTR in project jna by java-native-access.

the class User32Test method testGetClassLongPtr.

@Test
public void testGetClassLongPtr() {
    if (System.getProperty("os.arch", "unknown").equalsIgnoreCase("amd64")) {
        DesktopWindow explorerProc = getWindowByProcessPath("explorer.exe");
        assertNotNull("Could not find explorer.exe process", explorerProc);
        ULONG_PTR result = User32.INSTANCE.GetClassLongPtr(explorerProc.getHWND(), WinUser.GCLP_HMODULE);
        assertNotEquals(0, result.intValue());
    } else {
        System.err.println("GetClassLongPtr only supported on x64");
    }
}
Also used : ULONG_PTR(com.sun.jna.platform.win32.BaseTSD.ULONG_PTR) DesktopWindow(com.sun.jna.platform.DesktopWindow) Test(org.junit.Test)

Aggregations

ULONG_PTR (com.sun.jna.platform.win32.BaseTSD.ULONG_PTR)6 Pointer (com.sun.jna.Pointer)4 Test (org.junit.Test)4 HCONV (com.sun.jna.platform.win32.Ddeml.HCONV)3 HDDEDATA (com.sun.jna.platform.win32.Ddeml.HDDEDATA)3 HSZ (com.sun.jna.platform.win32.Ddeml.HSZ)3 ConnectHandler (com.sun.jna.platform.win32.DdemlUtil.ConnectHandler)3 ExecuteHandler (com.sun.jna.platform.win32.DdemlUtil.ExecuteHandler)3 IDdeConnection (com.sun.jna.platform.win32.DdemlUtil.IDdeConnection)3 StandaloneDdeClient (com.sun.jna.platform.win32.DdemlUtil.StandaloneDdeClient)3 XactCompleteHandler (com.sun.jna.platform.win32.DdemlUtil.XactCompleteHandler)3 CountDownLatch (java.util.concurrent.CountDownLatch)3 COPYDATASTRUCT (com.sun.jna.platform.win32.WinUser.COPYDATASTRUCT)2 DesktopWindow (com.sun.jna.platform.DesktopWindow)1 CONVINFO (com.sun.jna.platform.win32.Ddeml.CONVINFO)1 HMODULE (com.sun.jna.platform.win32.WinDef.HMODULE)1 HWND (com.sun.jna.platform.win32.WinDef.HWND)1 LPARAM (com.sun.jna.platform.win32.WinDef.LPARAM)1 LRESULT (com.sun.jna.platform.win32.WinDef.LRESULT)1 WPARAM (com.sun.jna.platform.win32.WinDef.WPARAM)1