Sign in to follow this  

Getting "Method is invalid call" error message

This topic is 4202 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

Hi, can somebody please help me on this. I'm getting D3DERR_INVALIDCALL and can't get past through it. This is part of the code: d3d = Direct3DCreate9( D3D_SDK_VERSION); if(!d3d){ zError("Unable to create Direct3D Object\n"); return false; } D3DDISPLAYMODE d3disp; ddrval = d3d->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3disp); if( ddrval != D3D_OK) { printf("This is really bad\n"); return false; } D3DFORMAT format = d3disp.Format; ZeroMemory(&pp,sizeof(D3DPRESENT_PARAMETERS)); pp.BackBufferCount= 1; pp.MultiSampleType=D3DMULTISAMPLE_NONE; pp.MultiSampleQuality=0; pp.SwapEffect = D3DSWAPEFFECT_DISCARD; pp.hDeviceWindow=hwnd; pp.Flags=0; pp.FullScreen_RefreshRateInHz=D3DPRESENT_RATE_DEFAULT; pp.PresentationInterval=D3DPRESENT_INTERVAL_DEFAULT; pp.BackBufferFormat=format; pp.EnableAutoDepthStencil=TRUE; pp.AutoDepthStencilFormat = D3DFMT_D16; if(FullScreenDisplay){ pp.Windowed = FALSE; pp.BackBufferWidth = width; pp.BackBufferHeight = height; }else{ pp.Windowed = TRUE; } ddrval = d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &pp, &device); if( ddrval == D3DERR_INVALIDCALL ) { zError("Method call is invalid\n"); return false; } else if( ddrval == D3DERR_NOTAVAILABLE ) { zError("This device does not support the queried technique\n"); return false; } else if( ddrval == D3DERR_OUTOFVIDEOMEMORY ) { zError("Not enough memory\n"); return false; } Is there anything that I missed ? Celios

Share this post


Link to post
Share on other sites

This topic is 4202 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this