import win32com.server.policy
class DynamicPolicy(BasicWrapPolicy) def _getidsofnames_(self, names, lcid) def _invoke_(self, dispid, lcid, wFlags, args) def _wrap_(self, object) # Methods inherited by DynamicPolicy from BasicWrapPolicy def _CreateInstance_(self, clsid, reqIID) def _GetIDsOfNames_(self, names, lcid) def _Invoke_(self, dispid, lcid, wFlags, args) def _QueryInterface_(self, iid) def __init__(self, object) def _query_interface_(self, iid)
A dynamic policy is used to dynamically dispatch methods and properties to the wrapped object. The list of objects and properties does not need to be known in advance, and methods or properties added to the wrapped object after construction are also handled.
The wrapped object must provide the folliwng attributes:
Creates a new instance of a wrapped object
This method looks up a "win32com.server.policy.regSpec" % clsid entry in the registry (using DefaultPolicy)
The main COM entry-point for GetIDsOfNames.
This checks the validity of the arguments, and calls the _getidsofnames_ helper.
The main COM entry-point for Invoke.
This calls the _invoke_ helper.
The main COM entry-point for QueryInterface.
This checks the _com_interfaces_ attribute and if the interface is not specified there, it calls the derived helper _query_interface_
Initialise the policy object
Params:
Called if the object does not provide the requested interface in _com_interfaces, and does not provide a _query_interface_ handler.
Returns a result to the COM framework indicating the interface is not supported.
Copyright © Greg Stein and Mark Hammond
All Rights Reserved
Comments to author: dev@null
Generated: Sun Apr 20 1997