I am trying to call CAPL function from Python giving char array as argument in python by taking reference: Call CAPL function from Python
But it throws error
function1.Call(my_char_array) File "C:\Python27\lib\site-packages\win32com\gen_py\4CB02FC0-4F33-11D3-854D-00105A3E017Bx0x1x31.py", line 1668, in Call , p7, p8, p9, p10) File "C:\Python27\lib\site-packages\win32com\client__init__.py", line 467, in ApplyTypes self.oleobj.InvokeTypes(dispid, 0, wFlags, retType, argTypes, *args), pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147352571), 10)
I am not able to pass char in function from Python to CAPL function. Passing Integer works. Any help would be much appreciated.
Code Snippet:
Python:
var = 'ABCD'
my_char_array = array('c', var)
print my_char_array.tostring()
function1.Call(my_char_array)
CAPL:
void function1(char var1[])
{
write("function1() called with %s!", var1);
}