MIXERLINE
C# Definition:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 4)]
public struct MIXERLINE
{
private UInt32 cbStruct;
private UInt32 dwDestination;
private UInt32 dwSource;
private UInt32 dwLineID;
private UInt32 fdwLine;
private IntPtr dwUser;
private UInt32 dwComponentType;
private UInt32 cChannels;
private UInt32 cConnections;
private UInt32 cControls;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MixerXPNative.MIXER_SHORT_NAME_CHARS)]
private string szShortName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MixerXPNative.MIXER_LONG_NAME_CHARS)]
private string szName;
public MIXERLINETARGET Target;
#region Properties
/// <summary>size of MIXERLINE structure</summary>
public UInt32 StructSize
{
get { return this.cbStruct; }
set { this.cbStruct = value; }
}
/// <summary>zero based destination index</summary>
public UInt32 Destination
{
get { return this.dwDestination; }
set { this.dwDestination = value; }
}
/// <summary>zero based source index (if source)</summary>
public UInt32 Source
{
get { return this.dwSource; }
set { this.dwSource = value; }
}
/// <summary>unique line id for mixer device</summary>
public UInt32 LineID
{
get { return this.dwLineID; }
set { this.dwLineID = value; }
}
/// <summary>state/information about line</summary>
public MIXERLINE_LINEF LineInformation
{
get { return (MIXERLINE_LINEF)this.fdwLine; }
set { this.fdwLine = (UInt32)value; }
}
/// <summary>driver specific information</summary>
public IntPtr UserPointer
{
get { return this.dwUser; }
set { this.dwUser = value; }
}
/// <summary>component type line connects to</summary>
public MIXERLINE_COMPONENTTYPE ComponentType
{
get { return (MIXERLINE_COMPONENTTYPE)this.dwComponentType; }
set { this.dwComponentType = (UInt32)value; }
}
/// <summary>number of channels line supports</summary>
public UInt32 Channels
{
get { return this.cChannels; }
set { this.cChannels = value; }
}
/// <summary>number of connections [possible]</summary>
public UInt32 Connections
{
get { return this.cConnections; }
set { this.cConnections = value; }
}
/// <summary>number of controls at this line</summary>
public UInt32 Controls
{
get { return this.cControls; }
set { this.cControls = value; }
}
/// <summary></summary>
public string ShortName
{
get { return this.szShortName; }
set { this.szShortName = value; }
}
/// <summary></summary>
public string Name
{
get { return this.szName; }
set { this.szName = value; }
}
#endregion
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 2)]
public struct MIXERLINETARGET
{
private UInt32 dwType;
private UInt32 dwDeviceID;
private UInt16 wMid;
private UInt16 wPid;
private UInt32 vDriverVersion;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MixerXPNative.MAXPNAMELEN)]
private string szPname;
#region Properties
/// <summary>MIXERLINE_TARGETTYPE_xxxx</summary>
public MIXERLINE_TARGETTYPE Type
{
get { return (MIXERLINE_TARGETTYPE)this.dwType; }
set { this.dwType = (UInt32)value; }
}
/// <summary>target device ID of device type</summary>
public UInt32 DeviceID
{
get { return this.dwDeviceID; }
set { this.dwDeviceID = value; }
}
/// <summary>of target device</summary>
public UInt16 ManufacturerID
{
get { return this.wMid; }
set { this.wMid = value; }
}
/// <summary></summary>
public UInt16 ProductID
{
get { return this.wPid; }
set { this.wPid = value; }
}
/// <summary></summary>
public UInt32 DriverVersion
{
get { return this.vDriverVersion; }
set { this.vDriverVersion = value; }
}
/// <summary></summary>
public string PName
{
get { return this.szPname; }
set { this.szPname = value; }
}
#endregion
}VB Definition:
Sample Code:
Última actualización