vb.net 调用API问题求大神!!!

环境是VS2005,我要利用timesetevent编写一个计时程序做实验,毫秒级

Public Delegate Sub ipfunction(ByVal uID As Integer, ByVal uMsg As Integer, ByVal dwUser As Integer, ByVal dw1 As Integer, ByVal dw2 As Integer)
Public Const TIME_PERIODIC = 1

public Const TIME_ONESHOT = 0
Dim temp As New ipfunction(AddressOf aaa)
TimeID = timeSetEvent(1, 0, temp, 1, TIME_PERIODIC)

定义委托ipfunction后,实例化为temp后(aaa为回调函数),总是被提示“experiment.Module1.ipfunction”的值无法转换为“Integer“