Detection of sound via MM audio input

I'm currently working on a MS Windows 3.1/95 project which
involves detecting the presence, duration and possibly frequency of
a tone supplied via the line or microphone input of a sound card.

I'm convinced there is a solution in using multi-media APIs.
But how?

The problem is driving me to distraction!

If possible please reply to my email address directly.

Thanks for any help.

PETER HARRIS