Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than Structures, prefix the name with the module name and a period.
MIXERLINECONTROLS (Structures)
.
C# Definition:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 4)]
public struct MIXERLINECONTROLS
{
private UInt32 cbStruct; /* size in bytes of MIXERLINECONTROLS */
private UInt32 dwLineID; /* line id (from MIXERLINE.dwLineID) */
private UInt32 dwControlID; /* MIXER_GETLINECONTROLSF_ONEBYID */
// private UInt32 dwControlType; //UNIONED with dwControlID /* MIXER_GETLINECONTROLSF_ONEBYTYPE */
private UInt32 cControls; /* count of controls pmxctrl points to */
private UInt32 cbmxctrl; /* size in bytes of _one_ MIXERCONTROL */
private IntPtr pamxctrl; /* pointer to first MIXERCONTROL array */
#region Properties
/// <summary>size in bytes of MIXERLINECONTROLS</summary>
public UInt32 StructSize
{
get { return this.cbStruct; }
set { this.cbStruct = value; }
}
/// <summary>line id (from MIXERLINE.dwLineID)</summary>
public UInt32 LineID
{
get { return this.dwLineID; }
set { this.dwLineID = value; }
}
/// <summary>MIXER_GETLINECONTROLSF_ONEBYID</summary>
public UInt32 ControlID
{
get { return this.dwControlID; }
set { this.dwControlID = value; }
}
/// <summary>MIXER_GETLINECONTROLSF_ONEBYTYPE</summary>
public MIXERCONTROL_CONTROLTYPE ControlType
{
get { return (MIXERCONTROL_CONTROLTYPE)this.dwControlID; }
set { this.dwControlID = (uint)value; }
}
/// <summary>count of controls pmxctrl points to</summary>
public UInt32 Controls
{
get { return this.cControls; }
set { this.cControls = value; }
}
/// <summary>size in bytes of _one_ MIXERCONTROL</summary>
public UInt32 MixerControlItemSize
{
get { return this.cbmxctrl; }
set { this.cbmxctrl = value; }
}
/// <summary>pointer to first MIXERCONTROL array</summary>
public IntPtr MixerControlArray
{
get { return this.pamxctrl; }
set { this.pamxctrl = value; }
}
#endregion
}
VB Definition:
Structure MIXERLINECONTROLS
Public TODO
End Structure
User-Defined Field Types:
None.
THIS IS MY CONVERSION FROM THE C# ABOVE. I have used an UInt32 instead of the MIXERCONTROL_CONTROLTYPE enum as I didn't bother converting it. Also I set dwLineID as an Integer as I was getting a negative number come back from the APIs.
Notes:
The winmm dll may not execute properly on 64-bit systems. Consequently, the StructLayout must be Sequential, with CharSet = Ansi, and Pack = 4. This particular type has some special layout considerations (the c union keyword) which typically means developers would use the explicit layout. However, the explicit layout breaks down on 64-bit systems for any type with an IntPtr in the type. Consequently, the C# types have been redesigned to use Sequential layout so that they will automatically adjust to 64-bit systems. This means private fields with public properties which perform the gunky work of making it look like there is a union.
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi, Pack:=4)> _
Public Structure MIXERLINECONTROLS
Private cbStruct As UInt32 '/* size in bytes of MIXERLINECONTROLS */
Private dwLineID As Integer '/* line id (from MIXERLINE.dwLineID) */
Private dwControlID As UInt32 '/* MIXER_GETLINECONTROLSF_ONEBYID */
'private UInt32 dwControlType; //UNIONED with dwControlID /* MIXER_GETLINECONTROLSF_ONEBYTYPE */
Private cControls As UInt32 '/* count of controls pmxctrl points to */
Private cbmxctrl As UInt32 '/* size in bytes of _one_ MIXERCONTROL */
Private pamxctrl As IntPtr '/* pointer to first MIXERCONTROL array */
Sample Code:
There is more code that is necessary to use the C# types listed above.
'/// <summary>size in bytes of MIXERLINECONTROLS</summary>
Public Property StructSize As UInt32
Get
Return cbStruct
End Get
Set(ByVal value As UInt32)
cbStruct = value
End Set
End Property
'/// <summary>line id (from MIXERLINE.dwLineID)</summary>
Public Property LineID As Integer
Get
Return dwLineID
End Get
Set(ByVal value As Integer)
dwLineID = value
End Set
End Property
'/// <summary>MIXER_GETLINECONTROLSF_ONEBYID</summary>
Public Property ControlID As UInt32
Get
Return dwControlID
End Get
Set(ByVal value As UInt32)
dwControlID = value
End Set
End Property
'/// <summary>MIXER_GETLINECONTROLSF_ONEBYTYPE</summary>
Public Property ControlType As UInt32
Get
Return dwControlID
End Get
Set(ByVal value As UInt32)
dwControlID = value
End Set
End Property
'/// <summary>count of controls pmxctrl points to</summary>
Public Property Controls As UInt32
Get
Return cControls
End Get
Set(ByVal value As UInt32)
cControls = value
End Set
End Property
'/// <summary>size in bytes of _one_ MIXERCONTROL</summary>
Public Property MixerControlItemSize As UInt32
Get
Return cbmxctrl
End Get
Set(ByVal value As UInt32)
cbmxctrl = value
End Set
End Property
'/// <summary>pointer to first MIXERCONTROL array</summary>
Public Property MixerControlArray As IntPtr
Get
Return pamxctrl
End Get
Set(ByVal value As IntPtr)
pamxctrl = value
End Set
End Property
End Structure
User-Defined Field Types:
None.
Notes:
The winmm dll may not execute properly on 64-bit systems. Consequently, the StructLayout must be Sequential, with CharSet = Ansi, and Pack = 4. This particular type has some special layout considerations (the c union keyword) which typically means developers would use the explicit layout. However, the explicit layout breaks down on 64-bit systems for any type with an IntPtr in the type. Consequently, the C# types have been redesigned to use Sequential layout so that they will automatically adjust to 64-bit systems. This means private fields with public properties which perform the gunky work of making it look like there is a union.
Sample Code:
There is more code that is necessary to use the C# types listed above.
TODO - a short description of this collection of constants
4/6/2012 12:59:20 AM - anonymous
TODO - a short description
3/16/2007 8:11:30 AM - -61.11.98.124
Click to read this page
4/6/2008 7:23:14 AM - anonymous
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.
1/13/2008 4:00:13 AM - Damon Carr-72.43.165.29
Click to read this page
4/6/2008 7:23:14 AM - anonymous
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.
1/13/2008 4:00:13 AM - Damon Carr-72.43.165.29
Please edit this page!
Do you have...
helpful tips?
corrections to the existing content?
alternate definitions?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.