Quote Originally Posted by tubus View Post
if you use LONG instead of CURRENCY, then the first call of PerformCount changes the value of the previously with PerformFreq assigned timeFreq

How on earth could this be ???
Stack layout.

Local variables are allocated on the stack and Long variables are 4 bytes each while Currency variables are 8 bytes.

Passing the address of the first Long var to an API that outputs 8 bytes at this address effectively overwrites the second Long var.

cheers,
</wqw>