2012/6/16 Tim Golden <m...@timgolden.me.uk>: > On 15/06/2012 22:55, Radek Holý wrote: >> >> 2012/6/15 Roger Upole<rup...@hotmail.com>: >>> >>> Looks like the parameters to SetIntegerElement are reversed: >>> >>>>>> objWBM.Methods_('SetIntegerElement').InParameters.Properties_[0].Name >>> >>> 'Integer' >>>>>> >>>>>> objWBM.Methods_('SetIntegerElement').InParameters.Properties_[1].Name >>> >>> 'Type' >>> >>> If I switch the call to >>> success, = call(objWBM, "SetIntegerElement", 5, 0x25000004) >>> the expected value is printed. >>> >>> Roger >> >> >> Wow, what a surprise. I did not expect that. I feel stupid that I did >> not come out. :-[ I’m solving it for three days in a row... In the >> Microsoft’s documentation (and in Visual Basic) it is reversed. >> >> Thank you very much for your help! > > > > In fact, since you're already using the wmi module, you can see the correct > order of parameters via the method's repr: > > <code> > import wmi > > print wmi.WMI (namespace="wmi").BCDObject.SetIntegerElement > # <function SetIntegerElement (Integer, Type) => (ReturnValue)> > > </code> > > TJG > > _______________________________________________ > python-win32 mailing list > python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32
Yes, I know, but I did not realize to doubt about Microsoft's documentation and its validity in Python implementation. In the future I will be more vigilant. Thank you very much, -- Radek Holý Czech republic _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32