IWMSContext.SetArrayValue (Visual Basic .NET)
.gif)
| Previous | Next |
IWMSContext.SetArrayValue (Visual Basic .NET)
The SetArrayValue method specifies an array of String values.
Syntax
Parameters
pstrName
String specifying the name portion of the name-value pair in the context.
lNameHint
Int32 containing an optional key that can be used to more efficiently access a value.
psaValue
An array of String values.
lOptions
Reserved for future use.
Return Values
This method does not return a value.
If this method fails, it throws an exception.
| Number | Description |
| 0x80070057 | The psaValue parameter or the pstrName parameter is null. |
| 0x8007000E | Could not allocate memory for the value. |
Example Code
Dim Context As IWMSContext
Dim pUnknown As IntPtr
Dim Colors As String() = {"Red", "Green", "Blue"}
Try
m_ClassFactory.AllocIWMSContext(GetType(IWMSContext).GUID, _
WMS_CONTEXT_TYPE.WMS_USER_CONTEXT_TYPE, _
pUserContext, pUnknown)
Context = Marshal.GetTypedObjectForIUnknown(pUnknown, _
GetType(IWMSContext))
Context.SetArrayValue("ColorValues", _
WMS_CONTEXT_HINT_CONSTANTS.WMS_CONTEXT_NO_NAME_HINT, _
Colors, 0)
Catch e As Exception
' TODO: Handle exceptions.
End Try
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 |