INSSBuffer.GetBufferAndLength (Visual Basic .NET)
Previous | Next |
INSSBuffer.GetBufferAndLength (Visual Basic .NET)
The GetBufferAndLength method retrieves the allocated buffer and the length of the data segment that can be loaded into it.
Syntax
Parameters
ppbBuffer
IntPtr containing the allocated buffer.
pdwLength
Reference to a UInt32 containing the size of the allocated buffer in bytes.
Return Values
This method does not return a value.
If this method fails, it throws an exception.
Number | Description |
0x80070057 | ppbBuffer or pdwLength is null. |
Remarks
You can use the IWMSBufferAllocator Object (Visual Basic .NET) to allocate the buffer.
Example Code
' Declare variables. Dim pbBuffer As IntPtr Dim pdwLength as UInt32 Dim Bytes as Byte() ' Retrieve a pointer to the buffer and convert it to an array of bytes. ' The pBuffer pointer is user-defined. pBuffer.GetBufferAndLength(pbBuffer, pdwLength) Bytes = Array.CreateInstance(GetType(Byte), Convert.ToInt32(pdwLength)) Marshal.Copy(pPlsBuf, Bytes, 0, Convert.ToInt32(pdwLength))
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices.
Namespace: Microsoft.WindowsMediaServices.Interop.
Assembly: Microsoft.WindowsMediaServices.dll.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.
See Also
Previous | Next |