System.EntryPointNotFoundException: Unable to find an entry point named 'SHGetStockIconInfo' in DLL 'Shell32.dll'

Aug 20, 2009 at 2:01 PM

Hi Pedro,

I'm getting an exception with the current builds. I noticed that VisaBridge is in the stack trace. I am running on WinXP. I'm wondering if that might have something to do with it.

9-08-20 08:27:36,026 [1] FATAL ScrumSprintMonitor.Wpf.Application.App [(null)] - Unhandled exception from System.Windows.Threading.Dispatcher
System.Windows.Markup.XamlParseException:  Exception has been thrown by the target of an invocation.  Error at object 'System.Windows.DataTemplate' in markup file 'ScrumSprintMonitor.Modules.WorkItemMonitor;component/DataTemplates/PrimaryMonitorDataTemplate.xaml' Line 128 Position 32. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.EntryPointNotFoundException: Unable to find an entry point named 'SHGetStockIconInfo' in DLL 'Shell32.dll'.
   at Microsoft.SDK.Samples.VistaBridge.Interop.UnsafeNativeMethods.SHGetStockIconInfo(StockIconIdentifier identifier, StockIconOptions flags, StockIconInfo& info)
   at Microsoft.SDK.Samples.VistaBridge.Library.StockIcons.StockIconHelper.GetIcon(StockIconIdentifier identifier, StockIconOptions flags)
   at Microsoft.SDK.Samples.VistaBridge.Library.StockIcons.StockIconHelper.MakeImage(StockIconIdentifier identifier, StockIconOptions flags)
   at Microsoft.SDK.Samples.VistaBridge.Library.StockIcons.StockIcon.GetBitmapSource(StockIconIdentifier identifier, StockIconOptions options)
   at Microsoft.SDK.Samples.VistaBridge.Library.StockIcons.StockIcons.get_Shield()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   at System.Windows.Markup.StaticExtension.ProvideValue(IServiceProvider serviceProvider)
   at System.Windows.Markup.BamlRecordReader.GetStaticExtensionValue(Int16 memberId)
   at System.Windows.Markup.BamlRecordReader.GetExtensionValue(IOptimizedMarkupExtension optimizedMarkupExtensionRecord, String propertyName)
   at System.Windows.Markup.OptimizedTemplateContentHelper.GetExtensionValue(IOptimizedMarkupExtension optimizedMarkupExtensionRecord, String propertyName)
   at System.Windows.Markup.OptimizedTemplateContent.ReadPropertyWithExtension(BamlPropertyWithExtensionRecord bamlPropertyRecord, DependencyProperty& dp, Object& propertyValue)
   at System.Windows.Markup.OptimizedTemplateContent.LookForShareableRecord(BamlRecord bamlRecord, DependencyProperty& dp, Object& dpValue)
   at System.Windows.Markup.OptimizedTemplateContent.ReadPotentiallyShareableRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.OptimizedTemplateContent.ReadRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.OptimizedTemplateContent.AddContentRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.TemplateBamlRecordReader.AddContentRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.TemplateBamlRecordReader.ReadRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)
   at System.Windows.Markup.TemplateTreeBuilderBamlTranslator.ParseFragment()
   at System.Windows.Markup.TreeBuilder.Parse()
   at System.Windows.Markup.XamlTemplateSerializer.ConvertBamlToObject(BamlRecordReader reader, BamlRecord bamlRecord, ParserContext context)
   at System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
   at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
   --- End of inner exception stack trace ---
   at System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
   at System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException)
   at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.BamlRecordReader.ReadElement(Int64 startPosition, XamlObjectIds contextXamlObjectIds, Object dictionaryKey)
   at System.Windows.ResourceDictionary.CreateObject(Int32 valuePosition, Object key)
   at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.DeferredResourceReference.GetValue(BaseValueSourceInternal valueSource)
   at System.Windows.StaticResourceExtension.ProvideValueInternal(IBamlReader bamlReader, Object targetObject, Object targetProperty, Boolean allowDeferredReference)
   at System.Windows.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider)
   at System.Windows.Markup.BamlRecordReader.ProvideValueFromMarkupExtension(MarkupExtension markupExtension, Object obj, Object member)
   at System.Windows.Markup.BamlRecordReader.BaseReadOptimizedMarkupExtension(Object element, Int16 attributeId, PropertyDefinition propertyDefinition, Object value)
   at System.Windows.Markup.BamlRecordReader.ReadPropertyWithStaticResourceIdRecord(BamlPropertyWithStaticResourceIdRecord bamlPropertyWithStaticResourceIdRecord)
   at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
   at System.Windows.StyleHelper.LoadOptimizedTemplateContent(DependencyObject container, ParserContext parserContext, OptimizedTemplateContent optimizedTemplateContent, FrameworkTemplate frameworkTemplate, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
   at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
   at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
   at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
Coordinator
Aug 21, 2009 at 12:28 AM

Hi Bebo. You are right, I am using VistaBridge, and unfortunately, it seems not to degrade gracefully when in Windows XP. I will check in a workaround ASAP.

 

Thanks for reporting the issue.

Pedro

Coordinator
Aug 21, 2009 at 12:57 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Aug 21, 2009 at 1:10 AM

Could you please try with the latest and see if that fixes the issue? I have made the shield icon invisible on OSes lower than Vista, expecting that the icon is not extracted if collapsed.

Thanks,

Pedro

Aug 27, 2009 at 1:15 PM

I downloaded the latest version (v1.0.0.126) and I don't receive these exceptions anymore. Thank you sir!

Coordinator
Aug 27, 2009 at 4:09 PM
You're most welcome.


-----Original Message-----
From: bebo
Sent: 8/27/2009 1:15:52 PM
To: [email removed]
Subject: Re: System.EntryPointNotFoundException: Unable to find an entry point named 'SHGetStockIconInfo' in D... [scrumsprintmonitor:66487]

From: bebo

I downloaded the latest version (v1.0.0.126) and I don't receive these exceptions anymore. Thank you sir!