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 SetIUnknownValue method specifies an IUnknown value for the context.
IWMSContext.SetIUnknownValue( pstrName As String,
lNameHint As Int32,
pValue As Object,
lOptions As Int32
)
Arguments
String specifying the name portion of the name-value pair in the context. |
|
Int32 containing an optional key that can be used to more efficiently access a value. |
|
Object containing the value. |
|
Reserved for future use. |
Return Value
This method does not return a value.
If this method fails, it throws an exception.
Number |
Description |
|---|---|
0x80070057 |
The pstrName parameter is null. |
0x8007000E |
Could not allocate memory for the value. |
Example
Dim Context As IWMSContext
Dim pUnknown As IntPtr
Dim pMyClass As CMyUserDefinedClass
Try
m_ClassFactory.AllocIWMSContext(GetType(IWMSContext).GUID, _
WMS_CONTEXT_TYPE.WMS_USER_CONTEXT_TYPE, _
pUserContext, pUnknown)
Context = Marshal.GetTypedObjectForIUnknown(pUnknown, _
GetType(IWMSContext))
Context.SetIUnknownValue("MyClassEntry", _
WMS_CONTEXT_HINT_CONSTANTS.WMS_CONTEXT_NO_NAME_HINT, _
pMyClass, 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.