Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
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 Documentsand \Application Data\Soundsor \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 SNDFILEINFOstructures, and allocate the appropriate amount of memory.

pcSoundFiles

[out] A pointer to an integer which indicates the number of SNDFILEINFOstructures 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_EVENTenumeration. 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 SNDFILEINFOstructures as one contiguous block. User is responsible for freeing all memory returned by this function by calling LocalFreefunction 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

See Also

Concepts

Sounds Reference