Windows Mobile 6.5

This function returns an array of available sound files on the device for the specified sound event.

HRESULT SndGetSoundFileList (
   SND_EVENT seSoundEvent,
   DWORD grfLocations, 
   SNDFILEINFO** ppSoundFiles,
   int* pcSoundFiles


[in] Indicates the type of sound event to query for.


[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


Retrieve sound files or directories from the storage card.


Retrieve sound files from user data folders such as \My Documents and \Application Data\Sounds or \Storage Application Data.


Retrieve sound files from ROM.


Retrieves sound files from all locations - storage card, user data folders, and ROM.


[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.


[out] A pointer to an integer which indicates the number of SNDFILEINFO structures created and returned in ppSoundFiles.

The function may return any HRESULT and the application should use the SUCCEEDED and FAILED macros to check the results.

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.

Windows Embedded CEWindows CE 5.0 and later
Windows MobilePocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later

Community Additions