
Short answer: No, you cannot do that.
Complete answer:
Yes, maybe you can do that, but you will have to learn Windows
programming (in C, C++, C#, or Visual-Basic) first.
Software can do sounds because it calls Win2K's API funtion "PlaySound"
in the following dll:
C:\WINNT\system32\winmm.dll
You can find the settings in the registry which list which sounds
can be played when certain programs send certain events:
HKEY_Current_User\AppEvents\Schemes\Apps
You can put entries in there to play certain sounds when certain named
events are sent from certain programs. For example, you could say:
- play "dingdong.wav" when program aardvark.exe sends event "Doorbell"
- play "screeech.wav" when program barn_owl.exe sends event "Hoot"
This is organized by user, app, event, and sound scheme, in that order,
so the tree really looks more like:
user1
Schemes
Apps
App1
App1Event1
Scheme1
ding.wav
Scheme2
swish.wav
App1Event2
Scheme1
smash.wav
Scheme2
crunch.wav
user2
Schemes
Apps
App1
App1Event1
Scheme1
snivel.wav
Scheme2
simper.wav
App1Event2
Scheme1
whirr.wav
Scheme2
whine.wav
But to send the events, you would need access to the source code and compiler
used to make the program, and you would have to speak the language the program
is written in (C, C++, Visual-Basic, or whatever), and be familiar with the
Win32 API for sending sound events to the OS.
To modify Win2K so that it plays certain sounds for certain hardware events,
you would have to have the Windows 2000 source code. Bill could give you that...
but then he'd have to kill you. ;-)
So in short, no, I do not think you can modify Win2K to play certain
sounds when certain events happen, except to the extent that Win2K is
already set-up to play sounds for those events.
But you might be able to write a program that monitors hardware events
such as devices being unplugged, and sends "play sound" messages to
Win2k (via the PlaySound API function) when these hardware events occur.
Unless you are a windows programmer, this is not going to be easy, though:
1. Get Visual Studio.
2. Get Kernigan's "The C Programming Language" and learn C.
3. Get Petzold's "Programming Windows" and learn Win32 programming.
4. Write a program that monitors hardware events and tells windows
to play certain sounds when certain events occur.
Or, you could do it in Visual Basic. Here is an related article:
http://www.vb6.us/tutorials/playsound-api
As to exactly how to monitor for devices being unplugged, I do not know.
You could try asking in the win32 programming Usenet groups, such as
microsoft.public.win32.programmer
--
Cheers,
Robbie Hatley
lonewolf at well dot com
www dot well dot com slant tilde lonewolf slant