Generally, MIDI is the way to go for games because it puts a minimal load on your CPU & data bus. Your soundcard/soundchip does all of the work.
Here's a great MIDI web site.
The site is hard to navigate, so here's the Windows programing info on the same site, where you will find this:
Of course for the ultimate resource, there's MSDN. (The ultimate hard-to-navigate web site too!! )
/* Open default MIDI Out device */
if (!midiOutOpen(&handle, (UINT)-1, 0, 0, CALLBACK_NULL) )
/* Output the C note (ie, sound the note) */
/* Output the E note */
/* Output the G note */
/* Here you should insert a delay so that you can hear the notes sounding */
/* Now let's turn off those 3 notes */
/* Close the MIDI device */