PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

CreateSurface problem

I'm trying to load a png image into a CGapiSurface from a VFS file and am getting 0xc8660190 as a return code. I can't find this error code anywhere in the GapiDraw header files. Any idea what it means?

The image file is a 24-bit png file. Other 24-bit png files load fine.

I try to load it as follows:

Code:
HRESULT hr = m_images[index]->CreateSurface(GDSURFACE_SYSTEMMEMORY, &vfs;, L"/images/fb_portrait.png");


m_images[index] has been created correctly via new CGapiSurface(m_gapidraw)

Any ideas?
HRESULT hr = m_images[index]->CreateSurface(GDSURFACE_SYSTEMMEMORY, &vfs;, L"/images/fb_portrait.png");

I don't use GAPIDraw myself, but are you sure the slashes are right? Given that it's a windows environment, and not Unix, perhaps it should be:

HRESULT hr = m_images[index]->CreateSurface(GDSURFACE_SYSTEMMEMORY, &vfs;, L"\\images\\fb_portrait.png");

or

HRESULT hr = m_images[index]->CreateSurface(GDSURFACE_SYSTEMMEMORY, &vfs;, L"images\\fb_portrait.png");
I figured it out. I didn't export the vfs file after I added the images, so although the editor showed the images in there, the resulting vfs file wasn't updated on the device.

So apparently a return code of 0xc8660190 means file not found in archive.

:oops: