[vbox-dev] help ! want to implement my IFramebuffer

Jack Han hanjackcyw at gmail.com
Sun Feb 22 04:05:36 GMT 2009


Thank you very much for taking time to view my mail.

I want to implement an IFramebuffer to capture the existing working guest
OS on my Windows XP.

I am using vs2008 aad ATL class library.

First, I use the pVirtualBox->OpenExistingSession() to get the ISession.

Then I use the ISession to get IConsole , use IConsole to get IDisplay, use
IDisplay->RegisterExternalFramebuffer() to register my Framebuffer. then
call ISession->Close().

And in my implementation of IFramebuffer, I noticed IDisplay called 2 times
of my get_Address.

At the first time of call get_Address, I have not received the
RequestResize() call, so I returned NULL.

At the second time of call get_Address, I returned the VRAM that got from
RequestResize().

Then, program exit !!!!!!!!!!!  I noticed the last line in my log file is
the get_Address return VRAM.

In my implementation of IFramebuffer:
IFramebuffer->get_UsesGuestVRAM, I set to TRUE.
IFramebuffer->get_PixelFormat, I set to FramebufferPixelFormat_FOURCC_RGB.

Why is that ????

I tried many ways to fix this. But the last good thing is that when I use
CoTaskMemAlloc() to allocate memory 2 times as my buffer in get_Address(),
program did not exit.
And I also received NotifyUpdate(). But the existing guest os not working at
all ( means I could not use my mouse to control it ) !
And the my buffer has nothing data in it.

Looking forward to your early reply! Thank you!

Jack Han
2009-2-22
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20090222/847db381/attachment.html>


More information about the vbox-dev mailing list