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

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

问题描述

我的Visual Studio 2005 C#项目有问题.自周一以来,我一直在Windows XP下使用它.然后我的笔记本电脑坏了,在我的新笔记本电脑上,我使用的是Windows 7 64位,但我仍在使用VS2005.

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 32bit下运行.

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位驱动程序v. 9.00.0200 ,Postgres 8.4 32位.
  2. 我以前从未使用过 Dependency Walker .但是我已经从 \ system32 \ SysWOW64 中打开了 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:\ Windows \ SysWOW64 \ odbcad32.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:\Windows\SysWOW64\odbcad32.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驱动程序,但它也不想为我工作.唯一的解决方案是Postgres和ODBC的32位版本,以及 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.

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

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