[python-win32] Re: Yet another python-com bridge (wincom.pyd)

Schneider schnijders at home.nl
Tue Apr 6 06:31:17 EDT 2004


Hi Lijun,

I started using your com interface today and had both success and problems.

First of all, the wincom module did not want to load since the MSVCR71.DLL
and MSVCP71.DLL were missing on my machine. After installing these, some
probelms I had with win32com (VARIANT* Value parameters) seem to be solved.
However, now I run into problems with the system complaining about missing
parameters.
In the win32com situation the code

    for k in range(sofon.project.Count):
        print k
        pos = sofon.project.Item(k)

worked fine. Now I get the error:

Traceback (most recent call last):
  File "L:\InvoiceSofon\invoiceSofonMainFrame.py", line 459, in
OnFilemenuitems2Menu
    printRec(odbc, sofon, self.invoiceOverviewListCtrl, Index)
  File "L:\InvoiceSofon\invoiceSofonFunctopns.py", line 162, in printRec
    pos = sofon.project.Item[k]
wincom.COMError: hr = 0x8002000f (Parameter niet optioneel. )

The error says 'Parameter not optional.'

Do you have any suggestions??

Frans

-----Oorspronkelijk bericht-----
Van: python-win32-bounces at python.org
[mailto:python-win32-bounces at python.org]Namens Lijun Qin
Verzonden: dinsdag 30 maart 2004 3:24
Aan: python-win32 at python.org
Onderwerp: [python-win32] Re: Yet another python-com bridge (wincom.pyd)


Sorry, the link is http://www.solidshare.com/python/wincom.zip


"Lijun Qin" <qinlj at solidshare.com> wrote in message
news:008f01c4146c$db3873f0$0200a8c0 at huhu...
> Hi all,
>
> Here is my own python-com bridge (named wincom), which support Python at
as
> both server and client side, support C++ access python use vtable
interface
> when the interface is a dual interface (similar to universal_gateway
featuer
> of win32all).
> One of the feature of wincom is that there is only a simple pyd file
> (wincom.pyd, and runtime boost_python23.dll) to deply, unlike win32-all
> package you'll need deploy a whole package.
> Another feature of wincom is that it's use is quite simple, a typelib is
in
> the center, and all objects in the typelib can be easily imported, like
> this:
>
> import wincom
> msxml = wincom.typelib('{F5078F18-C551-11D3-89B9-0000F81FE221}', 4, 0)
>
> after these lines, all objects in the msxml4.0 typelib can be easily
> accessed, like this:
>
> self.dom = msxml.DOMDocument40()        #create a CoClass use it's name
> if not self.dom.load(file_name):
>             raise RuntimeError, "load xml file failed"
>
> self.node = self.dom.documentElement        #COM object property mapped to
> python attribute
> self.id = self.node.getAttribute('id')             #COM object function
> mapped to python method
>
> self.my_objs = []
> for my_obj_node in self.node.selectNodes("//my_obj"):    #COM enumratable
> mapped to python iter object
>     self.my_objs.append(my_obj_class(self, my_obj_node))
>
> You can download the file from
http://www.solidshare.com/python/wincom.pyd,
> source file is not included, but if peoples like it, I'll consider setup a
> project in sourceforge or somewhere else.
>
> Lijun Qin




_______________________________________________
Python-win32 mailing list
Python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32




More information about the Python-win32 mailing list