Desktop Functions: Smart Device Functions:
|
Search Results for "waveOutOpen" in [All]winmm1: waveOutOpen
public static extern uint waveOutOpen(ref IntPtr hWaveOut, IntPtr uDeviceID, ref WAVEFORMATEX lpFormat, delegateWaveOutProc dwCallback, IntPtr dwInstance, uint dwFlags);
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 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 coredll2: waveOutOpen private static extern MMSYSERR waveOutOpen(ref IntPtr phwo, uint uDeviceID, ref WAVEFORMATEX pwfx, uint dwCallback, uint dwInstance, uint fdwOpen ); private static extern Wave.MMSYSERR waveOutOpen(ref IntPtr phwo, uint uDeviceID, Wave.WAVEFORMATEX pwfx, IntPtr dwCallback, uint dwInstance, uint fdwOpen); I kept getting the System.NotSupportedException when I tried to follow the MSDN recommended approach of passing the struct to the waveOutOpen rather than the ref. (If you downloaded the Pinvoke sample library, it was called WaveOut.cs located here: C:\Program Files\.NET Compact Framework Samples\PInvoke Library\Code\CS). Going through their sample program, it looks like they read in the wav file, get the header information using a binary read, then pass the binary data to the waveOutOpen. They never use the WAVEFORMATEX struct to open the wavOutOpen.
namespace waveoutopen {
MMSYSERR result = waveOutOpen(ref m_hwi, WAVE_MAPPER,
private static extern MMSYSERR waveOutOpen( |