[vbox-dev] takecSreenShot

Vadim Galitsyn vadim.galitsyn at oracle.com
Tue May 21 07:07:26 GMT 2013


Hi,

> display->GetScreenResolution(0,&width,&height,&bpp);
> printf("Width: %ul Height: %ul Bits Per Pixel: %ul. ", width,height,bpp);
>  buffersize = width*height*bpp/8;
> databuff= (BYTE*)CoTaskMemAlloc(buffersize);

It seems, *buffersize* calculated incorrectly. Please do not divide it by 8 (i.e, buffersize = width * height * bpp).

Best regards,
Vadim





More information about the vbox-dev mailing list