RE: Null Point in IWMSContext.GetStringValue
- From: javatopia <javatopia@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 2 Jan 2007 16:33:00 -0800
UPDATE. I figured out why this was happening. Turns out that if you log an
error message to the WMS, then your plugin will get disabled. That doesn't
halt the current thread, though, and it doesn't kick out any other current
sessions from your plugin. Therefore, I was querying a context that was
created for a plugin that was now disabled. This would return null from the
context instance. You need to constantly check if your plugin is enabled or
not while processing WMS events, especially when you try to query any WMS
managed resource, like the context objects.
Once I stopped logging into the error log, everything started to work great.
--
Jacob W Anderson
---
http://www.beyond-ordinary.com
http://www.extremeplannerlive.com
---
If you think it''''s expensive to hire a professional to do the job, wait
until you hire an amateur.
"javatopia" wrote:
Hello,.
I have a WMS9 digest authentication plugin written in C# and bound against
Microsoft.WindowsMediaServices 9.0.0.1 (Runtime 1.0.3705) and .NET 1.1
Today I am getting:
My Digest Authentication Plug-in: System.NullReferenceException: Object
reference not set to an instance of an object.
at
Microsoft.WindowsMediaServices.Interop.IWMSContext.GetStringValue(String
pstrName, Int32 lNameHint, String& pstrValue, Int32 lOptions)
at
WMS.AuthPlugin.MyAuthenticateContext.Microsoft.WindowsMediaServices.Interop.IWMSAuthenticationContext.Authenticate(Object
ResponseBlob, IWMSContext pUserCtx, IWMSContext pPresentationCtx,
IWMSCommandContext pCommandContext, IWMSAuthenticationCallback pCallback,
Object Context
The code where this is happening is:
void IWMSAuthenticationContext.Authenticate(object ResponseBlob, IWMSContext
pUserCtx, IWMSContext pPresentationCtx, IWMSCommandContext pCommandContext,
IWMSAuthenticationCallback pCallback, object Context)
{
// ....
pCommandContext.GetCommandRequest(out commandReq);
commandReq.GetStringValue("@ WMS_COMMAND_NAME", 153,
out strCommandName,
Convert.ToInt32(WMS_CONTEXT_OPTIONS.WMS_CONTEXT_GET_PROPERTY_STRING_BY_REFERENCE));
This is a recent development because in the past it has worked apparently
without this error. Has the WMS9 server been "hot fixed" through Windows
Update recently? Should I get a newer version of the WMS DLL? Is there any
other reason why this would fail?
Thanks
--
Jacob W Anderson
---
http://www.beyond-ordinary.com
http://www.accessquery.com
---
If you think it''s expensive to hire a professional to do the job, wait
until you hire an amateur.
- Prev by Date: Re: Media Player 11 & mms streaming problem
- Next by Date: Re: Event Notification Plugin.
- Previous by thread: Re: Media Player 11 & mms streaming problem
- Next by thread: Re: Event Notification Plugin.
- Index(es):
Relevant Pages
|
Loading