AudRecordLib
Public Member Functions
NativeDataBufferWrap Class Reference

#include <DataBufferWrap.h>

Inheritance diagram for NativeDataBufferWrap:
AudRecordCLI::IDataBuffer

List of all members.

Public Member Functions

 NativeDataBufferWrap (INSSBuffer *pBuffer)
virtual IntPtr GetBuffer ()
virtual IntPtr GetBufferAndLength ([Out] DWORD% length)
virtual DWORD GetLength ()
virtual DWORD GetMaxLength ()
virtual void SetLength (DWORD newLength)

Detailed Description

Simple managed wrapper around a native INSSBuffer, when one needs to be passed to a method of a ITargetSink


Constructor & Destructor Documentation

NativeDataBufferWrap::NativeDataBufferWrap ( INSSBuffer *  pBuffer)

Constructs the wrapper around the specified INSSBuffer

Parameters:
pBufferThe buffer to wrap

Member Function Documentation

IntPtr NativeDataBufferWrap::GetBuffer ( ) [virtual]

Wraps a native pointer returned by the native method of the same name in an IntPtr for easier managed consumption

Returns:
An IntPtr holding the address of an allocated buffer

Implements AudRecordCLI::IDataBuffer.

IntPtr NativeDataBufferWrap::GetBufferAndLength ( [Out] DWORD%  length) [virtual]

Does a job similar to GetBuffer with the addition of returning the length parameter.

Parameters:
[out]lengthThe size of the allocated buffer pointed to by the returned IntPtr
Returns:
An IntPtr holding the address of an allocated buffer

Implements AudRecordCLI::IDataBuffer.

DWORD NativeDataBufferWrap::GetLength ( ) [virtual]

Queries the current number of bytes used in the buffer, set by a previous call to SetLength

Returns:
Number of bytes used

Implements AudRecordCLI::IDataBuffer.

DWORD NativeDataBufferWrap::GetMaxLength ( ) [virtual]

Queries the maximum size the buffer can be set to by SetLength

Returns:
Total number of bytes the buffer spans

Implements AudRecordCLI::IDataBuffer.

void NativeDataBufferWrap::SetLength ( DWORD  newLength) [virtual]

Updates the number of bytes used in this buffer. Used by the Windows Media code to know how many bytes to copy from the buffer

Parameters:
newLengthBytes used

Implements AudRecordCLI::IDataBuffer.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Defines