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]
-
ni**************@exisconsulting.com
"Mauricio Streisky" <st******@hotmail.com> wrote in message
news:09****************************@phx.gbl...
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#?
Function prototype
[DllImport("Winmm.dll", CharSet=CharSet.Auto)
private static extern uint mixerGetLineControls(IntPtr
hmxobj, ref MIXERLINECONTROLS pmxlc, uint fdwControls);