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.