Jump to content

Win32 API dependencies in C/C++ (PrintWindow)

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Dero

Dero

    Newbie

  • Members
  • Pip
  • 1 posts
Hi, I need to take screenshots of some windows that are fully covered by my application's window. That is a relatively easy task to achieve using WINAPI's PrintWindow() function. The problem is that I need to ship these screenshots to the JavaScript/AJAX application running on the same machine in the web browser window.

My plan is:

  • Using C/C++ write a DLL that does the dirty screenshotting (Win32 API) stuff.
  • Link it to a signed JavaApplet using JNLPAppletLauncher (https://applet-launcher.dev.java.net/)
  • Call the C function from within the JavaApplication and retrieve a bitmap.
  • Send the bitmap to a remote server, do some magic there, share it with an AJAX application, ...

I'm a skilled web developer, but the first point goes far beyond my experience. So I would greatly appreciate an answer to any of the following questions:

  • How do I compile a DLL that would do what I want on every (even absolutely fresh) installation of Windows XP and newer? I can't/don't want to redistribute any files other that this single DLL.
  • What language do I need to use? I assume pure C is the best choice here?
  • Are there any tutorials that might point me to a right track?

Thank you very much!

#2
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,717 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
Wait...Java or JavaScript? Those are two completely different things.
sudo rm -rf /




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users