PyIUnknown = WrapObject(ob, gatewayIID , interfaceIID )

Wraps a Python instance in a gateway object.


ob : object

The object to wrap.

gatewayIID=IID_IDispatch : PyIID

The IID of the gateway object to create (ie, the interface of the server object wrapped by the return value)

interfaceIID=IID_IDispatch : PyIID

The IID of the interface object to create (ie, the interface of the returned object)

Return Value

Note that there are 2 objects created by this call - a gateway (server) object, suitable for use by other external COM clients/hosts, as well as the returned Python interface (client) object, which maps to the new gateway.
There are some unusual cases where the 2 IID parameters will not be identical. If you need to do this, you should know exactly what you are doing, and why!