Send HWND Over Network

John Corigliano 1 Reputation point

Is there an API to capture an HWND and send it over the network to another desktop application on a different PC?

We have a 3rd party program that will accept an HWND and stream video to that. We want to have that 3rd party program send the video to a different computer but the only parameter it accepts is an HWND.

Basically we want to do something like Zoom desktop capture but only a specific window. We are willing to write an app to relay the data over the network. Something like this:


The program running on PC2 is an existing MFC C++ app but the relay program on PC1 hasn't been created yet and can be C++, C# or whatever is needed.

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,605 questions
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,625 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tim Roberts 81 Reputation points

    No. An HWND is meaningful only on the machine that created it. There are several applications that can do window capture and stream it over a network. You could then use something like VLC to show it on PC2.

    0 comments No comments

  2. Cheong00 3,476 Reputation points

    Generally the way to do it is either write your own display driver filter to log any change to display and send it to remote computer, or to add a GDI+ subsystem level filter to capture the GDI+ API commands and send it to remote computer to replay it (much like what WMF/EMF do, it let you replay the sequence of command you used to draw the image on another device context)

    0 comments No comments