• Advertisement
Sign in to follow this  

about directx

This topic is 4727 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i have a problem about direct. what reasons can let this function return a false result .. pPSur->GetAttachedSurface(&caps,&pBBuf); thx...

Share this post


Link to post
Share on other sites
Advertisement
Probably because the caps members haven't been filled up properly or because the surface has been lost. Check the docs for more detail.

What does your caps look like? And is pPSur valid?

Share this post


Link to post
Share on other sites
Some general advice:

It always helps to check what it is that this method returns. The DirectX SDK contains a helper library, consisting of dxerr9.h and dxerr9.lib, which can tell you the human readable name of the error that occured like this:


HRESULT hResult = pPSur->GetAttachedSurface(&caps,&pBBuf);
if(FAILED(hResult)) {
cerr << DXGetErrorString9(hResult) << endl;
throw std::runtime_error("GetAttachedSurface() failed"); // or whatever
}



Also, try installing the debug runtime of DirectX. It will tell you, in plain english, in your output window, why the method fails and what you've got to do in order to fix it.

Share this post


Link to post
Share on other sites
What does your caps look like? And is pPSur valid?
i can say si valid.
but thx all the same.

Thank you to help me .
let me try.

Share this post


Link to post
Share on other sites
Dear Cygon:
Thank you helping me.
and i dont know how to install the debug runtime of DirectX.
i have intalled DirectX 9.0 SDK.

From kris3106

Share this post


Link to post
Share on other sites
Dear Cygon:
Thank you helping me.
and i dont know how to install the debug runtime of DirectX.
i have intalled DirectX 9.0 SDK.

From kris3106

Share this post


Link to post
Share on other sites
Control Panel -> DirectX -> Direct3D -> Use Debug Version of Direct3D

Share this post


Link to post
Share on other sites
now i know the problem is "DDERR_NOTFOUND"
but i dont know how to "FOUND" it .
please give some adives ..
thx very much..
from kris3106 ..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement