API Call

  • Thread starter Thread starter Mauricio Streisky
  • Start date Start date
M

Mauricio Streisky

I´m trying to map and use the winmm.dll functions to build
an audio assistant but I have a particular problem when I
try to use mixerGetLineControls function.

The function every return "Invalid Parameter" probably
related with the structures MIXERCONTROL and
MIXERLINECONTROLS (some is wrong implemented).

Anyone has a tip about how implement these structures in
c#?
[DllImport("Winmm.dll", CharSet=CharSet.Auto)
private static extern uint mixerGetLineControls(IntPtr
hmxobj, ref MIXERLINECONTROLS pmxlc, uint fdwControls);
 
Mauricio,

I believe you are right. I think that you are probably placing a
reference or something for the pamxctrl field in the structure which is
causing the problem. You will have to set this field to an IntPtr structure
and then marshal the value manually when you get the return result.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I´m trying to map and use the winmm.dll functions to build
an audio assistant but I have a particular problem when I
try to use mixerGetLineControls function.

The function every return "Invalid Parameter" probably
related with the structures MIXERCONTROL and
MIXERLINECONTROLS (some is wrong implemented).

Anyone has a tip about how implement these structures in
c#?
[DllImport("Winmm.dll", CharSet=CharSet.Auto)
private static extern uint mixerGetLineControls(IntPtr
hmxobj, ref MIXERLINECONTROLS pmxlc, uint fdwControls);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top