tags:

views:

213

answers:

2

Hello friends, I need an urgent help on importing dll. In my Python script i m importing a dll written in vb .net. I m callng a function of initialisation in my script.It takes 2 arguments.One path of xml file and 2nd a string.It returns an integer ,0 for success ,else error.The second argument is passed by reference.So if success,it will get updated by success message.Otherwise, get updated with error message.

When my script receives the integer,i must just print the message in the second variable I m not able to do that.Please give me a help asp...

+1  A: 

Python does not support the concept of passing a string "by reference" in the same way that VB.NET does. So it might not be possible to do this without some more work.

However, without seeing your code it's definitely not possible to tell you what's wrong.

Greg Hewgill
+3  A: 

Python strings are immutable. There is no way the string can be changed inside the function.

So what you really want is to pass a char buffer of some sort. You can create those in python using the ctypes module.

Please edit the question and paste a minimal snippet of the code so we can test and give more information.

nosklo