密码HRESULT错误
Cryptic HRESULT errors
以下EndDraw()函数返回HRESULT错误代码:http://msdn.microsoft.com/en-us/library/windows/desktop/dd371924%28v=vs.85%29.aspx
文件规定:
如果该方法成功,则返回S_OK。否则,它将返回HRESULT错误代码,并将tag1和tag2设置为错误发生时处于活动状态的标记。
然后返回指示操作成功的HRESULT。。。
我得到CCD_ 1的返回值;公共HRESULT值";页码:http://msdn.microsoft.com/en-us/library/windows/desktop/aa378137%28v=vs.85%29.aspx
我也在WinError.h
中搜索了错误代码,但也找不到。如果它返回此代码,那么必须有一种方法来了解它的含义。
我该如何解释此错误代码以找出问题所在?
您使用Google,该十六进制代码的顶部结果为:
D2DERR_WRONG_STATE
0x88990001
The object was not in the correct state to process the method.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd370979(v=vs.85).aspx
我不知道图形编程或Windows编程的第一件事,但我认为这回答了你的问题,再加上文档中指出的标记值将返回给你,指的是错误发生的点。
最后但并非最不重要的。。
我也遇到了同样的错误,直到我意识到我没有首先调用ID2D1HwndRenderTarget::BeginDraw()来为绘制调用准备渲染目标。
(我刚刚创建了一个帐户来投票支持Loul G.的答案,但我还没有投票权限…)
我也遇到过同样的问题。。。
当BeginDraw()和EndDraw(
追溯以查看调用它们的顺序。
此外,为了防止这种情况,您可以围绕BeginDraw()、EndDraw(
bool beginCalled;
int beginCount;//for debugging
int endCount;//for debugging
//initialize variables somewhere...
void begin(){
rendTarget>BeginDraw();
beginCalled = true;
beginCount++;
}
void end(){
if(beginCalled){
rendTarget->EndDraw();
beginCalled = false;
}
endCount++;
}
//print counts as necessary for debugging
- 警告处理为错误这里有什么问题
- "error: no matching function for call to"构造函数错误
- boost::进程间消息队列引发错误
- C++,OpenCV,尝试显示图像时"OpenCV(4.3.0) Error: Assertion failed (size.width>0 && size.height>0)"此错误
- 有关插入适配器的错误。[错误]请求从 'back_insert_iterator<vector<>>' 类型转换为非标量类型
- QT在错误的班级中寻找空位
- vector.resize()中的分配错误
- 代码在main()中运行,但在函数中出现错误
- 释放错误后堆使用
- (C++)分析树以计算返回错误值的简单算术表达式
- Project Euler问题4的错误解决方案
- 我的字符计数代码计算错误.为什么
- 从"int*"强制转换为"unsigned int"会丢失精度错误
- 尝试导入pybind-opencv模块时出现libgtk错误
- CMake项目Boost库错误:Boost/config/compiler/gcc.hpp:165:10:致命错误:cs
- 如何将Hresult转换为错误描述
- 对COM组件的调用返回错误HRESULT E_FAIL
- 如何获得WinRT / Windows 10 Store代码的HRESULT错误代码的描述
- HRESULT E_FAIL 0x80004005 和 0x80000008 的错误有什么区别?
- 密码HRESULT错误