[vbox-dev] IFramebuffer.GetAddress
Klaus Espenlaub
klaus.espenlaub at oracle.com
Tue May 28 04:31:10 PDT 2013
Hi,
On 28.05.2013 03:52, 一生有你 wrote:
> Hi,guys!
> framebuffer->vtbl->GetAddress(framebuffer,&adr) always returns with
> 0x8000ffff ,it means
> an unknow excption in xpcom.
NS_ERROR_UNEXPECTED. Not the same as unknown.
> i want to know why it could be this?
Because XPCOM doesn't have the faintest clue how to marshal the
parameter in the cross-process case.
> thanks a lot....
> /////////////////////////////here is the code
> IFramebuffer* framebuffer;
> int xo,yo;
> rc=display->vtbl->GetFramebuffer(display,0,&framebuffer,&xo,&yo);
> if(NS_SUCCEEDED(rc)) printf("framebuffer exist\n");//realy exist...
>
> unsigned int fw,fh,fbpp;
> framebuffer->vtbl->GetWidth(framebuffer,&fw);
> framebuffer->vtbl->GetHeight(framebuffer,&fh);
> framebuffer->vtbl->GetBitsPerPixel(framebuffer,&fbpp);
> printf("framebuffer Width: %u Height: %u Bits Per Pixel: %u \n
> ",fw,fh,bpp);
> //printf outputs the correct Width Height and Bits Per Pixel......but
> getaddress fails....
>
> unsigned char* adr;
> rc=framebuffer->vtbl->GetAddress(framebuffer,&adr);
> if(NS_SUCCEEDED(rc)) ////////fails here ???why
Because you're trying to call a function from a different process which
is only available in the VM process (at least you didn't say that you're
writing code which is running the VM in this process). Same error as in
your previous mail about takeScreenShot.
What do you want to do with the framebuffer address? It's useless
information in a process other than the VM process.
Klaus
> printf(">>>>>>>>>>>>>>>>%p.......\n",adr);
More information about the vbox-dev
mailing list