IWMSServer.ExportXML (C#)

banner art

Previous Next

IWMSServer.ExportXML (C#)

The ExportXML method creates an XML document containing the server configuration data.

Syntax

  IWMSServer
  .ExportXML(
  string  strXMLFileName 
);

Parameters

strXMLFileName

[in] string containing the name of the XML document.

Return Values

This method does not return a value.

If this method fails, it throws an exception.

Number Description
0x80070057 strXMLFileName is invalid.
0x00000003 The path indicated by strXMLFileName was not found.

Remarks

You must save the XML document in a file with an .xml extension before you can use it to configure a server.

This method requires the Network Service account to have write and browse access to the specified path.

Example Code

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;









    // Export the server configuration to a file.
    strText = "c:\\wmpub\\wmroot\\server.xml";
    Server.ExportXML (strText);
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

Requirements

Reference: Add a reference to Microsoft.WindowsMediaServices.

Namespace: Microsoft.WindowsMediaServices.Interop.

Assembly: Microsoft.WindowsMediaServices.dll.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003 family, Windows Server 2008 family.

See Also

Previous Next