VB编程中函数调用参数的问题 130
函数声明为DeclareFunctionhp816x_executeLambdaScanLib"hp816x_32.dll"(ByValIHandleAsLong,wav...
函数声明为
Declare Function hp816x_executeLambdaScan Lib "hp816x_32.dll" (ByVal IHandle As Long, wavelengthArray As Double, powerArray1 As Double) As Long
我在调用时
Dim inhandle As Integer
Dim wav() As Double
Dim pow() As Double
Private Sub Command1_Click()
ReDim wav(10)
ReDim pow(10)
Call hp816x_executeLambdaScan(inhandle, wav(10), pow(10))
End Sub
结果错误为
compile error
Argument not optional 请问有知道的这是怎么回事,错误是什么意思啊
那个inhandle应该定义为long型,确实
但是还是不对
急用阿,再线等答案 展开
Declare Function hp816x_executeLambdaScan Lib "hp816x_32.dll" (ByVal IHandle As Long, wavelengthArray As Double, powerArray1 As Double) As Long
我在调用时
Dim inhandle As Integer
Dim wav() As Double
Dim pow() As Double
Private Sub Command1_Click()
ReDim wav(10)
ReDim pow(10)
Call hp816x_executeLambdaScan(inhandle, wav(10), pow(10))
End Sub
结果错误为
compile error
Argument not optional 请问有知道的这是怎么回事,错误是什么意思啊
那个inhandle应该定义为long型,确实
但是还是不对
急用阿,再线等答案 展开
3个回答
展开全部
Argument not optional 应该是未对参数进行选择的意思,可能是你inhandle定义的类型不对,应该定义为LONG型。你试一下。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Declare Function hp816x_executeLambdaScan Lib "hp816x_32.dll" (ByVal IHandle As Long, wavelengthArray As Double, powerArray1 As Double) As Long
我在调用时
Dim inhandle As long
Dim wav() As Double
Dim pow() As Double
dim ss as long
Private Sub Command1_Click()
ReDim wav(10)
ReDim pow(10)
ss =hp816x_executeLambdaScan(inhandle, wav(10), pow(10))
End Sub
我在调用时
Dim inhandle As long
Dim wav() As Double
Dim pow() As Double
dim ss as long
Private Sub Command1_Click()
ReDim wav(10)
ReDim pow(10)
ss =hp816x_executeLambdaScan(inhandle, wav(10), pow(10))
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Call hp816x_executeLambdaScan(inhandle, wav, pow)是这样吧!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询