[python-win32] Read data from PyIUknown type variable
Stefano
sg.tino at gmail.com
Fri Mar 9 13:54:36 EST 2018
Hello everyone
I'm using win32com.client to read data from custom COM Object developed in
VB.Net.
With the following code I'm able to read a string result
---
>>> import win32com.client>>> cstApp = win32com.client.Dispatch("CustomLib.CSTApp")>>> string = cstApp.GiveMeTestString()>>> print(type(string))<class 'str'>>>> print("Test String: {0}".format(string))Test String: Well done! I come from COM Object
---
I've now a method that give as result a VB.Net Dictionary type, but when I
try to read it from my python script I get a PyIUknown type and I'm not
able to read its values
---
>>> username = 'artur'>>> resultset = cstApp.OpenTaskforUser(username)>>> print(type(resultset))<class 'PyIUnknown'>>>> print(resultset)<PyIUnknown at 0x0000003C47ABAC30 with obj at 0x0000003C47EAFF18>
---
How can I read it's data?
Otherwise, which type I need to use in VB.Net to be able to read a Python
list containing dictionaries from win32com?
Thank you for your help.
Stefano
PS: the same question was posted here
https://stackoverflow.com/q/49196724/1891624
Thank you for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20180309/887af8d7/attachment-0001.html>
More information about the python-win32
mailing list