`

system badimageformatexception and its partial solution

阅读更多

A couple of weeks ago, my colleague called me for this exception  raised when he tried to migrate our client app from xp to vista x64.

 

  This app uses an assembly lib which is written by c++/cli. This assembly mixs COM, win32 api and .net. when i tried to to launch this app, BadImageException raised again.

 

  after googling a bit, I finally solved this problem by setting the client app target to X86. In default, the client app target is Any cpu. This setting usually works well with any pure managed code; however those unmanaged codes need to deal with offset problems, just like what i encountered. So a feasible solution is to force all target to X86.

 

  and another issues is the UAC....for better user experience, turning off it is a good choice despite of any potential security risks...

分享到:
评论
1 楼 Mr.小裤裤 2010-04-10  
谢谢,

我生日过的很快乐,

o(∩_∩)o...

相关推荐

    sqlite最新System.Data.Sqlite.dll

    在官网下载的sqlite最新System.Data.Sqlite.dll,如果我们在C#中调用sqlite遇到错误System.BadImageFormatException:“未能加载文件或程序集“System.Data.SQLite, Version=1.0.60.0, Culture=neutral,那么有可能是...

    C# to IL

    通过C#深入介绍IL语言, 深入了解.Net必看书籍

    c# 卡拉OK点歌系统 源代码

    本系统主要实现以下目标:  系统采用人机交互的方式,界面美观友好,信息查询灵活、方便,数据存储安全可靠。  歌星点歌,根据演唱歌星的名字来查询选择歌曲。  数字点歌,按照歌曲名称编号进行查询选择歌曲。...

    “尝试加载oracle客户端时引发badimage,如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行,将出现此问题”

    “关于VS2013连接Oracle数据库提示:“尝试加载oracle客户端时引发badimage,如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行,将出现此问题”的解决方案

    instantclient_11_2

    instantclient_11_2压缩包, 附带 "尝试加载 Oracle 客户端库时引发 BadImageFormatException" 完美解决方案

    asp.net 未能加载文件或程序集“XXX”或它的某一个依赖项。试图加载格式不正确的程序。

    异常详细信息: System.BadImageFormatException: 未能加载文件或程序集“XXX”或它的某一个依赖项。试图加载格式不正确的程序。 源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息...

    ImGui.NET_OpenTK_Sample:一个示例项目,显示了C#中用于OpenTK的ImGui(使用ImGui.NET)渲染器

    亲爱的Imgui示例使用OpenTK ... System.BadImageFormatException: 'An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)' 为此,右键单击您的项目

    ORACLE 32 位

    ORACLE 32 位, plsqldev1204x32, plsqldev1105

    UiPermutations

    UWP UI排列 目的是尝试将UWP包含在WPF中的方法。 这展示了包括WindowsXamlHost C ++ / WinRT控件在内的问题。 项目: UwpLib 单个托管控件ManagedGrid (紫色... System.BadImageFormatException: 'Bad IL format.'

    C# 模拟键盘操作

    BadImageFormatException如果您没有为解决方案中的所有项目(包括此项目)使用正确的体系结构(x86或x64),则可能会获得。因此,您可能必须下载此项目的源代码才能将其重建为正确的体系结构。这应该很简单,构建...

    instantclient-basic-win-x86-64-11.1.0.7.0.zip

    数据连接不成功,请检查该数据库是否已启动尝试加载oracle客户端时引发BadImageFormatException.如果在安装32位Oracle客户端组件的情况下以64位模式运行,将出现此问题。 实际上,System.Data.OracleClient所指向的....

    Windows64位环境下_net访问Oracle解决方案

    尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行,将出现此问题

    轻量级的instantclient-basic-win32-11.2.0.1.0.zip

    net C#连接Oracle数据库:尝试加载Oracle客户端库时引发BadImageFormatException。如果在安装32位Oracle客户端组件的情况下以64位模式运行将出此问题

    instantclient-basic-win-x86-64-11.1.0.7

    尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行,将出现此问题。 解决方法下载此文件,根据提示操作即可(此时程序设置生成64位)

    数据库连接.rar

    部署xcgh系统的时候有些电脑装上客户端登录系统时连接数据库会报这个错(webservice 尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果在安装 32 位 Oracle 客户端组件的情况下运行,将出现此问题),...

    castlezmq:适用于0mq(zmq)的现代且强大的.net绑定

    如果您不这样做,请期待BadImageFormatException使用它首先,熟悉zmq。 阅读其出色的惊人指南并检查其api。 在使用它之前,请启动上下文。 using Castle.Zmq;... var ctx = new Context();...// some serious ...

Global site tag (gtag.js) - Google Analytics