IWMSDataContainer.GetTransferParameters (Visual Basic .NET)
Previous | Next |
IWMSDataContainer.GetTransferParameters (Visual Basic .NET)
The server calls the GetTransferParameters method to retrieve the optimal offset and buffer size to use for read and write access.
Syntax
Parameters
qwDesiredOffset
UInt64 containing the desired offset in bytes. This must be set to zero if the data source plug-in does not support seeking.
dwDesiredMinSize
UInt32 containing the desired minimum size, in bytes.
dwDesiredMaxSize
UInt32 containing the desired maximum size, in bytes.
pqwOffset
Reference to a UInt64 containing the optimal offset in bytes for the request. The server uses this value to determine the offset value that will be set for the Read or Write method. Data containers that do not support seeking must return WMS_DATA_CONTAINER_NONSEEKABLE. For example, a live source cannot be seekable, but a file can be.
pdwSize
Reference to a UInt32 containing the optimal size in bytes. The server uses this value to determine the size of the buffer required for the Read or Write method.
pdwBufferAlignment
Reference to a UInt32 containing the optimal buffer alignment in bytes. The server uses this value to determine the size of the buffer address that will be set for the Read or Write method. For data source plug-ins that do not require buffer alignment, the return value must be NULL. This value must not exceed the page size of the server running Windows Media Services.
Return Values
This method does not return a value. To report an error, the plug-in can throw a COMException object to the server. If the plug-in uses the IWMSEventLog object to log error information, it is recommended that it throw NS_E_PLUGIN_ERROR_REPORTED (0xC00D157D). Typically, the server attempts to make plug-in error information available to the server object model, the Windows Event Viewer, and the troubleshooting list in the details pane of the Windows Media Services MMC. However, if the plug-in uses the IWMSEventLog object to send custom error information to the Windows Event Viewer, throwing NS_E_PLUGIN_ERROR_REPORTED stops the server from also logging to the event viewer. For more information about plug-in error information, see Identifying Plug-in Errors.
Remarks
This method must be called before every call to Read or Write. The following table indicates the combinations that the server can set for the dwDesiredMinSize, dwDesiredMaxSize, and qwDesiredOffset parameters, and for the type of information that can be returned by the pqwOffset and pdwSize parameters.
dwDesiredMinSize | dwDesiredMaxSize | Description |
Positive integer value | NULL | The server requires data starting at the position indicated by qwDesiredOffset and going forward as specified by dwDesiredMinSize. This specifies that the value returned for pdwSize should be close to but not less than the value specified by dwDesiredMinSize for performance reasons. The values returned for pqwOffset and pdwSize must contain the data boundaries specified by qwDesiredOffset and dwDesiredMinSize, and can contain data before or after these boundaries. |
Positive integer value | Positive integer value | The server requires data starting at the position indicated by qwDesiredOffset and going forward as specified by dwDesiredMinSize. The value returned for pdwSize should not be greater than dwDesiredMaxSize. The value returned for pdwSize should be close to but not less than the value specified by dwDesiredMaxSize for performance reasons. The values returned for pqwOffset and pdwSize must contain the data boundaries specified by qwDesiredOffset and dwDesiredMinSize, and can contain data before or after these boundaries. |
NULL | Positive integer value | The server requires data starting at the position indicated by qwDesiredOffset and going backward to the value specified by dwDesiredMaxSize. The value returned for pdwSize should be close to but not less than the value specified by dwDesiredMaxSize for performance reasons. The values returned for pqwOffset and pdwSize must contain the data boundaries specified by qwDesiredOffset and dwDesiredMaxSize, and can contain data before or after these boundaries. |
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; and Windows Server 2008.
See Also
Previous | Next |