Closed GoogleCodeExporter closed 9 years ago
Hi Mathew,
Just noticed this defect now.
Can you explain what 'Imbalances' mean, and how I can test it as well?
The Cdecl means:
"The caller cleans the stack. This enables calling functions with varargs,
which makes it appropriate to use for methods that accept a variable number of
parameters, such as Printf."
I have no problem changing all the DllImport declarations, but I'm trying to
first understand how you noticed the issue. The original code I used was here,
http://stoyanov.in/2010/01/08/encoding-uncompressed-audio-with-flac-in-c/
It might be a bug by the original author
Original comment by yuva...@gmail.com
on 10 Jun 2013 at 3:25
I noticed it when I used the plugin for a personal player I'm working on. I
opened the Flac DLL in Dependency Walker and it says the calling convention
used within that DLL is cdecl.
By default, P/Invoke functions use StdCall if an explicit calling convention
isn't specified in the DllImport attribute. So it's using the wrong calling
convention to call those functions.
Original comment by mathew1800
on 12 Jun 2013 at 5:33
Oh, forgot to mention that what I meant by a stack imbalance is the error that
gets thrown: http://msdn.microsoft.com/en-us/library/0htdy0k3.aspx
PInvokeStackImbalance
Original comment by mathew1800
on 12 Jun 2013 at 5:35
Original comment by yuva...@gmail.com
on 14 Jun 2013 at 7:46
Will be released in the next release
Original comment by yuva...@gmail.com
on 14 Jun 2013 at 7:47
Original issue reported on code.google.com by
mathew1800
on 22 May 2013 at 3:40