Hello,
I had a program in .NET 1.1 that worked fine, but now that I'm trying to implement in the .NET 2.0 with VS 2005, it doesn't work. It doesn't even through an exception, but just crashes. Here is a snippet of the code:
Private Declare Function LockWindowUpdate Lib "user32.dll" (ByVal hwnd As Long) As Long
private sub performFreeze()
LockWindowUpdate(Me.Handle.ToInt32) 'lock window
' .... code executed here
LockWindowUpdate(0) ' unlock window
End Sub
This is the error that appears:
"A call to PInvoke function 'microSql 2!microSql_2005.myQuery::LockWindowUpdate' 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'd greatly appreciate any help with this, as the program worked graet before , and I'd hate to have to redo it.
thanks
I had a program in .NET 1.1 that worked fine, but now that I'm trying to implement in the .NET 2.0 with VS 2005, it doesn't work. It doesn't even through an exception, but just crashes. Here is a snippet of the code:
Private Declare Function LockWindowUpdate Lib "user32.dll" (ByVal hwnd As Long) As Long
private sub performFreeze()
LockWindowUpdate(Me.Handle.ToInt32) 'lock window
' .... code executed here
LockWindowUpdate(0) ' unlock window
End Sub
This is the error that appears:
"A call to PInvoke function 'microSql 2!microSql_2005.myQuery::LockWindowUpdate' 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'd greatly appreciate any help with this, as the program worked graet before , and I'd hate to have to redo it.
thanks