D3DERR_INVALIDCALL:无效的呼叫(-2005530516) [英] D3DERR_INVALIDCALL: Invalid call (-2005530516)

查看:560
本文介绍了D3DERR_INVALIDCALL:无效的呼叫(-2005530516)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WinXP(SP3)PC上进行测试时似乎出现错误.该错误在下面,但在使用Win7笔记本电脑时却听不到.

I seem to be getting an error when testing on my WinXP(SP3) PC. The error is below but I don't get it when using my Win7 laptop.

D3DERR_INVALIDCALL: Invalid call (-2005530516)
at SlimDX.Result.Throw[T](Object dataKey, Object dataValue)
at SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object dataValue)
at SlimDX.Direct3D9.Device..ctor(Direct3D direct3D, Int32 adapter, DeviceType deviceType, IntPtr     controlHandle, CreateFlags createFlags, PresentParameters[] presentParameters)

导致错误的代码是:

using (var d3d = new Direct3D())
{
using (var tmpDevice = new Device(d3d, 0, DeviceType.Hardware, IntPtr.Zero, CreateFlags.HardwareVertexProcessing, new PresentParameters() { BackBufferWidth = 1, BackBufferHeight = 1 }))
{
//I have some code here also but this doesn't even get here
}
}

据我所知,崩溃与创建新设备有关.

As far as I'm aware the crash is to do with creating the new device.

推荐答案

我的猜测是您的图形卡可能不支持1x1后备缓冲区.

My guess is that your graphics card probably doesn't support a 1x1 backbuffer.

看看调试运行时的输出.每当您收到InvalidCall时,很有可能会有某种诊断信息表明您做错了.

Take a look at the output from the debug runtimes. Whenever you get an InvalidCall chances are good that there's some sort of diagnostic information there indicating what you did wrong.

这篇关于D3DERR_INVALIDCALL:无效的呼叫(-2005530516)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆