系统环境为 WINDOWS XP SP3
visual studio 2008 版本9.0.21022.8 RTM
.net framework 3.5
DirectX SDK (June 2010)
昨个新装的系统。普通程序是没问题的,但所有使用DirectX9函数的程序都有问题。情况为编译正常,直接运行正常,但当F5调试运行时出错误。
我写了个简单的WIN32程序验证了一下
#include "d3d9.h"
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE,LPSTR,int)
{
LPDIRECT3D9 pD3D = NULL;
pD3D=Direct3DCreate9(D3D_SDK_VERSION);
if(pD3D)
pD3D->Release();
return 0;
}
点F5运行就会弹警告:"应用程序正常初始化(0xc0000235)失败。请点确定,终止程序。"
确定后,VS的输出窗口就会有:
“D3DUiLib.exe”: 已加载“D:\MyProjects\D3DUiLib\Debug\D3DUiLib.exe”,已加载符号。
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\ntdll.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\kernel32.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\d3d9.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\d3d8thk.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\gdi32.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\user32.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\msvcrt.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\advapi32.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\rpcrt4.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\secur32.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\version.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\winmm.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\D3dx9d_43.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\imm32.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\lpk.dll”
“D3DUiLib.exe”: 已加载“C:\WINDOWS\system32\usp10.dll”
D3DUiLib.exe 中的 0x7c92e4ff 处最可能的异常: 0xC0000235: 由句柄所调用的 NtClose 已使用 NtSetInformationObject 以防止关闭。
D3DUiLib.exe 中的 0x7c9873be 处最可能的异常: 0xC0000235: 由句柄所调用的 NtClose 已使用 NtSetInformationObject 以防止关闭。
D3DUiLib.exe 中的 0x7c9873be 处未处理的异常: 0xC0000235: 由句柄所调用的 NtClose 已使用 NtSetInformationObject 以防止关闭。
程序“[2484] D3DUiLib.exe: 本机”已退出,返回值为 0 (0x0)。
直接运行可以,但启动调试就出错,不知是什么原因,请各位达人指点一二。
------最佳解决方案--------------------------------------------------------
http://hi.baidu.com/zdd8231/blog/item/92ebb7168b803240f2de3218
------其他解决方案--------------------------------------------------------
配置:
windows XP SP 未知
VS 2008 9.0.30729.1 SP
DX August 2009 (更老的也用过)
一直是可以调的,最多慢得很
------其他解决方案--------------------------------------------------------
我居然也用的小红伞,害得我好苦啊~
问题解决了
谢谢,兄弟!
------其他解决方案--------------------------------------------------------
到底什么原因?