PC Review


Reply
Thread Tools Rate Thread

CATSTROPHIC FAILURE (WMPlayer Interop)

 
 
Blair Allen Stark
Guest
Posts: n/a
 
      22nd Feb 2008
The weirdest problem. . .

heres my code:

============================

public enum AudioLookup
{
Artist, Album,
}

public enum CollectionType
{
Audio, Video,
}
public IList<string> ItemList(AudioLookup itemType, CollectionType
collType)
{
IList<string> result = new List<string>();
WMPLib.IWMPLibraryServices libserv = wmp_ as IWMPLibraryServices;
if (libserv == null)
throw new NullReferenceException("Library Not Initialized");
WMPLibraryType libTypes = WMPLibraryType.wmpltLocal;
int lNct = libserv.getCountByType(libTypes);
for (int n = 0; n < lNct; n++)
{
IWMPLibrary lib = libserv.getLibraryByType(libTypes, n);
IWMPStringCollection2 col =
lib.mediaCollection.getAttributeStringCollection(itemType.ToString(),
collType.ToString()) as IWMPStringCollection2;
for (int i = 0; i < col.count; i++)
{
result.Add(col.getItemInfo(i, itemType.ToString()));
}
}
return result;
}
============================

at the line

int lNct = libserv.getCountByType(libTypes);

I get the catastrophic failure:
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

if I set a breakpoint on the line and then do an inspect of libserv, it
succeeds

any idea whats going on?
 
Reply With Quote
 
 
 
 
Jialiang Ge [MSFT]
Guest
Posts: n/a
 
      22nd Feb 2008
Hello Blair,

For all WMI SDK-related issues, I would suggest posting in the newsgroup
below:

microsoft.public.windowsmedia.sdk

The reason why we recommend posting appropriately is you will get the most
qualified pool of respondents, and other partners who the newsgroups
regularly can either share their knowledge or learn from your interaction
with us. Thank you for your understanding.

But please notice that the newsgroup 'microsoft.public.windowsmedia.sdk' is
not managed by Microsoft, so a timely response cannot be guaranteed.
The link http://msdn2.microsoft.com/en-us/sub.../aa974230.aspx lists
all the MSDN managed newsgroups for your reference.

Have a nice day!

Regards,
Jialiang Ge ((E-Mail Removed), remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interop.CDO uses Interop.ADODB which has a higher version... muriwai Microsoft C# .NET 7 27th Oct 2011 08:00 PM
Excel Interop & IIS: Permissions Issue: PlugPlayManager Security Failure JimLad Microsoft ASP .NET 5 9th Oct 2007 11:04 AM
Interop: failure returning a value from unmanaged dll ConfNoob Microsoft C# .NET 7 8th May 2006 09:08 AM
COM Interop registration failure =?Utf-8?B?U3RldmVT?= Microsoft VB .NET 3 25th May 2005 10:25 PM
COM failure (Interop PIA) Alvin Bruney Microsoft C# .NET 2 15th Jul 2003 08:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:17 PM.