### Class CDispatch

## SYNOPSIS

    import win32com.client.dynamic

    class CDispatch
      def _Release_(self)
      def __call__(self, *args)
      def __getattr__(self, attr)
      def __getitem__(self, index)
      def __init__(self, IDispatch, olerepr, userName =  "unknown")
      def __len__(self)
      def __nonzero__(self)
      def __repr__(self)
      def __setattr__(self, attr, value)
      def _find_dispatch_type_(self, methodName)
      def _get_good_object_(self,ob,userName = "<unknown>", ReturnCLSID=None)
      def _get_new_class_ctor_(self)
      def _make_method_(self, name)
      def _print_details_(self)
      def _proc_(self, name, *args)

## DESCRIPTION

### def _Release_(self)

Cleanup object - like a close - to force cleanup when you dont want to rely on Python's reference counting.

### def __call__(self, *args)

Provide `default dispatch` COM functionality - allow instance to be called

### ", ReturnCLSID=None)">def _get_good_object_(self,ob,userName = "", ReturnCLSID=None)

Given an object (usually the retval from a method), make it a good object to return. Basically checks if it is a COM object, and wraps it up. Also handles the fact that a retval may be a tuple of retvals

### def _get_new_class_ctor_(self)

Sort of factory for the class - derived classes should override

### def _make_method_(self, name)

Make a method object - Assumes in olerepr funcmap

### def _print_details_(self)

Debug routine - dumps what it knows about an object.

### def _proc_(self, name, *args)

Call the named method as a procedure, rather than function. Mainly used by Word.Basic, which whinges about such things.

## SEE ALSO

win32com.client.dynamic

Copyright © Greg Stein, Mark Hammond, Curt Hagenlocher and a few other contributors
All Rights Reserved
Comments to author:
Generated: Sun Apr 20 1997