Sandy Walsh schrieb: > False alarm. It was a UBD (User Brain Damage) problem on my C++ side. > > Move along. Nothing to see here.
Great that you fixed it yourself. For the record: the different behaviour between comtypes and win32com is most certainly explained by the fact that comtypes uses the custom interface by default, and win32com uses the dispatch interface. Thomas > -S > > > Sandy Walsh wrote: >> I have a piece of code that looks like this: >> >> control = CreateObject("ImpathVideo2.ImpathVideo2Ctrl") >> >> error = control.Connect(self.ip, self.port, self.host_ip) >> error = control.Disconnect() >> >> error = self.control.Connect("10.0.0.0", 9999, "") >> assertEqual(-2134704126, error) # We expect EC_CONNECT_FAIL >> >> The first call to Connect/Disconnect works fine (as expected), but the >> second call is expected to fail. >> >> The IDL looks like: >> >> HRESULT Connect([in] BSTR streamIPAddress, [in] short >> streamUdpPort, [in] BSTR hostIPAddress, [out, retval] long* error); >> >> The HRESULT is always S_OK and on failure, the error "out retval" >> parameter is set. >> >> This works fine under win32com, but with comtypes the second Connect >> gives a WindowsError >> >> WindowsError: exception code 0xe06d7363 >> >> And no other details are given: >> >> Args: ('exception code 0xe06d7363',) >> Message: exception code 0xe06d7363 >> StrError: None >> Filename: None >> WinError: None >> >> >> Any idea why comtypes would be unhappy with returning this error but >> win32com does the right thing? >> >> Thanks, >> Sandy >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> comtypes-users mailing list >> comtypes-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/comtypes-users >> > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > comtypes-users mailing list > comtypes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/comtypes-users -- Thanks, Thomas ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users