You must pass VarPtr(hTimer(0)) instead hTimer(0)