无法在 DLL 'kernel32.dll' 中找到名为 'InterlockedIncrement' 的入口点 - VS2005@Win7 64 位 [英] Unable to find an entry point named 'InterlockedIncrement' in DLL 'kernel32.dll' - VS2005@Win7 64 bit

查看:27
本文介绍了无法在 DLL 'kernel32.dll' 中找到名为 'InterlockedIncrement' 的入口点 - VS2005@Win7 64 位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Visual Studio 2005 C# 项目有问题.从星期一开始,我一直在 Windows XP 下使用它.然后我的笔记本电脑坏了,在我的新笔记本电脑上我有 Windows 7 64 位,我仍在使用 VS 2005.

I have a problem with my Visual Studio 2005 C# project. I have been using it under Windows XP, since Monday. Then my laptop broke down and on my new one I have Windows 7 64 bit and I am still using VS 2005.

源代码编译没有问题,但是当我运行程序时,它在下面的行中中断

There is no problem with compilation of the source, but when I run the program it breaks on the line below

OdbcConnection cn;
cn = new OdbcConnection("dsn=My_dsn_name;");

我收到错误:

EnrtyPointNotFoundExcepition 被取消

无法在 DLL 'kernel32.dll' 中找到名为 'InterlockedIncrement' 的入口点

我正在尝试使用 PostgresODBC 64 位驱动程序连接 Postgres 8.4 数据库.

I am trying to connect with a Postgres 8.4 database using PostgresODBC 64 bit driver.

欢迎任何解决方案或解决方法.我需要强调的是,我正在构建的解决方案需要在 Windows XP 32 位下运行.

Any solution or workaround is welcome. I need to stress that the solution I am building needs to run under Windows XP 32bit.

有关该问题的更新信息(来自我对评论的回复,但不仅限于此):

Updated information about the issue (from my respones to the comments but not only):

  1. 当我尝试向我的 VS 项目添加新连接时,我收到消息错误 [IM014] [Microsoft][ODBC 驱动程序管理器] 指定的 DSN 包含驱动程序和应用程序之间的架构不匹配.我使用 Windows 7 64 位,Postgres ODBC 64 位驱动程序版本.9.00.0200,Postgres 8.4 32 位.
  2. 我以前从未使用过 Dependency Walker.但是我已经从 system32SysWOW64 中打开了 kernel32.dll 并且 InterlockedIncrement 都存在于这两个文件中文件夹.
  3. 我有一些 TableAdapters,我用它们从 Postgres 获取数据.它是我在使用 WinXP 时设置的,它仍然有效.另一方面,在 VS2005 中的 TableAdapter 属性中,我单击 Data->CommandText 旁边的..."它显示消息无法调用 ODBC 驱动程序连接实用程序.
  1. When I tried to add new connection to my VS project I got the message ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application. I use Windows 7 64 bit, Postgres ODBC 64 bit Driver ver. 9.00.0200, Postgres 8.4 32 bit.
  2. I have never used Dependency Walker before. But I have opened kernel32.dll from both system32 and SysWOW64 and InterlockedIncrement is present in files from both folders.
  3. I have some TableAdapters, and I use them to fetch data from the Postgres. It was set when I was using WinXP, and it still works. On the other hand, when in VS2005 in the properties of TableAdapter I click on "..." next to Data->CommandText it displays a message Failed to call the ODBC driver connection utility.

我在上面添加了 1-3 点.

I added points 1-3 above.

推荐答案

我想我已经解决了问题,虽然我不确定.但是,我安装了 32 位版本的 Postgres ODBC 驱动程序并且我使用了 32 位版本的 ODBC 管理员 C:WindowsSysWOW64odbcad32.exe 来配置连接.我在线程 64-bit-odbc-exception 中找到了有关 32 位 ODBC 管理员的信息,其中其中一位用户参考了 MSDN:管理数据源.

I think I have solved problem, although I am not sure. However, I installed the 32bit version of Postgres ODBC driver and I used 32bit version of ODBC administrator C:WindowsSysWOW64odbcad32.exe to configure the connection. I found the information about the 32bit ODBC Administrator in the thread 64-bit-odbc-exception where one of the users refers to MSDN: Managing Data Sources.

我认为我需要与操作系统相同版本的 ODBC 驱动程序(关于位数).我也尝试过 64 位版本的 Postgres 和 ODBC 驱动程序,但它也不想为我工作.唯一的解决方案是 32 位版本的 Postgres、ODBC 和 32 位 ODBC 管理器中的连接集.

I thought that I needed the same version of ODBC driver (regarting to number of bits) as my OS. I have also tried 64bit version of Postgres and ODBC driver, but it also did not want to work for me. The only solution was 32bit version of Postgres, and ODBC, and connection set in 32bit ODBC Administrator.

关于我的 VS 项目,我将 Project->Properties->Build->Platform target 设置为 x86.

Regarding my VS project, I have Project->Properties->Build->Platform target set to x86.

希望它在未来对某人有所帮助.

Hope it helps somebody in the future.

这篇关于无法在 DLL 'kernel32.dll' 中找到名为 'InterlockedIncrement' 的入口点 - VS2005@Win7 64 位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆