How to draw VM‘s display to my program’s window

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
emillics
Posts: 1
Joined: 15. May 2015, 10:50

How to draw VM‘s display to my program’s window

Post by emillics »

Hi, i want to know how to draw VM's display to my C# program's window, how to use IFrameBuffer to get the display data to draw to my custom program's window?And is this the same meaning of making the custom frontend with ose ? Thanks a lot !
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: How to draw VM‘s display to my program’s window

Post by noteirak »

Yes, this means making a custom Frontend.
I personally don't have much knowledge here, but it was already dicussed here and (not necessarly on what you need) here
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
klaus
Oracle Corporation
Posts: 1133
Joined: 10. May 2007, 14:57

Re: How to draw VM‘s display to my program’s window

Post by klaus »

In VirtualBox 4.3 there are two ways one can get the VM's screen content efficiently:
1. one writes a "VM frontend" - others have done this, but since the VirtualBox hardening effort it's pretty much impossible to do this.
2. one writes a VRDE module - there is very little sample code, effectively only the VNC one. Don't think anyone tried doing this in C#

The details are specific to Windows host, but from the question it's clear that this is what you want.

There would be low-performance (and rather inefficient) ways of getting he screen content (requesting screen shots over the API), but that's not usable for running a VM.

With the upcoming VirtualBox 5.0 this will be different - there the API was redesigned so that it is possible to write a "normal API client" which hooks up to a headless VM, getting its screen content with efficient notifications. We extended the two frequently used GUI frontends (VirtualBox and VBoxSDL) to support both the traditional "all in one" and the new "separate VM and UI process" models, so there is sample code available already. Just very fat samples, as both modes are supported. So there's no "UI only" sample yet.
Post Reply