The DirectSoundCaptureBuffer.GetFormat method retrieves the format of the capture buffer.
object.GetFormat(waveformat As WAVEFORMATEX)
If the method fails, an error is raised and Err.Number may be set to DSERR_INVALIDPARAM.