Author: Unknown
•19:16

今天下了一个关于GIS的程序,虽然编译没有错误,但是真要执行起来,就会出错,调试时出现了Microsoft.DirectX.Direct3D.NotAvailableException这个错误,最终找到一个http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=244100&SiteID=1 上面的问题和我的一样,他的解决方法是:It turns out that in control panel -> DirectX under the Direct3D tab the 'Allow Hardware Acceleration' check box was not selected. After selecting it, it seems that the device is now available. Presumably this meant that when Direct3D API requested the device, the device was not allowing access because hardware accelleration was not being allowed.

不过我看了一下自己 控制面板 中的 DirectX 已经将 'Allow Hardware Acceleration' 选中,但是后来确实在这里解决了问题,因为我曾经按转过 06年4月份的 DirectX SDK 在 Managed 选项卡中的第一个Microsoft.DirectX 有两个版本,一个是06年4月的2.0.0.0 和 04年9月份的1.0.2902.0 ,而程序中使用的版本是第二个,只要我们选择 正确的版本作为默认就可以解决问题了。

This entry was posted on 19:16 and is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

0 评论: