LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI DLL PInvoke Error

I have a CVI DLL that  customer is trying to call from Visual Studio 2012.  The call works in VB6, but not Visual Studio.  Error is PInvokeStackImbalance.  Anyone else encounter this issue?  CVI prototype below...

 

int __stdcall TestDLL(int mode,int range,double q, double p,double *records,double *rec2,char *str);

0 Kudos
Message 1 of 4
(4,533 Views)

@ruskin1 wrote:

I have a CVI DLL that  customer is trying to call from Visual Studio 2012.  The call works in VB6, but not Visual Studio.  Error is PInvokeStackImbalance.  Anyone else encounter this issue?  CVI prototype below...

 

int __stdcall TestDLL(int mode,int range,double q, double p,double *records,double *rec2,char *str);


You don't say which flavor of Visual Studio 2012, they are using, VB.NET, C#, ?

 

here is tutorial for C#   http://msdn.microsoft.com/en-us/magazine/cc164123.aspx

 

0 Kudos
Message 2 of 4
(4,525 Views)

Customer tells me they are using Visual Studio 2012/VB, I presume VB.NET.  They claim there was a change from .NET Framework 4 that no longer automatically fixes problems with the stack.  Can the stack be packed in such a way to cause problems?

0 Kudos
Message 3 of 4
(4,510 Views)

@ruskin1 wrote:

Customer tells me they are using Visual Studio 2012/VB, I presume VB.NET.  They claim there was a change from .NET Framework 4 that no longer automatically fixes problems with the stack.  Can the stack be packed in such a way to cause problems?


Were they using a different version of Visual Studio before or were they using VB6?

 

In your first post they mentioned VB6 which leads me to think that they are not quite telling you the whole story.

 

It is quite easy to download VB.NET 2010 Express to verify.

0 Kudos
Message 4 of 4
(4,498 Views)