Microsoft KB Archive/255584

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 21:46, 16 July 2020 by X010 (talk | contribs) (1 revision imported: importing part 2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

INFO: PlaySound May Succeed But Not Play a Sound from a Service

Q255584



The information in this article applies to:


  • Microsoft Win32 Application Programming Interface (API), included with:
    • Microsoft Windows NT Server version 4.0
    • Microsoft Windows NT Workstation version 4.0





SUMMARY

When you are using the PlaySound function from a service that is configured for the localsystem account, it may fail to play a sound although the same code works from an interactive user.



MORE INFORMATION

The PlaySound function refers to the following registry key to determine the sound card to play the sound file:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Multimedia\Sound Mapper

The Playback value specifies the sound card.

HKEY_CURRENT_USER is a mapping of the user's profile, which is loaded under HKEY_USERS. A service that is configured for the localsystem account does not have a profile, and therefore any references to HKEY_CURRENT_USER refer to HKEY_USERS\.default. The registry settings may be different from the interactive user's profile. The Playback value should match for both registry keys.

Additional query words:

Keywords : kbOSWinNT400 kbDSupport
Issue type : kbinfo
Technology : kbAudDeveloper kbWin32sSearch kbWin32API


Last Reviewed: October 27, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.