We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

PInvokeStackImbalance Error

Thread ID:

Created:

Updated:

Platform:

Replies:

59922 Apr 24,2007 03:34 PM Apr 26,2007 02:11 PM Windows Forms 6
loading
Tags: GridControl
Marcia
Asked On April 24, 2007 03:34 PM

Hi

The following error:
============================================
PInvokeStackImbalance was detected
Message: A call to PInvoke function 'Syncfusion.Shared.Base!Syncfusion.Runtime.InteropServices.NativeMethods::ImageList_DrawEx' 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 trying to build my project in framework 2.0.
The version of the Syncfusion is 3.0.1.0 .
What`s I do? Please help me!!!

The error happened in this line:
Application.Run(frmPrincipal.GetInstance());
where call my main program.


haneefm [Syncfusion]
Replied On April 24, 2007 04:35 PM

Hi Marcia,

The version that you are using currently is not compatible with VS 2005. If you plan to work with VS 2005 (.NET 2.0) then, Essential Studio version 4.x is recommended. This version is fully compatible and has been tested with .NET 2.0. This also supports VS 2002 and VS 2003 frameworks.

Please refer the below link to download the latest version
http://www.syncfusion.com/downloads/latestversion/default.aspx

Best regards,
Haneef

Marcia
Replied On April 25, 2007 08:29 AM

thanks for your reply!!

but don`t have other way to correct this bug?

>Hi Marcia,

The version that you are using currently is not compatible with VS 2005. If you plan to work with VS 2005 (.NET 2.0) then, Essential Studio version 4.x is recommended. This version is fully compatible and has been tested with .NET 2.0. This also supports VS 2002 and VS 2003 frameworks.

Please refer the below link to download the latest version
http://www.syncfusion.com/downloads/latestversion/default.aspx

Best regards,
Haneef

Administrator [Syncfusion]
Replied On April 26, 2007 08:40 AM

The problem is a function signature. In order to work in .NET 2.0,

internal static extern bool ImageList_DrawEx( IntPtr himl, int i, IntPtr hdcDst, int x,
int y, int dx, int dy, long rgbBk, long rgbFg,
uint fStyle
);

should be

internal static extern bool ImageList_DrawEx( IntPtr himl, int i, IntPtr hdcDst, int x,
int y, int dx, int dy, uint rgbBk, uint rgbFg,
uint fStyle
);


I do not know of any simple work around for this other than getting a new library build.

Marcia
Replied On April 26, 2007 09:41 AM

Hi Clay!!!!

I have put this code in my application and is don`t work. This component
had that to be
compatible with the .Net 2.0. Why is don`t ?

>The problem is a function signature. In order to work in .NET 2.0,

internal static extern bool ImageList_DrawEx( IntPtr himl, int i, IntPtr hdcDst, int x,
int y, int dx, int dy, long rgbBk, long rgbFg,
uint fStyle
);

should be

internal static extern bool ImageList_DrawEx( IntPtr himl, int i, IntPtr hdcDst, int x,
int y, int dx, int dy, uint rgbBk, uint rgbFg,
uint fStyle
);


I do not know of any simple work around for this other than getting a new library build.

Administrator [Syncfusion]
Replied On April 26, 2007 12:12 PM

3.0.1.0 is not compatible with .NET 2.0. 3.1.0. was released in Dec of 2004, many months before .Net 2.0 was released (Nov 2005?).

When you say you put that change in your code, do you mean you recompiled the syncfusion libraries? There are likely other changes of that same nature that were made when we moved from 3.3 to 4.x to fully support .NET 2.0.

Marcia
Replied On April 26, 2007 02:11 PM

Thanks for your reply. But I believed that the components were compatible independent of framework version. This is strange because, others components in my project continue working.
A question: Each new version of .Net I go to have that to buy the Essential Grid?

Thanks!!!

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;