Hi tom0769,
I didn't see your reply. :)
Did you check the return value you are getting? It should return Non-zero values on Successful completion.
As I wrote in my last reply that the function will return Non-zero value on successful completion. So you must check for errors only when the ret == 0 but NOT when it is non-zero. So change the following code to-
int ret = Beep(1000,500);
if (ret == 0)
{
In my PC, the function returns 1 after execution which means it's a successful execution. :)
AFAIK, GetLastError() does not take any argument as input, it only reports the last error which may not be, in this case, related to Beep() function. :)