Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

waveOutOpen (winmm)
 
.
Summary
The waveOutOpen function opens the given waveform-audio output device for playback.
Summary
TODO - a short description

C# Signature:

[DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern uint waveOutOpen(ref IntPtr hWaveOut, IntPtr uDeviceID, ref WAVEFORMATEX lpFormat, delegateWaveOutProc dwCallback, IntPtr dwInstance, uint dwFlags);
public static extern uint waveOutOpen(ref IntPtr hWaveOut, int uDeviceID, ref WAVEFORMATEX lpFormat, delegateWaveOutProc dwCallback, IntPtr dwInstance, uint dwFlags);

VB Signature:

'Support for WAVEFORMATEX

Declare Function waveOutOpen Lib "winmm.dll" Alias "waveOutOpen" (ByRef phwi As IntPtr, ByVal uDeviceID As IntPtr, ByRef pwfx As WAVEFORMATEX, ByVal dwCallback As IntPtr, ByVal dwCallbackInstance As IntPtr, ByVal fdwOpen As WAVE_FLAGS) As MMSYSERR
Declare Function waveInOpen Lib "winmm.dll" Alias "waveOutOpen" (ByRef phwi As IntPtr, ByVal uDeviceID As Integer, ByRef pwfx As WAVEFORMATEX, ByVal dwCallback As IntPtr, ByVal dwCallbackInstance As IntPtr, ByVal fdwOpen As WAVE_FLAGS) As MMSYSERR

'Support for WAVEFORMATEXTENSIBLE

Declare Function waveOutOpen Lib "winmm.dll" Alias "waveOutOpen" (ByRef phwi As IntPtr, ByVal uDeviceID As IntPtr, ByRef pwfx As WAVEFORMATEXTENSIBLE, ByVal dwCallback As IntPtr, ByVal dwCallbackInstance As IntPtr, ByVal fdwOpen As WAVE_FLAGS) As MMSYSERR
Declare Function waveInOpen Lib "winmm.dll" Alias "waveOutOpen" (ByRef phwi As IntPtr, ByVal uDeviceID As Integer, ByRef pwfx As WAVEFORMATEXTENSIBLE, ByVal dwCallback As IntPtr, ByVal dwCallbackInstance As IntPtr, ByVal fdwOpen As WAVE_FLAGS) As MMSYSERR

User-Defined Types:

Alternative Managed API:

See http://winmm.codeplex.com/

Do you know one? Please contribute it!

Notes:

See http://social.msdn.microsoft.com/Forums/en-US/windowspro-audiodevelopment/thread/14926e01-635e-4360-998b-ec6124d888a7 - correct C# signature at the bottom (including uDeviceId). This is based on http://msdn.microsoft.com/en-us/library/windows/desktop/dd743866%28v=vs.85%29.aspx which shows a UINT_PTR for that parameter. Note that the _PTR parameters are the only ones that are different sizes in 32 vs. 64 bit mode. In .Net you use IntPtr for that purpose.

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation
waveOutOpen on MSDN

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).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions