it bombs out when it tries to turn on the Speaker using CallWindowProc. It uses a hex code to create a MachineCode array and then passes a pointer to the first byte of that array to the function. So perhaps the code to turn on the speaker is different in W2k & XP?