The following code illustrates how to load an existing file into the waveaudio device.
USHORT usDeviceID;
MCI_LOAD_PARMS mlp;
mlp.hwndCallback = (HWND) NULL; /* Not required if waiting */
strcpy(mlp.pszElementName, "oinker.wav");
/* File name to load */
mciSendCommand( usDeviceID, /* Device ID */
MCI_LOAD, /* MCI load message */
MCI_WAIT | MCI_OPEN_ELEMENT, /* Flags for this message */
(PVOID) &mlp, /* Data structure */
0); /* No user parm */