Unable to find an entry point named 'InterlockedIncrement' in DLL 'kernel32.dll' - VS2005@Win7 64 bit Unable to find an entry point named 'InterlockedIncrement' in DLL 'kernel32.dll' - VS2005@Win7 64 bit postgresql postgresql

Unable to find an entry point named 'InterlockedIncrement' in DLL 'kernel32.dll' - VS2005@Win7 64 bit


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.


I have just had exactly the same issue, and found a surprisingly simple solution:Use System.Data.Odbc instead of Microsoft.Data.Odbc in the imports.


My guess is there's something wrong with your driver. I can't be sure, but you might want to consider using something else. Npgsql looks pretty decent, and it's 100% C# code, so it should work on Windows XP 32-bit without any issues.