Skip to Content
1
Jan 12, 2023 at 05:56 AM

Pinvoke signature mismatch

424 Views

We are attempting to compile our 32-bit application - using fully up to date Visual Studio 2019 using SQLAnywhere build 7236 coming from 6933. (Because of an ODBC bug you confirmed in 6933)

We now get this error:

Managed Debugging Assistant 'PInvokeStackImbalance' : 'A call to PInvoke function 'Sap.Data.SQLAnywhere.v4.5!Sap.Data.SQLAnywhere.PInvokeMethods::Unmanaged_Init' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.'

We have been doing this for years and the same manner with no issue. We checked paths, and three dll

  • policy.17.0.....dll
  • dblgen17.dll
  • dbcon17.dll

I would think this is related to a path or dll mismatch error of some type....

Can you give us any insights?