INSSBuffer::GetLength
.gif)
| Previous | Next |
INSSBuffer::GetLength
The GetLength method retrieves the size, in bytes, of an allocated buffer.
Syntax
HRESULT GetLength( DWORD* pdwLength );
Parameters
pdwLength
[out] Pointer to a DWORD containing the size of the allocated buffer in bytes.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
| Return code | Number | Description |
| E_INVALIDARG | 0x80070057 | The pdwLength parameter is NULL. |
Remarks
You can use the IWMSBufferAllocator interface to allocate the buffer.
Example Code
#include <windows.h>
#include "wmsserver.h"
// Declare variables.
DWORD dwLength;
// Retrieve the length of the buffer. The pBuffer pointer
// is user-defined.
hr = pBuffer->GetLength( &dwLength );
if (FAILED(hr)) goto EXIT;
EXIT:
// TODO: Release temporary objects.
Requirements
Header: Include wmsbuffer.h, wmsserver.h.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.
See Also
| Previous | Next |