For anyone who's interested in writing software to access their sound card under Windows using the Micro$oft Waveform Audio API, I've written a guide, attached here. (This covers recording from either the line-in or microphone input.)
This uses the older, "deprecated" API (MS is now pushing WASAPI, the newer "object oriented" shiny thing). The older API is more primitive, but is actually easier to use and gets the job done.
The guide is written using X86 assembly language but can be applied to most any programming language. All the functions and structures used are well-known and available through any number of programming packages.
Enjoy!