IWPStream Interface

[Top]  [Chapter]  [Previous]  [Next]

.NET Stream2WPStream utility class

Description

This interface is used to allow the TextDynamic DLL to read and write from and to .NET Streams. To use this interface simply create an instance of the class Stream2WPStream and pass it as Stream parameter to any of the methods which expects an IStream interface.

 

Load:

 

IWPMemo Memo = WPDLLInt1.Memo;

FileStream textstream = new FileStream("C:\\1.htm",FileMode.Open);

Memo.LoadFromStream(

 new WPDynamic.Stream2WPStream(textstream),

 false, "" );

textstream.Close();

 

Save:

 

IWPMemo Memo = WPDLLInt1.Memo;

FileStream textstream = new FileStream("C:\\new.htm",FileMode.Create);

Memo.SaveToStream(

 new WPDynamic.Stream2WPStream(textstream),

 false, "HTML" );

textstream.Close();


[idh_interface_iwpstream.htm]    Copyright © 2007 by WPCubed GmbH