AudRecordLib
|
#include <DataBufferWrap.h>
Public Member Functions | |
ManagedDataBufferWrap (AudRecordCLI::IDataBuffer^ pBuffer) | |
HRESULT WINAPI | QueryInterface (REFIID riid, PVOID *ppv) |
ULONG WINAPI | AddRef () |
ULONG WINAPI | Release () |
HRESULT WINAPI | GetLength (DWORD *pLength) |
HRESULT WINAPI | SetLength (DWORD newLength) |
HRESULT WINAPI | GetMaxLength (DWORD *pMaxLen) |
HRESULT WINAPI | GetBuffer (BYTE **ppBuffer) |
HRESULT WINAPI | GetBufferAndLength (BYTE **ppDataBuffer, DWORD *pLength) |
Despite its name, this is a native object. It wraps an IDataBuffer when a INSSBuffer needs to be passed to a native function. This is usually where an IDataBuffer is returned from an ITargetSink method
ManagedDataBufferWrap::ManagedDataBufferWrap | ( | AudRecordCLI::IDataBuffer^ | pBuffer | ) |
Constructs a native wrapper around the managed IDataBuffer
pBuffer | The managed data buffer to track via a GCHandle |
ULONG WINAPI ManagedDataBufferWrap::AddRef | ( | ) |
Increments the objects reference count
HRESULT WINAPI ManagedDataBufferWrap::GetBuffer | ( | BYTE ** | ppBuffer | ) |
Gets a pointer to the managed buffer and unpacks the reutrned IntPtr to a BYTE pointer that is returned in the parameter
[out] | ppBuffer | A pointer that receives the data buffer pointer |
HRESULT WINAPI ManagedDataBufferWrap::GetBufferAndLength | ( | BYTE ** | ppDataBuffer, |
DWORD * | pLength | ||
) |
Gets a pointer to the managed buffer and unpacks the reutrned IntPtr to a BYTE pointer that is returned in the parameter
[out] | ppDataBuffer | A pointer that receives the data buffer pointer |
[out] | pLength | Pointer that holds the size of the buffer on return |
HRESULT WINAPI ManagedDataBufferWrap::GetLength | ( | DWORD * | pLength | ) |
Queries the current number of bytes used in the buffer, set by a previous call to SetLength
[out] | pLength | Number of bytes used |
HRESULT WINAPI ManagedDataBufferWrap::GetMaxLength | ( | DWORD * | pMaxLen | ) |
Queries the maximum number of bytes that can be used in the buffer.
[out] | pMaxLen | Number of bytes used that can be used |
HRESULT WINAPI ManagedDataBufferWrap::QueryInterface | ( | REFIID | iid, |
PVOID * | ppv | ||
) |
Returns a pointer to an interface on the current object
iid | Identifier of the interface to return | |
[out] | ppv | Pointer to a pointer that receives the interface, or NULL |
ULONG WINAPI ManagedDataBufferWrap::Release | ( | ) |
Drecreases the objects reference count
If the ref count reaches zero, the object is destroyed
HRESULT WINAPI ManagedDataBufferWrap::SetLength | ( | DWORD | newLength | ) |
Updates the number of bytes used in this buffer. Simply forwards the value to the managed IDataBuffer::SetLength()
newLength | The new value of the number of bytes used |