为什么 IDirect3DDevice9::Release 会返回 S_FALSE?
当我为 Direct3D9 设备调用 Release 方法时,它返回 S_FALSE,但我找不到任何解释为什么会返回该值的信息。
据我所知,S_FALSE 意味着它已经成功,但不必执行任何操作,但我只释放一次。
我也不认为该方法确实成功,因为即使在窗口被销毁并释放设备之后,我仍然保留全屏 DirectX 窗口。
When I call the Release method for my Direct3D9 device it returns S_FALSE but I can't find anything that explains why this value would be returned.
From what I can gather, S_FALSE means that it has succeeded but hasn't had to do anything but I only release once.
I also don't think the method does succeed as I am left with a fullscreen DirectX window even after the window has been destroyed and the device released.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IUnknown::Release
不会像您假设的那样返回HRESULT
,而是返回一个ULONG
,指示(此 COM 对象的)未完成的引用计数。IUnknown::Release
does not return aHRESULT
as you assumed, it instead returns aULONG
indicating outstanding reference count (of this COM object).