INSSBuffer::GetMaxLength
.gif)
| Previous | Next |
INSSBuffer::GetMaxLength
The GetMaxLength method retrieves the maximum length of the data segment, in bytes, that can be loaded into the buffer.
Syntax
HRESULT GetMaxLength( DWORD* pdwLength );
Parameters
pdwLength
[out] Pointer to a DWORD containing the length of the data segment.
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 cbMaxBuffer = 0;
// Retrieve the maximum buffer length. The pBuffer pointer
// is user-defined.
hr = pBuffer->GetMaxLength( &cbMaxBuffer );
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 |