It has nothing to do with the parameters, its the 'engine_open' function itself.

This is a 'PInvokeStackImbalance', a much more serious error which will corrupt the statck leading to all kinds of problems.

The problem is due to that the managed signature/method name does not match the unmanaged function in acknex.dll, upsetting the stack.

The weird thing is, is that this is handled by the wrapper with the P/Invoke declaration / mashalling stuff. I've never experiences this exception before whilst using the wrapper and so I'm not sure of the cause.

What version is the acknex.dll you are using?