mixerGetLineInfo (winmm)
Last changed: -87.2.12.102

.
Summary
TODO - a short description

C# Signature:

[DllImport("winmm.dll")]
static extern Int32 mixerGetLineInfo(IntPtr hmxobj,
   ref MIXERLINE pmxl, UInt32 fdwInfo);

VB Signature:

  <DllImport("winmm.dll")> _
Shared Function mixerGetLineInfo(<MarshalAs(UnmanagedType.I4)> ByVal hmxobj As Integer, ByRef pmxl As MIXERLINE, ByVal fdwInfo As MixerFlags) As MMRESULT
  End Function

User-Defined Types:

MIXERLINE

MMRESULT

MixerFlags

Notes:

None.

Tips & Tricks:

The fdwInfo parameter can be composed constants from two distinct enumerations, one of which is used frequently in the winmm library, and the other constant is only used with this method. Consequently, you should wrap up the method definition so that it is easier to use, and more consistent. In the following example, the actual extern is private, while the public static method lists both enums to callers.

[DllImport("winmm.dll")]
private static extern Int32 mixerGetLineInfo(IntPtr hmxobj, ref MIXERLINE pmxl, uint fdwInfo);

public static Int32 mixerGetLineInfo(IntPtr hmxobj, ref MIXERLINE pmxl, MIXER_OBJECTF fdwInfo, MIXER_GETLINEINFOF fieldToFollow)
{
     uint flags = ((uint)fdwInfo | (uint)fieldToFollow);
     return mixerGetLineInfo(hmxobj, ref pmxl, flags);
}

public enum MIXER_OBJECTF : uint
{
     HANDLE   = 0x80000000u,
     MIXER    = 0x00000000u,
     HMIXER   = (HANDLE | MIXER),
     WAVEOUT  = 0x10000000u,
     HWAVEOUT = (HANDLE | WAVEOUT),
     WAVEIN   = 0x20000000u,
     HWAVEIN  = (HANDLE | WAVEIN),
     MIDIOUT  = 0x30000000u,
     HMIDIOUT = (HANDLE | MIDIOUT),
     MIDIIN   = 0x40000000u,
     HMIDIIN  = (HANDLE | MIDIIN),
     AUX      = 0x50000000u,
}

public enum MIXER_GETLINEINFOF : uint
{
     DESTINATION      = 0x00000000u,
     SOURCE       = 0x00000001u,
     LINEID       = 0x00000002u,
     COMPONENTTYPE    = 0x00000003u,
     TARGETTYPE       = 0x00000004u,
     QUERYMASK    = 0x0000000Fu,
}

Sample Code:

Please add some!

Alternative Managed API:

The ManagedWindowsApi project (http://mwinapi.sourceforge.net) provides a Mixer control.

Documentation