Python + ASP + COM problems in Windows

Don Dwiggins dwig at advancedmp.net
Tue Jun 5 17:29:02 EDT 2001


I previously asked how to access a specific interface of a COM object, and
got the following useful hint:
    m = Dispatch('Mycomponent.Myobject')
    m2 = m._oleobj_.QueryInterface(InterfaceIID,pythoncom.IID_IDispatch)
    m2 = DynDispatch(m2)

This works beautifully when I run it directly from Python.  However, when I
try to use it in an ASP page, I get the following error:
      pywintypes.com_error (-2147352570, 'Unknown name.', None, None)
... which comes from the last statement (I've checked that m2 is correctly
instantiated in the second statement, and is of type <PyIDispatch at
0x4212c4 with obj at 0xf09ec>).  Any good words?

BTW, I've also found that "m = Server.CreateObject('Mycomponent.Myobject')"
doesn't work in my ASP page; I get the unhelpful message that "an exception
occurred".

Thanks,

-- 
Don Dwiggins                    "Solvitur Ambulando"
Advanced MP Technology
dwig at advancedmp.net





More information about the Python-list mailing list