Python Windll - passing python lists to DLL function using Windll

SK skunix at hotmail.com
Thu Aug 1 00:13:35 CEST 2002


Hello,

I have a function named TestMap() with the following prototype:-

void TestOpenCluster(_InputParamMap MapStateBefore);

where,
    typedef std::map<char**,char**> _InputParamMap ;

How do I pass the python list to this function using Windll? I got an
AV with the following code?

import windll
arr =[    (windll.cstring('VAR1'),windll.cstring('VALUE1')), 
          (windll.cstring('VAR2') , windll.cstring('VALUE2'))
     ]
modl = windll.module('MyTestDll')
modl.TestMap(arr)
Exception exceptions.AttributeError: "cstring instance has no
attribute 'mb'" in  ignored
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\Python22\windll.py", line 44, in __call__
    args
TypeError: an integer is required


Thanks in Advance.
/SK



More information about the Python-list mailing list