SndGetSoundFileList
4/8/2010
This function returns an array of available sound files on the device for the specified sound event.
Syntax
HRESULT SndGetSoundFileList (
SND_EVENT seSoundEvent,
DWORD grfLocations,
SNDFILEINFO** ppSoundFiles,
int* pcSoundFiles
);
Parameters
- seSoundEvent
[in] Indicates the type of sound event to query for.
grfLocations
[in] Indicates locations in memory that are searched for sound files. The following table shows the bitmask values for this parameter, with a description of the purpose of each.Bitmask Description SND_LOCATION_STORAGECARD
Retrieve sound files or directories from the storage card.
SND_LOCATION_USERDATA
Retrieve sound files from user data folders such as
\My Documents
and\Application Data\Sounds
or\Storage Application Data
.SND_LOCATION_ROM
Retrieve sound files from ROM.
SND_LOCATION_ALL
Retrieves sound files from all locations - storage card, user data folders, and ROM.
- ppSoundFiles
[out] A pointer to an array of sound files. This function will create the array of SNDFILEINFO structures, and allocate the appropriate amount of memory.
- pcSoundFiles
[out] A pointer to an integer which indicates the number of SNDFILEINFO structures created and returned in ppSoundFiles.
Return Value
The function may return any HRESULT and the application should use the SUCCEEDED and FAILED macros to check the results.
Remarks
This function enables an application to query sound files available to the device for any of the sound events listed in the SND_EVENT enumeration. By specifying the appropriate bitfield, sound files can be retrieved from all valid sound file storage locations. The fully qualified file path and friendly file name are returned for each sound file. This function allocates memory for all SNDFILEINFO structures as one contiguous block. User is responsible for freeing all memory returned by this function by calling LocalFree function on the returned pointer.
Requirements
Header | soundfile.h |
Windows Embedded CE | Windows CE 5.0 and later |
Windows Mobile | Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later |