Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The CopyValues method copies specified values to another context.
IWMSContext.CopyValues( pDest As IWMSContext,
ByRef pstrName As String,
ByRef lNameHint As Int32,
lNames As Int32
)
Arguments
IWMSContextIWMSContext Object (Visual Basic .NET) to copy the values into. |
|
Reference to a String array containing the names of the attributes to copy. This can be set to Nothing. |
|
Reference to an Int32 array containing the corresponding optional key values of the values to copy. This can be set to Nothing. |
|
Int32 the count of values to be copied. This can be set to zero. |
Return Value
This method does not return a value.
If this method fails, it throws an exception.
Number |
Description |
|---|---|
0x80070057 |
pDest is not a valid context. |
Remarks
Specifying a value of zero for the lNames parameter will copy the entire context to the destination context.
Example
Dim Context As IWMSContext
Dim CopyContext As IWMSContext
Dim pUnknown As IntPtr
Try
m_ClassFactory.AllocIWMSContext(GetType(IWMSContext).GUID, _
WMS_CONTEXT_TYPE.WMS_USER_CONTEXT_TYPE, _
pUserContext, pUnknown)
Context = Marshal.GetTypedObjectForIUnknown(pUnknown, _
GetType(IWMSContext))
m_ClassFactory.AllocIWMSContext(GetType(IWMSContext).GUID, _
WMS_CONTEXT_TYPE.WMS_USER_CONTEXT_TYPE, _
pUserContext, pUnknown)
CopyContext = Marshal.GetTypedObjectForIUnknown(pUnknown, _
GetType(IWMSContext))
Context.SetStringValue(WMSDefines.WMS_CONTENT_DESCRIPTION_TITLE, _
WMSDefines.WMS_CONTENT_DESCRIPTION_TITLE_ID, _
"My Title", 0)
Context.SetLongValue(WMSDefines.WMS_CONTENT_DESCRIPTION_NO_SKIP, _
WMSDefines.WMS_CONTENT_DESCRIPTION_NO_SKIP_ID, 1, 0)
Context.CopyValues(CopyContext, Nothing, Nothing, 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.