March 30th, 2010, 04:05 AM
How to catch error: The instruction at '' referenced memory at ''. The memory could n
I am experiencing this error: The instruction at '' referenced memory at ''. The memory could not be read. What I want to do is possibly Catch that error and execute a Go To Statement so that it will skip that part of the code altogether.
I do not know what parameter to put in the catch(<?>) block. Can anyone help me with this? Is it also possible if I want the code part where I want to GoTo is located in a different class/file?
Some additional information: This error occurs when I try to read an XML node attribute but is not present. Here is the part of the code where I think it causes this error.
VARIANT GetAttribute(string attribute, IXMLDOMNamedNodeMap* pNodeMap)
IXMLDOMNode* pAtt = NULL;
_bstr_t tempb = attribute.c_str();
//Process varSource first to determine if to use WMI or TSVar
BSTR bstrAtt = tempb.copy();
Tags for this Thread
Click Here to Expand Forum to Full Width