Jump to content
Sign in to follow this  
Andreik

Screen captures via HTTP requests

Recommended Posts

Andreik

I saw many people look for a way to transfer screen camputres from a computer to another. Here I want to present a simple way to do that via HTTP requests (thanks to Manadar HTTP server example). It's very customizable, there are options to capture all screen or just some specific areas, to capture mouse cursor and set image quality.

EDIT:

- fixed memory leak in client

- add option to get desktop width & height from remoted computer

- fixed mouse cursor show/hide

I hope this will help some of you. :oops:

Server.au3

Client.au3

Edited by Andreik
  • Like 2

When the words fail... music speaks

Share this post


Link to post
Share on other sites
Andreik

Thank you! Check out the source now. There was a memory leak in client but now is fixed.


When the words fail... music speaks

Share this post


Link to post
Share on other sites
JScript

Hello @Andreik

I checked the operation of the code and made ​​some changes to accelerate the capture and use less CPU.

I was not able to close the window of the Client module, so I made ​​some changes too.

I confess I had never used the InetRead() function, I noticed that she makes the following call:

Posted Image

I captured this image from the program: Process Explorer (sysinternals)!

I think the should be called by DLLCall() function, it would be much better!

Download:

Screen_captures_via_HTTP_requests.zip

Regards,

João Carlos.

Edited by JScript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post


Link to post
Share on other sites
Andreik

Yup, InetGet() uses functions from wininet.dll but I'm not sure how much performance I gain if I call directly functions from wininet.dll. Anyway I found some good resources on MSDN. I'll make a test and come back with the results.

Some good links for start:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa385096%28v=vs.85%29.aspx

http://msdn.microsoft.com/en-us/library/windows/desktop/aa384363%28v=vs.85%29.aspx

http://msdn.microsoft.com/en-us/library/windows/desktop/aa384233%28v=vs.85%29.aspx

Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites
JScript

Surely the performance will be better, because if you open Process Explorer you will see the Rundll32.exe file opening and closing all the time!

In a frantic pace, very crazy!!!

Do You tested the changes I have made?

Regards,

João Carlos.


http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post


Link to post
Share on other sites
Andreik

Yes, I tested. It's much better. Today I was busy with creating AVI file of session. As you know it's easy as uncompressed AVI but finally I got it work fine with XVID and without getting SaveOption window. Next step now it's to replace InetRead() if you say isn't so performant. Thank you!


When the words fail... music speaks

Share this post


Link to post
Share on other sites
Andreik

I found on forum WinINet UDF (a little modified because of conflicts between variables from different UDFs) and I wrote an example using it but I don't see any performance even if are used dll calls. With my initial example server use max 10% CPU and client max 15% CPU (I run both on same PC). About memory server use ~15Mb memory and client same. And this example using WinINet: server use 15% CPU and max 25Mb memory and client use 25% CPU and 25-50 Mb memory (very variable). Let me know how it works for you.

WinInet Example.rar

  • Like 1

When the words fail... music speaks

Share this post


Link to post
Share on other sites
JScript

Excellent!

Now I no longer see what was happening in this picture:

Posted Image

"Rundll32.exe" opening and closing like crazy, in a frenetic rhythm!

It may not make a difference in the CPU load, but in reading the HDD will be enough!

Updates that I'm doing in my program (), will have to be redone... :oops:

Best regards,

João Carlos.

Edited by JScript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.