<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Access violation when calling $IXMLDOMNode_appendChild from in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Access-violation-when-calling-IXMLDOMNode-appendChild-from/m-p/884031#M76216</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;I finally have found the reason for the access violation I have been getting.&lt;BR /&gt;&lt;BR /&gt;It seemsthat the interface definitiongenerated by the Intel VFortran Module Wizard for the function $IXMLDOMNode_appendChild($OBJECT, newChild, OutNewChild)isincorrect.&lt;BR /&gt;&lt;BR /&gt;Per default, the parameters are listed as&lt;BR /&gt;&lt;BR /&gt;INTEGER(INT_PTR_KIND()), INTENT(IN) :: $OBJECT ! Object Pointer&lt;BR /&gt;!DEC$ ATTRIBUTES VALUE :: $OBJECT&lt;BR /&gt;INTEGER(INT_PTR_KIND()), INTENT(IN) :: newChild ! IDispatch&lt;BR /&gt;!DEC$ ATTRIBUTESREFERENCE :: newChild&lt;BR /&gt;INTEGER(INT_PTR_KIND()), INTENT(OUT) :: outNewChild ! IDispatch&lt;BR /&gt;!DEC$ ATTRIBUTES REFERENCE :: outNewChild&lt;BR /&gt;&lt;BR /&gt;However, it seems like newChild should be passed by value and not by reference. If I change the attributes for newChild to &lt;BR /&gt;&lt;BR /&gt;!DEC$ ATTRIBUTESVALUE :: newChild&lt;/DIV&gt;
&lt;BR /&gt;in both $IXMLDOMNode_appendChild() and IXMLDOMNode_appendChild() the functions works correctly without giving an access violaiton.&lt;BR /&gt;&lt;BR /&gt;Now, theremaining question is, whether this incorrect function interface is caused by the Intel Visual Fortran Module Wizard or whether the interface description within the msxml6.dll is wrong. Does anybody have a clue how to find out? Is there any tool available that I can use to see the interface definitons contained in a COM dll? &lt;BR /&gt;&lt;BR /&gt;Any help would be greatly appreciated,&lt;BR /&gt;Thomas Boehme&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 15 Jun 2009 12:00:51 GMT</pubDate>
    <dc:creator>thomas_boehme</dc:creator>
    <dc:date>2009-06-15T12:00:51Z</dc:date>
    <item>
      <title>Access violation when calling $IXMLDOMNode_appendChild from msxml6.dll via COM interface</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Access-violation-when-calling-IXMLDOMNode-appendChild-from/m-p/884030#M76215</link>
      <description>&lt;P&gt;I am experiencing unexpected access violations when using Microsoft'smsxml6.dll via a COM interface. I attached a simple VS2008 project to illustratethe problem.&lt;BR /&gt;&lt;BR /&gt;Initially, I made an interface file for msxml6.dll via the Intel Fortran Module Wizard. In order to get this interface file to compile cleanly, Ifirst removed the parameterdefinitions for XML node types, as these parameters seem to be already defined in either the module IFCOM or IFWINTY. Also I had to replace all occurances of INTEGER(2), INTENT(OUT) by INTEGER(4), INTENT(OUT). &lt;BR /&gt;&lt;BR /&gt;After these modifications, the interface definition compiles ok and I can call most msxml6.dll functions without problems. I can read xml files, get content from them, create nodes, etc. &lt;BR /&gt;&lt;BR /&gt;However, I cannot get $IXMLDOMNode_appendChild(XMLDocument, XMLNode, XMLNodeOut) (line 24 in MSXML_FORTRAN.f90) to work. Everytime I try to add a node to a existing DOM structure, it results in an access violation and I could not find areason for it. &lt;BR /&gt;&lt;BR /&gt;Alternatively, I tried to passthe pointers XMLDocument and XMLNode to a C++ subroutine (with extern "C" interface) and call IXMLDOMNode::appendChild() from the C++ subroutine. To my supriseeverythings works well. Therefore, the object I want to add and the reference to the parent node seem to be fine. The problem seems to be in the call to appendChild in FORTRAN. Is it possible that the interface definitioncreated by theModule Wizard is incorrect?&lt;BR /&gt;&lt;BR /&gt;I would be very happy for any assistance regarding this problem. The workaround using a C++ function is less than elegant. It requires me touse a mixed languagesolution even thoughI do not really need any C++ in the project.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Thomas Boehme&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2009 11:46:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Access-violation-when-calling-IXMLDOMNode-appendChild-from/m-p/884030#M76215</guid>
      <dc:creator>thomas_boehme</dc:creator>
      <dc:date>2009-06-10T11:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Access violation when calling $IXMLDOMNode_appendChild from</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Access-violation-when-calling-IXMLDOMNode-appendChild-from/m-p/884031#M76216</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;I finally have found the reason for the access violation I have been getting.&lt;BR /&gt;&lt;BR /&gt;It seemsthat the interface definitiongenerated by the Intel VFortran Module Wizard for the function $IXMLDOMNode_appendChild($OBJECT, newChild, OutNewChild)isincorrect.&lt;BR /&gt;&lt;BR /&gt;Per default, the parameters are listed as&lt;BR /&gt;&lt;BR /&gt;INTEGER(INT_PTR_KIND()), INTENT(IN) :: $OBJECT ! Object Pointer&lt;BR /&gt;!DEC$ ATTRIBUTES VALUE :: $OBJECT&lt;BR /&gt;INTEGER(INT_PTR_KIND()), INTENT(IN) :: newChild ! IDispatch&lt;BR /&gt;!DEC$ ATTRIBUTESREFERENCE :: newChild&lt;BR /&gt;INTEGER(INT_PTR_KIND()), INTENT(OUT) :: outNewChild ! IDispatch&lt;BR /&gt;!DEC$ ATTRIBUTES REFERENCE :: outNewChild&lt;BR /&gt;&lt;BR /&gt;However, it seems like newChild should be passed by value and not by reference. If I change the attributes for newChild to &lt;BR /&gt;&lt;BR /&gt;!DEC$ ATTRIBUTESVALUE :: newChild&lt;/DIV&gt;
&lt;BR /&gt;in both $IXMLDOMNode_appendChild() and IXMLDOMNode_appendChild() the functions works correctly without giving an access violaiton.&lt;BR /&gt;&lt;BR /&gt;Now, theremaining question is, whether this incorrect function interface is caused by the Intel Visual Fortran Module Wizard or whether the interface description within the msxml6.dll is wrong. Does anybody have a clue how to find out? Is there any tool available that I can use to see the interface definitons contained in a COM dll? &lt;BR /&gt;&lt;BR /&gt;Any help would be greatly appreciated,&lt;BR /&gt;Thomas Boehme&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Jun 2009 12:00:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Access-violation-when-calling-IXMLDOMNode-appendChild-from/m-p/884031#M76216</guid>
      <dc:creator>thomas_boehme</dc:creator>
      <dc:date>2009-06-15T12:00:51Z</dc:date>
    </item>
  </channel>
</rss>

