IWMSContext.CopyValues (C#)
Previous | Next |
IWMSContext.CopyValues (C#)
The CopyValues method copies specified values to another context.
Syntax
Parameters
pDest
IWMSContext object to copy the values into.
pstrName
Reference to a string array containing the names of the attributes to copy. This can be set to null.
lNameHint
Reference to an Int32 array containing the corresponding optional key values of the values to copy. This can be set to null.
lNames
int the count of values to be copied. This can be set to zero.
Return Values
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 Code
Guid ContextGuid = typeof(IWMSContext).GUID; IWMSContext Context; IWMSContext CopyContext = null; IntPtr pUnknown; int iHint = 0; string strName = ""; try { m_ClassFactory.AllocIWMSContext(ref ContextGuid, WMS_CONTEXT_TYPE.WMS_USER_CONTEXT_TYPE, pUserContext, out pUnknown); Context = (IWMSContext)Marshal.GetTypedObjectForIUnknown(pUnknown, typeof(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, ref strName, ref iHint, 0); } catch( Exception e ) { // TODO: Handle exceptions. }
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 |