for some reason this works on xp but not on the schools 98 machines...any idea why?

Code:
#include <iostream.h>
#include <windows.h>

int GetKey();

int main()
{
	int test;
	while(1)
	{
		test = GetKey();
		if(test!=256)
			cout<<test<<endl;
	}
	
    return 0;
}

int GetKey()
{
	int num = 0;

	for(int i=0; i<256; i++)
	{
		num = GetAsyncKeyState(i);
		if(num!=0)
		{
			return i;
		}
	}
}
it says when the mouse is being clicked, but nothign works for the keyboard