Timing API Calls

BlitzMax Forums/BlitzMax Programming/Timing API Calls

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hello there,

There are 3 API calls that I want to make use of within BlitzMax. I've got one of them working but for some reason the others fail at compile-time.

Public Declare Function timeBeginPeriod Lib "winmm.dll" (ByVal uPeriod As Long) As Long

Above you can see the declaration as it would appear in VB. I've convert this to read:

Extern "Os"
Function timeBeginPeriod:Long(uPeriod:Long)
End Extern

But for some reason when I then make call like this: timeBeginPeriod(1) it fails at compile time.

Other declarations referencing WinMM.dll seem to work just fine. I've also validated the function name is correct by using the Depends.exe utility.

Any clues anyone?

Cheers

Pete