|
发表于 2014-3-16 15:07:04
|
显示全部楼层
Hi,
your code is working for me. I didn't test with Integrated login but I need to assume that the hServer handle which is passed from a different routine already did the connect. You should check your hProcess handle against TM1ValTypeError() (see example). Thus you check hServer indirectly. Hope this helps.
Code: Sub RunProc(hPool As Long, hServer As Long, hUser As Long)
Dim hProcess As Long
Dim voProcess As Long
Dim lReturn As Long
Dim hParamArray As Long
Dim voParamArray(0) As Long
voProcess = TM1ValString(hPool, "Save_Data", 0)
hProcess = TM1ObjectListHandleByNameGet(hPool, hServer, TM1ServerProcesses, voProcess)
If TM1ValType(hUser, hProcess) = TM1ValTypeError() Then
Stop
End If
voParamArray(0) = TM1ObjectNull()
hParamArray = TM1ValArray(hPool, voParamArray, 0)
Call s_TestHandle(hParamArray, hUser)
lReturn = TM1ProcessExecute(hPool, hProcess, hParamArray)
Call s_TestHandle(lReturn, hUser)
End Sub |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|