Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, March 8, 2011 12:39:20 PM(UTC)

ftv.dev  
ftv.dev

Groups: Registered
Posts: 1


I'am trying to develop a wpf OCR application that target x64 and use your 32bit dlls
But i get this error:
(Note: I don't have this problem when i target w32 and use your win32 dll version)



System.BadImageFormatException
Could not load file or assembly 'Leadtools.Codecs, Version=17.0.4.0, Culture=neutral, PublicKeyToken=9cf889f53ea9b907' or one of its dependencies. Tentative de chargement d’un programme de format incorrect.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.VsReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
   at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.CachingReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
   at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.Microsoft.Windows.Design.Metadata.IReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
   at MS.Internal.Metadata.ClrAssembly.GetRuntimeMetadata(Object reflectionMetadata)
   at Microsoft.Windows.Design.Metadata.AttributeTableContainer.<MergeAttributesIterator>d__c.MoveNext()
   at Microsoft.Windows.Design.Metadata.AttributeTableContainer.GetAttributes(Assembly assembly, Type attributeType, Func`2 reflectionMapper)
   at MS.Internal.Metadata.ClrAssembly.GetAttributes(ITypeMetadata attributeType)
   at MS.Internal.Design.Metadata.Xaml.XamlAssembly.GetXmlNamespaceMappings(XamlExtensionImplementations caller)
   at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.AssembliesForNamespace(IMetadataContext scope, String xmlNamespace)
   at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.GetType(IMetadataContext scope, String xmlNamespace, String typeName)
   at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensions.GetType(IMetadataContext source, String xmlNamespace, String typeName)
   at Microsoft.Windows.Design.Metadata.IdentifierExtensionImplementations.GetType(IMetadataContext scope, TypeIdentifier typeId)
   at Microsoft.Windows.Design.Metadata.IdentifierExtensionImplementations.IsAssignableFrom(TypeIdentifier sourceTypeId, ITypeMetadata type)
   at Microsoft.Windows.Design.Metadata.IdentifierExtensions.IsAssignableFrom(TypeIdentifier source, ITypeMetadata type)
   at MS.Internal.VirtualModel.VirtualModelItem.IsItemOfType(TypeIdentifier typeIdentifier)
   at MS.Internal.Interaction.DragTaskProvider.Activate(ModelItem item)
   at MS.Internal.Features.TaskProviderFeatureConnector.FeatureProvidersAdded(ModelItem item, IEnumerable`1 extensions)
   at Microsoft.Windows.Design.Policies.PolicyDrivenFeatureConnector`1.OnPolicyItemsChanged(Object sender, PolicyItemsChangedEventArgs e)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at Microsoft.Windows.Design.Policies.ItemPolicy.OnPolicyItemsChanged(PolicyItemsChangedEventArgs e)
   at MS.Internal.Policies.MouseOverPolicy.RaisePolicyItemsChanged(ModelItem oldMouseOver, ModelItem newMouseOver)
   at MS.Internal.Policies.MouseOverPolicy.OnMatchGesture(Object sender, MatchGestureEventArgs e)
   at Microsoft.Windows.Design.Interaction.DesignerView.OnMatchGesture(MatchGestureEventArgs e)
   at Microsoft.Windows.Design.Interaction.DesignerView.FindCommand(InputEventArgs eventArgs, FindCommandScope scope)
   at Microsoft.Windows.Design.Interaction.DesignerView.PerformMouseEnterLeave(InputEventArgs args, ModelItem priorModelHit, DependencyObject priorAdornerHit, Boolean usePreviousModelForEnter)
   at Microsoft.Windows.Design.Interaction.DesignerView.OnMouseEnter(Object sender, MouseEventArgs args)
   at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.MouseOverProperty.FireNotifications(UIElement uie, ContentElement ce, UIElement3D uie3D, Boolean oldValue)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
   at System.Windows.ReverseInheritProperty.OnOriginValueChanged(DependencyObject oldOrigin, DependencyObject newOrigin, IList`1 otherOrigins, DeferredElementTreeState& oldTreeState, Action`2 originChangedAction)
   at System.Windows.Input.MouseDevice.ChangeMouseOver(IInputElement mouseOver, Int32 timestamp)
   at System.Windows.Input.MouseDevice.PreNotifyInput(Object sender, NotifyInputEventArgs e)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.MouseDevice.Synchronize()
   at System.Windows.Input.MouseDevice.PostProcessInput(Object sender, ProcessInputEventArgs e)
   at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, March 9, 2011 2:56:41 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

If you want to build your application as 64-bit, you have to use the 64-bit version of LEADTOOLS DLLs.
Bu if you want to use LEADTOOLS .Net win32 DLLs on a 64-bit machine, you should NOT build your application to Any CPU or 64-bit. You must specifically build for 32-bit (x86 CPU). The resulting 32-bit EXE can be deployed on both 32-bit and 64-bit operating systems.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Friday, October 14, 2016 11:12:33 AM(UTC)
BonzoFestoon

Groups: Administrators
Posts: 27

Was thanked: 1 time(s) in 1 post(s)

In case someone is searching for BadImageFormatException and comes across this post, I recently posted an article on our blog about the BadImageFormatException that explains what to look for when trying to solve this problem.

https://www.leadtools.com/blog/general/badimageformatexception-and-leadtools/
Gabriel Smith
LEAD Technologies, Inc.

LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.105 seconds.