请教大家为什么在标准DLL中不能使用rnd函数
Function Rndaa() As SingleRndaa = Rnd()
End Function
Function Rndab(ByRef a As Single)
a = Rnd()
End Function
Function Rndac(ByRef a As Single)
a = 1.23246567
End Function
Function Rndad() As Single
Rndad = 1.23246567
End Function
这是标准DLL中的4个函数,前两个调用时均出错,后两个改成实际浮点数就没问题,不知为什么?
调用方法如下
Private Declare Function Rndaa Lib "test.dll" () As Single
Private Declare Function Rndab Lib "test.dll" (ByRef a As Single)
Private Declare Function Rndac Lib "test.dll" (ByRef b As Single)
Private Declare Function Rndad Lib "test.dll" () As Single
请教谁知道为什么标准DLL中不能使用rnd函数 是什么原因?