NTSTATUS
SoundOpenDevicesKey(
IN PWSTR RegistryPathName,
OUT PHANDLE DevicesKey
);
The SoundOpenDevicesKey function opens the Devices subkey under the specified registry path. If the Devices subkey does not exist, it is created.
Returns STATUS_SUCCESS if the operation succeeds. Otherwise returns an NTSTATUS error code.
A driver that calls SoundSaveDeviceName to save a device name in the registry must remove the created \Devices key, along with all device name subkeys, prior to being unloaded. To remove the \Devices key, a driver should: