Salve,

continuo nello studio della waveForm API di Win32 ed oras ono arrivato alla waveInOpen con il seguente codice:

codice:
#include <windows.h>
#pragma comment (lib, "winmm.lib")
#include <mmsystem.h>
#include <iostream>

BOOL CALLBACK myCallback();

int main()
{
	// Definisco la struttura WAVEFORMATEX
	WAVEFORMATEX waveFormat;
	waveFormat.wFormatTag      = WAVE_FORMAT_PCM;
	waveFormat.wBitsPerSample  = 16;
	waveFormat.nChannels       = 1;
	waveFormat.nSamplesPerSec  = 44100;
	waveFormat.nBlockAlign     = waveFormat.nChannels * waveFormat.wBitsPerSample / 8;
	waveFormat.nAvgBytesPerSec = waveFormat.nSamplesPerSec * waveFormat.nBlockAlign;
	waveFormat.cbSize          = 0;

	MMRESULT mmres;   // ...
	HWAVEIN phvi;     // Handle for the input device
	UINT uDevice = 1; // Device id

	// waveInOpen (http://msdn.microsoft.com/en-us/library/aa908147.aspx)
	mmres = waveInOpen(&phvi, // Address filled with a handle identifying the open waveform-audio input device.
					uDevice,  // Device identifier of the waveform-audio input device to open.
					(LPWAVEFORMATEX)&waveFormat, // Pointer to a WAVEFORMATEX structure
					(DWORD)myCallback, // Specifies the address of a fixed callback function, an event handle...
					0, // Specifies user-instance data passed to the callback mechanism.
					CALLBACK_EVENT // Flags for opening the device.
					);

	return 0;
}
Solo che non ho trovato come (con quali parametri) devo definire la callback che riceverà messaggi dal sistema...quali sono questi messaggi??

grazie