INSSBuffer::SetLength
.gif)
| Previous | Next |
INSSBuffer::SetLength
The SetLength method specifies the length of the data segment that can be loaded into the buffer.
Syntax
HRESULT SetLength( DWORD dwLength );
Parameters
dwLength
[in] DWORD specifying the size of the buffer, in bytes. This must be less than 16 megabytes (16,777,216 or 2**24 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 dwLength parameter exceeds the maximum size of the buffer. |
Remarks
You can use the IWMSBufferAllocator interface to allocate the buffer.
Example Code
#include <windows.h>
#include "wmsserver.h"
// Declare variables.
DWORD dwCDLBufferSize = 0;
// Specify the length of the content description list for
// a cache plug-in. The pBuffer pointer is user-defined.
dwCDLBufferSize = 4096;
hr = pBuffer->SetLength( dwCDLBufferSize );
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 |