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 winmm, prefix the name with the module name and a period.
Declare Function mixerSetControlDetails Lib "winmm.dll" (ByVal hmxobj As IntPtr, ByVal pmxcd As MIXERCONTROLDETAILS, ByVal fdwDetails As Integer) As Integer
User-Defined Types:
C# Struct
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.
Structure MIXERCONTROLDETAILS
Dim cbStruct As Integer
Dim dwControlID As Integer
Dim cChannels As Integer
Structure u ' A union
Dim hWndOwner As IntPtr
Dim cMultipleItems As Integer
End Structure
Dim cbDetails As Integer
Dim paDeatails As IntPtr
End Structure
/// <summary>signed minimum for this control</summary>
public Int32 Minimum
{
get { return this.lMinimum; }
set { this.lMinimum = value; }
}
/// <summary>signed maximum for this control</summary>
public Int32 Maximum
{
get { return this.lMaximum; }
set { this.lMaximum = value; }
}
/// <summary>unsigned minimum for this control</summary>
public UInt32 UnsignedMinimum
{
get { return (uint)this.lMinimum; }//TODO: something different
set { this.lMinimum = (int)value; }
}
/// <summary>unsigned maximum for this control</summary>
public UInt32 UnsignedMaximum
{
get { return (uint)this.lMaximum; }//TODO: something different
set { this.lMaximum = (int)value; }
}
/// <summary></summary>
public UInt32 Reserved1
{
get { return (uint)this.lMinimum; }//TODO: something different
set { this.lMinimum = (int)value; }
}
/// <summary></summary>
public UInt32 Reserved2
{
get { return (uint)this.lMaximum; }//TODO: something different
set { this.lMaximum = (int)value; }
}
/// <summary></summary>
public UInt32 Reserved3
{
get { return this.dwReserved3; }
set { this.dwReserved3 = value; }
}
/// <summary></summary>
public UInt32 Reserved4
{
get { return this.dwReserved4; }
set { this.dwReserved4 = value; }
}
/// <summary></summary>
public UInt32 Reserved5
{
get { return this.dwReserved5; }
set { this.dwReserved5 = value; }
}
/// <summary></summary>
public UInt32 Reserved6
{
get { return this.dwReserved6; }
set { this.dwReserved6 = value; }
}
/// <summary># of steps between min & max</summary>
public UInt32 Steps
{
get { return this.cSteps; }
set { this.cSteps = value; }
}
/// <summary>size in bytes of custom data</summary>
public UInt32 CustomData
{
get { return this.cSteps; }
set { this.cSteps = value; }
}
/// <summary>!!! needed? we have cbStruct....</summary>
public UInt32 Reserved1
{
get { return this.cSteps; }//TODO: something different
set { this.cSteps = value; }
}
/// <summary>!!! needed? we have cbStruct....</summary>
public UInt32 Reserved2
{
get { return this.dwReserved2; }
set { this.dwReserved2 = value; }
}
/// <summary>!!! needed? we have cbStruct....</summary>
public UInt32 Reserved3
{
get { return this.dwReserved3; }
set { this.dwReserved3 = value; }
}
/// <summary>!!! needed? we have cbStruct....</summary>
public UInt32 Reserved4
{
get { return this.dwReserved4; }
set { this.dwReserved4 = value; }
}
/// <summary>!!! needed? we have cbStruct....</summary>
public UInt32 Reserved5
{
get { return this.dwReserved5; }
set { this.dwReserved5 = value; }
}
/// <summary>!!! needed? we have cbStruct....</summary>
public UInt32 Reserved6
{
get { return this.dwReserved6; }
set { this.dwReserved6 = value; }
}
#endregion
}
VB Struct
Structure MIXERCONTROLDETAILS
Dim cbStruct As Integer
Dim dwControlID As Integer
Dim cChannels As Integer
Structure u ' A union
Dim hWndOwner As IntPtr
Dim cMultipleItems As Integer
End Structure
Dim cbDetails As Integer
Dim paDeatails As IntPtr
End Structure
Notes:
None.
Tips & Tricks:
The fdwDetails 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.
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
http://mwinapi.sourceforge.net/
3/31/2008 6:53:29 AM - -217.54.254.83
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).