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;");
I get the error:
EnrtyPointNotFoundExcepition was unhalted
Unable to find an entry point named 'InterlockedIncrement' in DLL 'kernel32.dll'
I am trying to connect with a Postgres 8.4 database using PostgresODBC 64 bit driver.
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):
EDIT: I added points 1-3 above.
On 64 bit windows these are not real functions exported from kernel32.dll - they are compiler intrinsics instead. The code that is P/Invoking that function should be using the Interlocked managed class instead.
They are intrinsics on 32-bit windows too nowadays, but the exported functions are still available from kernel32.dll on 32-bit windows for app compat reasons. Not a problem for 64 bit because there were no apps to be compatible with.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With