query regarding NULL result without error in COM code

Ken Guest kwg at renre-europe.com
Thu Dec 13 13:39:56 CET 2001

I've run into a "NULL result without error in call_object" system error
after using the DefaultDebugDispatcher in the COM code that I'm writing.

(This error wasn't being raised before hand, when I didn't specify which
dispatcher was to be used. The reason why I'm now using the
DefaultDebugDispatcher is that there's an error happening later on in my
code that I have to get to the bottom of).

The error happens when I try to create a 'COMObjectServer' in some VB
Set svr = _

Now the python code that I have for this is as follows.
(The sample code in the docstring works fine if I don't use that
I've checked through chapter 12 of the "Programming Python on Win32"
and through Google and can't find anything that suggests a solution.

I'd really appreciate it if someone could please help shed some light
on this.


class COMObjectServer:
        Used for serving out objects via COM.
Tested and found to be working with the following code:

Private Sub Document_Open()
Dim svr As Object
Dim obj As Object
Set svr =
End Sub

set obj = svr.object("renre.gps_layerstats.Objects.LatestRunObject")
f = obj.num_tabs_required()
print f

        _reg_clsid_ = "{AB07AB91-01EE-4FDD-A2D2-3A46E3488AE5}"
        _reg_desc_ = "renre.gps_layerstats.Objects.COMObjectServer"
        _reg_progid_ = "renre.gps_layerstats.Objects.COMObjectServer"
        _reg_class_spec_= "renre.gps_layerstats.Objects.COMObjectServer"
        _public_methods_ = ["object"]
        def object(self, class_name):
                from win32com.server.util import wrap
                from win32com.server.dispatcher import
                obj = dynamic_load2(class_name) 
                comobj = wrap(obj, useDispatcher =
                return comobj

The duck quacks.

More information about the Python-list mailing list