The easiest way to check up on stuff like this is taking a look at the msdn reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_timebeginperiod.asp
As you can see you should use Int and not Long.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_timebeginperiod.asp
As you can see you should use Int and not Long.