AudRecordLib
Public Member Functions
StaticBuffer Class Reference

List of all members.

Public Member Functions

 StaticBuffer (DWORD dataSize)
HRESULT WINAPI QueryInterface (REFIID iid, LPVOID *ppv)
ULONG WINAPI AddRef ()
ULONG WINAPI Release ()
HRESULT WINAPI GetLength (DWORD *pLength)
HRESULT WINAPI SetLength (DWORD length)
HRESULT WINAPI GetMaxLength (DWORD *pLength)
HRESULT WINAPI GetBuffer (BYTE **ppBuffer)
HRESULT WINAPI GetBufferAndLength (BYTE **ppBuffer, DWORD *pLength)

Detailed Description

Simple wrapper class around a vector Used by NullSink as a data packet buffer. This is not designed to be used on the stack


Constructor & Destructor Documentation

StaticBuffer::StaticBuffer ( DWORD  dataSize) [inline]

Constructs a buffer object of a specified size

Parameters:
dataSizeInitial size of the contained buffer

Member Function Documentation

ULONG WINAPI StaticBuffer::AddRef ( ) [inline]

Increments the object's reference count. Not thread safe.

Returns:
The new reference count
HRESULT WINAPI StaticBuffer::GetBuffer ( BYTE **  ppBuffer) [inline]

Queries for the buffer pointer

Parameters:
[out]ppBufferPointer that receives the buffer pointer
Returns:
S_OK if the pointer is valid, E_POINTER if it is not
HRESULT WINAPI StaticBuffer::GetBufferAndLength ( BYTE **  ppBuffer,
DWORD *  pLength 
) [inline]

Queries for the buffer pointer and buffer length at the same time

The function is just a combination of GetBuffer() and GetLength()

Parameters:
[out]ppBufferPointer that receives the buffer pointer
[out]pLengthPointer that is set to the length of the buffer
Returns:
S_OK on success, otherwise an error from GetBuffer() or GetLength
HRESULT WINAPI StaticBuffer::GetLength ( DWORD *  pLength) [inline]

Queries the length of the stored buffer

Parameters:
[out]pLengthPointer that is set to the length of the buffer
Returns:
S_OK if the pointer is valid, E_POINTER if it is not
HRESULT WINAPI StaticBuffer::GetMaxLength ( DWORD *  pLength) [inline]

Queries the maximum length of the stored buffer

Parameters:
[out]pLengthPointer that is set to the max length of the buffer
Returns:
S_OK if the pointer is valid, E_POINTER if it is not
HRESULT WINAPI StaticBuffer::QueryInterface ( REFIID  iid,
LPVOID *  ppv 
) [inline]

Returns pointers for implemented interfaces on the object

Currently supported interfaces are IUnknown and INSSBuffer

Parameters:
iidThe id of the requested interface
[out]ppvA pointer to a pointer that receives the interface pointer or NULL
Returns:
S_OK on success, E_NOINTERFACE for unsupported interfaces and E_POINTER if ppObj is NULL
ULONG WINAPI StaticBuffer::Release ( ) [inline]

Decrements the object's reference count. Not thread safe.

The object is deleted if the ref count drops to zero

Returns:
The new reference count
HRESULT WINAPI StaticBuffer::SetLength ( DWORD  length) [inline]

Sets the length of the stored buffer

If length is smaller than the current buffer size, nothing happens. Otherwise the buffer is largened to accommodate the request.

Parameters:
lengthNew length of the buffer in bytes
Returns:
Always S_OK

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