SOUND_REGISTRY_CALLBACK_ROUTINE

typedef NTSTATUS SOUND_REGISTRY_CALLBACK_ROUTINE(PWSTR RegistryPathName, PVOID Context);
 

SOUND_REGISTRY_CALLBACK_ROUTINE is the type definition for the callback function that is called by SoundEnumSubkeys.

Parameters
RegistryPathName
Pointer to the full registry path to a subkey representing a hardware device. The path format is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DriverName\Parameters\DeviceNumber
Context
Pointer to driver-specified context information. This is the Context parameter to SoundEnumSubkeys, and is typically the address of a driver-defined structure for storing device-specific information.
Comments

The function should save the path name pointer in device-specific storage, and use it as input to soundlib.lib functions requiring a registry path to a hardware device.

Note:  Prior to being unloaded, the driver must deallocate the space allocated to the path name.