'Wraps up the specified object.
This function keeps a reference to the passed
object, and may interogate it to determine how to respond to COM requests, etc.'

def _wrap_(self, object):

    self._name_to_dispid_ = {}
    ob = self._obj_ = object
    if hasattr(ob, '_query_interface_'):
        self._query_interface_ = ob._query_interface_
    if hasattr(ob, '_invoke_'):
        self._invoke_ = ob._invoke_
    if hasattr(ob, '_invokeex_'):
        self._invokeex_ = ob._invokeex_
    if hasattr(ob, '_getidsofnames_'):
        self._getidsofnames_ = ob._getidsofnames_
    if hasattr(ob, '_getdispid_'):
        self._getdispid_ = ob._getdispid_
    if hasattr(ob, '_com_interfaces_'):
        self._com_interfaces_ = []
        for i in ob._com_interfaces_:
            if (type(i) != pywintypes.IIDType):
                if (i[0] != '{'):
                    i = pythoncom.InterfaceNames[i]
                else:
                    i = pythoncom.MakeIID(i)
            self._com_interfaces_.append(i)
    else:
        self._com_interfaces_ = []
