Passing Arrays
Hi,
I want to pass an Array from the script to my TMyAServerImpl.cpp file.
I have made an OLE method with the Type Library in BCB 6, with a parameter type VARIANT *. Is this the right approach? How is FS passing arrays to OLE?
And how do I read the array data in TMyAServerImpl.cpp, se below.
---- Script Code
imglab = CreateOleObject("MyAutoSrv.MyLabAServer")
MyArray = [10,20,30]
imglab.MyMethod(MyArray)
TMyAServerImpl.cpp
STDMETHODIMP TMyLabAServerImpl::MyMethod(VARIANT* myConvArray)
{
// How do I read the array data??
}
Best Regards,
Christer
I want to pass an Array from the script to my TMyAServerImpl.cpp file.
I have made an OLE method with the Type Library in BCB 6, with a parameter type VARIANT *. Is this the right approach? How is FS passing arrays to OLE?
And how do I read the array data in TMyAServerImpl.cpp, se below.
---- Script Code
imglab = CreateOleObject("MyAutoSrv.MyLabAServer")
MyArray = [10,20,30]
imglab.MyMethod(MyArray)
TMyAServerImpl.cpp
STDMETHODIMP TMyLabAServerImpl::MyMethod(VARIANT* myConvArray)
{
// How do I read the array data??
}
Best Regards,
Christer