Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PInvokeStackImbalance on Pa_GetDeviceInfo #4

Closed
GoogleCodeExporter opened this issue Jun 18, 2015 · 2 comments
Closed

PInvokeStackImbalance on Pa_GetDeviceInfo #4

GoogleCodeExporter opened this issue Jun 18, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. PortAudio.Pa_Initialize();
2. PortAudio.PaDeviceInfo paDeviceInfo = PortAudio.Pa_GetDeviceInfo(0);


What is the expected output? What do you see instead?
IntPtr structptr = IntPtr_Pa_GetDeviceInfo(device);
This line produces a PInvokeStackImbalance warning. From what I found on the 
internet, it seems to occur when there's a mismatch between the parameters 
passed through the stack.


What version of the product are you using? On what operating system?
Visual C# 2010 Express - .NET4 Client - Windows Seven

Please provide any additional information below.


Original issue reported on code.google.com by michael....@gmail.com on 17 Oct 2011 at 7:00

@GoogleCodeExporter
Copy link
Author

Issue solved by adding the default calling convention of C/C++ compiled 
programs :
[DllImport("PortAudio.dll", EntryPoint = "Pa_GetDeviceInfo", CallingConvention 
= CallingConvention.Cdecl)]

I hope that's all ;)

Original comment by michael....@gmail.com on 17 Oct 2011 at 8:00

@GoogleCodeExporter
Copy link
Author

I added some information about the calling convention in the readme file in 
order to avoid this kind of issue in the future.

Original comment by R.Ger...@gmail.com on 22 Oct 2011 at 6:20

  • Changed state: Done
  • Added labels: Priority-Low, Type-Enhancement
  • Removed labels: Priority-Medium, Type-Defect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant