thanks for your replies. a pInvokeStackImbalance was detected is thrown:

A call to PInvoke function 'myApp!WindowsApplication1.Form1::HideCaret' 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.

I have no idea what it means