HRESULT和VARIANT_BOOL从IXMLDOMDocument方法返回值 [英] HRESULTs and VARIANT_BOOL return values from IXMLDOMDocument methods
问题描述
我一直在使用以下方法:
I have been using the following methods:
IXMLDOMDocument.CreateInstance
IXMLDOMDocument.load
我有很多麻烦检查失败的返回值. CreateInstance似乎返回HRESULT,而加载似乎返回VARIANT_BOOL.
这些重新运行类型之间是否存在一致性,或者是否存在任何逻辑?为什么每种情况下的返回类型都是HRESULT或VARIANT_BOOL?我仍然不了解HRESULTS是什么以及何时使用它们-在这个问题上似乎很少.有人可以指点我吗?
非常感谢
I have had a lot of bother checking the return values for failure. CreateInstance seems to return an HRESULT and load seems to return a VARIANT_BOOL.
Is there any coherency between these retrun types or any logic o why an HRESULT or VARIANT_BOOL is the return type in each case? I still don''t understand what HRESULTS are and when they are used - there seems to be very little on the subject. Can anyone point me at anything please?
Many thanks
推荐答案
HRESULT提供了操作的详细状态(例如,不支持接口).但是VARIANT_BOOL只是告诉您是对还是错.
http://msdn.microsoft.com/en-us/library/bb401631.aspx [ ^ ]
HRESULT provides detailed status of the operation (e.g. Interface not supported). But VARIANT_BOOL just tells true or false.
http://msdn.microsoft.com/en-us/library/bb401631.aspx[^]
这篇关于HRESULT和VARIANT_BOOL从IXMLDOMDocument方法返回值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!