In CaptureSharedEventDriven(Windows SDK). Wav file written in function WriteWaveFile(HANDLE FileHandle, const BYTE *Buffer, const size_t BufferSize)
CaptureSharedEventDriven
WriteWaveFile(HANDLE FileHandle, const BYTE *Buffer, const size_t BufferSize)