A call to PInvoke function ‘CLEyeCameraDevice::CLEyeGetCameraUUID’ has unbalanced the stack SOLVED
Posted: 03 August 2011 08:07 AM   [ Ignore ]
New Member
Rank
Total Posts:  5
Joined  2010-11-19

Hi

I keep getting this error

A call to PInvoke function ‘Prototype!Prototype.CLEyeCameraDevice::CLEyeGetCameraUUID’ 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.

When i try to use the CLEyeCameraDevice.
This only happens in 4.0 applications, not in v3.5

Anyone got a clue why this is happening?

SOLUTION:

Import dll external like so

[DllImport("CLEyeMulticam.dll"CallingConvention CallingConvention.Cdecl)
Profile
 
 
Posted: 03 August 2011 08:20 AM   [ Ignore ]   [ # 1 ]
New Member
Rank
Total Posts:  5
Joined  2010-11-19

Seems its working when i imported the dll like so

[DllImport(“CLEyeMulticam.dll”, CallingConvention = CallingConvention.Cdecl)]

Profile
 
 
Posted: 03 August 2011 01:40 PM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17

Make sure to use CallingConvention.Cdecl with all imports from the library.

Profile
 
 
Posted: 05 August 2011 01:57 PM   [ Ignore ]   [ # 3 ]
New Member
Rank
Total Posts:  1
Joined  2011-08-05

Yes you are right
good post

Profile
 
 
 
 


RSS 2.0     Atom Feed