 |
Windows Programming Unlike with some other operating systems, in Windows, a program should refrain from directly reading and writing hardware ports on a sound card. Whenever possible, a program should instead call functions in the Windows operating system, which will do the actual hardware reading and writing for you (in conjunction with the sound card's Windows device driver). For writing data to the card, you pass that data to an operating system function that sends that data to the card's device driver, which in turn writes that data to the card. For reading data from the card, you call an operating system function that causes the driver to read some data from the card, perhaps placing that data into a buffer whose address you've specified. Typically, such versions allow drivers to operate in special "modes" that allow hardware access, but restrict programs from the same access. |