Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have been using the following methods:
IXMLDOMDocument.CreateInstance

IXMLDOMDocument.load

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
Posted
Updated 29-Sep-11 23:19pm
v2
Comments
Slacker007 30-Sep-11 5:19am    
Edit: Formatting and readability.

1 solution

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[^]
 
Share this answer
 
Comments
Jackie Lloyd 30-Sep-11 8:00am    
Thanks - that's really useful.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900