Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 794799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:22:21+00:00 2026-05-14T22:22:21+00:00

W32API.HWND targetHwnd = User32.INSTANCE.FindWindow(SunAwtFrame, Frame) W32API.HWND sourceHwnd = User32.INSTANCE.FindWindow(triuiScreen, EVE) W32API.HANDLE thumbnailH = new

  • 0
W32API.HWND targetHwnd = User32.INSTANCE.FindWindow("SunAwtFrame", "Frame")
W32API.HWND sourceHwnd = User32.INSTANCE.FindWindow("triuiScreen", "EVE")
W32API.HANDLE thumbnailH = new W32API.HANDLE()

NativeLibrary dwm = NativeLibrary.getInstance("dwmapi")
dwm.getFunction('DwmRegisterThumbnail').invoke(targetHwnd, sourceHwnd, thumbnailH)

gives me

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x70f34bee, pid=7208, tid=7364
#
# JRE version: 6.0_18-b07
# Java VM: Java HotSpot(TM) Client VM (16.0-b13 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [DWMAPI.DLL+0x4bee]

I have a feeling I’m doing it completely wrong, but digging in documentation got me nowhere.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:22:22+00:00Added an answer on May 14, 2026 at 10:22 pm

    The 3rd param is an “out” parameter, and needs to be a pointer to the handle, not the handle itself. So, something like

    dwm.getFunction("DwmRegisterThumbnail")
      .invoke(targetHwnd, sourceHwnd, new PointerByReference(thumbnailH))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

1) How to call winapi functions from PHP? 2) How to load any dll
I'm following this guide mostly to compile gcc on windows: http://www.aristeia.com/Misc/gcc4ForWindows.html The difference is
I am running a Eclipse for C/C++ using cygwin GCC. I need to get
I am using Eclipse CDT with Cygwin GCC 3 as compiler. My project is
I've been using VS2008/2010 for a while and I'm going to learn using Eclipse
I need to compile my Qt application for Windows while I am using Fedora
I would like a clean way to increase the size of a StringBuilder() as
I have a project that needs to access a DLL with PHP. The server
Using Eclipse 3.6.2, current version of CDT, current Cygwin tools and C++ (GCC) compiler.
I am trying to install insight debugger on my windows 7 machine but without

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.