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);
 
Back
Top