/// <summary> /// Processes the specified Xml document and returns the response as a new <see cref="XmlDocument"/>. /// </summary> /// <param name="xmlIn">Xml Document containing configuration settings.</param> /// <param name="flags">Specifies a combination of <see cref="ConfigXmlFlags"/>.</param> /// <returns></returns> public static XmlDocument ProcessConfigXml(XmlDocument xmlIn, ConfigXmlFlags flags) { string s = ProcessConfigXml(xmlIn.OuterXml, flags); //load string into an XmlDocument object. XmlDocument dOut = new XmlDocument(); dOut.LoadXml(s); return dOut; }
/// <summary> /// Processes the specified Xml document and returns the response as a new <see cref="XmlDocument"/>. /// </summary> /// <param name="xmlIn">Xml Document containing configuration settings.</param> /// <param name="flags">Specifies a combination of <see cref="ConfigXmlFlags"/>.</param> /// <returns></returns> public static XmlDocument ProcessConfigXml(XmlDocument xmlIn, ConfigXmlFlags flags) { string s = ProcessConfigXml(xmlIn.OuterXml, flags); //load string into an XmlDocument object. XmlDocument dOut = new XmlDocument(); dOut.LoadXml(s); return(dOut); }
/// <summary> /// Processes the specified Xml and returns a string containing the Xml response. /// </summary> /// <param name="xmlIn">Xml containing configuration settings.</param> /// <param name="flags">Specifies a combination of <see cref="ConfigXmlFlags"/>.</param> /// <returns></returns> /// <remarks>The Configuration Manager component is transactioned and must process only one configuration request at a time to prevent collisions.</remarks> public static string ProcessConfigXml(string xmlIn, ConfigXmlFlags flags) { IntPtr pOut = IntPtr.Zero; int hresult = DMProcessConfigXML(xmlIn, flags, ref pOut); if (hresult == 0) { string s = Marshal.PtrToStringUni(pOut); free(pOut); return(s); } else { throw new ExternalException("Error " + hresult.ToString("X")); } }
/// <summary> /// Processes the specified Xml and returns a string containing the Xml response. /// </summary> /// <param name="xmlIn">Xml containing configuration settings.</param> /// <param name="flags">Specifies a combination of <see cref="ConfigXmlFlags"/>.</param> /// <returns></returns> /// <remarks>The Configuration Manager component is transactioned and must process only one configuration request at a time to prevent collisions.</remarks> public static string ProcessConfigXml(string xmlIn, ConfigXmlFlags flags) { IntPtr pOut = IntPtr.Zero; int hresult = DMProcessConfigXML(xmlIn, flags, ref pOut); if(hresult == 0) { string s = Marshal.PtrToStringUni(pOut); free(pOut); return s; } else { throw new ExternalException("Error " + hresult.ToString("X")); } }
private static extern int DMProcessConfigXML(string pszWXMLin, ConfigXmlFlags dwFlags, ref IntPtr ppszwXMLout);