Reputation: 688
I am executing a VBScript function in C++ using Microsoft script control (IScriptControlPtr
interface).
VBScript Function:
Function Add1(a,b)
Add1 = a+b
End Function
I need to pass unsigned long values to the parameters a
and b
.
So I assigned parameters datatype as VT_UI4
. But When executing the function I am getting the error "Variable uses an Automation Type not supported in VBScript".
To my requirement , how to handle unsigned long values?
Upvotes: 1
Views: 5407
Reputation: 5920
VBScript only supports signed 2- and 4-byte Integers. So you have to change your arguments to VT_I4
, or use type conversion functions like UnsignedToLong
and LongToUnsigned
. See below for the additional information.
Upvotes: 4