ifdnrg Posted July 21, 2003 Posted July 21, 2003 i'm trying to add crossfade to items in a loaded playlist Dim playereq As WMPLib.IWMPEqualizerSettingsCtrl playereq.crossFade = True this builds ok bt breaks with " An unhandled exception of type 'System.NullReferenceException' occurred in bs_playlists.exe Additional information: Object reference not set to an instance of an object. " Can anyone help? Quote
AndreRyan Posted July 21, 2003 Posted July 21, 2003 The object needs to be created if the function isn't Shared Dim Playereq As New WMPLib.IWMPEqualizerSettingsCtrl 'Object Reference Dim Playereq As WMPLib.IWMPEqualizerSettingsCtrl 'Nothing Quote .Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
ifdnrg Posted July 21, 2003 Author Posted July 21, 2003 thanks for the quick response with that snippet (used in onformLoad) 'Object Reference Dim Playereq As New WMPLib.IWMPEqualizerSettingsCtrl Playereq.crossFade = True gives me : 'New' cannot be used on an interface. I've also tried WMPLib.WMPEqualizerSettingsCtrl but wasnt sure what the differenece between IWMP and WMP thanks Quote
*Experts* Volte Posted July 21, 2003 *Experts* Posted July 21, 2003 If it is prefixed with an "I" it means it is an interface. There is no real functionality to it; it's just a "shell" of a class that consists of the declarations of all of the properties and methods, but no code. In your case, you need to use the one without the "I" in front. I suggest you read about polymorphism and other OOP concepts in your MSDN if you want to really understand it. Quote
mobileh1 Posted July 14, 2004 Posted July 14, 2004 any followup to this? I cannot construct the WMPLib.IWMPEqualizerSettingsCtrl obeject without a runtime exception... Thanks Quote
superdude Posted August 19, 2004 Posted August 19, 2004 I have the same problem.... i want to use the equalizer in the wmp9 usercontrol have tried everything here but it dosent work.... Help!!! Quote
Recommended Posts