Xeno-rat
Loading...
Searching...
No Matches
NAudio.Wave.ComStream Class Reference

Implementation of Com IStream. More...

Inheritance diagram for NAudio.Wave.ComStream:
Collaboration diagram for NAudio.Wave.ComStream:

Public Member Functions

 ComStream (Stream stream)
 
override void Flush ()
 Flushes the stream's buffer.
 
override int Read (byte[] buffer, int offset, int count)
 
override long Seek (long offset, SeekOrigin origin)
 
override void SetLength (long value)
 Sets the length of the current stream.
 
override void Write (byte[] buffer, int offset, int count)
 
override void Close ()
 Closes the stream and releases any system resources associated with it.
 

Protected Member Functions

override void Dispose (bool disposing)
 Disposes the stream if it is not null.
 

Properties

override bool CanRead [get]
 
override bool CanSeek [get]
 
override bool CanWrite [get]
 
override long Length [get]
 
override long Position [get, set]
 

Private Member Functions

void IStream. Clone (out IStream ppstm)
 Clones the current stream.
 
void IStream. Commit (int grfCommitFlags)
 Flushes the stream.
 
void IStream. CopyTo (IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten)
 Copies a specified number of bytes from the current stream to another stream.
 
void IStream. LockRegion (long libOffset, long cb, int dwLockType)
 Locks a region of the stream.
 
void IStream. Read (byte[] pv, int cb, IntPtr pcbRead)
 Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
 
void IStream. Revert ()
 Reverts the stream to its previous state.
 
void IStream. Seek (long dlibMove, int dwOrigin, IntPtr plibNewPosition)
 Sets the position within the current stream.
 
void IStream. SetSize (long libNewSize)
 Sets the size of the stream to the specified new size.
 
void IStream. Stat (out System.Runtime.InteropServices.ComTypes.STATSTG pstatstg, int grfStatFlag)
 Retrieves the statistics for this stream.
 
void IStream. UnlockRegion (long libOffset, long cb, int dwLockType)
 Unlocks the specified region of the stream.
 
void IStream. Write (byte[] pv, int cb, IntPtr pcbWritten)
 Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
 

Private Attributes

Stream stream
 

Detailed Description

Implementation of Com IStream.

Constructor & Destructor Documentation

◆ ComStream()

NAudio.Wave.ComStream.ComStream ( Stream stream)
inline

Member Function Documentation

◆ Clone()

void IStream. NAudio.Wave.ComStream.Clone ( out IStream ppstm)
inlineprivate

Clones the current stream.

Parameters
ppstmWhen this method returns, contains a reference to the cloned stream. This parameter is passed uninitialized.

This method creates a new stream object that is a copy of the current stream. The cloned stream is independent of the original stream, and any changes to the original stream do not affect the cloned stream, and vice versa.

◆ Close()

override void NAudio.Wave.ComStream.Close ( )
inline

Closes the stream and releases any system resources associated with it.

This method closes the underlying stream if it is not null and releases any system resources associated with it.

◆ Commit()

void IStream. NAudio.Wave.ComStream.Commit ( int grfCommitFlags)
inlineprivate

Flushes the stream.

Parameters
grfCommitFlagsFlags that specify the nature of the commit operation.

This method flushes the underlying stream, writing any buffered data to the underlying file or network stream.

◆ CopyTo()

void IStream. NAudio.Wave.ComStream.CopyTo ( IStream pstm,
long cb,
IntPtr pcbRead,
IntPtr pcbWritten )
inlineprivate

Copies a specified number of bytes from the current stream to another stream.

Parameters
pstmThe stream to which the data is to be copied.
cbThe number of bytes to be copied from the current stream.
pcbReadA pointer to a 64-bit value that receives the actual number of bytes read from the source stream.
pcbWrittenA pointer to a 64-bit value that receives the actual number of bytes written to the destination stream.

◆ Dispose()

override void NAudio.Wave.ComStream.Dispose ( bool disposing)
inlineprotected

Disposes the stream if it is not null.

Parameters
disposingA boolean value indicating whether the method is being called from the Dispose method and not from the finalizer.

This method disposes the stream if it is not null and sets it to null.

◆ Flush()

override void NAudio.Wave.ComStream.Flush ( )
inline

Flushes the stream's buffer.

This method flushes the buffer of the underlying stream, writing any buffered data to the underlying device.

◆ LockRegion()

void IStream. NAudio.Wave.ComStream.LockRegion ( long libOffset,
long cb,
int dwLockType )
inlineprivate

Locks a region of the stream.

Parameters
libOffsetThe byte offset of the beginning of the range to be locked.
cbThe length of the range to be locked, in bytes.
dwLockTypeThe type of access to be granted for the specified range.

◆ Read() [1/2]

override int NAudio.Wave.ComStream.Read ( byte[] buffer,
int offset,
int count )
inline

◆ Read() [2/2]

void IStream. NAudio.Wave.ComStream.Read ( byte[] pv,
int cb,
IntPtr pcbRead )
inlineprivate

Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

Parameters
bufferAn array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
offsetThe zero-based byte offset in buffer at which to begin storing the data read from the current stream.
countThe maximum number of bytes to be read from the current stream.
Returns
The total number of bytes read into the buffer. This might be less than the number of bytes requested if that many bytes are not currently available, or zero if the end of the stream is reached before any bytes are read.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Revert()

void IStream. NAudio.Wave.ComStream.Revert ( )
inlineprivate

Reverts the stream to its previous state.

◆ Seek() [1/2]

void IStream. NAudio.Wave.ComStream.Seek ( long dlibMove,
int dwOrigin,
IntPtr plibNewPosition )
inlineprivate

Sets the position within the current stream.

Parameters
offsetA byte offset relative to the origin parameter.
originA value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position.
Returns
The new position within the current stream.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Seek() [2/2]

override long NAudio.Wave.ComStream.Seek ( long offset,
SeekOrigin origin )
inline

◆ SetLength()

override void NAudio.Wave.ComStream.SetLength ( long value)
inline

Sets the length of the current stream.

Parameters
valueThe desired length of the stream in bytes.

This method sets the length of the current stream to the specified value. If the specified value is less than the current length of the stream, the stream is truncated. If the specified value is greater than the current length of the stream, the stream is expanded. If the stream is expanded, the contents of the stream between the old and new lengths are undefined.

Here is the caller graph for this function:

◆ SetSize()

void IStream. NAudio.Wave.ComStream.SetSize ( long libNewSize)
inlineprivate

Sets the size of the stream to the specified new size.

Parameters
libNewSizeThe new size to set for the stream.

This method sets the size of the stream to the specified new size.

Here is the call graph for this function:

◆ Stat()

void IStream. NAudio.Wave.ComStream.Stat ( out System::Runtime::InteropServices::ComTypes::STATSTG pstatstg,
int grfStatFlag )
inlineprivate

Retrieves the statistics for this stream.

Parameters
pstatstgWhen this method returns, contains a STATSTG structure that describes this stream object. This parameter is passed uninitialized.
grfStatFlagMembers of the STATFLAG enumeration that control the type of statistics returned in pstatstg.
Exceptions
ObjectDisposedExceptionThrown when the stream has been disposed.

◆ UnlockRegion()

void IStream. NAudio.Wave.ComStream.UnlockRegion ( long libOffset,
long cb,
int dwLockType )
inlineprivate

Unlocks the specified region of the stream.

Parameters
libOffsetThe byte offset of the beginning of the region to be unlocked.
cbThe length of the region to be unlocked in bytes.
dwLockTypeThe type of access to the region to be unlocked.

◆ Write() [1/2]

override void NAudio.Wave.ComStream.Write ( byte[] buffer,
int offset,
int count )
inline

◆ Write() [2/2]

void IStream. NAudio.Wave.ComStream.Write ( byte[] pv,
int cb,
IntPtr pcbWritten )
inlineprivate

Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

Parameters
bufferAn array of bytes. This method copies count bytes from buffer to the current stream.
offsetThe zero-based byte offset in buffer at which to begin copying bytes to the current stream.
countThe number of bytes to be written to the current stream.

This method writes count bytes from buffer to the current stream at the current position. The current position within the stream is advanced by count. If the write operation is successful, the current position within the stream is advanced by count; otherwise, the current position within the stream is unchanged.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ stream

Stream NAudio.Wave.ComStream.stream
private

Property Documentation

◆ CanRead

override bool NAudio.Wave.ComStream.CanRead
get

◆ CanSeek

override bool NAudio.Wave.ComStream.CanSeek
get

◆ CanWrite

override bool NAudio.Wave.ComStream.CanWrite
get

◆ Length

override long NAudio.Wave.ComStream.Length
get

◆ Position

override long NAudio.Wave.ComStream.Position
getset

The documentation for this class was generated from the following file: