On Fri, 25 Feb 2005 21:43:44 -0800, "Peter Rilling"
<pe***@nospam.rilling.net> wrote:
A stream just contains a sequence of bytes, it has nothing to do with XML.
XML is simply the format of those bytes. Either you pass a stream to the
method or you must pass some class that interprets the XML such as an
XmlTextReader or XmlDocument.
I appreciate your input Peter, though I know this, but what I'm doing
now causes a CLR runtime error.
"Application has generated an exception that could not be handled."
"Process id=0xea0 (3744), Thread id=0x564 (1380)."
It could always be from the method call to Submit(....), this MCE2k5
isn't spitting out any details in the console window. I'll check that
next.
// xml is a string filled with xml.
byte[] byteArr;
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
byteArr = encoding.GetBytes(xml);
Microsoft.Windows.MediaCenter.ProgramDetails [] details;
System.IO.Stream sr = new System.IO.MemoryStream(byteArr);
ClickToRecord.Submit( sr,
Microsoft.Windows.MediaCenter.ClickToRecord.Confli ctResolutionPolicy.AllowConflict,
out details);
I was just having a brainfart earlier on how to start with a stream,
move the data to a byte array, then use the byte array to instantiate
a Stream object for passing to my Submit() method. Too much work is
frying my brain, eh?
Have a good weekend,
Michael Hughes - Silverton, Oregon
http://wou.ath.cx/Trivia http://wou.ath.cx/AmateurRadio